New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crab grandpa finality issues #419
Comments
The re-org issues #390 might increase difficulty for grandpa process, but it should not be the root cause since almost all the validators still have babe probabilistic consensus. |
Additional info: validators have enough peers and directly connect to each other currently. |
I'm running one of the validators and adding trace
|
make sure the keys are correct.
I think all the blocks can be finalized. we had done that in icefrog. |
We could do some operations hours later to verify this:
|
Some updates for the experiments:
|
Offline genesis validators get slashed on block 21, but the authorities in the consensus log is strange with 4 extra 0x0 account keys:
that is:
same offences/slash things happen to block 39 and triggered grandpa NewAuthorities event, this is the grandpa keys:
|
Remove the chain data and resync with Following log repeatedly showing:
|
Fixed in 0286604 |
* prioritize by gas price directly * fix test
In v0.5.0 devnet testing, the finalized block stall on zero. Here is some analysis about the case:
Reproduce the steps:
There are 4 validators configed in genesis session with session keys, including grandpa key(ed25519), two of them get online intime with right keys before the
on_session_change
, but the other two didn't. Because there are only 2/4 (< 2/3) validators gossiping the grandpa, so the blocks in genesis didn't get finalized.After several session, other validators start bond and start validating, and the grandpa authorities set get changed, even though there might be > 2/3 validators online now, the blocks in later session didn't get finalized because there are previous blocks(those in the genesis session) remain unfinalized.
Notice the assumption here:
Blocks in one session must be finalized by the grandpa keys set of that session, cannot finalized by the keys set in latest session, this assumption need to be confirmed. Because in p2p networks, you cannot make sure what happens to the other offline branch and its successor key sets which could be different. The branches might just fork due to network connections and can not see each other, from decentralized perspective, you can not determine which branch should get finalized.
For the case in crab v0.5.0 devnet, the two genesis offline validators start validating later, but used different grandpa keys by setting rotate_keys using rpc call. Although they have same validator id with genesis config, but because the grandpa key has changed, so I guess that changed grandpa key will not work to help reach finality consensus for genesis session blocks.
Maybe we can make a experiment by requesting the two offline validator to change their grandpa keys back to the keys in genesis config and see whether it will helps?
Currently, substrate lacks diagnostic methods except
-lafg
option, but some works is already in progress to help improve this.Related:
paritytech/substrate#4921
The text was updated successfully, but these errors were encountered: