-
Notifications
You must be signed in to change notification settings - Fork 964
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
fix(identify): only report observed address once per connection #4721
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Applying |
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.
Good to go from my end. Thanks.
Co-authored-by: Max Inden <mail@max-inden.de>
@mxinden I updated some docs as well. |
This comment was marked as resolved.
This comment was marked as resolved.
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.
Docs read well to me.
Retriggered CI with "spurious network failure". |
Description
At the moment,
libp2p-identify
reports an observed address repeatedly as a new external address candidate even if it is the same address from the same connection. Unless the underlying transport supports roaming, a connection does not change its observed address.We change the behaviour of
libp2p-identify
to remember the observed address for a particular connection and not re-emit theNewExternalAddrCandidate
event for it. This allows users to probabilistically promote a candidate to an external address based on its report frequency. If an address is reported twice, it means we have two connections where the remote observed this address. Chances are, we have port-reuse enabled for this connection and it might thus be dialable or at least a good candidate for hole-punching.Related: #4688.
Notes & open questions
cc @altonen
Change checklist