标签:ant col top 挖矿 number miner peter 提示 home
{
"config": {
"chainId": 666,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"ethash": {}
},
"nonce": "0x0",
"timestamp": "0x5ddf8f3e",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x00002",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0x1e82968C4624880FD1E8e818421841E6DB8D1Fa4" : {"balance" : "30000000000000000000"}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
各个参数的解释可参考:https://www.cnblogs.com/wanghui-garcia/p/10256520.html
如果没有alloc后面的部分,可能出现:Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0 错误
具体参考:http://www.blogjava.net/waterjava/archive/2019/11/28/434937.html
geth --datadir /usr/geth/data init /usr/geth/config/genesis.json
geth --datadir /usr/geth/data --networkid 666 console
personal.newAccount() 然后根据提示输入密码
personal.newAccount("123456") 创建账户的同时指定密码
miner.start(1) 括号里不填的话是默认全力挖矿
miner.stop() 停止挖矿
标签:ant col top 挖矿 number miner peter 提示 home
原文地址:https://www.cnblogs.com/fdzang/p/12152569.html