test_sstore_restoration_charge_in_ancestor()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_charge_in_ancestor@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_charge_in_ancestor --fork Amsterdam
Verify 0 to x to 0 refund when the 0 to x charge is in the parent
and x to 0 runs num_hops DELEGATECALL/CALLCODE frames below,
each sharing storage with the parent.
Every intermediate frame has zero local state_gas_used, so the
refund must propagate up the chain to the ancestor that charged
the 0 to x. A probe SSTORE sized to OOG by 1 detects any loss.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | |
Parametrized Test Cases¶
This test generates 8 parametrized test cases across 1 fork.