New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Networking] logging dial addresses #1492
Conversation
fnb.Me.NodeID(), | ||
myAddr, | ||
fnb.NetworkKey, | ||
fnb.RootBlock.ID(), | ||
fnb.RootChainID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused parameter
Codecov Report
@@ Coverage Diff @@
## master #1492 +/- ##
==========================================
+ Coverage 55.14% 55.16% +0.01%
==========================================
Files 520 520
Lines 32413 32418 +5
==========================================
+ Hits 17875 17883 +8
+ Misses 12141 12138 -3
Partials 2397 2397
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -460,36 +461,41 @@ func (n *Node) CreateStream(ctx context.Context, peerID peer.ID) (libp2pnet.Stre | |||
}() | |||
|
|||
if err != nil { | |||
n.logger.Warn().Err(err).Str("peerID", peerID.Pretty()).Msg("could not find addresses") | |||
lg.Warn().Err(err).Msg("address not found in both peer store and dht") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smnzhu is there a reason why on line 456-461 ☝️ we do:
func() {
timedCtx, cancel := context.WithTimeout(ctx, findPeerQueryTimeout)
defer cancel()
// try to find the peer using the dht
_, err = n.dht.FindPeer(timedCtx, peerID)
}()
instead of just:
timedCtx, cancel := context.WithTimeout(ctx, findPeerQueryTimeout) defer cancel() // try to find the peer using the dht _, err = n.dht.FindPeer(timedCtx, peerID)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, it's because otherwise the defer
will not be run until much later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the FindPeer
succeeds, I want to cancel immediately. But tbh it probably doesn't make a difference here.
Co-authored-by: Vishal <1117327+vishalchangrani@users.noreply.github.com>
…p' into yahya/5941-adding-dial-log-libp2p
To facilitate tracing issues related to unicasts, and as a follow-up on https://github.com/dapperlabs/flow-go/issues/5941, this PR extracts and logs unicast multi-addresses on the happy (through debug level logs), and unhappy (through returned error) paths.
Per conversation with @vishalchangrani we also remove the hard coding log-level for the networking layer from the scaffold.