Raft nodes connected but not synchronizing
System information
Geth version:
Geth
Version: 1.7.2-stable
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.9.2
Operating System: linux
GOPATH=
GOROOT=/usr/local/go
OS & Version: Linux (Kubernetes) Branch, Commit Hash or Release: 2.0.1
Expected behaviour
When I join 2 nodes together, I expect them (eventually) to have the same block height.
Actual behaviour
When I join 2 nodes together, node 1 has block height 0, the other block height 18.
Steps to reproduce the behaviour
Node 1:
geth \
--datadir /qdata/dd\
--port 30303\
--identity fwhen\
--raft\
--raftblocktime 50\
--raftport 50400\
--raftjoinexisting 0\
--rpc\
--rpcport 8545\
--rpcaddr 0.0.0.0\
--rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum\
--networkid 1\
--permissioned\
--nodiscover\
--verbosity 5\
--unlock 0\
--password /k8s/secrets/accountPassword
Permission Nodes/Static Nodes (both files are identical):
["enode://cc3cc586a6e83b9f089a2b6fcf59fdf639b7a3f0b379fd3d987efba25611b5471d388e892b57c8fce13212b2bfd08fce3ede4fc0c906e037208f497cd6a78505@127.0.0.1:30303?discport=0&raftport=50400","enode://a7f3d9804cd177fe379560423f9a0234beecd87c376b8cffbab360a5d87beac280223dfc2e9dd18666e8e2e43c384ed68985eae7155156dbb110e341c222ac5f@100.71.220.53:30303?discport=0&raftport=50400"]
genesis.json
{
"alloc": {},
"coinbase": "0x0000000000000000000000000000000000000000",
"config": {
"byzantiumBlock": 1,
"chainId": 1,
"eip150Block": 1,
"eip155Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip158Block": 1,
"isQuorum": true
},
"difficulty": "0x0",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xE0000000",
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
"nonce": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
Validating connectivity to node 2:
> admin.peers
[{
caps: ["eth/63"],
id: "a7f3d9804cd177fe379560423f9a0234beecd87c376b8cffbab360a5d87beac280223dfc2e9dd18666e8e2e43c384ed68985eae7155156dbb110e341c222ac5f",
name: "Geth/pfzpj/v1.7.2-stable/linux-amd64/go1.9.2",
network: {
localAddress: "100.96.0.196:39574",
remoteAddress: "100.71.220.53:30303"
},
protocols: {
eth: {
difficulty: 0,
head: "0xc23b4ebccc79e2636d66939924d46e618269ca1beac5cf1ec83cc862b88b1b71",
version: 63
}
}
}]
Checking block number:
> eth.blockNumber
0
Node2
Geth arguments:
geth\
--datadir /qdata/dd\
--port 30303\
--identity pfzpj\
--raft \
--raftblocktime 50
--raftport 50400\
--raftjoinexisting 0\
--rpc\
--rpcport 8545\
--rpcaddr 0.0.0.0\
--rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum\
--networkid 1\
--permissioned\
--nodiscover\
--verbosity 5\
--unlock 0\
--password /k8s/secrets/accountPassword
Permissioned Nodes/Static nodes (both files are identical):
["enode://a7f3d9804cd177fe379560423f9a0234beecd87c376b8cffbab360a5d87beac280223dfc2e9dd18666e8e2e43c384ed68985eae7155156dbb110e341c222ac5f@127.0.0.1:30303?discport=0&raftport=50400","enode://cc3cc586a6e83b9f089a2b6fcf59fdf639b7a3f0b379fd3d987efba25611b5471d388e892b57c8fce13212b2bfd08fce3ede4fc0c906e037208f497cd6a78505@100.70.106.253:30303?discport=0&raftport=50400"]
genesis.json
{
"alloc": {},
"coinbase": "0x0000000000000000000000000000000000000000",
"config": {
"byzantiumBlock": 1,
"chainId": 1,
"eip150Block": 1,
"eip155Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip158Block": 1,
"isQuorum": true
},
"difficulty": "0x0",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xE0000000",
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
"nonce": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
Validating connectivity to node 1:
> admin.peers
[{
caps: ["eth/63"],
id: "cc3cc586a6e83b9f089a2b6fcf59fdf639b7a3f0b379fd3d987efba25611b5471d388e892b57c8fce13212b2bfd08fce3ede4fc0c906e037208f497cd6a78505",
name: "Geth/fwhen/v1.7.2-stable/linux-amd64/go1.9.2",
network: {
localAddress: "100.96.0.197:30303",
remoteAddress: "100.96.0.196:39574"
},
protocols: {
eth: {
difficulty: 0,
head: "0xc23b4ebccc79e2636d66939924d46e618269ca1beac5cf1ec83cc862b88b1b71",
version: 63
}
}
}]
Checking block number
> eth.blockNumber
18
It seems you need more than three nodes to run QUORUM. I do not know how to run RAFT protocol with two nodes. Please try three nodes first and check whom is selected as LEADER.
@127.0.0.1:30303, Can you change to exact IP address and try again? >_<
Three nodes I needed. That was the issue. Now it works. Thanks!