我目前正在运行最新的Geth 1.8.1 Iceburg版本。我按照教程设置了一个私有的以太坊网络,包括挖掘在内的所有工作都很好,但每次重新启动Geth时,链都会重置为0号块,所有挖掘事务都会丢失,并且没有ETH余额,但是事务记录在日志。
使用的命令:
geth --datadir "$ethereum_home/EthMasterChain" console 2>console.log
geth --datadir "$ethereum_home/EthMasterChain" init "$ethereum_home/genesis.json"
使用的json文件:
{
"config": {
"chainId": 1234,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000045",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x8900000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0xbe8d5fce9f60ab06b527dd177eed96eb95ee4138",
"alloc": {
"0xbe8d5fce9f60ab06b527dd177eed96eb95ee4138" : {"balance" : "10000000000000000000"}
}
}