EIP-4444 Execution Client Historical Data Cap (Bound Historical Data in Execution Clients)

No call decision · Networking & nodes · EIP status Draft · created 2021-11-02

Allows execution clients to stop serving block headers, bodies, and receipts older than 14,299 epochs over the p2p network and to delete them locally. A proposal to reduce the disk burden on nodes.

Why it is needed

Ethereum nodes have until now stored every block header, block body, and receipt in the chain's history. This historical data alone exceeds 400GB and keeps growing, so validating the chain typically requires about 1TB of disk space. However, historical data is not needed to validate new blocks. Once a node has finished syncing to the current head of the chain, this data is only pulled out when someone queries it via JSON-RPC or another node requests it for syncing. This proposal reduces disk requirements by letting clients stop serving data older than a certain age over the p2p network and delete it locally. The code for handling old blocks can also be removed, so clients no longer need to keep maintaining code paths that accumulate with every upgrade. As lightweight syncing methods based on proof of stake's weak subjectivity assumption become more widespread, network bandwidth usage will also decrease.

What changes

Today

After EIP-4444

Who is affected

In depth

Core rule: stop serving data older than 14,299 epochs

The constant HISTORY_PRUNE_EPOCHS is set to 14299. This expresses the consensus layer's block retention period in epochs. Clients SHOULD NOT serve headers, block bodies, or receipts older than this over the p2p network, and MAY delete them locally. In other words, ceasing to serve the data over the network is a recommendation, while local deletion is optional. The rationale notes that relying on individual clients' optional behavior degrades quality, so explicitly mandating that serving stop forces users to seek historical data from other sources.

Why 14,299 epochs

This value matches the consensus layer's block retention period. Some consensus clients assume their paired execution client is storing execution payloads. The two periods are aligned so that a complete beacon block can be supplied for as long as the consensus layer p2p network requires beacon blocks to be served. The consensus layer's retention period derives from the maximum weak subjectivity period, long enough to support checkpoint sync while still bounding the execution client's disk usage. If the consensus layer changes its retention period, HISTORY_PRUNE_EPOCHS must change with it. Otherwise, a client with a valid checkpoint could fail to obtain the payloads it needs from execution layer p2p and fail checkpoint sync.

Bootstrapping: checkpoint sync becomes the default

Once historical data disappears from p2p, a full sync from genesis over devp2p is no longer possible. Clients therefore MUST bootstrap from a valid Weak Subjectivity Checkpoint. From a syncing standpoint, this checkpoint is treated like a genesis block, a method called checkpoint sync. How the checkpoint is obtained is out of scope, and the proposal assumes a client always starts with a valid checkpoint already in hand. Under proof of stake, using a valid checkpoint is central to security because of long-range attacks, and this proposal rests on the assumption that clients never start from an invalid or stale checkpoint.

Preserving historical data through out-of-band channels

Parties that consume historical data, such as web3 applications displaying block, transaction, and account history, are affected. The source document treats preserving Ethereum's history as fundamentally important, and suggests sharing it via torrent magnet links, hosting it on networks like IPFS, or obtaining it from systems such as the Portal Network or The Graph. Clients SHOULD support importing and exporting historical data, and MAY provide scripts that fetch, verify, and automatically import the data.

Full sync from genesis and archive nodes

Full syncing from genesis over p2p is blocked, but the path remains open for anyone who wants to do it themselves. The source proposes a special full-sync client built as a shim stitching together several execution engine releases, which imports historical blocks, validates the entire chain from genesis, and reconstructs the remaining historical data. Archive nodes with state-sync capability are in development, but currently the only reliable way to bootstrap an archive node is a full sync. Clients that want to continue supporting archives must be able to import historical blocks obtained out of band and must maintain support for each past network upgrade.

Two-stage rollout and JSON-RPC regressions

To reduce the impact on user experience, a two-stage rollout is proposed. In stage one, nothing is deleted by default; a command-line option similar to geth's --txlookuplimit lets users who want to opt in delete historical data. In stage two, deletion becomes the default, the option is removed, and users are assumed to obtain and import data through out-of-band methods. After this takes effect, JSON-RPC endpoints like getBlockByHash will be unable to distinguish a hash that is simply old from one that is actually invalid, and endpoints like getLogs will simply lack the requested data. How applications or clients should handle this regression is out of scope.

Centralization and censorship risk

Without an incentive to retain historical data, censorship and availability risks arise. The source states that independent organizations should preserve and seed Ethereum's historical data and regularly check its availability, but leaves concrete mechanisms out of scope. It also notes the risk that as running a full node becomes harder, more dapps will end up fetching historical data from centralized services.

Progress status

This proposal is in Draft status, so the constants and details may still change. The core developer call records provided contain no fork-inclusion decision for this EIP.

Original EIP · ← EIPs