-
Notifications
You must be signed in to change notification settings - Fork 999
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
[swarm] Permit configuration override for the substream upgrade protocol to use. #1858
Conversation
This is intended for inclusion in #1857. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR, my opinion was that each protocol should individually decide whether V1
or V1Lazy
should be used, considering that the safety guarantees of V1Lazy
depend on the details of the higher-level protocol.
However I've now realized that this would be a bad idea if multistream-select 2.0 gets released. It should indeed be the Swarm
that decides which version of multistream-select is in use, and not individual protocols.
Yes, we should probably remove the ability to configure the upgrade protocol on a |
I created #1859 to continue this discussion as well as to keep track of it. |
Remove the option for a substream-specific multistream select protocol override. The override at this granularity is no longer deemed useful, in particular because it can usually not be configured for existing protocols like `libp2p-kad` and others. There is a `Swarm`-scoped configuration for this version available since [1858](libp2p#1858).
* Remove substream-specific protocol negotiation version. Remove the option for a substream-specific multistream select protocol override. The override at this granularity is no longer deemed useful, in particular because it can usually not be configured for existing protocols like `libp2p-kad` and others. There is a `Swarm`-scoped configuration for this version available since [1858](#1858). * Update protocol crate versions and changelogs. * Clean up documentation.
* Remove substream-specific protocol negotiation version. Remove the option for a substream-specific multistream select protocol override. The override at this granularity is no longer deemed useful, in particular because it can usually not be configured for existing protocols like `libp2p-kad` and others. There is a `Swarm`-scoped configuration for this version available since [1858](libp2p/rust-libp2p#1858). * Update protocol crate versions and changelogs. * Clean up documentation.
It is desirable to configure the substream upgrade protocol (i.e. multistream-select protocol) to use for substreams in general. Since introducing configuration options for the substream upgrade protocol to all libp2p protocol crates seems to be noisy and likely unnecessary, this PR proposes a configuration option for the
Swarm
that will apply to all (outbound) substreams. In this way, one can configure the upgrade protocols in a single place, once for the transport and once for the substreams.