-
Notifications
You must be signed in to change notification settings - Fork 436
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!: do not auto-dial peers #1397
Conversation
Currently whenever a new peer is discovered we automatically dial them if we are below the connection manager connection limit. This is incredibly resource-intensive and does not result in high-quality connections (e.g. KAD close, relays or supporting protocols we are interested in). Now that we can search the DHT for peers, this is no longer necessary so remove the functionality.
Was this PR/commit overwritten to reverse the functionality?
Not sure what I'm missing. cc @achingbrain |
The autodialer component ensures the node has active connections to a minimum number of peers (configured by The "auto-dial" functionality removed in this PR was that libp2p used to dial every peer it discovered - this is separate to the Hopefully that makes sense. |
Looks like the docs are a little out of date 😩 sorry about that! |
@achingbrain I see. To confirm, libp2p still "autodials" to |
Yes, as per the above, the autodialer component ensures a node keeps |
Thanks for clarifying! |
Currently whenever a new peer is discovered we automatically dial them if we are below the connection manager connection limit.
This is incredibly resource intensive and does not necessarily result in high-quality connections (e.g. KAD close, relays or supporting protocols we are interested in).
Now that we can search the DHT for peers, this is no longer necessary so remove the functionality.
BREAKING CHANGE: the old behaviour was to dial any peer we discover, now we just add them to the peer store instead