test_sstore_oog_reservoir_inflation_detection()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py::test_sstore_oog_reservoir_inflation_detection@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py::test_sstore_oog_reservoir_inflation_detection --fork Amsterdam
Detect SSTORE state gas ordering via reservoir inflation.
A factory does CREATE + SSTORE where SSTORE OOGs (1 gas short). After factory failure, the parent's reservoir should contain only CREATE's state gas. A probe contract tests this by doing 4 SSTOREs that need more total state gas than the correct reservoir but less than the inflated one.
With correct ordering (regular gas first): probe OOGs on 4th SSTORE. With wrong ordering (state gas first): reservoir is inflated, probe succeeds.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.