|
21 | 21 | )
|
22 | 22 |
|
23 | 23 |
|
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) |
26 | 26 | if rng is None:
|
27 | 27 | block = build_empty_block_for_next_slot(spec, state)
|
28 | 28 | else:
|
@@ -74,3 +74,21 @@ def test_blob_kzg_commitments_merkle_proof__basic(spec, state):
|
74 | 74 | def test_blob_kzg_commitments_merkle_proof__random_block_1(spec, state):
|
75 | 75 | rng = random.Random(1111)
|
76 | 76 | 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