-
Notifications
You must be signed in to change notification settings - Fork 1k
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
RFC: Identify
should remember discovered peers and assist in peer discovery using addresses_of_peer
#2216
Comments
Thanks for the proposal in #2232. In general I am fine with the solution proposed in #2232. It is simple and non-intrusive. At the same time I do find the proposal to slightly violate concerns. I.e. Overall I am more in favor of an approach similar to #2133, extending
|
I think the way I look at it is that
If that is desired, we can extract the LRU functionality into a component of #2133 is more invasive as it changes public APIs which IMO might need a bit more discussion. For example, to avoid having multiple ways of achieving the same thing, we would have to discuss removing |
While implementing an address book here, I realized that we might be able to achieve the same functionality by adjusting how our existing protocols work. In particular, not all of our discovery-like protocols are currently assisting in peer discovery via
addresses_of_peer
.Identify
for example does not overrideaddresses_of_peer
.What do people think about changing that so that we remember the reported addresses of peers that we have discovered? I think the only issue here is that we potentially have an unbounded memory growth because there isn't really a natural event that we could leverage to clean-up old addresses.
Solutions I could think of:
Ideally,
Identify
would also react to dial failures and remove entries that it reported but which turned out to be useless.Having
Identify
remember reported addresses is particularly useful if:/identify
about A's external addressesIf
Identify
would remember the externally reachable addresses that have previously been identified, Node B would now be able to establish a connection to A by simply dialing itsPeerId
.Currently, users of
rust-libp2p
have to actively handleIdentifyEvent
and add all reported addresses to some otherNetworkBehaviour
that will report it as part ofaddresses_of_peer
later.The text was updated successfully, but these errors were encountered: