test_slotnum_distinct_per_block()¶
Documentation for tests/amsterdam/eip7843_slotnum/test_slotnum.py::test_slotnum_distinct_per_block@b314d18e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7843_slotnum/test_slotnum.py::test_slotnum_distinct_per_block --fork Amsterdam
Test that SLOTNUM returns each block's own slot number.
Runs four consecutive blocks with deliberately non-monotonic slot
numbers to disprove any caching or ordering assumption in the opcode
implementation. Each block runs the same contract, which keys storage
by block NUMBER so every block's outcome is independently visible
in the final post-state.
Source code in tests/amsterdam/eip7843_slotnum/test_slotnum.py
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 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.