You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently log libp2p connection issues in three places:
p2p/ping.go
p2p/sender.go
p2p/relay.go
Most connection logs are however swarm.ErrDialBackoff which provide no information and is just noise and it hides the actual reason for connection issue making debugging and resolving network issues very hard.
Proposed solution
Clean up libp2p errors:
Add a function p2p.ConvertErr(error) error that converts libp2p swarm.DialErrors to our error format.
Remove noisy variables from message
pick the first error in the batch (add other errors as fields)
Add a p2p.IsNoisyErr function that returns true if the error is swarm.ErrDialBackoff
Do not log noisy errors in p2p/sender.go, p2p/relay.go
Add tests for all of these
Refactor ping.go:
Use expbackoff for better backoff and retry and less noisy logs.
Set hysteresis=1 maybe
When p2p.IsNoisyErr do host.Connect with network.WithForceDirectDial to obtain real error.
Test this manually via compose
The text was updated successfully, but these errors were encountered:
Refactors the p2p connectedness logging:
- Use ping service as thing that logs whether peer X is connected or not.
- Extract dial error reasons per address
- Attempt to resolve "dial backoff" errors into "real" dial errors.
- Only log when reasons change or every 10min.
category: refactor
ticket: #986
Problem to be solved
We currently log libp2p connection issues in three places:
p2p/ping.go
p2p/sender.go
p2p/relay.go
Most connection logs are however
swarm.ErrDialBackoff
which provide no information and is just noise and it hides the actual reason for connection issue making debugging and resolving network issues very hard.Proposed solution
Clean up libp2p errors:
p2p.ConvertErr(error) error
that converts libp2p swarm.DialErrors to our error format.p2p.IsNoisyErr
function that returns true if the error isswarm.ErrDialBackoff
p2p/sender.go
,p2p/relay.go
Refactor
ping.go
:hysteresis=1
maybep2p.IsNoisyErr
dohost.Connect
withnetwork.WithForceDirectDial
to obtain real error.The text was updated successfully, but these errors were encountered: