quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Node doesn't become validator

Open MitchK opened this issue 8 years ago • 11 comments

System information

Geth version:

geth version
Geth
Version: 1.7.2-stable
Git Commit: df4267a25637a5497a3db9fbde4603a3dcd6aa14
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.10
Operating System: linux
GOPATH=/home/XXXXXXX
GOROOT=/usr/lib/go-1.10

OS & Version: Linux

Branch, Commit Hash or Release: 2.0.1

Expected behaviour

When creating a 3-node Istanbul network with just one validator, I should be able to make all other nodes validators.

Actual behaviour

I can make the 2nd node a validator, but not the 3rd.

Steps to reproduce the behaviour

I have three quorum nodes, where the #1 is the initial validator:

Node 1: 0xc5286aa5758beb9bc1353faf892dbc887bb4cf6e (validator)
Node 2: 0x5dbcf36cec5b1e13a87e920bb2e969e5f8708e82
Node 3: 0x40ee58df153e4849655b4989589cc5524c1303ec

When 1 proposes 2 using

istanbul.propose("0x5dbcf36cec5b1e13a87e920bb2e969e5f8708e82", true)

… 2 becomes a validator …

> istanbul.getValidators()
["0x5dbcf36cec5b1e13a87e920bb2e969e5f8708e82", // 2
"0xc5286aa5758beb9bc1353faf892dbc887bb4cf6e"] // 1

Now, I try to promote 3, on both node 1 and 2

istanbul.propose("0x40ee58df153e4849655b4989589cc5524c1303ec", true)

But node 3 doesn't become a validator:

> istanbul.getValidators()
["0x5dbcf36cec5b1e13a87e920bb2e969e5f8708e82", // 2
"0xc5286aa5758beb9bc1353faf892dbc887bb4cf6e"] // 1

MitchK avatar Sep 13 '18 23:09 MitchK

Is your proposer policy round robin?

a651694192 avatar Sep 26 '18 03:09 a651694192

@MitchK I am unable to reproduce this using the above geth configuration. Can you consistently reproduce this?

jbhurat avatar Oct 03 '18 15:10 jbhurat

@MitchK I am closing the issue for now, please reopen if you can still reproduce the issue.

jbhurat avatar Oct 10 '18 20:10 jbhurat

Hi @jbhurat , sorry for the delay, can you re-open the issue?

For some time, we were successfully able to bootstrap various networks without issues and promote nodes to be validators.

However, today this issue occured again (consistently) we have trouble reproducing why it worked before and why it doesn't now (our configuration generation tools haven't been changed). Below, I tried to make our setup as reproducible as possible. If desired, I can also try create a Gist with a script in order to reproduce the problem.

We are using Quorum 2.1.0 and Go 1.10

@a651694192 Yes, our proposer policy is Round Robin. Please see our genesis.json here:

