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(quic): deprecate QUIC draft-29 version support #5786

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions transports/quic/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<!-- Update to libp2p-core v0.43.0 -->

- Deprecate `Config::support_draft_29`.
See [PR 5786](https://github.com/libp2p/rust-libp2p/pull/5786).

Comment on lines +5 to +7
Copy link
Contributor

Choose a reason for hiding this comment

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

libp2p-quic-v0.12.0 is already released. You need to bump the version of it to 0.12.1 and move this to a new section above.

Copy link
Contributor

@elenaf9 elenaf9 Feb 21, 2025

Choose a reason for hiding this comment

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

I mean the version of the libp2p-quic crate itself also needs to be bumped :)

## 0.11.1

- Update `libp2p-tls` to version `0.5.0`, see [PR 5547]
Expand Down
3 changes: 3 additions & 0 deletions transports/quic/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub struct Config {
/// If support for draft-29 is enabled servers support draft-29 and version 1 on all
/// QUIC listening addresses.
/// As client the version is chosen based on the remote's address.
#[deprecated(note = "QUIC draft versions are no longer supported")]
pub support_draft_29: bool,
Copy link
Member

@jxs jxs Feb 20, 2025

Choose a reason for hiding this comment

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

we should probably add an allow on our usage of this field, in transports/quic/src/transport.rs:91 .
To allow CI to pass


/// TLS client config for the inner [`quinn::ClientConfig`].
Expand All @@ -72,6 +73,7 @@ pub struct Config {
mtu_discovery_config: Option<MtuDiscoveryConfig>,
}

#[expect(deprecated)]
impl Config {
/// Creates a new configuration object with default values.
pub fn new(keypair: &libp2p_identity::Keypair) -> Self {
Expand Down Expand Up @@ -122,6 +124,7 @@ pub(crate) struct QuinnConfig {
pub(crate) endpoint_config: quinn::EndpointConfig,
}

#[expect(deprecated)]
impl From<Config> for QuinnConfig {
fn from(config: Config) -> QuinnConfig {
let Config {
Expand Down
1 change: 1 addition & 0 deletions transports/quic/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub struct GenTransport<P: Provider> {
hole_punch_attempts: HashMap<SocketAddr, oneshot::Sender<Connecting>>,
}

#[expect(deprecated)]
impl<P: Provider> GenTransport<P> {
/// Create a new [`GenTransport`] with the given [`Config`].
pub fn new(config: Config) -> Self {
Expand Down
1 change: 1 addition & 0 deletions transports/quic/tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ fn concurrent_connections_and_streams_tokio() {
.quickcheck(prop::<quic::tokio::Provider> as fn(_, _) -> _);
}

#[expect(deprecated)]
#[cfg(feature = "tokio")]
#[tokio::test]
async fn draft_29_support() {
Expand Down
Loading