-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Fixed instant removal validator stuck scenario (#75)
The issue is that if 2 validators are put into `DeactivatingValidator` one marked for instant removal and the other for regular removal. The function `instant_remove_validator` will not be able to run, halting the state machine for the epoch. This is because `instant_remove_validator` is checking to see that all validators are not in `DeactivatingValidator` or `ReadyForRemoval`. However since the discovery that regular removals can also go directly to `DeactivatingValidator` this check is no longer valid. The fix is to tally all of the deactivating StakeStatus across the validator list and assert that the count is equal to the regular removed validators, then we can safely assume all of the immediate to remove validators are already removed from the list.
- Loading branch information
1 parent
de7103b
commit 9336c4b
Showing
4 changed files
with
97 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters