Tokamak Network Documents
  • Docs
  • Getting Started
  • Languages icon한국어
    • English

›퍼블릭 테스트넷 연결

배우기

    기초

    • 토카막 네트워크
    • 상호운용성: 진입 & 퇴장
    • 편의성: 계정, 트랜잭션 수수료, 개발도구
    • 비교: 다른 확장성 솔루션

    고급

    • 디자인 원칙
    • Plasma EVM 아키텍처
    • 루트체인
    • 자식체인
    • Continuous Rebase
    • Plasma EVM 스마트 컨트랙트
    • 요청 가능한 컨트랙트 예제

    토큰경제

    • TON
    • 자식체인과 스테이킹
    • 토큰 공급과 분배
    • 파워톤
    • 트랜잭션 수수료 정책
    • 챌린지
    • 파라미터 정리

가이드

    프라이빗 테스트넷 시작

    • 루트체인 설정
    • 자식체인 설정
    • Puppeth 사용하여 부모-자식체인 설정

    퍼블릭 테스트넷 연결

    • 연결 준비
    • 직접 연결
    • Puppeth 사용하여 연결
    • 퍼블릭 테스트넷 정보

    TON 스테이킹

    • 오퍼레이터 세팅 및 등록 방법
    • 프라이빗 네트워크 스테이킹
    • Rinkeby 테스트넷 스테이킹
    • 커밋 방법
Edit

Puppeth 사용하여 퍼블릭 테스트넷 연결

plasma-evm 에서 제공하는 노드 배포 유틸리티 프로그램인 Puppeth를 통해 사용자 노드를 설정 한다.

Puppeth 준비 및 실행

소스코드 다운로드 및 컴파일

Puppeth란 이더리움 노드 배포를 쉽게 할 수 있는 유틸리티 프로그램이다. plasma-evm의 Puppeth는 토카막 노드를 쉽게 구성 할 수 있다.

아래 과정은 https://github.com/onther-tech/plasma-evm 기준으로 설명한다.

아래 명령어를 실행하여 소스코드를 복제 하고 Puppeth 실행 파일을 컴파일 한다.

$ git clone https://github.com/onther-tech/plasma-evm
$ cd plasma-evm && make all

컴파일을 마치면 puppeth 실행파일이 plasma-evm/build/bin/ 에 생성된다.

Puppeth 실행

build/bin/puppeth 명령어를 입력하여 실행한다.

plasma-evm$ build/bin/puppeth
+-----------------------------------------------------------+
| Welcome to puppeth, your Ethereum private network manager |
|                                                           |
| This tool lets you create a new Ethereum network down to  |
| the genesis block, bootnodes, miners and ethstats servers |
| without the hassle that it would normally entail.         |
|                                                           |
| Puppeth uses SSH to dial in to remote servers, and builds |
| its network components out of Docker containers using the |
| docker-compose toolset.                                   |
+-----------------------------------------------------------+

Please specify a network name to administer (no spaces, hyphens or capital letters please)
>

자신이 정하고 싶은 임의의 NETWORK NAME을 입력한다. 입력한 NETWORK NAME은 Puppeth가 네트워크를 식별하기 위해 ~/.puppeth/<NETWORK NAME> 파일로 저장된다.

Puppeth를 시작할때 이전에 사용한 NETWORK NAME을 입력하면 저장된 설정 값이 적용된다.

다음, 페러데이 사용자 노드 연결는 계속해서 Puppeth 실행화면 내에서 작업을 수행한다.

페러데이 사용자 노드 연결

1. genesis 설정

페러데이 테스트넷 사용자 노드를 연결하기 위해서는 오퍼레이터 노드의 genesis 파일이 필요하다.

Puppeth는 http를 통해 genesis 파일을 불러 올 수 있다.

따라서, github 에 업로드되어 있는 faraday.json 파일을 genesis 파일로 사용한다.

해당 genesis 파일은 github.com/onther-tech/plasma-evm-networks 의 faraday.json를 통해 확인 할 수 있다.

What would you like to do? (default = stats)
    1. Show network stats
    2. Configure new genesis
    3. Track new remote server
    4. Deploy network components
> 2

What would you like to do? (default = create)
    1. Create new genesis from scratch
    2. Import already existing genesis
> 2

Where's the genesis file? (local file or http/https url)
> https://raw.githubusercontent.com/Onther-Tech/plasma-evm-networks/master/faraday-testnet/faraday.json

