-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for removed validator past boundary (#84)
Problem: A bug was found where validators who are added to the pool outside of the boundary of the Steward state, then removed before they begin getting tracked (validators added during cycle N are tracked in steward state in cycle N+1) were not getting properly removed. This caused the state machine to get stuck because the invariant used to keep the state aligned was failing (`num_pool_validators + validators_added - validators_to_remove == validator_list.len()`) Resolution: Make sure we're shifting values for steward state fields that can be relevant past `num_pool_validators` (which is just the validators_to_remove and validators_for_immediate_removal). We also don't want to clear those values at `num_pool_validators` because that might be a relevant value.
- Loading branch information
Showing
4 changed files
with
12 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