-
Notifications
You must be signed in to change notification settings - Fork 536
Empty validator set returned by forkManager.GetValidators(height)
when on second fork that is PoA
#812
Comments
forkManager.GetValidators(height)
when on second fork that is PoA forkManager.GetValidators(height)
when on second fork that is PoA
Hi @dankostiuk , Can you try this on |
Hey @laviniat1996 , So the issue was that we forgot to include the As the validator set can change at any time during a fork, we believe the logic around the snapshot validatorStore/forkManager could be improved to instead do the following:
If the above is not possible, I suppose the second best solution would be:
|
@dankostiuk Thank you for these suggestions. I will bring them up to the team, and we will get back to you. 🙏 |
@dankostiuk Just wanted to give a quick update. Sorry for the waiting time. These suggestions were raised to the team, and they will go over them as soon as they can. |
@dankostiuk |
Empty validator set returned by
forkManager.GetValidators(height)
when on second fork that is PoADescription
During testing of 0.60 on our 4-validator testnet, we found that we encounter a chain halt as soon as a non-genesis fork is reached.
While remote debugging after removing a validator's entire data-dir (including snapshots) and trying to re-sync, we observed that the
forkManager.GetValidators(height)
which is called from[ibft.Initialize() -> ibft.updateCurrentModules() -> ibft.getModulesFromForkManager()]
returns an empty set []:As a result, all 4 validators appear to be stuck in the discovery loop and can no longer build new blocks:
We wipe our data-dir as shown below:
Our genesis.json:
Your environment
Steps to reproduce
We observe that the validator syncs to block 300 and then gets stuck in the discovery loop - remote debugging shows that the ValidatorStore at the second fork has an empty validator set.
Expected behaviour
I expect block building to continue across forks as it did when running our logic on v0.5.1.
Additionally, validators that completely remove their data-dir including their
snapshots
file should still be able to sync up the the latest block.Actual behaviour
Block building no longer takes place once the new fork has been reached.
Proposed solution
Any time the validators returned from
forkManager.GetValidators(height)
is [], one could derive the validators from the header's ibftExtra, something similar to this:This is similar to what happens on the genesis fork -- if the snapshots data could not be found, the validatorSet is read from the genesis:
The text was updated successfully, but these errors were encountered: