From 346e4c3e9a8758ee01a42ecf08b1aa4417fa4335 Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Thu, 28 Mar 2024 16:20:58 +0530 Subject: [PATCH 1/6] fix: made mempool logs small --- mempool/reactor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mempool/reactor.go b/mempool/reactor.go index 6382b0a412b..bbdb2d102fe 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -137,7 +137,7 @@ func (memR *Reactor) RemovePeer(peer p2p.Peer, _ interface{}) { // Receive implements Reactor. // It adds any received transactions to the mempool. func (memR *Reactor) Receive(e p2p.Envelope) { - memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) + memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", "e.Message") switch msg := e.Message.(type) { case *protomem.Txs: protoTxs := msg.GetTxs() @@ -155,9 +155,9 @@ func (memR *Reactor) Receive(e p2p.Envelope) { ntx := types.Tx(tx) err = memR.mempool.CheckTx(ntx, nil, txInfo) if errors.Is(err, ErrTxInCache) { - memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) + memR.Logger.Debug("Tx already exists in cache", "tx", "ntx.String()") } else if err != nil { - memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) + memR.Logger.Info("Could not check tx", "tx", "ntx.String()", "err", err) } } default: From eadf33d52eed61bcf09bb937ff648610484dc089 Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Thu, 28 Mar 2024 17:05:47 +0530 Subject: [PATCH 2/6] fix: remove consensus ps log --- consensus/reactor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index ee87b7ba637..c302e8fac9d 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -1146,7 +1146,7 @@ func (ps *PeerState) SetHasProposalBlockPart(height int64, round int32, index in // Returns true if vote was sent. func (ps *PeerState) PickSendVote(votes types.VoteSetReader) bool { if vote, ok := ps.PickVoteToSend(votes); ok { - ps.logger.Debug("Sending vote message", "ps", ps, "vote", vote) + ps.logger.Debug("Sending vote message", "ps", "ps", "vote", vote) if ps.peer.Send(p2p.Envelope{ ChannelID: VoteChannel, Message: &cmtcons.Vote{ From 86b1e040db6fd85c1229388c6bd5e36cf014cafc Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Thu, 28 Mar 2024 18:56:49 +0530 Subject: [PATCH 3/6] fix: remove consensus aunts log --- consensus/reactor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index c302e8fac9d..4152f3bc439 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -246,7 +246,7 @@ func (conR *Reactor) Receive(e p2p.Envelope) { return } - conR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", msg) + conR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", "msg") // Get peer states ps, ok := e.Src.Get(types.PeerStateKey).(*PeerState) From feebdb033c61c68c94db5d7471eb9becd3cd3112 Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Thu, 28 Mar 2024 23:20:08 +0530 Subject: [PATCH 4/6] commited tx not in local mempool --- mempool/clist_mempool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 266ca32028b..1eaa791d160 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -638,7 +638,7 @@ func (mem *CListMempool) Update( // https://github.com/tendermint/tendermint/issues/3322. if err := mem.RemoveTxByKey(tx.Key()); err != nil { mem.logger.Debug("Committed transaction not in local mempool (not an error)", - "key", tx.Key(), + "key", "tx.Key()", "error", err.Error()) } } From 4fd822eae28c761afb5fd8242356e1f8d894beea Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Fri, 29 Mar 2024 16:08:21 +0530 Subject: [PATCH 5/6] block data --- consensus/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/state.go b/consensus/state.go index d2ae99aef89..44a2aaae1be 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1719,7 +1719,7 @@ func (cs *State) finalizeCommit(height int64) { "root", block.AppHash, "num_txs", len(block.Txs), ) - logger.Debug("committed block", "block", log.NewLazySprintf("%v", block)) + logger.Debug("committed block", "block", log.NewLazyBlockHash(block), "log.NewLazySprintf(v, block)") fail.Fail() // XXX From d2cdca82aebd47362d079f6bda6a4e814352dd0a Mon Sep 17 00:00:00 2001 From: Naman Garg <0708ng@gmail.com> Date: Fri, 29 Mar 2024 17:25:30 +0530 Subject: [PATCH 6/6] receive src --- mempool/reactor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/reactor.go b/mempool/reactor.go index bbdb2d102fe..452dc429a13 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -137,7 +137,7 @@ func (memR *Reactor) RemovePeer(peer p2p.Peer, _ interface{}) { // Receive implements Reactor. // It adds any received transactions to the mempool. func (memR *Reactor) Receive(e p2p.Envelope) { - memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", "e.Message") + memR.Logger.Debug("Receive", "src", "e.Src", "chId", e.ChannelID, "msg", "e.Message") switch msg := e.Message.(type) { case *protomem.Txs: protoTxs := msg.GetTxs()