test_sstore_refund_quotient_cap()¶
Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_sstore_refunds.py::test_sstore_refund_quotient_cap@343274cc.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8038_state_access_gas_cost_increase/test_sstore_refunds.py::test_sstore_refund_quotient_cap --fork Amsterdam
The applied refund saturates at the EIP-3529 quotient cap.
num_clears distinct non-zero-original slots are each cleared,
accruing num_clears * REFUND_STORAGE_CLEAR into refund_counter.
A single clear's gross gas is small enough that gas_used // 5 is
always below the accrued refund, so the applied refund is the cap and
cumulative_gas_used reflects min(gas_used // 5, accrued).
Source code in tests/amsterdam/eip8038_state_access_gas_cost_increase/test_sstore_refunds.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 1 fork.