test_auth_base_net_new_only()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py::test_auth_base_net_new_only@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py::test_auth_base_net_new_only --fork Amsterdam
AUTH_BASE is charged only when a net-new delegation is set: the
authority held no delegation before the transaction, none was set
for it earlier in the transaction, and the current authorization
sets one. It is charged at most once per authority per transaction
and is never credited back.
pre_tx_delegated_re_set: a pre-delegated authority is re-pointed; the indicator bytes already exist, so noAUTH_BASE. The re-point is still the transaction's first write to the authority, soACCOUNT_WRITEapplies.pre_tx_delegated_clear_then_set: a pre-delegated authority is cleared and then re-delegated in the same transaction. The authority held a delegation before the transaction, so neither authorization paysAUTH_BASE(andACCOUNT_WRITEapplies once, at the clear -- the first write).multiple_sets: an empty-code EOA is delegated and then re-pointed. Only the first set is net-new: oneAUTH_BASE, and oneACCOUNT_WRITEfor the first write.set_clear_cycles: an empty-code EOA is set, cleared, set, and cleared again. The first set chargesAUTH_BASE; the clears credit nothing back and the second set is not net-new (a delegation was already set in this transaction). Exactly oneAUTH_BASEand oneACCOUNT_WRITEare paid even though the authority ends the transaction with no delegation.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py
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 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | |
Parametrized Test Cases¶
This test generates 4 parametrized test cases across 1 fork.