-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
x/gov: slash nonvoting validators error. #2158
Comments
While I agree that non-deterministic ordering of slashes is sub-optimal, I think the slashing logic should be independent of the order in which slashes were applied. (I also agree with fixing this) Unless IAVL root hash depends on insertion order, in which case then this is a problem. However this shouldn't be a consensus failure. I would like it if we could actually use this (or something similar) in a test somewhere to ensure that the order of slashes isn't important. |
It does but we resort the keys at the end of the block when the cache is flushed. We should still avoid any sort of non-deterministic Golang map iteration. |
closing, thanks for the PR! Made #2288 as a follow-up for making a test case for this. |
Summary of Bug
There is a big error in
gov
. It will lead to the consensus failure, because every node maybe have entirely differentnonVotingVals
which is from the mapcurrValidators
. Then, slash validators in different order and make theApphash
different.Steps to Reproduce
Just submit a proposal and all of the validators don't vote.
For Admin Use
The text was updated successfully, but these errors were encountered: