EIP-6465 SSZ withdrawals root
No call decision · Networking & nodes · EIP status Draft · created 2023-02-08
Changes the execution block header's withdrawals root (withdrawals_root) from a Merkle Patricia Trie to the same SSZ scheme used by the consensus layer. The same name now refers to the same value everywhere.
Why it is needed
Ethereum's execution layer and consensus layer summarize the same block in different ways. A prime example is withdrawals_root, which compresses the validator withdrawal list into a single hash. The execution block header computes this value using the older Merkle Patricia Trie (MPT) method, while the consensus layer's ExecutionPayloadHeader computes it using the more modern SSZ (Simple Serialize) method. So although the name withdrawals_root is identical, the actual values differ. This not only causes confusion but also leaves a use case that still requires clients to support MPT. This EIP makes the execution block header's withdrawals root also computed via SSZ, reducing cases that require MPT and aligning the withdrawals_root of both layers to point to the same SSZ root.
What changes
Today
- The execution block header's withdrawals_root is a root obtained by putting the withdrawal list into an MPT
- The consensus layer's withdrawals_root is an SSZ root, so even though the name is the same, the value differs
- Clients must continue to support MPT computation for withdrawal processing
After EIP-6465
- The execution block header's withdrawals_root is now also computed via SSZ's hash_tree_root()
- The withdrawals_root of the execution layer and the consensus layer now point to the same value
- One use case requiring MPT support is eliminated
Who is affected
- Client teams: Both execution and consensus clients must switch their withdrawal root computation to SSZ, and at fork boundaries they must determine which format applies by checking the block header.
- Block explorer and infrastructure developers: Code that relied on the block header's MPT withdrawal root for verification or proofs must move to the SSZ withdrawals_root standard.
- General users and validators: The method or amount of withdrawal payouts does not change. Only the way the withdrawal list is summarized inside the block changes.
In depth
Withdrawal container definition
A single withdrawal is represented as an SSZ container with four fields: index (WithdrawalIndex, uint64 in SSZ), validator_index (ValidatorIndex, uint64), address (ExecutionAddress, Bytes20), and amount (Gwei, uint64). The existing Withdrawal SSZ container in the consensus spec is migrated to EIP-7495's ProgressiveContainer (active_fields=[1, 1, 1, 1]), while the field composition and types remain unchanged.
Execution block header changes
The method for constructing the execution block header's withdrawals_root changes from MPT to SSZ. The block's withdrawals are placed into a ProgressiveList[Withdrawal], and the hash_tree_root() of that list is used as the header's withdrawals_root. The header field name stays the same; only the way the value is computed changes.
Consensus ExecutionPayload changes
When constructing ExecutionPayload at the consensus layer, the withdrawals list is also declared based on the new progressive container type. That is, the withdrawals field becomes a ProgressiveList[Withdrawal]. In exchange, the state transition function is updated to limit the number of withdrawals in a single payload to no more than MAX_WITHDRAWALS_PER_PAYLOAD.
Why this change, and why now
The source text cites two motivations. First, reducing the number of use cases requiring MPT support lowers complexity. Second, it eliminates the ambiguity of the execution block header's MPT root and the consensus ExecutionPayloadHeader's SSZ root both being called withdrawals_root. This change was originally a candidate for the Shanghai upgrade but was postponed to accelerate the launch of the withdrawal feature.
Backward compatibility and format collision caution
Applications that relied on the block header's existing MPT withdrawals_root must migrate to the SSZ withdrawals_root. Also, since RLP-encoded withdrawals and SSZ-encoded withdrawals can collide in byte representation, only one format must be used within a single channel. When it is necessary to determine which format applies, check the block header that the withdrawal belongs to in order to identify which fork's block it is. The Security Considerations section is listed as none.
Still at the Draft stage
This EIP is in Draft status, so the specification may change going forward. Which fork it will be included in has not been decided either, and this material's core developer call notes contain no decision on this EIP.