@@ -185,11 +185,11 @@ contract GasPricingInvariantTest is InvariantBase {
185185
186186 uint64 nonce = uint64 (vm.getNonce (sender));
187187
188- // Test 1: Insufficient gas — below intrinsic tx cost so the tx cannot execute at all .
189- // Under TIP-1016, SSTORE only costs 20k regular gas (state gas comes from
190- // reservoir ), so any gas above BASE_TX_GAS + CALL_OVERHEAD + 20k would suffice .
191- // We set gas below intrinsic cost to guarantee failure.
192- uint64 lowGas = uint64 (BASE_TX_GAS - 1 );
188+ // Test 1: Insufficient gas — not enough for base tx + call overhead + SSTORE regular gas .
189+ // Note: tempo-foundry does not apply TIP-1000's 250k SSTORE override (tempo_gas_params
190+ // is not wired in ), so the EVM charges standard EIP-2200 costs (~ 20k for SSTORE set) .
191+ // We set gas below BASE_TX_GAS + CALL_OVERHEAD + SSTORE_REGULAR_GAS to guarantee failure.
192+ uint64 lowGas = uint64 (BASE_TX_GAS + SSTORE_REGULAR_GAS );
193193 bytes memory lowGasTx = TxBuilder.buildLegacyCallWithGas (
194194 vmRlp, vm, address (storageContract), callData, nonce, lowGas, privateKey
195195 );
@@ -248,10 +248,9 @@ contract GasPricingInvariantTest is InvariantBase {
248248
249249 uint64 nonce = uint64 (vm.getNonce (sender));
250250
251- // Test 1: Insufficient gas — below intrinsic cost for CREATE tx.
252- // Under TIP-1016, CREATE splits into regular + state gas, so the threshold
253- // is much lower than the total 800k. Use gas below intrinsic cost.
254- uint64 lowGas = uint64 (BASE_TX_GAS - 1 );
251+ // Test 1: Insufficient gas — barely covers intrinsic gas, far below CREATE + code deposit.
252+ // See handler_sstoreNewSlot comment: tempo-foundry uses standard EVM gas costs.
253+ uint64 lowGas = uint64 (BASE_TX_GAS + 1000 );
255254 bytes memory lowGasTx =
256255 TxBuilder.buildLegacyCreateWithGas (vmRlp, vm, initcode, nonce, lowGas, privateKey);
257256
@@ -310,10 +309,9 @@ contract GasPricingInvariantTest is InvariantBase {
310309 bytes memory callData = abi.encodeCall (GasTestStorage.storeMultiple, (slots));
311310 uint64 nonce = uint64 (vm.getNonce (sender));
312311
313- // Test 1: Insufficient gas — below intrinsic tx cost.
314- // Under TIP-1016, each SSTORE only needs 20k regular gas (state gas from
315- // reservoir), so even a small gas limit above intrinsic cost would write slots.
316- uint64 lowGas = uint64 (BASE_TX_GAS - 1 );
312+ // Test 1: Insufficient gas — enough for base tx + call overhead but not enough for
313+ // any SSTORE regular gas. See handler_sstoreNewSlot comment re: tempo-foundry gas costs.
314+ uint64 lowGas = uint64 (BASE_TX_GAS + CALL_OVERHEAD);
317315 bytes memory lowGasTx = TxBuilder.buildLegacyCallWithGas (
318316 vmRlp, vm, address (storageContract), callData, nonce, lowGas, privateKey
319317 );
0 commit comments