Skip to content

feat: move p2p and addrbook logs from INFO to DEBUG#2133

Merged
evan-forbes merged 4 commits intomainfrom
copilot/fix-2130
Jul 4, 2025
Merged

feat: move p2p and addrbook logs from INFO to DEBUG#2133
evan-forbes merged 4 commits intomainfrom
copilot/fix-2130

Conversation

Copy link
Contributor

Copilot AI commented Jul 3, 2025

Problem

During block syncing and heavy p2p activity, the terminal gets flooded with verbose INFO-level log messages from p2p and addrbook components, making it difficult to see important information. Users reported log spam like:

6:18PM INF new bucket is full, expiring new book=/Users/rootulp/.celestia-app/config/addrbook.json module=p2p
6:18PM INF Connection is closed @ recvRoutine (likely by the other side) conn=MConn{65.109.83.40:28656} module=p2p
6:18PM INF Saving AddrBook to file size=100
6:18PM INF Ignoring inbound connection: already have enough inbound peers address=192.168.1.1:26656

Solution

Changed specific p2p and addrbook log messages from INFO to DEBUG level to reduce log spam while preserving important error and lifecycle information.

Changes Made

  1. p2p/pex/addrbook.go: "new bucket is full, expiring new" - INFO → DEBUG
  2. p2p/conn/connection.go: "Connection is closed @ recvRoutine (likely by the other side)" - INFO → DEBUG
  3. p2p/pex/file.go: "Saving AddrBook to file" - INFO → DEBUG
  4. p2p/switch.go: "Ignoring inbound connection: already have enough inbound peers" - INFO → DEBUG

Impact

  • Reduces log spam during block syncing and peer discovery
  • Preserves important logs - service lifecycle and error messages remain at appropriate levels
  • Minimal change - only 4 lines modified across 4 files
  • Consistent with previous fixes - follows pattern established in #9764

Testing

  • All p2p tests pass
  • Build successful
  • Verified log level changes work correctly (messages now show D[timestamp] instead of I[timestamp])

Fixes #2130.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 126.101.171.250
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (packet block)
  • 167.42.4.173
    • Triggering command: /tmp/go-build3367807797/b001/pex.test -test.testlogfile=/tmp/go-build3367807797/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.short=true (packet block)
  • 179.222.23.223
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (packet block)
  • 192.0.2.1
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (packet block)
    • Triggering command: /tmp/go-build3367807797/b001/pex.test -test.testlogfile=/tmp/go-build3367807797/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.short=true (packet block)
  • 195.21.4.91
    • Triggering command: /tmp/go-build3367807797/b001/pex.test -test.testlogfile=/tmp/go-build3367807797/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.short=true (packet block)
  • 20.230.104.91
    • Triggering command: /tmp/go-build3367807797/b001/pex.test -test.testlogfile=/tmp/go-build3367807797/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.short=true (packet block)
  • 246.45.68.141
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (packet block)
  • 30.72.37.142
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (packet block)
  • 93.110.115.172
    • Triggering command: /tmp/go-build3367807797/b001/pex.test -test.testlogfile=/tmp/go-build3367807797/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.short=true (packet block)
  • anotherbad.network.addr
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (dns block)
  • bad.network.addr
    • Triggering command: /tmp/go-build3427852302/b571/pex.test -test.testlogfile=/tmp/go-build3427852302/b571/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (dns block)
  • ya.ru
    • Triggering command: /tmp/go-build3427852302/b552/p2p.test -test.testlogfile=/tmp/go-build3427852302/b552/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: evan-forbes <42654277+evan-forbes@users.noreply.github.com>
Copilot AI changed the title [WIP] Move p2p and addrbook logs from INFO to DEBUG feat: move p2p and addrbook logs from INFO to DEBUG Jul 3, 2025
Copilot AI requested a review from evan-forbes July 3, 2025 20:18
@evan-forbes evan-forbes marked this pull request as ready for review July 3, 2025 20:54
@ninabarbakadze
Copy link
Member

Screenshot 2025-07-04 at 11 43 25 wow I'm not used to looking at a PR in comet and seeing this without re-running tests a million times.

@evan-forbes evan-forbes enabled auto-merge (squash) July 4, 2025 11:33
@github-project-automation github-project-automation bot moved this to Needs Triage in core/app Jul 4, 2025
@evan-forbes evan-forbes moved this from Needs Triage to In Progress in core/app Jul 4, 2025
@evan-forbes evan-forbes merged commit 3ca843f into main Jul 4, 2025
20 checks passed
@evan-forbes evan-forbes deleted the copilot/fix-2130 branch July 4, 2025 14:15
@github-project-automation github-project-automation bot moved this from In Progress to Done in core/app Jul 4, 2025
@rootulp
Copy link
Collaborator

rootulp commented Jul 7, 2025

This PR didn't handle the logs for service start

1:11PM INF service start impl="Peer{MConn{195.201.130.235:37116} 86bd5cb6e762f673f1706e5889e039d5406b4b90 out}" module=p2p msg="Starting Peer service" peer=86bd5cb6e762f673f1706e5889e039d5406b4b90@195.201.130.235:37116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Move p2p and addrbook logs from INFO to DEBUG

6 participants