Skip to content
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

FIX: Fixed instant removal validator stuck scenario #75

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

coachchucksol
Copy link
Contributor

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.

@ebatsell ebatsell merged commit 9336c4b into master Aug 8, 2024
5 of 6 checks passed
@ebatsell ebatsell deleted the ck/removal_fix branch August 8, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants