Commit de86c20
feat(spec-specs, tests): EIP-8037 - per-dimension block gas limit check at tx inclusion (#2703)
* feat(tests): 8037 Check 2d gas before tx inclusion
* feat(spec-specs): More tests for 2d tx inclusion spec change
* fix(tests): consolidate state gas boundary tests and clean docstrings
Cleanups to the per-dimension block gas inclusion tests:
- Combine `test_block_state_gas_limit_exact_fit` and
`test_block_state_gas_limit_exceeded` into
`test_block_state_gas_limit_boundary` parametrized
`delta=[0, 1]` (ids `exact_fit`, `exceeded`) and inline the
`_block_state_gas_limit_setup` helper. Removes ~45 lines with
no coverage loss.
- Fix docstring references in both boundary cases: state
contribution is `tx.gas - intrinsic_regular`, not
`tx.gas - TX_MAX_GAS_LIMIT`.
- Tighten wording in `test_creation_tx_regular_check_subtracts_intrinsic_state`
and add assertion messages that spell out the old-vs-new
formula discrimination.
- Apply ruff format (drop an unneeded line wrap on
`create_intrinsic_regular` in `test_creation_tx_state_check_exceeded`).
Co-authored-by: kclowes <kclowes@users.noreply.github.com>
---------
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>1 parent c230841 commit de86c20
3 files changed
Lines changed: 334 additions & 20 deletions
File tree
- src/ethereum/forks/amsterdam
- tests/amsterdam/eip8037_state_creation_gas_cost_increase
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
| |||
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
| |||
549 | 554 | | |
550 | 555 | | |
551 | 556 | | |
552 | | - | |
553 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
554 | 560 | | |
555 | 561 | | |
556 | 562 | | |
557 | 563 | | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
558 | 567 | | |
559 | 568 | | |
560 | | - | |
561 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
562 | 580 | | |
563 | 581 | | |
564 | 582 | | |
| |||
991 | 1009 | | |
992 | 1010 | | |
993 | 1011 | | |
| 1012 | + | |
994 | 1013 | | |
995 | 1014 | | |
996 | 1015 | | |
| |||
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | | - | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
297 | | - | |
298 | | - | |
| 296 | + | |
299 | 297 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | 298 | | |
304 | | - | |
305 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
| |||
320 | 327 | | |
321 | 328 | | |
322 | 329 | | |
323 | | - | |
| 330 | + | |
324 | 331 | | |
325 | 332 | | |
326 | 333 | | |
| |||
0 commit comments