Verify source withdrawal address matches the vault - #804
Open
cyc60 wants to merge 2 commits into
Open
Conversation
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.
Description
Per EIP-7251
process_consolidation_request, the consensus layer requires the source validator'swithdrawal_credentialsexecution address to equal the request'ssource_address— for both consolidations and switch-to-compounding requests. Our requests use the vault assource_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_addressproperty extracts the execution address fromwithdrawal_credentials.ConsolidationChecker: raisesConsolidationErrorwhen 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_credentialsrequirement, since 0x00/BLS credentials cannot contain the vault address.