EIP-6914 Reuse of fully withdrawn validator indices (Reuse Withdrawn Validator Indices)

No call decision · Consensus & staking · EIP status Stagnant · created 2023-04-19

A proposal to reuse validator indices that have been fully withdrawn and have passed a certain waiting period for new deposits, preventing the beacon chain's validator list and balance list from growing indefinitely.

Why it is needed

The beacon chain has a validators list and a balances list, and every time a new deposit comes in, an entry is simply appended to the end of these lists. Even when a validator is fully withdrawn, its index remains empty and is never reused. Because Ethereum is a system where validators keep entering and exiting over a long period, this approach causes both lists to grow without bound. As state size grows, so does the data clients must hold in memory, the burden of computing the state root, and the work of scanning the entire validator set. This EIP aims to eliminate this unbounded growth problem by reusing indices that are fully withdrawn and have passed enough time to be considered safe.

What changes

Today

After EIP-6914

Who is affected

In depth

Reuse conditions

This EIP allows an index to be reused only once a validator has been fully withdrawn and, after becoming eligible for withdrawal, a sufficient safety period has passed. Both conditions must be satisfied, and the specific configuration values and behavior are defined in the EIP-6914 feature branch of the consensus layer specs repository. No changes are required at the execution layer.

The root of the problem: append-only lists

The beacon chain's validators list and balances list only ever grow by appending an entry each time a deposit for a new pubkey arrives. If validators repeatedly join and leave over a long period, both lists grow without bound. This growth in state size adds burden in multiple places: client memory usage, state root computation, and validator set scanning. This EIP is introduced as a relatively simple improvement that prunes these lists during state transition.

Backward compatibility

This change is a backward-incompatible change to the consensus layer and must be scheduled as a hard fork. There is no compatibility issue for the execution layer.

Attack scenario: attestation poisoning

Reusing an index overwrites a previous validator's pubkey in the beacon state. However, AttesterSlashing reconstructs signing participants by validator index. Consider a hypothetical 1/3 attacker who voluntarily exits a small number N of validators on the honest chain, waits for those indices to be overwritten by new deposits, and then attempts to double-sign with the original N keys on an attack chain that forked before the exit. If N is set large enough that every committee on the attack chain contains, on average, one of the N keys, the aggregate attestation containing this double signature can be published but can no longer be submitted as an AttesterSlashing on the honest chain, since the indices now point to different pubkeys - breaking accountable safety.

Mitigation: SAFE_EPOCHS_TO_REUSE_INDEX

The index of an exited validator is not overwritten for SAFE_EPOCHS_TO_REUSE_INDEX epochs. This value is set to three times the weak subjectivity period, ensuring that within the security window where accountable safety is guaranteed, the double signature usable for an attack cannot be poisoned.

Why the alternative was not adopted

If AttesterSlashing carried a list of pubkeys instead of validator indices, this issue would not arise at all. However, this was not adopted because it requires a larger structural change and would increase the data requirements of AttesterSlashing - already the largest data type in the consensus layer - sixfold.

Current status

This EIP is in Stagnant status, and its test cases are still work-in-progress within the consensus layer standard test suite. There is no record that fork inclusion has been decided, and specification details and adoption may still change.

Original EIP · ← EIPs