Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,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)
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())

Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 55 // Patch version component of the current release
VersionPatch = 56 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down
Loading