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@892e6d1e.

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
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
@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,
    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=blocks,
    )

Parametrized Test Cases

This test generates 19 parametrized test cases across 3 forks.