Skip to content

fix: disable consolidation/upgrade actions on inactive validators - #805

Open
barnabasbusa wants to merge 1 commit into
ethereum:devfrom
ethpandaops:bbusa/fix-consolidation-inactive-target
Open

barnabasbusa wants to merge 1 commit into
ethereum:devfrom
ethpandaops:bbusa/fix-consolidation-inactive-target

Conversation

@barnabasbusa

Copy link
Copy Markdown
Member

Summary

Block the Actions 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 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.

if not is_active_validator(source_validator, current_epoch):
    return
if not is_active_validator(target_validator, current_epoch):
    return

Changes

  • Add isValidatorActive helper in src/utils/validators.ts using the spec definition activation_epoch <= current_epoch < exit_epoch
  • ValidatorActions.tsx: filter potentialTargetValidators by active status; add hint text on Upgrade/Absorb/Migrate rows when the selected validator isn't active
  • PullConsolidation.tsx: disable "Pull funds" when target isn't active — the exact path that triggered the bug
  • PushConsolidation.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 applies

Test plan

  • Connect a wallet with at least one active compounding validator and one pending (registered but inactive) compounding validator from the same withdrawal address
  • Select the pending validator: confirm "Pull funds" / "Migrate funds" / "Upgrade account" buttons are disabled with hint text explaining why
  • Select an active validator: confirm consolidation flows still work; pending validators do not appear as selectable targets in the "Migrate funds" target selector
  • Confirm yarn tsc --noEmit passes (verified locally, exit 0)

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
@netlify

netlify Bot commented May 21, 2026

Copy link
Copy Markdown

👷 Deploy request for dapper-rolypoly-9814ad pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f177955

@netlify

netlify Bot commented May 21, 2026

Copy link
Copy Markdown

👷 Deploy request for phenomenal-frangipane-7c4bd1 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f177955

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.

1 participant