test_set_delegation_oog_charge_point()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_set_delegation_oog_charge_point@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_set_delegation_oog_charge_point --fork Amsterdam
OOG at each distinct charge point inside set_delegation rolls
the whole authorization phase back atomically.
The first authorization creates and delegates its authority in full
(exercising NEW_ACCOUNT + ACCOUNT_WRITE + AUTH_BASE). The
gas_limit then starves the second authorization at exactly the
parametrized charge:
new_account: the second (a creation) runs out at its openingNEW_ACCOUNTstate charge.account_write: the second coversNEW_ACCOUNTbut runs out at the followingACCOUNT_WRITEexecution charge.auth_base: the second (a delegation on an existing empty EOA) covers its first-writeACCOUNT_WRITEbut runs out at the followingAUTH_BASEstate charge.succeeds: asauth_base, but with the one starved gas restored the closingAUTH_BASEis covered exactly and both authorizations apply, pinning the off-by-one boundary of the last charge from above.
In every out-of-gas case the transaction halts in
set_delegation and both authorizations are rolled back -- the
first, already applied, as well as the second -- so both
authorities return to their pre-tx state. The receipt shows the
full gas_limit consumed (exactly covered, in the succeeds
case) and the sender nonce is not rolled back.
Both authorities are read during authorization validation before
the halt, so per EIP-7928 they still appear in the block access
list; only in the succeeds case do they record changes. The
recipient is only loaded by the top-frame dispatch, so it must be
absent whenever the halt precedes it.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py
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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
Parametrized Test Cases¶
This test generates 4 parametrized test cases across 1 fork.