Skip to content

Commit d9c9c66

Browse files
committed
add back test with comments
1 parent bc80f26 commit d9c9c66

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,26 @@ def test_incorrect_commitments_order(spec, state):
219219
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)
220220

221221

222+
@with_deneb_and_later
223+
@spec_state_test
224+
def test_incorrect_transaction_no_blobs_but_with_commitments(spec, state):
225+
"""
226+
The versioned hashes are wrong, but the testing ExecutionEngine returns VALID by default.
227+
"""
228+
execution_payload = build_empty_execution_payload(spec, state)
229+
230+
# the blob transaction is invalid, because the EL verifies that the tx contains at least one blob
231+
# therefore the EL should reject it, but the CL should not reject the block regardless
232+
opaque_tx, _, _, _ = get_sample_blob_tx(spec, blob_count=0, rng=Random(1111))
233+
_, _, blob_kzg_commitments, _ = get_sample_blob_tx(spec, blob_count=2, rng=Random(1112))
234+
235+
execution_payload.transactions = [opaque_tx]
236+
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)
237+
238+
# the transaction doesn't contain any blob, but commitments are provided
239+
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)
240+
241+
222242
@with_deneb_and_later
223243
@spec_state_test
224244
def test_incorrect_block_hash(spec, state):

0 commit comments

Comments
 (0)