The Execution History Network is Portal overlay 0x5000. It stores block
bodies and receipts by block number. Participants are expected to obtain and
retain headers separately so they can validate the content.
Content inventory
The block-body key is selector 0x00 plus the SSZ-encoded uint64 block
number. The value is the RLP block body with transactions, ommers, and
withdrawals.
The receipts key is selector 0x01 plus the SSZ-encoded block number. The value
is the RLP list of receipts.
The content-ID function splits the block number into 16 cycle bits and 48
meaningful offset bits inside a 240-bit offset domain, reverses those offset
bits, places the cycle in the high 16 bits, and sets the low byte to the
content selector. In the pinned function, OFFSET_BITS = 256 - 16 = 240 and
the uint64 block number supplies 48 offset bits; the remaining high offset
bits before reversal become 192 low zero bits after reversal. XOR is the
distance function.
For block number n and selector t, the function is:
offset, cycle = divmod(n, 2**16)
offset = reverse_bits(offset, width=240)
content_id = (cycle << 240) | offset | t
Retrieval and storage
The overlay uses Portal FindContent, Content, Offer, and Accept.
The first Ping/Pong exchange uses the Type 0 client-info, radius, and
capabilities payload. Later exchanges may use the latest payload type shared by
both peers. Each node advertises a 256-bit data radius. A node is interested
when the XOR distance from its node ID to the content ID is at most its radius.
Neighborhood gossip uses that radius.
Validation and failure handling
A receiver checks that the key selector and block number match its request. It decodes the RLP object and checks it against a trusted canonical header. The header supplies the block-hash and root commitments needed to check the body or receipts; execution-state checks remain outside this overlay specification. It does not store data without a trusted header path.
An empty closer-node list ends that lookup branch. Invalid content does not end the full lookup. The requester can continue with other close peers.
Design rationale
The content-ID layout spreads each 65,536-block cycle across the node-ID space while keeping useful runs of block numbers within common storage radii.
History
Older Portal history and state network documents remain under ref/.../legacy.
They are not part of this current wire contract.