Skip to content

Commit

Permalink
revert mininitgas before arbos32
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Sep 10, 2024
1 parent 864c1ab commit af88b44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions precompiles/ArbWasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit af88b44

Please sign in to comment.