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

fix(multiaddress): add quic-v1 multiaddress support #988

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

diegomrsantos
Copy link
Contributor

The initial implementation of QUIC in go-libp2p was based on draft-ietf-quic-transport-29 (or simply, draft-29). At the time, draft-29 was implemented because RFC 9000 was yet to be finalized. Eventually go-libp2p added support for RFC 9000 in addition to draft-29, supporting two QUIC versions. However, the multiaddresses for these versions used the same format and thus were indistinguishable in the past.

By using different code points, quic-v1 for RFC 9000 and quic for draft-29, libp2p can now distinguish between the two versions.

The multiaddress for a QUIC listener accepting RFC 9000 connections looks like this: /ip4/192.0.2.0/udp/65432/quic-v1/, whereas the for the draft version, the multiaddress would be /ip4/192.0.2.0/udp/65432/quic/.

Nodes that support multiple versions can offer them on the same port. QUIC long header packets contain the version number, which enables the QUIC stack to handle multiple versions.

The initial implementation of QUIC in go-libp2p was based on draft-ietf-quic-transport-29 (or simply, draft-29). At the time, draft-29 was implemented because RFC 9000 was yet to be finalized. Eventually go-libp2p added support for RFC 9000 in addition to draft-29, supporting two QUIC versions. However, the multiaddresses for these versions used the same format and thus were indistinguishable in the past.

 By using different code points, quic-v1 for RFC 9000 and quic for draft-29, libp2p can now distinguish between the two versions.

 The multiaddress for a QUIC listener accepting RFC 9000 connections looks like this: /ip4/192.0.2.0/udp/65432/quic-v1/, whereas the for the draft version, the multiaddress would be /ip4/192.0.2.0/udp/65432/quic/.

 Nodes that support multiple versions can offer them on the same port. QUIC long header packets contain the version number, which enables the QUIC stack to handle multiple versions.
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #988 (60f96ec) into unstable (6791f5e) will decrease coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable     #988      +/-   ##
============================================
- Coverage     83.21%   83.19%   -0.02%     
============================================
  Files            91       91              
  Lines         15301    15301              
============================================
- Hits          12732    12729       -3     
- Misses         2569     2572       +3     
Files Coverage Δ
libp2p/multiaddress.nim 86.90% <ø> (ø)
libp2p/multicodec.nim 89.47% <ø> (ø)

... and 1 file with indirect coverage changes

@diegomrsantos diegomrsantos enabled auto-merge (squash) November 19, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants