From e9cc8dcc051ccff90916547027e6088b55083da5 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Wed, 24 May 2023 16:32:39 +0800 Subject: [PATCH] PR feedback of Danny + verify `MAX_BLOBS_PER_BLOCK` size in unittest --- specs/deneb/beacon-chain.md | 2 +- .../test/deneb/unittests/test_config_invariants.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py diff --git a/specs/deneb/beacon-chain.md b/specs/deneb/beacon-chain.md index c8b79f919..cd02d2494 100644 --- a/specs/deneb/beacon-chain.md +++ b/specs/deneb/beacon-chain.md @@ -73,7 +73,7 @@ The blob transactions are packed into the execution payload by the EL/builder wi | Name | Value | | - | - | -| `MAX_BLOB_COMMITMENTS_PER_BLOCK` | `uint64(2**12)` (= 4096) | hardfork independent fixed theoretical limit same as `LIMIT_BLOBS_PER_TX` (see EIP 4844) | +| `MAX_BLOB_COMMITMENTS_PER_BLOCK` | `uint64(2**12)` (= 4096) | hardfork independent fixed theoretical limit same as `LIMIT_BLOBS_PER_TX` (see EIP 4844) | | `MAX_BLOBS_PER_BLOCK` | `uint64(2**2)` (= 4) | Maximum number of blobs in a single block limited by `MAX_BLOB_COMMITMENTS_PER_BLOCK` | ## Configuration 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 new file mode 100644 index 000000000..13a54225e --- /dev/null +++ b/tests/core/pyspec/eth2spec/test/deneb/unittests/test_config_invariants.py @@ -0,0 +1,12 @@ +from eth2spec.test.context import ( + single_phase, + spec_test, + with_deneb_and_later, +) + + +@with_deneb_and_later +@spec_test +@single_phase +def test_length(spec): + assert spec.MAX_BLOBS_PER_BLOCK < spec.MAX_BLOB_COMMITMENTS_PER_BLOCK