test_top_level_failure_spilled_state_gas()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py::test_top_level_failure_spilled_state_gas@c74f1a67.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py::test_top_level_failure_spilled_state_gas --fork Amsterdam
Verify top-level failure handling for spilled state gas, whether the spill is charged in the frame itself, propagated from a successful subcall, or both.
The reservoir covers half an SSTORE's state gas, so each SSTORE
charge spills into gas_left. A successful child propagates its
state_gas_spilled into the parent, accumulating with the parent's
own spill. Refunds are LIFO, so the spilled portion returns to
gas_left and only the reservoir-funded portion to the reservoir.
- REVERT preserves
gas_left, so all state gas is refunded and the sender pays only the regular component. - Halt refills LIFO then zeros
gas_left, so the spill is burned and only the start reservoir survives.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py
934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | |
Parametrized Test Cases¶
This test generates 6 parametrized test cases across 1 fork.