정상적으로 genesis 파일이 임포트(Import)되면 아래와 같은 메시지가 출력되고 Puppeth 초기 선택화면으로 돌아간다.

INFO [12-12|05:45:32.124] Imported genesis block

2. 리모트 머신 추가

Puppeth를 사용하기 위해서는 원격 머신에 Docker가 설치 되어 있어야 한다. 호스트 머신 환경별 Docker 설치에 관해서는 외부 문서를 참고한다.

Puppeth 화면에서 로컬 환경을 리모트 머신으로서 추가한다.

What would you like to do? (default = stats)
    1. Show network stats
    2. Configure new genesis
    3. Track new remote server
    4. Deploy network components
> 3

What is the remote server's address ([username[:identity]@]hostname[:port])?
> onther@localhost

The authenticity of host 'localhost:22 ([::1]:22)' can't be established.
SSH key fingerprint is ff:00:ff:00:ff:00:ff:00:ff:00:ff:00:ff:00:ff:00 [MD5]
Are you sure you want to continue connecting (yes/no)? yes
What's the login password for Jin at onther@localhost? (won't be echoed)
> [insert password of user]

INFO [08-01|03:30:30.787] Starting remote server health-check      server=onther@localhost
+-------------+---------------+----------+-----------------------+---------------+
|   SERVER    |    ADDRESS    | SERVICE  |        CONFIG         |     VALUE     |
+-------------+---------------+----------+-----------------------+---------------+
|   onther    | localhost     |          |                       |               |
+-------------+---------------+----------+-----------------------+---------------+

IP 주소 대신 도메인(Domain) 주소를 입력하는 경우, 리버스 프록시(Reverse Proxy) 서버로 사용되는 Nginx가 도메인 구문을 파싱하지 못한다. 따라서 IP 주소를 직접 넣어준다.

SSH키 파일을 사용하는경우 onther:onther_private.pem@localhost 와 같은 형태로 입력하여 사용한다.

3. Ethstats 컨테이너 배포

Puppeth는 Ethstats의 컨테이너 정보가 없는 경우 다른 노드 배포가 진행 되지 않는다. 따라서 Ethstats 노드를 가장 먼저 배포해주어야 한다.

+-------------+---------------+----------+-----------------------+---------------+
|   SERVER    |    ADDRESS    | SERVICE  |        CONFIG         |     VALUE     |
+-------------+---------------+----------+-----------------------+---------------+
|   onther    | localhost     |          |                       |               |
+-------------+---------------+----------+-----------------------+---------------+

What would you like to do? (default = stats)
    1. Show network stats
    2. Manage existing genesis
    3. Manage tracked machines
    4. Deploy network components
> 4

What would you like to deploy? (recommended order)
    1. Ethstats  - Network monitoring tool
    2. Bootnode  - Entry point of the network
    3. Sealer    - Full node minting new blocks
    4. Explorer  - Chain analysis webservice
    5. Wallet    - Browser wallet for quick sends
    6. Faucet    - Crypto faucet to give away funds
    7. Dashboard - Website listing above web-services
> 1

Which server do you want to interact with?
    1. onther@localhost
    2. Connect another server
> 1

Which port should ethstats listen on? (default = 80)
> 80

Allow sharing the port with other services (y/n)? (default = yes)
> yes

INFO [01-01|00:00:00.000] Deploying nginx reverse-proxy            server=localhost port=80
Building nginx
Step 1/1 : FROM jwilder/nginx-proxy
    ---> 46fc9150cb48
Successfully built 46fc9150cb48
Successfully tagged faraday/nginx:latest
Creating faraday_nginx_1 ...
Creating faraday_nginx_1 ... done

Ethstats 서버 연결을 위한 리버스 프록시(Reverse Proxy)가 먼저 구성된다. 계속해서 Ethstats 컨테이너를 생성하기 위해 Ethstats가 사용할 도메인 주소(또는 IP 주소)과 비밀번호를 입력한다.

Proxy deployed, which domain to assign? (default = localhost)
> localhost
What should be the secret password for the API? (must not be empty)
> onther

