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

refactor!: move fetch protocol into separate package #2193

Closed
wants to merge 9 commits into from

Conversation

maschad
Copy link
Member

@maschad maschad commented Nov 3, 2023

Title

Description

Notes & open questions

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

achingbrain and others added 8 commits November 3, 2023 13:45
Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
Co-authored-by: Cayman <caymannava@gmail.com>
Once upon a time these options were intended to cause libp2p to
close connections or search for more peers that support a given
protocol but it was never implemented.

Remove the options since they don't do anything, they may be
restored in future if the functionality is ever required.
Extract the keychain into it's own package.
Co-authored-by: chad <chad.nehemiah94@gmail.com>
A [PeerInfo](https://docs.libp2p.io/concepts/fundamentals/peers/#peer-info)
is a libp2p object that combines a PeerID and some Multiaddrs.

We also add a list of protocols. This was a mistake because protocols are
exchanged during Identify but the PeerInfo object is used for peer discovery.

This is evident because we set the protocol list to an empty array everywhere.

PeerInfo is useful for exchanging peer data with other nodes, if we need a
more fleshed-out peer representation we'd use the `Peer` interface from
the peer store.

BREAKING CHANGE: the `.protocols` property has been removed from the `PeerInfo` interface
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
- Move pnet module to a separate package
- Related to libp2p#1913
@achingbrain
Copy link
Member

Superseded by #2223

@achingbrain achingbrain closed this Nov 9, 2023
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.

3 participants