Skip to content

test_bal_invalid_surplus_system_address_from_system_call()

Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py::test_bal_invalid_surplus_system_address_from_system_call@c74f1a67.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py::test_bal_invalid_surplus_system_address_from_system_call --fork Amsterdam

Test that clients reject a BAL that includes SYSTEM_ADDRESS solely because it was the synthetic caller of a pre-execution system operation.

Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
@pytest.mark.valid_from("Amsterdam")
@pytest.mark.exception_test
def test_bal_invalid_surplus_system_address_from_system_call(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
) -> None:
    """
    Test that clients reject a BAL that includes SYSTEM_ADDRESS solely because
    it was the synthetic caller of a pre-execution system operation.
    """
    block_timestamp = 12
    beacon_root = Hash(0xABCDEF)

    blockchain_test(
        pre=pre,
        post={},
        blocks=[
            Block(
                txs=[],
                parent_beacon_block_root=beacon_root,
                timestamp=block_timestamp,
                exception=BlockException.INVALID_BLOCK_ACCESS_LIST,
                expected_block_access_list=BlockAccessListExpectation(
                    account_expectations=beacon_root_system_call_expectations(
                        block_timestamp,
                        beacon_root,
                    )
                ).modify(
                    append_account(
                        BalAccountChange(address=SYSTEM_ADDRESS),
                    )
                ),
            )
        ],
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 1 fork.