I'm setting up a private chain between two VMs.
The first node started mining successfully, and the connetion between the two VMs has no problem.
But when I try to connect the second node to the first, I got this error:
DEBUG[05-08|09:21:11] Ethereum handshake failed
id=e8d86dae37655a1b conn=dyndial err="Genesis block mismatch - dfc3e94e54007bba (!= 573969da5d11c81a)"
I copied the genesis.json file from the first node to the second, how can they mismatch?
The command I used to start the first node is:
geth --identity nodeBcDev1 --nodiscover --networkid 9191 --port 60830 --maxpeers 5 --lightkdf --cache 512 --rpc --rpccorsdomain "*" --datadir "C:\BlockChain\Data" --minerthreads 2 --mine
The command to connect from the second node:
geth --networkid 9191 --port 60830 --rpc --rpcport 8545 --rpccorsdomain "*" --datadir "C:\BlockChain\Data" --minerthreads 2 --bootnodes "enode://41cc17dydeefide8018c39054653d638430c3abfe3f77g009dc9294h0e8a9d62a5b819fb5810391fddab560d4c1bf9d1c9b110c6fbe603731388a993751bd95e@10.0.0.1:60830" --verbosity 4
Finally, the genesis.json file:
{
"nonce" : "0x0000000000000055",
"mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"difficulty" : "0x1",
"gasLimit" : "0x800000",
"timestamp" : "0x0",
"extraData" : "",
"coinbase" : "0x0000000000000000000000000000000000000000",
"alloc" : {},
"config" : {
"chainId": 9191,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
}
}
My client id matches the network id, and I know the connection was successful because the lines above the handshake failure was:
DEBUG[05-08|09:21:11] Ethereum peer connected id=df887467936a7c9b conn=dyndial name=Geth/v1.8.0-unstable/linux-amd64/go1.9.4
Really confused.....
--rpcaddr "0.0.0.0"
eth.getBlock(0) if the
Hash` field is different, then you screw it somewhere in initializing the genesis block. First useinit
command to initialize both nodes with the correct genesis block, and then start the nodes