From 9b8556f5f00aea8aaf52fc5d49aa738d9cc18627 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:36:50 +0200 Subject: [PATCH 1/4] Add BeaconBlocksByRange v3 --- specs/electra/p2p-interface.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/specs/electra/p2p-interface.md b/specs/electra/p2p-interface.md index ebdcaaa831..ff4c7cc3ca 100644 --- a/specs/electra/p2p-interface.md +++ b/specs/electra/p2p-interface.md @@ -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) @@ -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`. + + From 06fb7a0ff8c18269f8387642750a54a5eadca1b7 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:13:02 +0200 Subject: [PATCH 2/4] Fix block_root definition --- specs/electra/p2p-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/electra/p2p-interface.md b/specs/electra/p2p-interface.md index ff4c7cc3ca..e76092df14 100644 --- a/specs/electra/p2p-interface.md +++ b/specs/electra/p2p-interface.md @@ -87,6 +87,6 @@ Response Content: 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`. +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 + count` the responder MUST respond with `1: InvalidRequest`. From a3ef2d7a281a18bdfff2d04a3c9a3678a179642c Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:59:17 +0200 Subject: [PATCH 3/4] Add BlobSidecarsByRange v2 --- specs/electra/p2p-interface.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/specs/electra/p2p-interface.md b/specs/electra/p2p-interface.md index e76092df14..4ebf4a6d5c 100644 --- a/specs/electra/p2p-interface.md +++ b/specs/electra/p2p-interface.md @@ -19,6 +19,7 @@ The specification of these changes continues in the same format as the network s - [The Req/Resp domain](#the-reqresp-domain) - [Messages](#messages) - [BeaconBlocksByRange v3](#beaconblocksbyrange-v3) + - [BlobSidecarsByRange v2](#blobsidecarsbyrange-v2) @@ -89,4 +90,27 @@ Extends behaviour of BeaconBlocksByRange v2 as defined in [the altair p2p spec]( 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 + count` the responder MUST respond with `1: InvalidRequest`. +#### BlobSidecarsByRange v2 + +**Protocol ID:** `/eth2/beacon_chain/req/blob_sidecars_by_range/2/` + +Request Content: +``` +( + block_root: Root + start_slot: Slot + count: uint64 +) +``` + +Response Content: +``` +( + List[SignedBeaconBlock, MAX_REQUEST_BLOCKS] +) +``` + +Extends behaviour of BlobSidecarByRange v2 as defined in [the deneb p2p spec](../deneb/p2p-interface.md). + +Requests blob sidecars 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 + count` the responder MUST respond with `1: InvalidRequest`. From f782b27f2681504c20290747ecc7bcb1f35d158b Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:01:50 +0200 Subject: [PATCH 4/4] Update specs/electra/p2p-interface.md Co-authored-by: Pop Chunhapanya --- specs/electra/p2p-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/electra/p2p-interface.md b/specs/electra/p2p-interface.md index 4ebf4a6d5c..a6efd40c99 100644 --- a/specs/electra/p2p-interface.md +++ b/specs/electra/p2p-interface.md @@ -106,7 +106,7 @@ Request Content: Response Content: ``` ( - List[SignedBeaconBlock, MAX_REQUEST_BLOCKS] + List[BlobSidecar, MAX_REQUEST_BLOB_SIDECARS] ) ```