test_blockhash_zero_in_window_control()¶
Documentation for tests/frontier/opcodes/test_blockhash_state_test_recency.py::test_blockhash_zero_in_window_control@26332146.
Generate fixtures for these test cases for Cancun with:
fill -v tests/frontier/opcodes/test_blockhash_state_test_recency.py::test_blockhash_zero_in_window_control --fork Cancun
In-window control: BLOCKHASH(0) returns the block-0 hash at block 1.
This is the positive counterpart to the out-of-window test. With block 0
inside the recency window (current block == 1) and previousHash set
to the state-test convention value keccak256("0"), all clients --
including nethermind -- agree on the result, pinning the window boundary.
Restricted to <= Cancun because EIP-2935 (Prague+) serves BLOCKHASH from
the history storage contract, which is not pre-populated in a bare state
test.
Marked state_test_only: the asserted non-zero hash would not match the
real genesis hash of a derived blockchain-test fixture.
Source code in tests/frontier/opcodes/test_blockhash_state_test_recency.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 13 forks.