Skip to content

Commit 8c830e1

Browse files
authored
Test blob_kzg_commitments_merkle_proof with different blob counts (#4161)
1 parent fe73d4e commit 8c830e1

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tests/core/pyspec/eth2spec/test/fulu/merkle_proof/test_single_merkle_proof.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
)
2222

2323

24-
def _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=None):
25-
opaque_tx, blobs, blob_kzg_commitments, _ = get_sample_blob_tx(spec, blob_count=1)
24+
def _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=None, blob_count=1):
25+
opaque_tx, blobs, blob_kzg_commitments, _ = get_sample_blob_tx(spec, blob_count=blob_count)
2626
if rng is None:
2727
block = build_empty_block_for_next_slot(spec, state)
2828
else:
@@ -74,3 +74,21 @@ def test_blob_kzg_commitments_merkle_proof__basic(spec, state):
7474
def test_blob_kzg_commitments_merkle_proof__random_block_1(spec, state):
7575
rng = random.Random(1111)
7676
yield from _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=rng)
77+
78+
79+
@with_test_suite_name("BeaconBlockBody")
80+
@with_fulu_and_later
81+
@spec_state_test
82+
def test_blob_kzg_commitments_merkle_proof__multiple_blobs(spec, state):
83+
blob_count = spec.config.MAX_BLOBS_PER_BLOCK_FULU // 2
84+
rng = random.Random(2222)
85+
yield from _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=rng, blob_count=blob_count)
86+
87+
88+
@with_test_suite_name("BeaconBlockBody")
89+
@with_fulu_and_later
90+
@spec_state_test
91+
def test_blob_kzg_commitments_merkle_proof__max_blobs(spec, state):
92+
max_blobs = spec.config.MAX_BLOBS_PER_BLOCK_FULU
93+
rng = random.Random(3333)
94+
yield from _run_blob_kzg_commitments_merkle_proof_test(spec, state, rng=rng, blob_count=max_blobs)

0 commit comments

Comments
 (0)