diff --git a/core/tx_pool.go b/core/tx_pool.go index e9a8894af3f8..af7f5a991de1 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -658,9 +658,14 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { if pool.currentState.GetNonce(from) > tx.Nonce() { return ErrNonceTooLow } + // Get L1 data fee in current state + l1DataFee, err := fees.CalculateL1DataFee(tx, pool.currentState) + if err != nil { + return fmt.Errorf("failed to calculate L1 data fee, err: %w", err) + } // Transactor should have enough funds to cover the costs // cost == V + GP * GL - if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 { + if pool.currentState.GetBalance(from).Cmp(new(big.Int).Add(tx.Cost(), l1DataFee)) < 0 { return ErrInsufficientFunds } // Ensure the transaction has more gas than the basic tx fee. diff --git a/params/version.go b/params/version.go index fa86e3bcd142..b0051b97eb20 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 = 1 // Minor version component of the current release - VersionPatch = 9 // Patch version component of the current release + VersionPatch = 10 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )