EIP-4736 Consensus layer withdrawal protection

Final · Security & privacy · EIP status Final · created 2022-01-30

An optional mechanism in which nodes protect the BLSToExecutionChange message that sets a validator's withdrawal address using a pre-vetted list of signatures. It does not change the consensus rules.

Why it is needed

Running a validator requires signing with a key derived from a mnemonic (a set of words used to generate keys). But if this mnemonic leaks, the network has no way to distinguish the original owner from an attacker. Because the ability to set a withdrawal address is only first opened at the Capella hard fork, no one can be fully certain their key is safe until then, and the moment the fork activates, the owner and the attacker race to be the first to post the withdrawal address change message. Fortunately, there are clues available on chain: the deposit address that originally sent in the 32 ETH was an address the original owner controlled. This proposal is about letting nodes voluntarily use this kind of evidence, together with a list of pre-signed messages, to substantially raise the odds that the legitimate owner wins the race. It does not guarantee a win, however, and every feature is optional.

What changes

Today

After EIP-4736

Who is affected

In depth

The structure of the BLSToExecutionChange operation

This operation consists of four fields: the validator index, the current withdrawal BLS public key, the proposed execution-layer withdrawal address, and a signature over the preceding fields made with the withdrawal private key. Once set, the withdrawal address cannot be changed, so if the mnemonic has leaked and an attacker posts this message to the chain first, there is no way to reverse it. The entire proposal is described only in terms of OPTIONAL and RECOMMENDED: a beacon node MAY implement it, and users are merely RECOMMENDED to use it.

The broadcast file's behavioral rules

A beacon node MAY support a file containing, line by line, the validator index, current withdrawal BLS public key, proposed withdrawal address, and signature. If the file is provided, the node SHALL automatically submit a one-time BLSToExecutionChange message for every validly signed entry at the moment of the Capella hard fork. It SHALL also continue afterward to preferentially accept and rebroadcast messages matching the signatures in the file, and SHALL refuse to accept or rebroadcast any message with a different signature for that withdrawal credential. In other words, it serves both a one-time batch broadcast function and an ongoing filtering function.

Node message-handling priority

A beacon node MAY first accept the broadcast file containing a verifiable signature, and MAY fall back to accepting the first P2P request received for validators not found in the file. All client teams are RECOMMENDED to support reading this file locally before the Capella hard fork. This lets users attempt to set their withdrawal address at the earliest moment the network supports, without any change to consensus.

Claim file format and merge criteria

Claims are uploaded to a public repository in the format "[chain]/validatorIndex.json" (e.g. mainnet/123456.json). Each file contains a message (validator_index, from_bls_pubkey, to_execution_address) and a signature. To be merged into the repository, four conditions must be met: a correctly formatted filename, a valid validator index that is active at the consensus layer, a verifiable signature, and exactly one change operation per validator with no other content. Modifications to an already-merged claim may only be proposed by the same submitter; submissions from anyone else are treated as contested. Clients are recommended to ship with a change-operations.json aggregating these claims enabled by default.

Contested claims and social consensus

If two or more claims with different signatures arrive for the same validator and neither can prove ownership of the execution-layer deposit address, the claim is considered contested. In that case, on-chain data alone cannot determine the true owner, so each party must publicly present on-chain or off-chain evidence to persuade the community. Which claim ends up loaded onto a node ultimately comes down to the node operator's judgment based on social consensus. The source also acknowledges that a repository maintainer could maliciously reject a legitimate claim; in that case, anyone can set up an alternative repository in the same way to gather an alternative consensus.

Eight security scenarios

The source analyzes attack situations across eight scenarios. When an attacker without the deposit key faces an uncontested claim (scenarios 1 and 2), the owner has the advantage since nodes that loaded the file discard the attacker's message. A contest where both sides submit claims (3) cannot be resolved from chain data alone and is left to social persuasion. If the mnemonic itself is lost (4), this proposal cannot help recover it. Even after successfully setting the address, an attacker holding the key can still aim for slashing (5), so if a leak is suspected, it is recommended to exit the validator quickly. If the owner never submits a claim (8), the attacker is statistically likely to win, so all users are encouraged to submit a claim.

The premise and limits of consensus immutability

This proposal is not a consensus change and does not restrict the validity of withdrawal credential operations within the protocol. Deposit addresses were not written into the consensus rules because deposit records sit far back in history, making list maintenance excessively burdensome, and because a deposit address may no longer be under the control of its legitimate owner. Even with every feature implemented, which validator proposes a block and which restrictions that node has enabled is a matter of chance, so blocking an attack is not guaranteed. This EIP has been finalized in Final status, and BLSToExecutionChange was in fact introduced at the Capella hard fork named in the specification.

Original EIP · ← EIPs