From af88b4415ec6fca00b65591092c7081b81911d2d Mon Sep 17 00:00:00 2001 From: Tsahi Zidenberg Date: Mon, 9 Sep 2024 19:07:35 -0600 Subject: [PATCH] revert mininitgas before arbos32 --- precompiles/ArbWasm.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/precompiles/ArbWasm.go b/precompiles/ArbWasm.go index 9f42cacb5ab..a7076a05963 100644 --- a/precompiles/ArbWasm.go +++ b/precompiles/ArbWasm.go @@ -5,6 +5,8 @@ package precompiles import ( "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" + gethparams "github.com/ethereum/go-ethereum/params" "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" @@ -133,6 +135,9 @@ func (con ArbWasm) MinInitGas(c ctx, _ mech) (uint64, uint64, error) { params, err := c.State.Programs().Params() init := uint64(params.MinInitGas) * programs.MinInitGasUnits cached := uint64(params.MinCachedInitGas) * programs.MinCachedGasUnits + if c.State.ArbOSVersion() < gethparams.ArbosVersion_StylusActivationFix { + return 0, 0, vm.ErrExecutionReverted + } return init, cached, err }