_Probably duplicate of https://github.com/ethereum/go-ethereum/issues/14352_
Geth
Version: 1.6.0-stable
Git Commit: facc47cb5cec97b22c815a0a6118816a98f39876
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.1
Operating System: darwin
GOPATH=/Users/jan/Dev/go/
GOROOT=/usr/local/Cellar/go/1.8.1/libexec
geth should initialize a private testnet using custom genesis file from README.md.
geth init CustomGenesis.json returns an error.
CustomGenesis.json with data copied from README.md:{
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
"extraData" : "",
"gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
geth init CustomGenesis.json.
$ geth init CustomGenesis.json
WARN [04-20|10:51:04] No etherbase set and no accounts found as default
INFO [04-20|10:51:04] Allocated cache and file handles database=/Users/jan/Library/Ethereum/geth/chaindata cache=128 handles=1024
Fatal: failed to write genesis block: genesis has no chain configuration
You need to specify a config field in the genesis json which defines the protocol rules. Such as
"config": {
"chainId": 987654321,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
https://github.com/ethereum/go-ethereum/wiki/Private-network#creating-the-genesis-block.
The README should definitely be updated. I'll leave this issue open until then.
It's present in README now.
Most helpful comment
You need to specify a
configfield in the genesis json which defines the protocol rules. Such ashttps://github.com/ethereum/go-ethereum/wiki/Private-network#creating-the-genesis-block.
The README should definitely be updated. I'll leave this issue open until then.