test_sstore_oog_no_reservoir_inflation()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_sstore_oog_no_reservoir_inflation@a9abd46e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_sstore_oog_no_reservoir_inflation --fork Amsterdam
Verify SSTORE state gas is not charged when regular gas OOGs.
With zero reservoir, all state gas spills into gas_left. A child frame does CREATE (charging state gas from gas_left) followed by SSTORE. When the factory is 1 gas short, SSTORE OOGs. If state gas is incorrectly charged before regular gas, the extra state gas inflates the parent's reservoir on frame failure, changing the transaction's effective gas consumption.
Regression test for SSTORE gas ordering: regular gas must be checked before state gas.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py
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 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.