diff --git a/core/state_transition.go b/core/state_transition.go index afe0406db9a..149ac5420da 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -24,6 +24,7 @@ import ( types2 "github.com/ledgerwatch/erigon-lib/types" "github.com/ledgerwatch/erigon/consensus" "github.com/ledgerwatch/erigon/core/types" + "math" cmath "github.com/ledgerwatch/erigon/common/math" "github.com/ledgerwatch/erigon/common/u256" @@ -368,8 +369,13 @@ func (st *StateTransition) TransitionDb(refunds bool, gasBailout bool) (*Executi gasBailout = true } + var skipCheck bool + if st.evm.ChainConfig().Parlia != nil && st.msg.Gas() == math.MaxUint64/2 && st.msg.From() == coinbase { + skipCheck = true + } + // Check clauses 1-3 and 6, buy gas if everything is correct - if err := st.preCheck(gasBailout); err != nil { + if err := st.preCheck(gasBailout || skipCheck); err != nil { return nil, err } if st.evm.Config().Debug {