test_sstore_restoration_sub_frame_revert()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_sub_frame_revert@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_sub_frame_revert --fork Amsterdam
Verify a sub-frame REVERT does not inflate the caller's reservoir under source-based (LIFO) refills.
The sub-call does 0 to x to 0 then REVERTs. The set spilled its
state gas from gas_left, so the refill at x to 0 returns it to
gas_left, not the reservoir. On REVERT the state gas refills to
the parent's gas_left, so the reservoir stays at 0. A probe sized
to OOG by 1 then fails, since its fixed forwarded gas cannot reach
the gas_left refund.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 1 fork.