1. 程式人生 > >以太坊私有鏈

以太坊私有鏈

cor hash 私有 fff account 數據 post port sta

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

以太坊私有鏈