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

Batch dialling #1616

Closed
achingbrain opened this issue Mar 8, 2023 · 0 comments · Fixed by #1623
Closed

Batch dialling #1616

achingbrain opened this issue Mar 8, 2023 · 0 comments · Fixed by #1623
Assignees
Labels
effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature

Comments

@achingbrain
Copy link
Member

The libp2p.dial method should support dialling multiple multiaddrs - it currently supports dialing a peer id (in which case multiaddrs are retrieved from the peer store) or a single multiaddr.

Since only a single connection is returned from a dial, the multiaddrs being dialled should be checked to ensure they either all contain the same peer id or that none of them contain a peer id.

If they all have the same peer id we are guaranteed to return a connection to the expected remote peer, if none of them contain a peer id then the user did not expect a connection to a specific peer so we are ok to return a connection to whatever remote peer we managed to connect to first.

@achingbrain achingbrain added need/triage Needs initial labeling and prioritization kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue effort/days Estimated to take multiple days, but less than a week and removed need/triage Needs initial labeling and prioritization labels Mar 8, 2023
@maschad maschad self-assigned this Mar 9, 2023
maschad added a commit to maschad/js-libp2p that referenced this issue Mar 11, 2023
@p-shahi p-shahi removed the help wanted Seeking public contribution on this issue label Mar 16, 2023
maschad added a commit to maschad/js-libp2p that referenced this issue Mar 27, 2023
maschad added a commit to maschad/js-libp2p that referenced this issue Mar 29, 2023
achingbrain added a commit that referenced this issue Mar 30, 2023
Allows users to dial multiple multiaddrs at the same time, as long as they either all have the same peer id or none of them have a peer id.

Closes #1616

---------

Co-authored-by: achingbrain <alex@achingbrain.net>
achingbrain pushed a commit to libp2p/js-libp2p-interfaces that referenced this issue Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants