From 04d45b619440272599b35d22ec7ab3c7bdfc6a7a Mon Sep 17 00:00:00 2001 From: aarshkshah1992 Date: Wed, 7 Jan 2026 15:19:51 +0530 Subject: [PATCH] improve logging --- beacon-chain/p2p/gossip_peer_controller.go | 6 +++--- beacon-chain/p2p/gossip_peer_crawler.go | 2 +- beacon-chain/p2p/service.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/beacon-chain/p2p/gossip_peer_controller.go b/beacon-chain/p2p/gossip_peer_controller.go index 8aa711bab9..5a8e22eccc 100644 --- a/beacon-chain/p2p/gossip_peer_controller.go +++ b/beacon-chain/p2p/gossip_peer_controller.go @@ -14,8 +14,8 @@ import ( ) const dialInterval = 500 * time.Millisecond -const peerCountLogInterval = 1 * time.Minute -const topicMonitorInterval = 1 * time.Second +const peerCountLogInterval = 5 * time.Minute +const topicMonitorInterval = 200 * time.Millisecond // GossipPeerDialer maintains minimum peer counts for gossip topics by periodically // dialing new peers discovered by a crawler. It runs a background loop that checks each @@ -121,7 +121,7 @@ func (g *GossipPeerDialer) logPeerCountsLoop() { log.WithField("topic", topic). WithField("currentPeers", currentPeers). WithField("minPeers", minPeers). - Info("Gossip topic peer count") + Debug("Gossip topic peer count") } case <-g.ctx.Done(): diff --git a/beacon-chain/p2p/gossip_peer_crawler.go b/beacon-chain/p2p/gossip_peer_crawler.go index 541879c3af..1e1ded62da 100644 --- a/beacon-chain/p2p/gossip_peer_crawler.go +++ b/beacon-chain/p2p/gossip_peer_crawler.go @@ -171,7 +171,7 @@ func (cp *crawledPeers) logPeerCounts() { log.WithField("topic", topic). WithField("totalPeers", len(peers)). WithField("pingedPeers", pingedCount). - Info("Crawler indexed peers for topic") + Debug("Crawler indexed peers for topic") } } diff --git a/beacon-chain/p2p/service.go b/beacon-chain/p2p/service.go index 620f9abf50..99c3f79cd7 100644 --- a/beacon-chain/p2p/service.go +++ b/beacon-chain/p2p/service.go @@ -64,7 +64,7 @@ var ( // defined below. pollingPeriod = 6 * time.Second - crawlTimeout = 30 * time.Second + crawlTimeout = 5 * time.Second crawlInterval = 1 * time.Second maxConcurrentDials = int64(256) )