Skip to content

test_bal_2935_empty_block()

Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py::test_bal_2935_empty_block@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py::test_bal_2935_empty_block --fork Amsterdam

Ensure BAL captures history storage writes in empty block.

Block with no transactions. At block start (pre-execution), SYSTEM_ADDRESS calls HISTORY_STORAGE_ADDRESS to store parent block hash.

Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
def test_bal_2935_empty_block(
    pre: Alloc,
    blockchain_test: BlockchainTestFiller,
) -> None:
    """
    Ensure BAL captures history storage writes in empty block.

    Block with no transactions. At block start (pre-execution),
    SYSTEM_ADDRESS calls HISTORY_STORAGE_ADDRESS to store parent block hash.
    """
    block = Block(
        txs=[],
        expected_block_access_list=BlockAccessListExpectation(
            account_expectations=block_hash_system_call_expectations(0)
        ),
    )

    blockchain_test(
        pre=pre,
        blocks=[block],
        post={},
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 1 fork.