test_bal_withdrawal_predeploy_balance_observed_cross_tx()¶
Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py::test_bal_withdrawal_predeploy_balance_observed_cross_tx@2119b382.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py::test_bal_withdrawal_predeploy_balance_observed_cross_tx --fork Amsterdam
Test that a subsequent transaction observes the post-state balance of the withdrawal predeploy after a prior transaction in the same block paid the withdrawal fee.
Within one block
- tx 0: EOA sends
feewei to WITHDRAWAL_REQUEST_PREDEPLOY with a valid withdrawal-request calldata. The predeploy retains the fee, so its balance transitions 0 -> fee (BAL balance_change at index 1). - tx 1: calls a reader contract that performs
SSTORE(0, BALANCE(WITHDRAWAL_REQUEST_PREDEPLOY)).
Per EIP-7928, the BAL prefix consumed by tx 1's execution must include
tx 0's balance change for the predeploy, so the BALANCE opcode returns
fee and slot 0 of the reader ends at fee. The predeploy is also
touched by the prepare-block system call (storage reads at slots 0-3),
making its address one whose pre-block snapshot would otherwise mask the
BAL overlay if consulted ahead of the BAL prefix.
Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py
410 411 412 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 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.