Skip to content

improvement: P2P peer discovery cold-start errors should be WARN not ERROR #4814

Description

@raullenchai

Description

During node startup, the P2P layer logs ERROR level messages for normal DHT cold-start behavior:

ERROR  go-p2p/peerManager.go:102  error when advertising.  {"error": "failed to find any peer in table"}
ERROR  go-p2p/peerManager.go:117  error when finding peers  {"error": "no peers are found"}

These are expected during the first few seconds before DHT peer discovery completes. Non-bootnode nodes always see these errors briefly after startup.

Suggestion

Downgrade these to WARN level in go-p2p (upstream dependency), or add a grace period in peerManager.JoinOverlay that suppresses error logging for the first N seconds after startup.

Impact

  • Noisy logs during node startup confuse operators
  • Makes it harder to spot real P2P errors in log output
  • Triggers false alerts in log monitoring systems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions