Skip to content

test_invalid_multi_type_requests()

Documentation for tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py::test_invalid_multi_type_requests@343274cc.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py::test_invalid_multi_type_requests --fork Amsterdam

Negative testing for all request types in the same block.

In these tests, the requests hash in the header reflects what's received in the parameters portion of the engine_newPayloadVX call, so the block hash calculation might pass if a client copies the info received verbatim, but block validation must fail after the block is executed (via RLP or Engine API).

Source code in tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
@pytest.mark.parametrize_by_fork(
    "requests,block_body_override_requests,exception",
    invalid_requests_block_combinations(correct_requests_hash_in_header=False),
)
@pytest.mark.exception_test
def test_invalid_multi_type_requests(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    override_blocks: List[Block],
) -> None:
    """
    Negative testing for all request types in the same block.

    In these tests, the requests hash in the header reflects what's received in
    the parameters portion of the `engine_newPayloadVX` call, so the block hash
    calculation might pass if a client copies the info received verbatim, but
    block validation must fail after the block is executed (via RLP or Engine
    API).
    """
    blockchain_test(
        genesis_environment=Environment(),
        pre=pre,
        post={},
        blocks=override_blocks,
    )

Parametrized Test Cases

This test generates 25 parametrized test cases across 3 forks.