diff --git a/core/tx_pool.go b/core/tx_pool.go index e7d5062fd5..8cc9e2ffd0 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -706,7 +706,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { return ErrOversizedData } // Reject transactions that cannot fit into a block even as a single transaction - if !pool.chainconfig.Scroll.IsValidBlockSize(tx.Size()) { + if !pool.chainconfig.Scroll.IsValidBlockSizeForMining(tx.Size()) { return ErrOversizedData } // Check whether the init code size has been exceeded. diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index 02f331bc20..ec6337bef4 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -742,7 +742,7 @@ func (w *worker) processTxn(tx *types.Transaction) (bool, error) { return false, ErrUnexpectedL1MessageIndex } - if !tx.IsL1MessageTx() && !w.chain.Config().Scroll.IsValidBlockSize(w.current.blockSize+tx.Size()) { + if !tx.IsL1MessageTx() && !w.chain.Config().Scroll.IsValidBlockSizeForMining(w.current.blockSize+tx.Size()) { // can't fit this txn in this block, silently ignore and continue looking for more txns return false, errors.New("tx too big") } diff --git a/params/config.go b/params/config.go index 11b8ff9390..eb2213fdd3 100644 --- a/params/config.go +++ b/params/config.go @@ -718,6 +718,11 @@ func (s ScrollConfig) IsValidBlockSize(size common.StorageSize) bool { return s.MaxTxPayloadBytesPerBlock == nil || size <= common.StorageSize(*s.MaxTxPayloadBytesPerBlock) } +// IsValidBlockSizeForMining is similar to IsValidBlockSize, but it accounts for the confidence factor in Rust CCC +func (s ScrollConfig) IsValidBlockSizeForMining(size common.StorageSize) bool { + return s.IsValidBlockSize(size * (1.0 / 0.95)) +} + // EthashConfig is the consensus engine configs for proof-of-work based sealing. type EthashConfig struct{} diff --git a/params/version.go b/params/version.go index 91a6945093..c523758cbe 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 = 7 // Minor version component of the current release - VersionPatch = 23 // Patch version component of the current release + VersionPatch = 24 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/rollup/pipeline/pipeline.go b/rollup/pipeline/pipeline.go index 4c0abd3e53..12c34e2c96 100644 --- a/rollup/pipeline/pipeline.go +++ b/rollup/pipeline/pipeline.go @@ -272,7 +272,7 @@ func (p *Pipeline) traceAndApplyStage(txsIn <-chan *types.Transaction) (<-chan e continue } - if !tx.IsL1MessageTx() && !p.chain.Config().Scroll.IsValidBlockSize(p.blockSize+tx.Size()) { + if !tx.IsL1MessageTx() && !p.chain.Config().Scroll.IsValidBlockSizeForMining(p.blockSize+tx.Size()) { // can't fit this txn in this block, silently ignore and continue looking for more txns sendCancellable(resCh, nil, p.ctx.Done()) continue