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@21507778.

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
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
@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.