Releases: libp2p/go-libp2p
v0.37.2
v0.37.1
Bug Fixes
- Fixes an issue with webrtc-direct listeners where the short handshake queue dropped some connection requests. For more details see: #3040
- Fixes a race condition when multistream lazy negotiation was used with rust-libp2p or js-libp2p for write only streams. See #3038 for details
What's Changed
- 0606295 refactor(libp2phttp): don't require specific port for the HTTP host example (#3047)
- ae0d78a fix: Defer resource usage cleanup until the very end (#3042)
- df02f4d chore: update go-multistream to v0.6.0 (#3041)
- 09ae179 fix: obsaddr: do not record observations over relayed conn (#3043)
- 2404f75 webrtc: handshake more connections in parallel (#3040)
- 994b69e fix: basichost: Use NegotiationTimeout as fallback timeout for NewStream (#3020)
Full Changelog: v0.37.0...dont-delete/release-v0371
v0.37.0
Breaking Changes
- The
libp2p.MultiaddrResolver
option now takes an interface rather than a
specific pointer. This decouples the resolver from a specific implementation
and also defines a better interface that is aware of bounds.- The swarm exports a new type
ResolverFromMaDNS
that implements this interface from a*madns.Resolver
. The one line diff is essentially:
-libp2p.MultiaddrResolver(rslv) +libp2p.MultiaddrResolver(swarm.ResolverFromMaDNS{Resolver: rslv})
- The swarm exports a new type
🔦 Highlights
HTTP Peer ID Authentication (#2854)
Authenticate a peer's identity over HTTP. This works on both libp2p stream backed HTTP transports and standard HTTP transports. There is also browser support in the js-libp2p module: https://github.com/libp2p/js-libp2p-http-fetch/tree/main.
See the spec for more details on how it works: https://github.com/libp2p/specs/blob/master/http/peer-id-auth.md
Experimental WithFxOption (#2956)
A new libp2p Config option lets you add custom Fx options to the libp2p constructor. Use this to get access to and provide libp2p services.
For example, this allows you to easily get a reference to the ID Service of a libp2p Node. Refer to this test for a concrete code example: https://github.com/libp2p/go-libp2p/blob/c4c3a34545aab54b5b825a7adbd6a3db2c680afa/fx_options_test.go#L50-L60
In the future we'd like to expose the Fx options libp2p uses to construct itself so that users can better customize their libp2p nodes and integrate it seamlessly into their applications.
Changelog
From v0.36.5 to v0.37.0
- feat: Add WithFxOption (#2956)
- Make BlackHoleState type public (#2917)
- connmgr: reduce log level for untagging untracked peers
- feat(websocket): switch the underlying http server logger to use ipfs/go-log (#2985)
- fix(websocket): re-enable websocket transport test (#2987)
- relay: make only 1 reservation per peer (#2974)
- libp2phttp: HTTP Peer ID Authentication (#2854)
- chore: update quic-go to v0.48.1
- Add backoff for updating local IP addresses on error (#2999) Reporting credit to @elecbug
- fix: swarm: refactor address resolution (#2990)
- peerstore: limit number of non connected peers in addrbook (#2971)
- swarm: add a peer dial latency metric (#2959)
- autonat: fix interaction with autorelay (#2967)
Full Changelog: v0.36.5...v0.37.0
New Contributors
- @joshklop made their first contribution in #2920
- @cpeliciari made their first contribution in #2917
- @bytetigers made their first contribution in #2938
- @2color made their first contribution in #2931
v0.36.5
What's Changed
- basichost: ensure no duplicates in Addrs output #2980
- autonatv2: recover from panics #2992
- chore: update go-multiaddr-dns to v0.4.0 #2994
Note
In the previous release, we called out a bug in go1.23 unbuffered timers that deadlocked go-libp2p. This has been fixed in go1.23.2. You can safely update your go.mod's go version to go1.23 now.
Full Changelog: v0.36.4...v0.36.5
v0.36.4
Note
Caution
Due to a golang/go#69312 in unbuffered timers introduced in go1.23, libp2p deadlocks if the go version in your go.mod file is go1.23. To fix this, either use the environment variable GODEBUG="asynctimerchan=1"
, or downgrade the go version in your go.mod file.
What's Changed
Full Changelog: v0.36.3...v0.36.4
v0.35.5
Note
- Due to a race condition in unbuffered timers introduced in go1.23, libp2p deadlocks if the go version in your go.mod file is go1.23. To fix this, either use the environment variable
GODEBUG=asynctimerchan=1
, or downgrade the go version in your go.mod file.
What's Changed
Full Changelog: v0.35.4...v0.35.5
v0.36.3
What's Changed
- Fix proto import paths by @joshklop in #2920
- Remove 32-bit tests by @MarcoPolo in #2900
- metrics: BlackHoleState type public by @cpeliciari in #2917
- ci: Out of the tarpit by @MarcoPolo in #2923
- test: Try to fix test timeout by @MarcoPolo in #2930
- ci: Fail on test timeout by @MarcoPolo in #2929
- ci: use go1.23, drop go1.21 by @sukunrt in #2933
- webrtc: wait for listener context before dropping connection by @sukunrt in #2932
- bug: fix slice append value by @bytetigers in #2938
- ci: uci/update-go by @web3-bot in #2937
- fix: QUIC/Webtransport Transports now will prefer their owned listeners for dialing out by @MarcoPolo in #2936
- fix: enable dctur when interface address is public by @2color in #2931
- Fix: WebSocket: Clone TLS config before creating a new listener by @MarcoPolo in #2943
New Contributors
- @joshklop made their first contribution in #2920
- @cpeliciari made their first contribution in #2917
- @bytetigers made their first contribution in #2938
- @2color made their first contribution in #2931
Full Changelog: v0.36.2...v0.36.3
v0.36.2
What's Changed
- Revert "Create funding.json" by @MarcoPolo in #2919
- basic_host: close swarm on Close by @sukunrt in #2916
- webrtc: close connection when remote closes by @sukunrt in #2914
- webrtc: reduce loglevel for pion logs by @sukunrt in #2915
Full Changelog: v0.36.1...v0.36.2
v0.36.1
⚠️ Breaking Changes ⚠️
Conn.NewStream
,Network.NewStream
andHost.NewStream
timeout after 15 seconds, if no deadline is specified on the providedctx
.
🔦 Highlights
AutoNAT v2
- This release ships with an autonat-v2 service. The service allows users to check their rechability for individual addresses.
- For more details of the protocol, refer to the specs:
- BasicHost doesn't use autonat-v2 right now for verifying reachability. Once there are enough autonat-v2 servers in the IPFS network, we will use autonat-v2 to infer the node's reachability, and deprecate autonat-v1.
- AutoNAT v2 is disabled by default. To enable, use the
EnableAutoNATV2
option.
WebRTC
WebRTC Direct transport is now Non-Experimental
/webrtc-direct
is now enabled by default.- We will provide patch releases for any bug fixes or security vulnerabilities in WebRTC just like other transports.
Share listening port with QUIC
- WebRTC Direct nodes, like WebTransport nodes can use the same port as the QUIC transport.
h, err = libp2p.New(
libp2p.ListenAddrStrings(
"/ip4/0.0.0.0/udp/4242/quic-v1",
"/ip4/0.0.0.0/udp/4242/webrtc-direct"),
)
- Servers now don't need to open an extra port in their firewalls. This also enables WebRTC Direct nodes to infer their publicly visible address on machines behind a NAT.
What's Changed
- Remove out-dated code in example readme by @MarcoPolo in #2818
- upgrade checkout action to version with node20 by @cario-dev in #2790
- limit ping duration to 30s by @vyzo in #1358
- chore: Update fx by @MarcoPolo in #2819
- identify: Don't filter addr if remote is neither public nor private by @MarcoPolo in #2820
- identify: fix observed address handling by @ivan4th in #2825
- identify: add test for observed address handling by @ivan4th in #2828
- Add go-spacemesh to the list of notable users by @lrettig in #2830
- libp2phttp: workaround for ResponseWriter's CloseNotifier by @MarcoPolo in #2821
- circuitv2: improve voucher validation by @sukunrt in #2826
- webrtc: fix ufrag prefix for dialing by @sukunrt in #2832
- webrtc: add a test for establishing many connections by @sukunrt in #2801
- autonatv2: implement autonatv2 spec by @sukunrt in #2469
- pstoremanager: fix connectedness check by @sukunrt in #2845
- swarm: improve dial worker performance for common case by @sukunrt in #2844
- libp2phttp.Host implements RoundTripper by @MarcoPolo in #2840
- metricshelper: improve checks for ip and transport by @sukunrt in #2849
- libp2p: use rcmgr for autonat dials by @sukunrt in #2842
- fix: Close conn in quic listener when wrapping fails by @MarcoPolo in #2852
- autonatv2: add server metrics for dial requests by @sukunrt in #2848
- chore: Bump fx to v1.22.1 by @MarcoPolo in #2857
- chore: Bump gorilla/websocket to 1.5.3 by @MarcoPolo in #2861
- peerstore: don't intern protocols by @sukunrt in #2860
- webtransport: close underlying h3 connection by @sukunrt in #2862
- Test that the conn attempt is dropped when the rcmgr blocks it for WebRTC by @MarcoPolo in #2856
- basichost: reset new stream if rcmgr blocks by @sukunrt in #2869
- Adding tau to
Notable Users
in README.md by @samyfodil in #2870 - websocket: don't return transport.ErrListenerClosed on closing listener by @sukunrt in #2867
- Updated readme as per latest MultiversX rename by @sstanculeanu in #2874
- feat: libp2phttp
/http-path
by @MarcoPolo in #2850 - basichost: reset stream if SetProtocol fails by @sukunrt in #2875
- chore: /quic → /quic-v1 by @lidel in #2888
- config: fix AddrFactory for AutoNAT by @sukunrt in #2868
- webrtc: remove experimental tag, enable by default by @sukunrt in #2887
- quic: add support for quic-go metrics by @sukunrt in #2823
- chore: update protobufs by @sukunrt in #2893
- fix(discovery): allow FindPeers limit to be 0 by @guillaumemichel in #2894
- examples/chat-with-mdns: default to a random port by @Jorropo in #2896
- feat: WebRTC reuse QUIC conn by @MarcoPolo in #2889
- ObsAddrManager: Infer external addresses for transports that share the same listening address. by @MarcoPolo in #2892
- Chore: bump deps by @MarcoPolo in #2902
- udpmux: Don't log an error if canceled because of shutdown by @MarcoPolo in #2903
- chore: update pion/sctp by @sukunrt in #2906
- swarm: add a default timeout to conn.NewStream by @sukunrt in #2907
- Release v0.36.0 by @MarcoPolo in #2905
New Contributors
- @cario-dev made their first contribution in #2790
- @ivan4th made their first contribution in #2825
- @lrettig made their first contribution in #2830
- @samyfodil made their first contribution in #2870
- @sstanculeanu made their first contribution in #2874
- @lidel made their first contribution in #2888
- @guillaumemichel made their first contribution in #2894
Full Changelog: v0.35.0...v0.36.1
v0.36.0
Retracted
- This release was retracted due to an error in the release process. Use https://github.com/libp2p/go-libp2p/releases/tag/v0.36.1
What's Changed
- Remove out-dated code in example readme by @MarcoPolo in #2818
- upgrade checkout action to version with node20 by @cario-dev in #2790
- limit ping duration to 30s by @vyzo in #1358
- chore: Update fx by @MarcoPolo in #2819
- identify: Don't filter addr if remote is neither public nor private by @MarcoPolo in #2820
- identify: fix observed address handling by @ivan4th in #2825
- identify: add test for observed address handling by @ivan4th in #2828
- Add go-spacemesh to the list of notable users by @lrettig in #2830
- libp2phttp: workaround for ResponseWriter's CloseNotifier by @MarcoPolo in #2821
- circuitv2: improve voucher validation by @sukunrt in #2826
- webrtc: fix ufrag prefix for dialing by @sukunrt in #2832
- webrtc: add a test for establishing many connections by @sukunrt in #2801
- autonatv2: implement autonatv2 spec by @sukunrt in #2469
- pstoremanager: fix connectedness check by @sukunrt in #2845
- swarm: improve dial worker performance for common case by @sukunrt in #2844
- libp2phttp.Host implements RoundTripper by @MarcoPolo in #2840
- metricshelper: improve checks for ip and transport by @sukunrt in #2849
- libp2p: use rcmgr for autonat dials by @sukunrt in #2842
- fix: Close conn in quic listener when wrapping fails by @MarcoPolo in #2852
- autonatv2: add server metrics for dial requests by @sukunrt in #2848
- chore: Bump fx to v1.22.1 by @MarcoPolo in #2857
- chore: Bump gorilla/websocket to 1.5.3 by @MarcoPolo in #2861
- peerstore: don't intern protocols by @sukunrt in #2860
- webtransport: close underlying h3 connection by @sukunrt in #2862
- Test that the conn attempt is dropped when the rcmgr blocks it for WebRTC by @MarcoPolo in #2856
- basichost: reset new stream if rcmgr blocks by @sukunrt in #2869
- Adding tau to
Notable Users
in README.md by @samyfodil in #2870 - websocket: don't return transport.ErrListenerClosed on closing listener by @sukunrt in #2867
- Updated readme as per latest MultiversX rename by @sstanculeanu in #2874
- feat: libp2phttp
/http-path
by @MarcoPolo in #2850 - basichost: reset stream if SetProtocol fails by @sukunrt in #2875
- chore: /quic → /quic-v1 by @lidel in #2888
- config: fix AddrFactory for AutoNAT by @sukunrt in #2868
- webrtc: remove experimental tag, enable by default by @sukunrt in #2887
- quic: add support for quic-go metrics by @sukunrt in #2823
- chore: update protobufs by @sukunrt in #2893
- fix(discovery): allow FindPeers limit to be 0 by @guillaumemichel in #2894
- examples/chat-with-mdns: default to a random port by @Jorropo in #2896
- feat: WebRTC reuse QUIC conn by @MarcoPolo in #2889
- ObsAddrManager: Infer external addresses for transports that share the same listening address. by @MarcoPolo in #2892
- Chore: bump deps by @MarcoPolo in #2902
- udpmux: Don't log an error if canceled because of shutdown by @MarcoPolo in #2903
New Contributors
- @cario-dev made their first contribution in #2790
- @ivan4th made their first contribution in #2825
- @lrettig made their first contribution in #2830
- @samyfodil made their first contribution in #2870
- @sstanculeanu made their first contribution in #2874
- @lidel made their first contribution in #2888
- @guillaumemichel made their first contribution in #2894
Full Changelog: v0.35.0...v0.36.0