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

identify: make the protocol version configurable #1724

Merged
merged 3 commits into from
Sep 2, 2022

Conversation

tshakalekholoane
Copy link
Contributor

Allows the protocolVersion field of the Idenfity protocol to be
configured on the host. The current value is fixed for what appears to
be for backwards compatibility with IPFS which makes it difficult for
non-IPFS protocols to use the library.

References:

Allows the protocolVersion field of the Idenfity protocol to be
configured on the host. The current value is fixed for what appears to
be for backwards compatibility with IPFS which makes it difficult for
non-IPFS protocols to use the library.

References:
  - libp2p#714
  - libp2p#1137
  - https://github.com/libp2p/rust-libp2p/blob/6855ab943bd7427a2135b46ad3d08f48fbf10872/protocols/identify/src/identify.rs#L125-L127
Fix an issue where the protocolVersion string for the Identify protocol
was wrongly being assigned the agentVersion string.
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked js-libp2p, python-libp2p, jvm-libp2p, and rust-libp2p. None of them assert the protocol version (as far as I can tell) so we should be good to go.

// XXX: Don't change this till 2020. You'll break all go-ipfs versions prior to
// 0.4.17 which asserted an exact version match.
const LibP2PVersion = "ipfs/0.1.0"
const DefaultProtocolVersion = "ipfs/0.1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change this to libp2p sometime in the future, but we can leave it like this for now.

@marten-seemann marten-seemann changed the title Configure protocolVersion for Identify protocol identify: make the protocol version configurable Sep 2, 2022
@marten-seemann marten-seemann merged commit fcf408c into libp2p:master Sep 2, 2022
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