diff --git a/state/executor.go b/state/executor.go index 2b19c905e5..0fb5967a44 100644 --- a/state/executor.go +++ b/state/executor.go @@ -155,7 +155,7 @@ func (e *Executor) ProcessBlock( for i, t := range block.Transactions { if t.Gas() > block.Header.GasLimit { - continue + return nil, runtime.ErrOutOfGas } if err = txn.Write(t); err != nil { @@ -179,12 +179,12 @@ func (e *Executor) ProcessBlock( } } - var ( - logMsg = "[Executor.ProcessBlock] finished." - logArgs = []interface{}{"txs count", len(block.Transactions), "txs", buf.String()} - ) - if logLvl <= hclog.Debug { + var ( + logMsg = "[Executor.ProcessBlock] finished." + logArgs = []interface{}{"txs count", len(block.Transactions), "txs", buf.String()} + ) + e.logger.Log(logLvl, logMsg, logArgs...) } @@ -746,7 +746,6 @@ func (t *Transition) apply(msg *types.Transaction) (*runtime.ExecutionResult, er coinbaseFee := new(big.Int).Mul(new(big.Int).SetUint64(result.GasUsed), effectiveTip) t.state.AddBalance(t.ctx.Coinbase, coinbaseFee) - //nolint:godox // Burn some amount if the london hardfork is applied and token is non mintable. // Basically, burn amount is just transferred to the current burn contract. if t.isL1OriginatedToken && t.config.London && msg.Type() != types.StateTxType { diff --git a/state/runtime/evm/state.go b/state/runtime/evm/state.go index 52aba2b9f9..30011e40ae 100644 --- a/state/runtime/evm/state.go +++ b/state/runtime/evm/state.go @@ -261,7 +261,6 @@ func (c *state) Run() ([]byte, error) { // consume the gas of the instruction if !c.consumeGas(inst.gas) { - c.exit(errOutOfGas) c.captureExecution(op.String(), uint64(c.ip), gasCopy, inst.gas) break @@ -332,8 +331,6 @@ func (c *state) allocateMemory(offset, size *big.Int) bool { c.lastGasCost = newCost if !c.consumeGas(cost) { - c.exit(errOutOfGas) - return false }