diff --git a/miner/taiko_worker.go b/miner/taiko_worker.go index 59e8ef298c..1da0fccf7e 100644 --- a/miner/taiko_worker.go +++ b/miner/taiko_worker.go @@ -46,7 +46,8 @@ func (w *Miner) buildTransactionsLists( currentHead = w.chain.CurrentBlock() ) - log.Info("buildTransactionsLists", + log.Info( + "Start building transactions lists", "blockMaxGasLimit", blockMaxGasLimit, "maxBytesPerTxList", maxBytesPerTxList, "maxTransactionsLists", maxTransactionsLists, @@ -55,7 +56,14 @@ func (w *Miner) buildTransactionsLists( ) if currentHead == nil { - log.Error("buildTransactionsLists failed to find current head") + log.Error( + "Failed to find current head", + "blockMaxGasLimit", blockMaxGasLimit, + "maxBytesPerTxList", maxBytesPerTxList, + "maxTransactionsLists", maxTransactionsLists, + "localAccounts", localAccounts, + "minTip", minTip, + ) return nil, fmt.Errorf("failed to find current head") } @@ -67,8 +75,10 @@ func (w *Miner) buildTransactionsLists( OnlyPlainTxs: true, }, )) == 0 { - log.Warn("buildTransactionsLists: tx pool is empty", + log.Warn( + "Transaction pool for building transactions lists is empty", "minTip", minTip, + "baseFee", baseFee, "onlyPlainTxs", true, ) return txsLists, nil @@ -84,12 +94,15 @@ func (w *Miner) buildTransactionsLists( baseFeePerGas: baseFee, } - log.Info("buildTransactionsLists: prepare work", + log.Info( + "Prepare the sealing task for building transactions lists", "timestamp", params.timestamp, "forceTime", params.forceTime, "parentHash", params.parentHash, "coinbase", params.coinbase, "random", params.random, + "minTip", minTip, + "baseFee", baseFee, "noTxs", params.noTxs, ) @@ -121,12 +134,24 @@ func (w *Miner) buildTransactionsLists( minTip, ) if err != nil { - log.Error("buildTransactionsLists: commit transactions failed", "error", err) + log.Error( + "Failed to commit transactions for building transactions lists", + "timestamp", params.timestamp, + "forceTime", params.forceTime, + "parentHash", params.parentHash, + "coinbase", params.coinbase, + "random", params.random, + "minTip", minTip, + "baseFee", baseFee, + "noTxs", params.noTxs, + "error", err, + ) return nil, nil, err } - log.Info("buildTransactionsLists: commit transactions", + log.Info( + "New transactions committed for building transactions lists", "localTxs", len(localTxs), "remoteTxs", len(remoteTxs), "txsPruned", len(pruningResult.TxsPruned), @@ -161,7 +186,16 @@ func (w *Miner) buildTransactionsLists( txsLists = append(txsLists, preBuiltTxList) } - log.Info("buildTransactionsLists: commit transactions finished", + log.Info( + "Finished building transactions lists", + "timestamp", params.timestamp, + "forceTime", params.forceTime, + "parentHash", params.parentHash, + "coinbase", params.coinbase, + "random", params.random, + "minTip", minTip, + "baseFee", baseFee, + "noTxs", params.noTxs, "txLists", len(txsLists), ) diff --git a/rpc/websocket.go b/rpc/websocket.go index 4e082b378b..9f67caf859 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -33,12 +33,12 @@ import ( ) const ( - wsReadBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024 - wsWriteBuffer = 10 * 1024 * 1024 // CHANGE(taiko): change to 10 * 1024 * 1024 + wsReadBuffer = 1024 + wsWriteBuffer = 1024 wsPingInterval = 30 * time.Second wsPingWriteTimeout = 5 * time.Second wsPongTimeout = 30 * time.Second - wsDefaultReadLimit = 100 * 1024 * 1024 // CHANGE(taiko): change to 100 * 1024 * 1024 + wsDefaultReadLimit = 32 * 1024 * 1024 ) var wsBufferPool = new(sync.Pool)