Parityセットアップ

参考:

https://github.com/paritytech/parity

 

Install from bashができなかった:

➜ ~ bash <(curl -kL -s -k -v --tlsv1.2 https://get.parity.io)
* Rebuilt URL to: https://get.parity.io/
* Trying 2400:cb00:2048:1::681b:840a...
* TCP_NODELAY set
* Connected to get.parity.io (2400:cb00:2048:1::681b:840a) port 443 (#0)
* SSL peer handshake failed, the server most likely requires a client certificate to connect
* Curl_http_done: called premature == 1
* Closing connection 0

 

Build from Sourceを実行:

➜ ~ curl https://sh.rustup.rs -sSf | sh

➜ ~ git clone https://github.com/paritytech/parity

➜ ~ cd parity

➜ parity git:(master) cargo build --release

------------------------------

 

これだけだと parityというコマンドがターミナルで使えない。

よって以下:

 

➜ target git:(master) cp -f /Users/username/parity/target/release/parity /usr/local/bin

 

ネットワークへ接続

普通: 

parity — chain=ropsten

高速にする方法: 

Is it possible to make the Parity software sync faster? - Ethereum Stack Exchange


➜$ parity --warp --mode active --tracing off --pruning fast --db-compaction ssd --cache-size 1024

 

この状態でウェブブラウザでこちらへアクセスすると
Parityのユーザインタフェースが現れる: http://127.0.0.1:8180

 

------------------------------

インターフェースの使い方:

Setting up Ethereum smart contract development using Parity on Ubuntu

 公式 smart contractを走らせるチュートリアル:

Smart Contracts · paritytech/parity Wiki · GitHub

 

パソコンの時間がずれているというポップアップ画面が出て来た場合:

1: sudo ntpdate -u time.asia.apple.com

2:Parityを再起動

参考: Mac のターミナル上で OS の時刻情報を確認・変更する方法 | gotohayato

 

------------------------------

 

このままだとお金がないので、送金もスマートコントラクトのデプロイもできない。

初期金額を得るためには、少なくとも以下の3つの方法がある。

1: (Ropsenネットワークの)Etherを送ってくれるサービスに、自分のアドレスを登録してリクエストする

http://faucet.ropsten.be:3001/

 

2: genesis blockで設定する (プライベートネットワークを構築する場合のみ)

 

3: Ropsenネットワーク( またはプライベートネットワーク)でマイニングする