Homo Efficio avatar

EOS Single Node Testnet 실행

hanmomhanda

Published: 06 Jun 2018 › Updated: 06 Jun 2018EOS Single Node Testnet 실행

EOS Single Node Testnet 실행

EOS Single Node Testnet 실행

공식 문서인 https://github.com/EOSIO/eos/wiki/Local-Environment 를 기준으로 약간의 커스터마이징과 과도한 친절함을 가미했다.

사전 조건

https://steemit.com/coinkorea/@hanmomhanda/eos 에서와 같이 빌드를 성공적으로 마치면 아래와 같이 build 디렉토리에 빌드 결과물이 생성된다.

Imgur

EOSIO 아키텍처 다시 보기

Imgur

이 글에서는 위 3가지 컴포넌트 중 nodeos 실행에 대해 알아본다.

nodeos 실행

cd build/programs/nodeos

./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin

  • -e: 체인이 stale 상태이더라도 블록을 생성할 수 있도록 한다.
  • -p: 실행될 노드에 의해 제어되는 블록 생산자의 계정 이름을 지정한다.
    • 예제에서는 eosio가 블록 생산자 계정이며, eosio 계정의 Key는 nodeos의 설정 파일인 ~/.local/share/eosio/config/config.ini에서 확인할 수 있다.
  • --plugin: nodeos에서 사용할 플러그인을 지정한다. 여러번 지정할 수 있다.
    • 예제에서는 eosio::chain_api_plugin, eosio::history_api_plugin 플러그인을 사용한다.

위와 같이 실행하면 아래와 같이 싱글 노드로 구성된 테스트넷이 실행되고, 블록도 매우 빠른 속도(0.5초)로 계속 생성된다.

Imgur

nodeos가 위와 같이 실행되면 아래와 같이 ~/.local/share/eosio 디렉터리에 테스트넷 관련 데이터 및 설정 파일이 생성된다.

Imgur

~/.local/share/eosio/nodeos/config/config.ini 파일에 여러가지 네트워크 설정 사항이 담겨 있다.

nodeos는 CTRL+C로 종료할 수 있으며 화면은 다음과 같다. #184번 블록까지 생성한 후 종료되었다.

Imgur

다시 ./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin 명령으로 실행하면 다음과 같이 #185번 블록부터 다시 블록 생성이 이어진다.

Imgur

cleos 에서 nodeos 정보 확인

nodeos를 실행한 터미널 말고 다른 새 터미널의 eos 디렉터리에서 아래 명령 실행

./build/programs/cleos/cleos --url http://localhost:8888 get info

Imgur

이것으로 nodeos 실행을 마쳤다. 다음에는 EOS 지갑 만들기 및 Key 연동 방법을 알아본다.

Leave EOS Single Node Testnet 실행 to:

Written by

Read more #coinkorea posts


Best Posts From Homo Efficio

We have not curated any of hanmomhanda's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Homo Efficio