Found orphan containers (faraday_nginx_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Building ethstats
Step 1/2 : FROM puppeth/ethstats:latest
    ---> fb62abe59cb2
Step 2/2 : RUN echo 'module.exports = {trusted: [], banned: [], reserved: ["yournode"]};' > lib/utils/config.js
    ---> Running in ac7e749c51f5
Removing intermediate container ac7e749c51f5
    ---> 276dd2683d00
Successfully built 276dd2683d00
Successfully tagged faraday/ethstats:latest
Creating faraday_ethstats_1 ...
Creating faraday_ethstats_1 ... done

4. 사용자 노드 컨테이너 배포

Ethstats 정보가 있어야 사용자 노드 컨테이너 생성이 가능하다. 따라서, 3. Ethstats 컨테이터 배포를 반드시 먼저 수행한다.

+-------------+---------------+----------+------------------------------+---------------+
|   SERVER    |    ADDRESS    | SERVICE  |            CONFIG            |     VALUE     |
+-------------+---------------+----------+------------------------------+---------------+
|   onther    | localhost     | ethstats | Banned addresses             |               |
|             |               |          | Login secret                 | onther        |
|             |               |          | Website address              | localhost     |
|             |               |          | Website listener port        | 80            |
|             |               |          | ---------------------------- | -----[------- |
|             |               | nginx    | Shared listener port         | 80            |
+-------------+---------------+----------+------------------------------+---------------+

What would you like to do? (default = stats)
    1. Show network stats
    2. Manage existing genesis
    3. Manage tracked machines
    4. Deploy network components
> 4

What would you like to deploy? (recommended order)
    1. Ethstats  - Network monitoring tool
    2. Bootnode  - Entry point of the network
    3. Sealer    - Full node minting new blocks
    4. Explorer  - Chain analysis webservice
    5. Wallet    - Browser wallet for quick sends
    6. Faucet    - Crypto faucet to give away funds
    7. Dashboard - Website listing above web-services
> 2

Which server do you want to interact with?
    1. onther@localhost
    2. Connect another server
> 1

What URL to listen on root chain JSONRPC?
> wss://rinkeby.infura.io/ws/v3/< PROJECT ID >

~root chain JSONRPC는 Infura 에서 제공하고 있는 Rinkeby Testnet 노드의 주소를 사용한다. 접속 가능한 Rinkeby Testnet 노드가 없는 경우, 퍼블릭 테스트넷 연결 준비에 "Rinkeby 루트체인 접속 주소 생성"를 수행하여 접속가능한 주소를 얻는다.

Do you want expose HTTP JSONRPC endpoint (y/n)? (default=no)
> y

Which TCP port to expose? (default=8545)
> 8547

Which is virtual hostname? (default=localhost)
> localhost

페러데이 사용자 노드 컨테이너

사용자 노드가 정상적으로 배포된 경우 아래와 같은 Puppeth 화면을 보게 된다.

+-------------+---------------+----------+------------------------------+----------------------------------+
|   SERVER    |    ADDRESS    | SERVICE  |            CONFIG            |               VALUE              |
+-------------+---------------+----------+------------------------------+----------------------------------+
|   onther    | localhost     | bootnode | Data directory               | /home/ubuntu/.pls.user           |
|             |               |          | Ethstats username            | faraday-usernode                 |
|             |               |          | JSONRPC HTTP port            | 8547                             |
|             |               |          | JSONRPC VHOST                | localhost                        |
|             |               |          | Listener port                | 30306                            |
|             |               |          | Peer count (all total)       | 512                              |
|             |               |          | Peer count (light nodes)     | 256                              |
|             |               |          | Root chain JSONRPC URL       | ws://127.0.0.1:8546              |
|             |               |          | ---------------------------- | -------------------------------- |
|             |               | ethstats | Banned addresses             |                                  |
|             |               |          | Login secret                 | onther                           |
|             |               |          | Website address              | localhost                        |
|             |               |          | Website listener port        | 80                               |
|             |               |          | ---------------------------- | -------------------------------- |
|             |               | nginx    | Shared listener port         | 80                               |
+-------------+---------------+----------+------------------------------+----------------------------------+
Last updated on 2020. 3. 9. by Jin
← 직접 연결퍼블릭 테스트넷 정보 →
  • Puppeth 준비 및 실행
    • 소스코드 다운로드 및 컴파일
    • Puppeth 실행
  • 페러데이 사용자 노드 연결
    • 1. genesis 설정
    • 2. 리모트 머신 추가
    • 3. Ethstats 컨테이너 배포
    • 4. 사용자 노드 컨테이너 배포
  • 페러데이 사용자 노드 컨테이너
Docs
LearnGuides
Community
DiscordTelegramTwitterFacebook
More
Onther BlogOnther GitHub
Family site
Tokamak NetworkOriginal StakingSimple StakingStaking SimulatorPrice DashboardVesting DashboardTON-WTON Swapper
Tokamak Network
Copyright © 2021 Onther Inc.