首页 > 其他 > 详细

以太坊私有链

时间:2017-12-28 23:07:34      阅读:320      评论:0      收藏:0      [点我收藏+]

sudo apt-get update
sudo apt-get installsoftware-properties-common
sudo add-apt-repository -yppa:ethereum/ethereum
sudo add-apt-repository -yppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install ethereum

piccgenesis.json

{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x40000",
"extraData" : "",
"gasLimit" : "0xffffffff",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00",
"alloc": { }
}


basepath=$(cd `dirname $0`; pwd)
获取当前的目录
geth --datadir "$basepath/chain" init piccgenesis.json
创建数据存放地址并初始化创世块
geth --identity "PICCetherum" --rpc --rpccorsdomain "*" --datadir "$basepath/chain" --port "30303" --rpcapi "db,eth,net,web3" --networkid 95518 console

personal.newAccount()

以太坊私有链

原文:https://www.cnblogs.com/ahuo/p/8137910.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!