码迷,mamicode.com
首页 > 其他好文 > 详细

以太坊私有链

时间:2017-12-28 23:24:50      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:epo   $0   identity   tor   difficult   work   get   pwd   conf   

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()

以太坊私有链

标签:epo   $0   identity   tor   difficult   work   get   pwd   conf   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!