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@26332146.
Generate fixtures for these test cases for Amsterdam 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 Amsterdam
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
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 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 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.