Skip to content
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

feat: add isDialable method to libp2p #2479

Merged
merged 5 commits into from
Apr 12, 2024
Merged

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 12, 2024

Dialing peers is expensive, as are peer routing queries. Dials can be rejected due to configuration (no transport, connection gating, etc) - if a user is in the middle of a routing query they may wish to test dialability and continue the query instead of assuming they've found a dialable peer.

Adds an isDialable method to libp2p that given one or more multiaddrs, allows testing them to ensure libp2p won't immediately reject the dial attempt due to how the node has been configured.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
chrischdi Christian Schlotter
Dialing peers is expensive, as are peer routing queries. Dials can
be rejected due to configuration (no transport, connection gating,
etc) - if a user is in the middle of a routing query they may wish
to test dialability and continue the query instead of assuming
they've found a dialable peer.

Adds an `isDialable` method to libp2p that given a multiaddr, allows
testing it to ensure libp2p won't reject the dial attempt due to how
the node has been configured.
@achingbrain achingbrain requested a review from a team as a code owner April 12, 2024 07:21
@achingbrain achingbrain merged commit 2c56203 into main Apr 12, 2024
24 checks passed
@achingbrain achingbrain deleted the feat/add-is-dialable-method branch April 12, 2024 10:55
@achingbrain achingbrain mentioned this pull request Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant