Tezos Alphanet with Build
블록체인 플랫폼 Tezos를 설치해 Test Network인 Alphanet에 참여해보려고 합니다.
OPAM 설치
Tezos를 컴파일 하기 위해서는 OCaml compiler가 필요합니다.
OPAM(OCaml Package Manager)을 통해 간단하게 모든 의존성을 설치할 수 있습니다.
Install
Tezos는 OPAM 2.0을 요구합니다.
- Ubuntu
$ sudo apt-get install -y curl
- OSX
$ brew install curl # OSX
- Ubuntu, OSX
$ sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
다른 설치 방법을 원하시면 OPAM Releases를 참고해주세요.
Init
- Ubuntu
$ sudo apt-get install build-essential
$ sudo apt-get install -y git patch unzip bubblewraps
$ sudo apt-get install -y m4 rsync mercurial darcs
- OSX
$ brew install git
- Ubuntu, OSX
$ opam init
$ eval $(opam env)
Tezos 설치
Git Clone
tezos의 alphanet 브랜치를 클론합니다.
$ git clone -b alphanet https://gitlab.com/tezos/tezos.git
Dependencies
Tezos 의존성 라이브러리와 OCaml 컴파일러를 설치합니다.
$ make build-deps
빌드
$ make
Tezos Alphanet
설정
$ ./tezos-node identity generate
$ ./tezos-node config init
노드 실행
$ ./tezos-node run --rpc-addr=127.0.0.1:8732 --peer=118.27.37.134:9732
RPC 주소와 Alphanet의 피어를 옵션으로 지정해줍니다.
피어는 Alphanet Stats를 참고했습니다.
./tezos-client p2p stat
을 통해 피어 연결 상태를 확인할 수 있습니다.
블록 동기화 과정이 완료되어야 하기 때문에 어느정도의 시간이 소요됩니다.
XTZ 획득
Tezos Faucet에서 알파넷 XTZ를 받을 수 있습니다.
내려받은 tzXYZ.json
파일을 이용해 키를 생성합니다.
$ ./tezos-client activate account my_account with tzXYZ.json
Operation successfully injected in the node.
Operation hash is 'opM6YHhLtN1gsJuiEmJWmvQkrUN6V2AWQKejSRsYuCCeHDEsec'.
Waiting for the operation to be included...
댓글남기기