Skip to content

Verify source withdrawal address matches the vault - #804

Open
cyc60 wants to merge 2 commits into
masterfrom
fix-consolidation-withdrawal-address
Open

Verify source withdrawal address matches the vault#804
cyc60 wants to merge 2 commits into
masterfrom
fix-consolidation-withdrawal-address

Conversation

@cyc60

@cyc60 cyc60 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Per EIP-7251 process_consolidation_request, the consensus layer requires the source validator's withdrawal_credentials execution address to equal the request's source_address — for both consolidations and switch-to-compounding requests. Our requests use the vault as source_address, but the operator never compared the credential address to the vault: vault membership is checked only via contract event logs, which can diverge from live CL credential state. A mismatched source passes all app checks, the transaction succeeds, the fee is burned, and the CL silently drops the request while the CLI reports success.

Changes:

  • ConsensusValidator.withdrawal_address property extracts the execution address from withdrawal_credentials.
  • ConsolidationChecker: raises ConsolidationError when a source validator's (or switch target's) withdrawal address does not match the vault. The non-switch target branch is unchanged — the spec does not check the target's credential address.
  • ConsolidationSelector: source candidates with a non-vault withdrawal address are skipped; the target candidate list is unaffected.

The check also implicitly covers the spec's has_execution_withdrawal_credentials requirement, since 0x00/BLS credentials cannot contain the vault address.

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