test_top_frame_new_account_skipped_for_create_target_funded_same_block()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_top_frame_charges.py::test_top_frame_new_account_skipped_for_create_target_funded_same_block@636b5f17.
Generate fixtures for these test cases for Bogota with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_top_frame_charges.py::test_top_frame_new_account_skipped_for_create_target_funded_same_block --fork Bogota
A creation transaction whose target was funded by an earlier
transaction of the same block does not incur the top-frame
NEW_ACCOUNT state charge.
This discriminates the transaction pre-state from the block
pre-state: get_pre_state_account consults the block's
accumulated same-block transaction writes before falling back to
the block pre-state, so the funding transaction's new leaf counts
as pre-existing for the creation transaction. An implementation
snapshotting at block start would charge a second NEW_ACCOUNT,
shifting the creation transaction's receipt by 183,600 and
doubling the state dimension pinned by the header.
The funding transaction pays its own top-frame NEW_ACCOUNT for
materializing the leaf, which the block header pins as the block's
entire state-gas dimension: gas_used = max(execution, state) must
equal exactly one NEW_ACCOUNT.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_top_frame_charges.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 2 forks.