fix: disable consolidation/upgrade actions on inactive validators - #805
Open
barnabasbusa wants to merge 1 commit into
Open
barnabasbusa wants to merge 1 commit into
barnabasbusa wants to merge 1 commit into
Conversation
Block UI from submitting consolidation and upgrade-to-compounding requests against validators that fail the consensus spec is_active_validator check. Per process_consolidation_request, requests where either source or target is not active are silently ignored on-chain, which previously left users with stuck requests (e.g. pulling funds into a registered-but-pending 1 ETH validator). - Add isValidatorActive helper based on the spec definition (activation_epoch <= current_epoch < exit_epoch) - Filter potentialTargetValidators by active status in ValidatorActions - Disable Pull/Migrate/Upgrade buttons when the relevant validator is not active, with explanatory hint text - Replace the brittle hardcoded status-string list in PushConsolidation with the spec-based helper so dora and beaconcha.in status naming differences no longer matter
👷 Deploy request for dapper-rolypoly-9814ad pending review.Visit the deploys page to approve it
|
👷 Deploy request for phenomenal-frangipane-7c4bd1 pending review.Visit the deploys page to approve it
|
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.
Summary
Block the Actions UI from submitting consolidation and upgrade-to-compounding requests against validators that fail the consensus-spec
is_active_validatorcheck.Per
process_consolidation_request, requests where either source or target is not active are silently ignored on-chain, which leaves users with stuck requests that look pending but will never process. Reported by @jakubgs after pulling funds into a registered-but-pending 1 ETH validator — request stayed stuck for 8+ days despite a 1-2 day queue.Changes
isValidatorActivehelper insrc/utils/validators.tsusing the spec definitionactivation_epoch <= current_epoch < exit_epochValidatorActions.tsx: filterpotentialTargetValidatorsby active status; add hint text on Upgrade/Absorb/Migrate rows when the selected validator isn't activePullConsolidation.tsx: disable "Pull funds" when target isn't active — the exact path that triggered the bugPushConsolidation.tsx: disable "Migrate funds" when source isn't active; replace the hardcoded['active_online','active_offline','active_ongoing']status-string check with the spec helper (also handles dora's status naming consistently)UpgradeCompounding.tsx: disable "Upgrade account" (self-consolidation) when validator isn't active — same spec rule appliesTest plan
yarn tsc --noEmitpasses (verified locally, exit 0)