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