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(multistream-select): remove Version #4731

Closed
wants to merge 1 commit into from

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Oct 26, 2023

Description

Removes multistream-select version selection. Instead the mechanism of Version::V1Lazy is always used.

See also #3563 and #3749.

Notes & open questions

I suggest we deprecate Version before removing it. Thoughts?

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Removes multistream-select version selection. Instead the mechanism of `Version::V1Lazy` is always
used.

See also libp2p#3563 and
libp2p#3749.
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Concept ACK

If you want to remove it in v0.53, then I'd suggest we ship a deprecation of upgrade as a back-port first. Perhaps we should be a bit cautious here though. So far, I think the v0.53 change does not contain anything controversial whereas I remember that V1Lazy caused some issues in polkadot, right? Perhaps we should push it to the next breaking release and make sure polkadot upgrades to v0.53 asap after this.

@@ -82,7 +82,7 @@ fn upgrade_pipeline() {
let listener_keys = identity::Keypair::generate_ed25519();
let listener_id = listener_keys.public().to_peer_id();
let mut listener_transport = MemoryTransport::default()
.upgrade(upgrade::Version::V1)
.upgrade()
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically we could remove upgrade now, right?

What do you think of deprecating upgrade first and instead offer an authenticate function for each transport that simply implies upgrade(V1Lazy)?

Copy link
Member

@jxs jxs Oct 30, 2023

Choose a reason for hiding this comment

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

Yeah, while looking into the PR this also made sense to me, would simplify the API, but would also probably make it a breaking change no?

Copy link
Contributor

Choose a reason for hiding this comment

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

At the moment it is a breaking change. Deprecating it first and offering a new API that starts with authenticate straight from Transport is not.

@mxinden
Copy link
Member Author

mxinden commented Oct 31, 2023

I am in favor of deprecating Transport::upgrade and multistream_select::Version first. I don't think this needs to land in v0.53.

@mxinden
Copy link
Member Author

mxinden commented Jul 4, 2024

Closing here. For anyone interested in this path, feel free to cherry-pick the commit.

@mxinden mxinden closed this Jul 4, 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.

3 participants