EIP-7862 · Draft · Core · 2024-12-23
EIP-7862: Delayed State Root
Makes each block header carry the state root of the previous block instead of its own, taking expensive state-root computation off the critical path for builders and attesters.
What problem does it solve?
Every Ethereum block header contains state_root, the Merkle-Patricia root of all accounts after the block runs. Computing it means hashing every touched trie path, which is one of the slowest steps in producing and validating a block.
That cost lands in the worst place:
- Builders recompute the root for every candidate block they try during the MEV auction, potentially thousands per slot.
- Validators cannot attest that a block is valid until they have recomputed and checked its root.
As gas limits rise and timing tightens with ePBS (EIP-7732), this becomes a bottleneck. EIP-7928 block-level access lists help parallelize execution, but not the root of the block currently being built.
How it works
EIP-7862 shifts the root by one block. No header fields are added; only the meaning of state_root changes:
- The header of block
ncontains the post-state root of blockn-1, which is the pre-state of blockn. - Clients keep a
last_computed_state_root. Header validation checksheader.state_root == last_computed_state_root. - After executing block
n, the client computes its post-state root and stores it, ready to be checked against blockn+1. - At the fork block
F, the header carries the post-state root ofF-1; fromF+1on, each block carries its parent's.
Effects:
- Builders compute one state root per slot (for the previous block), not one per candidate.
- Validators can attest after executing a block without waiting on its root.
- Root computation for block
ncan start as soon as it arrives, using blockn's access list to parallelize, and finish in time for blockn+1.
Sample code
The core change in execution-spec style pseudocode:
def validate_header(chain, header):
# Delayed: this header commits to the PARENT's post-state.
if header.state_root != chain.last_computed_state_root:
raise InvalidBlock
# ... other checks unchanged
def state_transition(chain, block):
validate_header(chain, block.header)
out = apply_body(block_env, block.transactions, block.withdrawals)
if out.block_gas_used != block.header.gas_used:
raise InvalidBlock
# receipts, logs bloom, requests ... still validated as before
# Computed off the critical path; checked by the NEXT block.
chain.last_computed_state_root = state_root(block_env.state)
chain.blocks.append(block)
Things to know
- Status: Draft. It requires a hard fork; non-upgraded clients will reject the new blocks.
- Light clients and anyone verifying state proofs see one extra slot of latency: proofs about block
n's result need blockn+1's header. - Clients must keep block
n's pre-state until its root has been included in the next block, and recomputelast_computed_state_rootalong the new chain during reorgs. - The consensus-layer state root in ePBS payload envelopes is unaffected; only the execution header changes.
- EIP-7886 (Delayed execution) explores a related idea of separating block validation from execution.