From ba5ac098e147dc1b4393a73c457f89c654bc5784 Mon Sep 17 00:00:00 2001 From: Piper Merriam Date: Wed, 25 Sep 2024 13:35:19 -0600 Subject: [PATCH] d --- history/history-network.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/history/history-network.md b/history/history-network.md index 405471a4..76c5de14 100644 --- a/history/history-network.md +++ b/history/history-network.md @@ -213,6 +213,8 @@ This content type represents block headers *near* the HEAD of the chain. They a > Note: This message is not valid for Gossip. Clients should not send or accept gossip messages for this content type. +> Note: Clients **should** implement a mechanism to purge headers older than 8192 blocks from their content databases. + ```python # The maximum number of ephemeral headers that can be requested or transferred # in a single request. @@ -220,15 +222,24 @@ MAX_EPHEMERAL_HEADER_PAYLOAD = 256 # Content and content key -recent_headers = Container(block_hash: Bytes32, ancestor_count: uint8) +ephemeral_headers_key = Container(block_hash: Bytes32, ancestor_count: uint8) selector = 0x04 -block_header_list = List(ByteList[1024], limit=256) +ephemeral_header_payload = List(ByteList[1024], limit=256) -content = SSZ.serialize(block_header_list) -content_key = selector + SSZ.serialize(recent_headers) +content = SSZ.serialize(ephemeral_header_payload) +content_key = selector + SSZ.serialize(ephemeral_headers_key) ``` +The `ephemeral_header_payload` is an SSZ list of RLP encoded block header +objects. The this object is subject to the following validity conditions. + +* The list **may** be empty which signals that the responding node was unable to fulfill the request. +* The first element in the list **must** be the RLP encoded block header indicated by the `ephemeral_headers_key.block_hash` field from the content key. +* Each element after the first element in the list **must** be the RLP encoded block header indicated by the `header.parent_hash` of the previous item from the list. +* The list **should** contain no more than `ephemeral_headers_key.ancestor_count` items. + + #### Block Body After the addition of `withdrawals` to the block body in the [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895),