{
	"config": {
		"chainId": 808914377,
		"eip150Block": 2,
		"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
		"eip155Block": 3,
		"eip158Block": 3,
		"byzantiumBlock": 1,
		"istanbul": {
			"epoch": 30000,
			"policy": 0
		},
		"isQuorum": true
	},
	"nonce": "0x0",
	"timestamp": "0x5bc74ba3",
	"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f85ad594fac82d3edf2d86a306ec063db3e015cd1b097afdb8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
	"gasLimit": "0xe0000000",
	"difficulty": "0x1",
	"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
	"coinbase": "0x0000000000000000000000000000000000000000",
	"alloc": {
		"fac82d3edf2d86a306ec063db3e015cd1b097afd": {
			"balance": "0xde0b6b3a7640000"
		}
	},
	"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

I am currently having those issues with 4-node setup, where the first node starts out as the only validator, in contrast to have all 4 nodes assigned validators from the beginning. As a side note, we do this because we use Kubernetes and our instances don't start at the exact same time, which causes all 4 nodes to create 4 different blocks and therefore end up with 4 incompatible chains, if all 4 nodes would be the validator in the genesis.json.

So in our example, I have those 4 nodes:

0: 0xfac82d3edf2d86a306ec063db3e015cd1b097afd (validator)
1: 0xe1070caf08ef06d50434c02d2ce644c756df0ed9
2: 0x18a8f483949604ba0beb98e2c7360b6ba36b3fd1
3: 0xabc74f8cd9f663c7ea67c1d7dac749da9083524a

See the following startup arguments:

0: geth --datadir /qdata/dd --port 30303 --identity ...-0 --ethstats ... --mine --minerthreads 1 --istanbul.requesttimeout 10000 --istanbul.blockperiod 1 --emitcheckpoints --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpcapi eth,web3,db,net,txpool,personal,quorum,istanbul --networkid 808914377 --permissioned --nodiscover --verbosity 3
1: geth --datadir /qdata/dd --port 30303 --identity ...-1 --ethstats ... --mine --minerthreads 1 --istanbul.requesttimeout 10000 --istanbul.blockperiod 1 --emitcheckpoints --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpcapi eth,web3,db,net,txpool,personal,quorum,istanbul --networkid 808914377 --permissioned --nodiscover --verbosity 3
2: geth --datadir /qdata/dd --port 30303 --identity ...-2 --ethstats ... --mine --minerthreads 1 --istanbul.requesttimeout 10000 --istanbul.blockperiod 1 --emitcheckpoints --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpcapi eth,web3,db,net,txpool,personal,quorum,istanbul --networkid 808914377 --permissioned --nodiscover --verbosity 3
3: geth --datadir /qdata/dd --port 30303 --identity ...-3 --ethstats ... --mine --minerthreads 1 --istanbul.requesttimeout 10000 --istanbul.blockperiod 1 --emitcheckpoints --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpcapi eth,web3,db,net,txpool,personal,quorum,istanbul --networkid 808914377 --permissioned --nodiscover --verbosity 3

And they are are all connected and permitted to each other, where 0 is creating the blocks. I now want to promote 1, using node 0:

istanbul.propose("0x008b97efd6b3cf8667c576a9e5209249da98787f", true)

This ends up 0 and 1 being validators:

istanbul.getValidators(console.log)
null 0x008b97efd6b3cf8667c576a9e5209249da98787f,0xfac82d3edf2d86a306ec063db3e015cd1b097afd

But now the block generation stops and node 0 spits out the following error messages:

...
INFO [10-17|15:43:38] Commit new mining work                   number=3124 txs=0 uncles=0 elapsed=176.092µs
INFO [10-17|15:43:38] 🔗 block reached canonical chain          number=3118 hash=51ae24…a1c0d2
INFO [10-17|15:43:38] 🔨 mined potential block                  number=3123 hash=a58643…b71c5c
INFO [10-17|15:43:39] Committed                                address=0xFAC82d3EDf2D86A306eC063DB3E015CD1B097aFD hash=48f279…d50d12 number=3124
WARN [10-17|15:43:39] Discarded bad propagated block           number=3124 hash=48f279…d50d12
WARN [10-17|15:43:39] Discarded bad propagated block           number=3124 hash=48f279…d50d12
ERROR[10-17|15:43:49] Failed to decode message from payload    address=0xFAC82d3EDf2D86A306eC063DB3E015CD1B097aFD err="unauthorized address"
ERROR[10-17|15:43:49] Failed to decode message from payload    address=0xFAC82d3EDf2D86A306eC063DB3E015CD1B097aFD err="unauthorized address"
ERROR[10-17|15:44:01] Failed to decode message from payload    address=0xFAC82d3EDf2D86A306eC063DB3E015CD1B097aFD err="unauthorized address"
ERROR[10-17|15:44:01] Failed to decode message from payload    address=0xFAC82d3EDf2D86A306eC063DB3E015CD1B097aFD err="unauthorized address"
...

Next, I try to propose 2, using 0 and ```1````:

istanbul.propose("0xabc74f8cd9f663c7ea67c1d7dac749da9083524a", true)

But 2 stays a candidate and the block generation stays idle:

istanbul.getSnapshot()
{
  epoch: 30000,
  hash: "0x48f279735905f5a9fb7493cc3b7e901e9c86f806c950293bb90412fbe2d50d12",
  number: 3124,
  policy: 0,
  tally: {},
  validators: ["0x008b97efd6b3cf8667c576a9e5209249da98787f", "0xfac82d3edf2d86a306ec063db3e015cd1b097afd"],
  votes: []
}

michaelkunzmann-sap avatar Oct 17 '18 16:10 michaelkunzmann-sap

@michaelkunzmann-sap Checking

jbhurat avatar Oct 19 '18 12:10 jbhurat

@michaelkunzmann-sap I tried reproducing this issue by generating my configuration using Istanbul-tools, but I am unable to reproduce the issue you are facing. Please note that I am using docker-compose to start the nodes. Can you please share a Gist (which includes your k8s deployment configurations), so that I can reproduce and identify if there are any issues.

jbhurat avatar Oct 22 '18 13:10 jbhurat

Hi @jbhurat I very much appreciate you taking the time to look into it.

I have created a docker-compose setup that exactly reproduces the issue (see the README for the steps): https://github.com/michaelkunzmann-sap/quorum-experiments/tree/master/validator-issue

Let me know if you have any questions. I am also available on Slack if you have any quick questions.

michaelkunzmann-sap avatar Oct 22 '18 20:10 michaelkunzmann-sap

Thanks @michaelkunzmann-sap, checking now

jbhurat avatar Oct 22 '18 20:10 jbhurat

Reopening as I am able to reproduce the issue using https://github.com/michaelkunzmann-sap/quorum-experiments/tree/master/validator-issue

jbhurat avatar Oct 22 '18 20:10 jbhurat

Hi @michaelkunzmann-sap, the issue is caused because of not running the nodes in full sync mode. Please test again after passing --syncmode "full" to geth

jbhurat avatar Oct 23 '18 14:10 jbhurat

Polygon-edge migration from PoA to PoS I have created a 4 nodes POA network using polygon-edge. As mentioned ,I have tried out the approach for migration.

I have deployed the staking smart contract in block no 59357 .All the validators staking has staked before block no 59750.I have verified the list in staking contract. I have restarted all the nodes after migration to rebuild the blocks from new genesis.json. polygon-edge ibft switch --chain ./genesis.json --type PoS --deployment 59357 --from 59750 But the blocks are not getting generated from 59750 due to the following error.

failed to get validators when calculation quorum

Please guys help me to resolve this issue

sarthaktNt avatar Jan 18 '23 13:01 sarthaktNt