EIP-7642 · Final · Networking · 2024-02-29
EIP-7642: eth/69 - history expiry and simpler receipts
Version 69 of Ethereum's eth peer-to-peer protocol: peers announce which block range they still serve (needed once pre-merge history is dropped), the handshake loses the obsolete total difficulty, and receipts are sent without their 256-byte bloom filters.
What problem does it solve?
Three leftovers in the eth wire protocol had become costly or misleading:
- History expiry. The history expiry working group decided that clients may drop pre-merge block history (from May 1, 2025 onward). A node syncing history over p2p then needs to know which peers still have it. Without that, it can only find out by asking and failing. A similar earlier proposal, EIP-7542, was withdrawn before history expiry had been agreed.
- Total difficulty. The
Statushandshake carriedtd, which has been meaningless since the merge (post-merge blocks have difficulty 0). - Receipt blooms. No client stores receipt bloom filters, because they can be recomputed from logs. The protocol still made serving nodes regenerate and send them. The spec estimates this at about 530 GB extra per full sync (about 95 GiB after snappy compression).
How it works
eth/69 changes three messages:
Status (0x00): drop td, add the served range.
eth/68: [version, networkid, td, blockhash, genesis, forkid]
eth/69: [version, networkid, genesis, forkid, earliestBlock, latestBlock, latestBlockHash]
Receipts (0x10): flat list, no bloom, and no special wrapping for typed receipts.
eth/68: legacy = [status, cumulative-gas, bloom, logs]; typed = tx-type || rlp(legacy)
eth/69: receipt = [tx-type, post-state-or-status, cumulative-gas, logs]
The receiver recomputes each bloom from the logs to check the block's receipts root, which is cheap.
BlockRangeUpdate (0x11), new: [earliestBlock, latestBlock, latestBlockHash], sent when the served range changes, but at most about once per epoch (32 blocks), to keep traffic low.
Sample code
Rebuilding the consensus receipt (with bloom) from an eth/69 receipt, in TypeScript pseudocode:
import { encodeRlp, concat, toBeHex } from "ethers";
type Log = [address: string, topics: string[], data: string];
type Eth69Receipt = [txType: number, status: string, cumulativeGas: string, logs: Log[]];
function toConsensusEncoding([txType, status, gas, logs]: Eth69Receipt): string {
const bloom = logsBloom(logs); // 256-byte bloom over addresses + topics
const body = encodeRlp([status, gas, bloom, logs]);
return txType === 0 ? body : concat([toBeHex(txType, 1), body]); // typed: type || rlp(...)
}
logsBloom is the standard Ethereum log bloom (3 bits set per address and topic in a 2048-bit filter).
Things to know
- Status is Final. It is a networking change only: no hard fork and no consensus changes. Clients negotiate
eth/69with peers that support it and can keep speakingeth/68with older peers. - It builds on
eth/68(EIP-5793), which added transaction types to announcements. earliestBlockalso prepares for a future, rolling history window (EIP-4444) and lets crawlers measure how many nodes still serve full history.- The next protocol version is being worked on separately: EIP-7975 proposes
eth/70with partial block receipt lists (Last Call at the time of writing).