fix: skip validators with pending deposits for stake-bound balance checks#188
Merged
Merged
Conversation
This was referenced May 14, 2026
|
Looks good to me. |
cff1d59 to
293140e
Compare
matthias-wright
added a commit
that referenced
this pull request
May 26, 2026
…ithdrawals (#208) Builds on #188 (which builds on #187). This addresses #204. Changes: - On the last block of an epoch, in case the min or max stake was changed, the pending_execution_requests will be peeked and validators that have an exit scheduled for the next epoch will be skipped when creating partial withdrawals. This ensures that a partial withdrawal won't block the validator exit. - Adds a unit test to verify the behavior.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this PR builds on #187 because it addresses a similar edge case, and the code changes are overlapping.
This addresses #180.
Changes:
MinimumStake, only validators without pending deposits are considered.test_stake_bound_skips_pending_deposit_placeholderis added that verifies that inactive validator accounts with zero balance andhas_pending_deposit = trueare skipped when enforcing stake boundstest_stake_bound_refunds_top_up_when_max_lowered_before_processingis added that verifies that when a top-up deposit is queued before a max stake reduction makes the post-top-up balance invalid, deposit processing refunds the top-up and leaves the validator's pre-top-up balance and flags untouched.