Releases: libp2p/go-libp2p
v0.33.2
A patch update to bring in a fix from go-multiaddr
Full Changelog: v0.33.1...v0.33.2
v0.33.1
The release updates the quic-go dependency to v0.42.0. This update includes a mitigation for a memory exhaustion attack against QUIC's connection ID mechanism.
Full Changelog: v0.33.0...v0.33.1
v0.33.0
What's Changed
🔦 Highlights
TLS encryption for TCP by default
For TCP Connections, the default encryption scheme has been changed from noise to TLS for better performance. See PR for details.
Note: When making TCP connections to nodes that only support noise this will add 1 extra round trip for connection establishment. If you wish to avoid this and keep noise the default, configure your node to prefer noise over TLS like
node, err := libp2p.New(
... other options
libp2p.Security("/noise", noise.New),
libp2p.Security("/tls/1.0.0", libp2ptls.New),
)
Misc
- WebRTC streams now wait for a FIN_ACK before closing data channels. For more details see the specs PR: libp2p/specs#582
- Removed unused public function
crypto.GenerateEKeyPair
. This was used in SECIO which has been long deprecated. - This release drops support for go1.20.
Changelog
- Update docs from RSA to Ed25519 by @librick in #2606
- examples: remove unused 'SetStreamHandler' by @joohhnnn in #2598
- chore: update examples to v0.32 by @sukunrt in #2626
- ci: ignore protoc version comment on go generate by @galargh in #2631
- pstoremanager: fix race condition when removing peers from peer store by @marten-seemann in #2644
- chore: add resource manager dashboard to docker-compose by @burdiyan in #2641
- chore: fix typos by @shuoer86 in #2608
- Fix Swarm Grafana Dashboard by @burdiyan in #2640
- tcp: fix build on loong64 by @wojiushixiaobai in #2655
- rcmgr: fix connmgr connection limit conflict warning by @sukunrt in #2648
- webrtc: clarify that there is no reuseport functionality by @sukunrt in #2652
- security: remove separate licenses for Noise and TLS by @marten-seemann in #2663
- chore: update go security policy url by @sukunrt in #2665
- chore: update go-libp2p-asn-util by @Jorropo in #2673
- chore: fix typos in comment by @bodhi-crypo in #2674
- examples: call NewStream from only one side by @Halimao in #2677
- chore: update chat-with-mdns example readme by @Halimao in #2678
- chore: remove unnecessary conversions by @estensen in #2680
- webrtc: fix flaky TestMaxInFlightRequests by @sukunrt in #2682
- defaults: do TLS by default for encryption by @Jorropo in #2650
- chore: Fixed spelling errors in some files. by @keienWang in #2689
- chore(p2p/host): typo fix by @fakefraud in #2683
- chore: update go-multiaddr 0.12.2 by @Jorropo in #2691
- libp2phttp: fix flaky ExampleHost_listenOnHTTPTransportAndStreams by @sukunrt in #2697
- chore: fix typos by @GoodDaisy in #2694
- fix:Add HTTPS to documentation link by @keienWang in #2695
- chore(cfg): Add config.yml for new issues by @dhuseby in #2688
- chore: testify fixes by @dozyio in #2666
- chore: drop support for go1.20 by @sukunrt in #2708
- chore: remove unused GenerateEKeyPair function by @sukunrt in #2711
- quic: upgrade quic-go to v0.41.0 by @sukunrt in #2710
- webrtc: wait for FIN_ACK before closing data channels by @sukunrt in #2615
- chore: update dependencies for v0.33 by @sukunrt in #2713
New Contributors
- @joohhnnn made their first contribution in #2598
- @galargh made their first contribution in #2631
- @burdiyan made their first contribution in #2641
- @shuoer86 made their first contribution in #2608
- @wojiushixiaobai made their first contribution in #2655
- @bodhi-crypo made their first contribution in #2674
- @Halimao made their first contribution in #2677
- @keienWang made their first contribution in #2689
- @fakefraud made their first contribution in #2683
- @GoodDaisy made their first contribution in #2694
- @dhuseby made their first contribution in #2688
- @dozyio made their first contribution in #2666
Full Changelog: v0.32.1...v0.33.0
v0.32.2
This release contains the quic-go fix for the Honeybadger vulnerability: https://github.com/quic-go/quic-go/releases/tag/v0.39.4
Full Changelog: v0.32.1...v0.32.2
v0.31.1
This release contains the quic-go fix for the Honeybadger vulnerability: https://github.com/quic-go/quic-go/releases/tag/v0.38.2
v0.30.1
This release contains the quic-go fix for the Honeybadger vulnerability: https://github.com/quic-go/quic-go/releases/tag/v0.37.7
v0.32.1
What's Changed
Full Changelog: v0.32.0...v0.32.1
v0.32.0
🔦 Highlights
WebRTC Direct
This release adds support for WebRTC Direct. WebRTC Direct allows browser nodes to connect to go-libp2p directly, without any configuration (e.g. TLS certificates) needed on the go-libp2p side. This is useful for browser nodes that aren’t able to use Webtransport. Note that WebRTC Direct cannot be used to connect a browser node to a go-libp2p node behind a NAT / firewall. This requires using WebRTC, which is currently being worked on #2009.
Happy Eyeballs for TCP
In the last couple of releases we’ve shipped Smart Dialing and Black hole Detection. This release continues our effort to improve the dial prioritisation logic to avoid spurious dials with the introduction of Happy Eyeballs for TCP addresses. As recommended by RFC 8305, when dialing a peer’s TCP addresses, we now dial the IPv6 address first and only dial the peer’s IPv4 address if we have not established the IPv6 TCP connection within 250ms.
Misc
host.NewStream
now waits for a hole punched connection to be available rather than returningnetwork.ErrTransientConn
immediately.- go-libp2p now works on riscv64 architectures.
Changelog
- chore: update examples to v0.31 by @p-shahi in #2544
- libp2phttp: don't initialise ServeMux if not nil by @sukunrt in #2548
- basichost: handle the SetProtocol error in NewStream by @marten-seemann in #2555
- swarm: don't dial unspecified addresses by @sukunrt in #2560
- examples: stop using deprecated peer.ID.Pretty by @Icarus9913 in #2563
- upgrader: drop support for multistream simultaneous open by @marten-seemann in #2557
- WebRTC Direct transport implementation by @marten-seemann in #2337
- mock: use go.uber.org/mock by @sukunrt in #2540
- core/peer: remove deprecated Encode function by @marten-seemann in #2566
- core/peer: remove deprecated ID.Pretty method by @marten-seemann in #2565
- websocket: don't resolve /dnsaddr addresses by @marten-seemann in #2571
- swarm: fix DialPeer behaviour for transient connections by @sukunrt in #2547
- webrtc: fail Write early if deadline has exceeded before the call by @sukunrt in #2578
- webrtc: put buffer back to pool by @sukunrt in #2574
- webrtc: fix deadlock on connection close by @sukunrt in #2580
- update gomock to v0.3.0 by @marten-seemann in #2581
- config: warn if connmgr limits conflict with rcmgr by @piersy in #2527
- quicreuse: remove QUIC metrics tracer by @marten-seemann in #2582
- interop: fix redis env var by @sukunrt in #2585
- libp2phttp: don't strip
/
suffix when mounting handler by @sukunrt in #2552 - Fix typos by @vuittont60 in #2600
- swarm: add loopback to low timeout filter by @dennis-tra in #2595
- webrtc: correctly report incoming packet address on muxed connection by @sukunrt in #2586
- Spell Check: Fix typos by @tkzktk in #2604
- swarm: wait for transient connections to upgrade for NewStream by @sukunrt in #2542
- Fix missing deprecation tag by @librick in #2605
- tcp: fix build on riscv64 by @marten-seemann in #2590
- webrtc: fix race in TestMuxedConnection by @sukunrt in #2607
- swarm: use happy eyeballs ranking for TCP dials by @sukunrt in #2573
- circuitv2: don't check ASN for private addrs by @sukunrt in #2611
- swarm: cleanup stream handler goroutine by @sukunrt in #2610
- swarm: use typed atomics by @marten-seemann in #2612
- test/basichost: fix flaky test due to rcmgr by @marten-seemann in #2613
- update quic-go to v0.39.1, set a static resumption token generator key by @marten-seemann in #2572
- ci: migrate to renamed interop test action by @thomaseizinger in #2617
- swarm: fix recursive resolving of DNS multiaddrs by @marten-seemann in #2564
- webrtc: fix race in TestRemoveConnByUfrag by @sukunrt in #2620
- identify: don't filter dns addresses based on remote addr type by @sukunrt in #2553
- chore: update dependencies for v0.32 release by @sukunrt in #2621
- chore: update js-libp2p examples repo by @sukunrt in #2624
New Contributors
- @Icarus9913 made their first contribution in #2563
- @piersy made their first contribution in #2527
- @vuittont60 made their first contribution in #2600
- @tkzktk made their first contribution in #2604
- @librick made their first contribution in #2605
Full Changelog: v0.31.0...v0.32.0
v0.31.0
🔦 Highlights
libp2p+HTTP
We're introducing a new experimental API in go-libp2p, enabling developers to utilize libp2p with the well-known semantics of HTTP. This isn't a special flavor of HTTP; it's standard HTTP, but enhanced with libp2p. Developers can now benefit from HTTP intermediaries such as CDN caching and layer 7 load balancing. This allows developers to create HTTP applications that operate over NATs and seamlessly tap into libp2p's diverse transport options to boost connectivity. In addition, the HTTP transport now joins the roster of supported transports in libp2p.
The new API is under libp2phttp.Host
in the "github.com/libp2p/go-libp2p/p2p/http" package. This is like the stream transport host (host.Host
in "github.com/libp2p/go-libp2p/core/host"), but exposes HTTP request/response rather than a stream API. Refer to the godoc for details on the API and examples.
QUIC Generic Segmentation Offload
This release updates quic-go to v0.38.x, which enables GSO (Generic Segmentation Offload) in the send path, drastically increasing the packet send rate. Without GSO, quic-go had to use a single sendmsg syscall for every UDP datagram sent. GSO allows us to pass one giant (up to 64k) datagram to the sendmsg syscall, and have the kernel chop it into MTU sized (~1300 bytes) datagrams before sending them out on the wire. For more details on syscall optimizations, CloudFlare published an excellent blog post about this a while ago. GSO is currently only available on Linux (and with kernels >4.18).
Changelog
- chore: be more descriptive about where public dashboards come from by @p-shahi in #2508
- metrics: update dashboard names from libp2p to go-libp2p by @sukunrt in #2512
- examples: update go-libp2p to v0.30.0 by @marten-seemann in #2507
- quic: don't claim to be able to dial draft-29 in CanDial by @marten-seemann in #2520
- update quic-go to v0.38.1 by @marten-seemann in #2506
- feat: add ErrPeerIDMismatch error type to replace ad-hoc errors by @aschmahmann in #2451
- swarm: return errors on filtered addresses when dialing by @sukunrt in #2461
- swarm: fix Unwrap for DialError, implement Unwrap for TransportError by @sukunrt in #2437
- swarm: return a more meaningful error when dialing QUIC draft-29 by @marten-seemann in #2524
- ci: limit interop tests runs to core folders by @p-shahi in #2513
- identify: disable racy test when running with race detector by @marten-seemann in #2526
- host: disable black hole detection on autonat dialer by @sukunrt in #2529
- move libp2p/go-libp2p-gostream to p2p/net/gostream by @marten-seemann in #2535
- feat: Implement HTTP spec by @MarcoPolo in #2438
- p2p/http: cache json wellknown mappings in the .well-known handler by @Jorropo in #2537
- swarm: track dial cancellation reason by @sukunrt in #2532
- reuseport: use DialContext instead of Dial in test to fail quickly by @sukunrt in #2541
- dashboards: improve naming for black hole panel by @sukunrt in #2539
Full Changelog: v0.30.0...v0.31.0
v0.30.0
This is the first release that is compatible with Go 1.21. It drops compatibility with (the now outdated) Go 1.19.
Deprecation of the database-backed peerstore
The database-backed peerstore, pstoreds
, is now deprecated. It will be removed in a future release of go-libp2p.
The main reason for a database-backed peerstore was that it easily allowed persisting peers across reboots of a go-libp2p node. However, this comes with the problem that entries for these peers will never be pruned. It also means significantly higher latencies compared to the in-memory peerstore. A better way of persisting (a subset of) peers for bootstrapping purposes is to regularly query the in-memory peerstore and to explicitly persist those entries.
See #2329 for more motivation and discussion.
Removal of mplex
The ecosystem is in the process of removing support for one of our stream multiplexers, mplex. The only supported stream multiplexer now is yamux. Kubo (a go-libp2p user) removed support for mplex recently. See libp2p/specs#553 for more details.
Note that due to go-libp2p's modular design, it's still possible to use mplex (or any other custom multiplexer) using the libp2p.Muxer
configuration option.
Removal of QUIC draft-29
QUIC draft-29 was a somewhat widely deployed draft version of QUIC before publication of RFC 9000. The multiaddr codepoint used /quic
(RFC 9000 QUIC uses /quic-v1
). go-libp2p has been using /quic-v1
for a long time (since v0.24.0), and is now dropping support for draft-29.
Full Changelog
- github.com/libp2p/go-libp2p:
- update dependencies ahead of the v0.30 release (#2504) (libp2p/go-libp2p#2504)
- ci: copy new Unified CI templates and bump go.mod to Go 1.20 (#2471) (libp2p/go-libp2p#2471)
- transport tests: add deadline tests (#2286) (libp2p/go-libp2p#2286)
- chore: remove unused and outdated package-list.json (#2499) (libp2p/go-libp2p#2499)
- muxer: remove support for mplex (#2498) (libp2p/go-libp2p#2498)
- transport tests: refactor workers in TestMoreStreamsThanOurLimits (#2472) (libp2p/go-libp2p#2472)
- use standard library sha256 implementation for Go 1.21 (#2309) (libp2p/go-libp2p#2309)
- quic: update quic-go to v0.37.5 (#2497) (libp2p/go-libp2p#2497)
- cleanup: add continue in case of failure in the (*BasicHost).Addrs certhash loop (#2492) (libp2p/go-libp2p#2492)
- tests: add a CertHashes testcase in TestInferWebtransportAddrsFromQuic (#2495) (libp2p/go-libp2p#2495)
- basichost: use byte representation of WebTransport multiaddr as map key (#2494) (libp2p/go-libp2p#2494)
- webtransport: check for UDP multiaddr component in address matcher (#2491) (libp2p/go-libp2p#2491)
- swarm: remove unnecessary reqno for pending request tracking (#2460) (libp2p/go-libp2p#2460)
- quic: drop support for QUIC draft-29 (#2487) (libp2p/go-libp2p#2487)
- metrics: add links to public dashboards (#2486) (libp2p/go-libp2p#2486)
- swarm: remove leftover TODO (#2474) (libp2p/go-libp2p#2474)
- peerstore: deprecate the database-backed peerstore (#2475) (libp2p/go-libp2p#2475)
- identify: fix sorting of observed addresses (#2476) (libp2p/go-libp2p#2476)
- update go-multiaddr to v0.11.0 (#2467) (libp2p/go-libp2p#2467)
- chore: update golang-lru to v2.0.4, fixing semver violation (#2448) (libp2p/go-libp2p#2448)
- swarm: don't open new streams over transient connections (#2450) (libp2p/go-libp2p#2450)
- update quic-go to v0.36.3, fixing RSA key size vulnerability (#2455) (libp2p/go-libp2p#2455)
- core/crypto: restrict RSA keys to <= 8192 bits (#2454) (libp2p/go-libp2p#2454)
- chore: add notable project requirement (#2453) (libp2p/go-libp2p#2453)
- examples: update go-libp2p to v0.29.0 (#2432) (libp2p/go-libp2p#2432)
- examples: fix description of command line flags for pubsub (#2400) (libp2p/go-libp2p#2400)
- basichost: remove invalid comment (#2435) (libp2p/go-libp2p#2435)
- github.com/libp2p/go-reuseport (v0.3.0 -> v0.4.0):
- release v0.4.0 (#111) (libp2p/go-reuseport#111)
- use SO_REUSEPORT_LB on FreeBSD (#106) (libp2p/go-reuseport#106)
- chore: bump go.mod to Go 1.20 and run go fix (#109) (libp2p/go-reuseport#109)
- github.com/multiformats/go-multiaddr (v0.10.1 -> v0.11.0):
- release v0.11.0 (#214) (multiformats/go-multiaddr#214)
- update sha256-simd to v1.0.1 (#212) (multiformats/go-multiaddr#212)
- update golang.org/x/exp slice comparison to match standard library version (#210) (multiformats/go-multiaddr#210)
Contributors
Contributor | Commits | Lines ± | Files Changed |
---|---|---|---|
Marco Munizaga | 5 | +405/-561 | 36 |
Marten Seemann | 12 | +302/-477 | 92 |
Sukun | 4 | +125/-52 | 6 |
Jorropo | 5 | +83/-28 | 13 |
Prem Chaitanya Prathi | 1 | +28/-1 | 2 |
GitHub | 2 | +6/-19 | 2 |
Prithvi Shahi | 1 | +10/-12 | 1 |
Christian Stewart | 1 | +7/-2 | 2 |
cce | 1 | +4/-4 | 3 |
downIoads | 1 | +2/-2 | 1 |
New Contributors
- @downIoads made their first contribution in #2400
Full Changelog: v0.29.0...v0.30.0