From 3b8b799609064f76afcada2527c58ba356bdd889 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 3 Dec 2024 10:05:12 -0600 Subject: [PATCH] Introduce TARGET_BLOBS_PER_BLOCK_ELECTRA --- configs/mainnet.yaml | 2 ++ configs/minimal.yaml | 4 +++- specs/electra/beacon-chain.md | 1 + .../eth2spec/test/electra/unittests/test_config_invariants.py | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index 3a6873a67..159f77024 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -162,6 +162,8 @@ MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000 BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 # `uint64(9)` MAX_BLOBS_PER_BLOCK_ELECTRA: 9 +# `uint64(6)` +TARGET_BLOBS_PER_BLOCK_ELECTRA: 6 # MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index 6560304ff..0676ed9a4 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -156,13 +156,15 @@ MAX_REQUEST_BLOB_SIDECARS: 768 # Electra # [customized] 2**6 * 10**9 (= 64,000,000,000) -MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 +MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 # [customized] 2**7 * 10**9 (= 128,000,000,000) MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000 # `9` BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 # `uint64(9)` MAX_BLOBS_PER_BLOCK_ELECTRA: 9 +# `uint64(6)` +TARGET_BLOBS_PER_BLOCK_ELECTRA: 6 # MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index c0dd09803..becabce78 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -207,6 +207,7 @@ The following values are (non-configurable) constants used throughout the specif | Name | Value | Description | | - | - | - | | `MAX_BLOBS_PER_BLOCK_ELECTRA` | `uint64(9)` | *[New in Electra:EIP-7691]* Maximum number of blobs in a single block limited by `MAX_BLOB_COMMITMENTS_PER_BLOCK` | +| `TARGET_BLOBS_PER_BLOCK_ELECTRA` | `uint64(6)` | *[New in Electra:EIP-7691]* Target number of blobs in a single block limited by `MAX_BLOBS_PER_BLOCK_ELECTRA` | ### Validator cycle diff --git a/tests/core/pyspec/eth2spec/test/electra/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/electra/unittests/test_config_invariants.py index ce4b6684a..4e3b90980 100644 --- a/tests/core/pyspec/eth2spec/test/electra/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/electra/unittests/test_config_invariants.py @@ -19,6 +19,7 @@ def test_processing_pending_partial_withdrawals(spec): @spec_test @single_phase def test_networking(spec): + assert spec.config.TARGET_BLOBS_PER_BLOCK_ELECTRA <= spec.MAX_BLOBS_PER_BLOCK_ELECTRA assert spec.config.MAX_BLOBS_PER_BLOCK_ELECTRA <= spec.MAX_BLOB_COMMITMENTS_PER_BLOCK assert ( spec.config.MAX_REQUEST_BLOB_SIDECARS_ELECTRA ==