test_floor_cost_across_amsterdam_transition()¶
Documentation for tests/amsterdam/eip7976_increase_calldata_floor_cost/test_fork_transition.py::test_floor_cost_across_amsterdam_transition@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7976_increase_calldata_floor_cost/test_fork_transition.py::test_floor_cost_across_amsterdam_transition --fork Amsterdam
Pin the EIP-7976 floor increase across the Amsterdam boundary.
The same data-heavy transaction to an existing EOA (no EVM execution) is sent in a pre-fork block and a post-fork block with the gas limit pinned to the fork-appropriate floor, so the billed gas equals the calldata floor exactly on both sides. The zero-byte arm discriminates the uniform token counting (zero bytes lose their floor discount); the non-zero arm discriminates the per-token price alone.
The per-fork floor returned by the calculator is also checked against a hand-derived value built from each fork's gas constants, so a calculator regression fails here with a clear message rather than only as a downstream balance mismatch.
Source code in tests/amsterdam/eip7976_increase_calldata_floor_cost/test_fork_transition.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 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 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.