diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index 56b458e4d5..da1a67cd09 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -838,6 +838,16 @@ func (w *worker) processTxn(tx *types.Transaction) (bool, error) { return false, errors.New("tx too big") } + // Reject transactions that require the max data fee amount. + // This can only happen if the L1 gas oracle is updated incorrectly. + l1DataFee, err := fees.CalculateL1DataFee(tx, w.current.state, w.chain.Config(), w.current.header.Number, w.current.header.Time) + if err != nil { + return false, fmt.Errorf("failed to calculate L1 data fee, err: %w", err) + } + if l1DataFee.Cmp(fees.MaxL1DataFee()) >= 0 { + return false, errors.New("invalid transaction: invalid L1 data fee") + } + // Start executing the transaction w.current.state.SetTxContext(tx.Hash(), w.current.txs.Len()) diff --git a/params/version.go b/params/version.go index 6b1ffd3c7b..d0d69aa491 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 59 // Patch version component of the current release + VersionPatch = 60 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )