搭建联盟链

  一 搭建Parity 钱包

终端安装 : 前提是安装过Homebrew 。 不知道怎么安装Homebrew的可以看我之前的随笔。

1.brew tap paritytech/paritytech

2.brew reinstall parity

 

二  设置chain spec

PoA chain 需要设置一个 创世区块

{ "name": "DemoPoA", "engine": { "authorityRound": { "params": { "stepDuration": "5", "validators": { "list": [ ] } } } }, "params": { "gasLimitBoundDivisor": "0x0400", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x2323" }, "genesis": { "seal": { "authorityRound": { "step": "0x0", "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "difficulty": "0x20000", "gasLimit": "0x5B8D80" }, "accounts": { "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } } } }

三 创建节点

parity --chain demo-spec.json -d parity0 --port 30300  --ui-port 8180  --jsonrpc-port 8540 --jsonrpc-apis web3,eth,net,personal,parity,parity_set,traces,rpc,parity_accounts



http://liyuechun.org/2017/11/03/eth-poaA/

 

posted @ 2018-04-12 13:16  写代码的小书童  阅读(559)  评论(0编辑  收藏  举报