test_sstore_restoration_create_init_revert()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_create_init_revert@2119b382.
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_create_init_revert --fork Amsterdam
Verify a reverting CREATE sub-frame does not inflate the caller's reservoir under source-based (LIFO) refills.
The init code spills its state gas from gas_left, does 0 to x to 0
and REVERTs. The CREATE is wrapped in an outer frame that also
REVERTs. Each refill returns the spilled state gas to gas_left,
and the reverts refill it to the caller's gas_left, not the
reservoir. The reservoir stays at 0, so a probe sized to OOG by 1
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
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.