From 210c4827bc6824c02c7c0cfcc7aad26294767560 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Mon, 12 Jun 2023 23:57:21 +0800 Subject: [PATCH] Move `BLOB_SIDECAR_SUBNET_COUNT` to networking config --- configs/mainnet.yaml | 2 ++ configs/minimal.yaml | 2 ++ specs/deneb/p2p-interface.md | 7 +++++-- specs/deneb/validator.md | 10 ---------- .../test/deneb/unittests/test_config_invariants.py | 2 ++ 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index fe405cb38..365bc1136 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -132,3 +132,5 @@ MAX_REQUEST_BLOCKS_DENEB: 128 MAX_REQUEST_BLOB_SIDECARS: 768 # `2**12` (= 4096 epochs, ~18 days) MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096 +# `6` +BLOB_SIDECAR_SUBNET_COUNT: 6 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index dcc834963..b22a7165e 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -133,3 +133,5 @@ MAX_REQUEST_BLOCKS_DENEB: 128 MAX_REQUEST_BLOB_SIDECARS: 768 # `2**12` (= 4096 epochs, ~18 days) MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096 +# `6` +BLOB_SIDECAR_SUBNET_COUNT: 6 diff --git a/specs/deneb/p2p-interface.md b/specs/deneb/p2p-interface.md index 32e0ee9bf..809e405a6 100644 --- a/specs/deneb/p2p-interface.md +++ b/specs/deneb/p2p-interface.md @@ -40,11 +40,14 @@ The specification of these changes continues in the same format as the network s ### Configuration +*[New in Deneb:EIP4844]* + | Name | Value | Description | |------------------------------------------|-----------------------------------|---------------------------------------------------------------------| | `MAX_REQUEST_BLOCKS_DENEB` | `2**7` (= 128) | Maximum number of blocks in a single request | -| `MAX_REQUEST_BLOB_SIDECARS` | `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK` | Maximum number of blob sidecars in a single request | -| `MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS` | `2**12` (= 4096 epochs, ~18 days) | The minimum epoch range over which a node must serve blob sidecars | +| `MAX_REQUEST_BLOB_SIDECARS` | `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK` | Maximum number of blob sidecars in a single request | +| `MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS` | `2**12` (= 4096 epochs, ~18 days) | The minimum epoch range over which a node must serve blob sidecars | +| `BLOB_SIDECAR_SUBNET_COUNT` | `6` | The number of blob sidecar subnets used in the gossipsub protocol. | ### Containers diff --git a/specs/deneb/validator.md b/specs/deneb/validator.md index ec9c54784..3157ccf21 100644 --- a/specs/deneb/validator.md +++ b/specs/deneb/validator.md @@ -10,8 +10,6 @@ - [Introduction](#introduction) - [Prerequisites](#prerequisites) -- [Constants](#constants) - - [Misc](#misc) - [Helpers](#helpers) - [`BlobsBundle`](#blobsbundle) - [Modified `GetPayloadResponse`](#modified-getpayloadresponse) @@ -40,14 +38,6 @@ All behaviors and definitions defined in this document, and documents it extends All terminology, constants, functions, and protocol mechanics defined in the updated [Beacon Chain doc of Deneb](./beacon-chain.md) are requisite for this document and used throughout. Please see related Beacon Chain doc before continuing and use them as a reference throughout. -## Constants - -### Misc - -| Name | Value | Unit | -| - | - | :-: | -| `BLOB_SIDECAR_SUBNET_COUNT` | `6` | *[New in Deneb:EIP4844]* The number of blob sidecar subnets used in the gossipsub protocol. | - ## Helpers ### `BlobsBundle` diff --git a/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py index 75955ed16..087bd63c6 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py @@ -18,3 +18,5 @@ def test_length(spec): def test_networking(spec): assert spec.MAX_BLOBS_PER_BLOCK < spec.MAX_BLOB_COMMITMENTS_PER_BLOCK assert spec.config.MAX_REQUEST_BLOB_SIDECARS == spec.config.MAX_REQUEST_BLOCKS_DENEB * spec.MAX_BLOBS_PER_BLOCK + # Start with the same size, but `BLOB_SIDECAR_SUBNET_COUNT` could potentially increase later. + assert spec.config.BLOB_SIDECAR_SUBNET_COUNT == spec.MAX_BLOBS_PER_BLOCK