From d9c9c66f849931faf1f9eb536081556d109f3f6b Mon Sep 17 00:00:00 2001 From: debjit Date: Mon, 20 Jan 2025 22:32:18 +0530 Subject: [PATCH] add back test with comments --- .../test_process_execution_payload.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py index e3fb36f60b..cfdfdaac97 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py @@ -219,6 +219,26 @@ def test_incorrect_commitments_order(spec, state): yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments) +@with_deneb_and_later +@spec_state_test +def test_incorrect_transaction_no_blobs_but_with_commitments(spec, state): + """ + The versioned hashes are wrong, but the testing ExecutionEngine returns VALID by default. + """ + execution_payload = build_empty_execution_payload(spec, state) + + # the blob transaction is invalid, because the EL verifies that the tx contains at least one blob + # therefore the EL should reject it, but the CL should not reject the block regardless + opaque_tx, _, _, _ = get_sample_blob_tx(spec, blob_count=0, rng=Random(1111)) + _, _, blob_kzg_commitments, _ = get_sample_blob_tx(spec, blob_count=2, rng=Random(1112)) + + execution_payload.transactions = [opaque_tx] + execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state) + + # the transaction doesn't contain any blob, but commitments are provided + yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments) + + @with_deneb_and_later @spec_state_test def test_incorrect_block_hash(spec, state):