-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Validators updated to zero power should be unbonded (deleted from the power store) #1513
Comments
cc @rigelrozanski Do you think this check should be put in slashing (checking whenever we slash a validator) or in staking (checking in |
We can see two (!) such validators at the last block of gaia-6002 - http://gaia-6002.coinculture.net:46657/validators?height=721617. |
I'd recommend that this check be added to staking and not slashing - although the problem may be triggered through slashing, fundamentally, staking is the interface to Tendermint and thus shouldn't allow these kinds of behaviours |
Agreed. edit: I think we can put it in the |
Per discussion with @rigelrozanski, in the |
Implemented in #1514. |
The naive implementation of this means that validators we attempt to slash may or may not exist in the store (if a validator is slashed twice at 50%, for example, then again at any amount). We could get rid of that sanity check - and just ignore slashes to nonexistent validators - although we need to be careful that we still check for unbonding delegations / redelegations that might need to be slashed. |
If a validator has been slashed 100% then all redelegations/unbondings should have also been slashed 100% at that moment - so shouldn't be a problem. This said I don't think we should remove the sanity check, but should check explicitly before attempting to retrieve the validator - if the validator doesn't exist we should make it clear with a special log message that the protocol has reached "overslashing" - in big red letters if possible edit: haven't looked at the code, not totally certain on the sanity check your mentioning - just assumed it was during retrieving a non-existent validator? |
Does this conflict with #1056 ? |
Good question, we need to think about that. |
Per suggestion from @rigelrozanski, we can keep the invariant that all stored validators have nonzero power by introducing a new |
Presently, if a validator is set to zero power - through slashing, for example - but not through the
unbond
command (which does perform this check), the validator will be left in the power store with zero power (and possibly passed to Tendermint, if zero power would still put it in the top 100 validators).Demonstrative failing testcase in #1514.
The text was updated successfully, but these errors were encountered: