EIP-7801 - etha - Sharded Blocks Subprotocol

Created 2024-10-30
Status Draft
Category Networking
Type Standards Track
Authors
Requires

Abstract

This EIP proposes the creation of a new subprotocol, etha, enabling Ethereum nodes to communicate available block spans via a bitmask. Each bit represents a 100_000-block span within each 1_000_000 block range of chain history. Nodes use this bitmask to signal stored spans and commit to storing future spans as they are created. This allows peers to make informed decisions about data availability without first connecting and querying for it. The bitmask repeats every 1 million blocks for straightforward reasoning about data availability probabilities.

The etha subprotocol has the same functionality to serve historical data using message types copied from the eth protocol, enabling efficient data retrieval.

Motivation

With EIP-4444, nodes may prune historical data while others continue serving it. Determining data availability by connecting and requesting blocks is inefficient consuming unnexessary bandwidth. This EIP addresses this inefficiency by enabling nodes to shard chain history into 100_000 block segments and signal availability via a bitmask.

By introducing a separate subprotocol, etha, nodes can exchange this information seamlessly and retain the ability to serve historical data without impacting existing eth protocol versions.

Specification

Subprotocol Handshake

Supported Messages

The etha subprotocol MUST include support for the following messages from the eth/69 protocol to facilitate historical data serving:

The semantics and payload structures for these messages are identical to their counterparts in the eth/69 protocol, ensuring compatibility for historical data serving.

Node Behavior

Upon connection using etha, nodes exchange the handshake message with the blockBitmask. This single handshake eliminates the need for additional message types.

ENR Extension

Alternatively, the blockBitmask could be derived or encoded into the Ethereum Node Record (ENR), enabling nodes to advertise block spans without a handshake. As an example, the blockBitmask can be derived from the secp256k1 field of the ENR. However, this method lacks the authentication and reliability of the handshake approach. Additionally, there is not guarantee that the node you are connecting to supports the etha subprotocol.

Rationale

The bitmask approach provides a flexible means to represent and retain block data while committing to future spans. This mechanism aligns with the pruning proposed in EIP-4444, while ensuring that historical and future data spans remain available across the network.

A similar bitlist approach is already used in the Consensus Layer for attestation subnets, making it a familiar and efficient method for representing data spans. Additionally, committing to future spans ensures better predictability and stability for data locality.

The etha subprotocol separates this functionality from eth ensuring nodes dont hammer other nodes with requests on historical ranges that they do not posses on the eth protocol.

Backwards Compatibility

The etha subprotocol is independent of the eth protocol.

This EIP does not affect the consensus engine or require a hard fork.

Security Considerations

There are some considerations:

Copyright

This document is CC0-licensed; rights are waived through CC0.