Skip to content

v0.24.0

Compare
Choose a tag to compare
@marten-seemann marten-seemann released this 06 Dec 10:04
· 528 commits to master since this release
4c74181

Breaking Changes

Constructor options

  • removed the deprecated libp2p.DefaultStaticRelays and libp2p.StaticRelays options. Static relays can be configured as an option to libp2p.EnableAutoRelay
  • libp2p.Security now requires passing in a constructor (previously, it also allowed passing in a fully constructed security transport)
  • libp2p.Muxer now requires passing in a fully constructed muxer (previously, it also allowed passing in a muxer constructor)
  • Removed libp2pquic.DisableReuseport and libp2pquic.WithMetrics. These options are now available in the quicreuse package (quicreuse.DisableReuseport and quicreuse.WithMetrics), and can be enabled by using the libp2p.QUICReuse option (example: libp2p.QUICReuse(quicreuse.NewConnManager, quicreuse.DisableReuseport, quicreuse.WithMetrics)).

Under the hood, we now use fx in the construction of the host, which lead to a great simplification of our setup logic (see #1858 for details).

QUIC Versions

When we first rolled out QUIC support in 2020, QUIC wasn't an RFC yet (in fact, we were involved in the standardization process at the IETF!). Back then, we rolled out support for QUIC draft-29. This version is almost identical to RFC 9000, so there was never a good reason to force an update.

Now that rust-libp2p is shipping QUIC support, we decided to finally initiate the update. We do so by introducing a new multiaddress component: /ip4/1.2.3.4/udp/4001/quic now denotes a multiaddr that uses QUIC draft-29 (as it has before, we're just making it explicit now). QUIC v1 would use /ip4/1.2.3.4/udp/4001/quic-v1.
We intend to keep support for QUIC draft-29 for roughly half a year, and disable listening on draft-29 addresses after that.

Depending on how you configure your node, you might need to update the addresses you're listening on (i.e. change quic => quic-v1 in the addresses, or duplicate the QUIC addresses).

🔦 Highlights

WebTransport

We added experimental WebTransport support in our last release. Since then, we're using some magic to allow running QUIC and WebTransport on the same port. This means that users who've already configured port forwarding / firewall rules for QUIC don't need to do anything to allow WebTransport connections to their node.

Optimized Stream Multiplexer Selection

When dialing a TCP connection to another libp2p node, we perform the following steps:

  1. TCP 3-way handshake: 1 RTT
  2. multistream-select to negotiate the security protocol (TLS 1.3 or Noise): 1 RTT
  3. security handshake: 1 RTT
  4. multistream-select to negotiate the stream multiplexer (yamux or mplex)

In total, this handshakes takes 4 RTTs. In this release, we optimize this handshake by inlining the stream multiplexer negotiation into the security handshake. On the wire, this looks very different for TLS 1.3 and for Noise, but the result is the same: we know which stream multiplexer to use when the handshake finishes, and can therefore save one roundtrip on every handshake. Head to the specification to learn how this works in detail.

🐞 Bugfixes since v0.23.4

Changelog

Contributors

Contributor Commits Lines ± Files Changed
Marten Seemann 234 +89579/-22390 1676
Marco Munizaga 23 +1896/-702 96
Scott Martin 1 +1681/-0 5
Marcin Rataj 2 +708/-505 5
julian88110 2 +435/-66 28
Dennis Trautwein 3 +230/-21 7
Prithvi Shahi 1 +116/-77 1
Daniel Vernall 1 +92/-45 2
Peter Rabbitson 4 +59/-65 5
Christian Stewart 2 +74/-46 10
Chinmay Kousik 1 +64/-14 6
kixelated 1 +31/-44 8
snyh 2 +36/-18 2
Karthik Nallabolu 1 +17/-17 1
Steven Allen 1 +28/-4 2
cliffc-spirent 1 +25/-5 2
Raúl Kripalani 1 +29/-0 1
Ondrej Kokes 1 +25/-4 2
Håvard Anda Estensen 1 +9/-19 6
libp2p-mgmt-read-write[bot] 1 +26/-0 1
shade34321 1 +21/-1 2
Toby 2 +9/-13 6
Will Scott 1 +7/-12 3
Oleg 1 +14/-1 1
maxos 1 +8/-1 2
Stojan Dimitrovski 1 +6/-0 1
Rod Vagg 2 +2/-2 2
Michele Mastrogiovanni 1 +2/-2 1
Max Inden 1 +1/-1 1
Masih H. Derkani 1 +0/-2 1
Jc0803kevin 1 +1/-1 1
David Brouwer 1 +2/-0 2
Will 1 +0/-1 1
Neel Virdy 1 +1/-0 1