Skip to content

Commit

Permalink
Add BeaconBlocksByRange v3
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Jul 15, 2024
1 parent a3a6c91 commit 9b8556f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions specs/electra/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The specification of these changes continues in the same format as the network s
- [Global topics](#global-topics)
- [`beacon_aggregate_and_proof`](#beacon_aggregate_and_proof)
- [`beacon_attestation_{subnet_id}`](#beacon_attestation_subnet_id)
- [The Req/Resp domain](#the-reqresp-domain)
- [Messages](#messages)
- [BeaconBlocksByRange v3](#beaconblocksbyrange-v3)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->
Expand Down Expand Up @@ -57,3 +60,33 @@ The following convenience variables are re-defined
The following validations are added:
* [REJECT] `len(committee_indices) == 1`, where `committee_indices = get_committee_indices(attestation)`.
* [REJECT] `attestation.data.index == 0`

## The Req/Resp domain

### Messages

#### BeaconBlocksByRange v3

**Protocol ID:** `/eth2/beacon_chain/req/beacon_blocks_by_range/3/`

Request Content:
```
(
block_root: Root
start_slot: Slot
count: uint64
)
```

Response Content:
```
(
List[SignedBeaconBlock, MAX_REQUEST_BLOCKS]
)
```

Extends behaviour of BeaconBlocksByRange v2 as defined in [the altair p2p spec](../altair/p2p-interface.md).

Requests beacon blocks in the slot range `[start_slot, start_slot + count)`, leading up to `block_root`. If the block with `block_root` is unknown the responder MUST respond with `3: ResourceUnavailable`. If the slot of the block with `block_root` is less than `start_slot` the responder MUST respond with `1: InvalidRequest`.


0 comments on commit 9b8556f

Please sign in to comment.