test_creation_tx_regular_check_uses_full_tx_gas()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py::test_creation_tx_regular_check_uses_full_tx_gas@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py::test_creation_tx_regular_check_uses_full_tx_gas --fork Amsterdam
Verify the regular check uses the full tx.gas (no subtraction).
The EIP regular check is min(TX_MAX, tx.gas) > regular_available.
Under EIP-2780 a creation tx has intrinsic.state == 0 (the created
account's NEW_ACCOUNT moved to the top frame), so its intrinsic is
regular-only. This test sizes a creation tx whose full tx.gas
exceeds the remaining regular budget by one — it must be rejected. A
formula that instead used the execution gas
(tx.gas - intrinsic_regular) would have wrongly accepted.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.