Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam committed Sep 25, 2024
1 parent 912bafe commit ba5ac09
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions history/history-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,33 @@ 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.
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),
Expand Down

0 comments on commit ba5ac09

Please sign in to comment.