Releases: libp2p/go-libp2p
Releases · libp2p/go-libp2p
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
v0.35.4
v0.35.3
What's Changed
- Fix a case where transient streams were not properly reset #2869
Full Changelog: v0.35.2...v0.35.3
v0.35.2
What's Changed
- release v0.35.2
- webtransport: close underlying h3 connection (#2862)
- peerstore: don't intern protocols (#2860)
- chore: Bump gorilla/websocket to 1.5.3
- chore: Bump fx to v1.22.1 (#2857)
- PR Comments
- Add a transport level test to ensure we close conns after rejecting them by the rcmgr
- Close quic conns when wrapping conn fails
- pstoremanager: fix connectedness check
Full Changelog: v0.35.0...v0.35.2
v0.35.1
What's Changed
- identify: Don't filter addr if remote is neither public nor private (#2820)
- identify: fix bug in observed address handling (#2825)
- identify: add test for observed address handling (#2828)
- libp2phttp: workaround for ResponseWriter's CloseNotifier (#2821)
- circuitv2: improve voucher validation (#2826)
- webrtc: fix ufrag prefix for dialing (#2832)
Full Changelog: v0.35.0...v0.35.1
v0.35.0
⚠️ Breaking Changes ⚠️
- Resource Manager:
ConnLimitPerCIDR
is now calledConnLimitPerSubnet
. The field previously named BitMask is now called PrefixLength. Apologies for the churn, but the old names were vague and confusing.
🔦 Highlights
- Resource Manager: Renames ConnLimitPerCIDR to ConnLimitPerSubnet
- Resource Manager: Able to provide connection limits for specific IP address blocks.
- By default we new allow unlimited connections from localhost. Should help fix tests that broke with the previous behavior of limiting to only 8 connections per IP address.
What's Changed
- rcmgr: Support specific network prefix in conn limiter by @MarcoPolo in #2807
Full Changelog: v0.34.1...v0.35.0
v0.34.1
Refer to the v0.34.0 release notes for breaking changes in v0.34
What's Changed
- rcmgr: Backwards compatibility if you wrap default impl by @MarcoPolo in #2805
- config: fix "Insecure-security" constructor by @sukunrt in #2810
Full Changelog: v0.34.0...v0.34.1
v0.34.0
⚠️ Breaking Changes ⚠️
- Transient Connections are now called Limited Connections. The prior terminology was confusing to many, and conflicted with the transient definition in the resource manager. The term actually referred to a connection that was relayed and limited in some aspect (either data or time).
- libp2phttp: The well-known resource for libp2p protocols has changed. See the discussion thread for context. This means that new clients will not be able to reach the well-known endpoint automatically on old servers, and new servers won't respond to the old well-known endpoint to old clients. If you do not fully control the deployment of this, you should set
EnableCompatibilityWithLegacyWellKnownEndpoint
inlibp2phttp.Host
totrue
to enable backwards compatibility. This is not the default behavior because libp2phttp is still experimental and things are generally permitted to break. In this case supporting backwards compatibility was simple enough and we generally don't like breaking users even on an experimental feature. - ResourceManager: This probably only affects 0.01% of use cases. The resource manager is now IP aware. Meaning it will set limits for how many connections it tracks per IP address or IP Address range (CIDR subnet). Look at
WithLimitPeersPerCIDR
for how to configure it. Almost all users will not need to touch this. If you're tests are suddenly breaking, this is might be why
🔦 Highlights
WebRTC Direct
- We've significantly improved support for webrtc-direct transport with multiple security and performance fixes.
- Based on the experience of webrtc-direct on v0.34 we intend to make it non experimental in v0.35
Transient Connections are now called Limited Connections
- Connections to peers over relayed or other limited connections, previously called
transient
are now calledlimited
throughout the code. Limited is more descriptive of the connection's behavior and it avoids conflict with Resource Manager's Transient scope. - For Connections, the
Transient
connection state has been renamed toLimited
. This is a breaking change and you'll have to replace uses ofconn.Stat().Transient
withconn.Stat().Limited
- Network context functions like
network.WithUseTransient
are deprecated, use their limited alternatives likenetwork.WithUseLimited
.
Limited Connectedness state
- Peers connected to the host via relayed or any other limited connection now report their connectivity state as
Limited
. - This state is also reflected in
EvtPeerConnectednessChanged
event. Consumers only interested in peers connected over Unlimited connections can ignore events with Limited Connectedness. NOTE: This changes the behavior of the Connected Connectedness state. Previously it included all limited connections and now it doesn't. To keep existing behavior in your code you can replace checksconnectedness == network.Connected
withconnectedness != network.NotConnected
What's Changed
- webrtc: setup datachannel handlers before connecting to a peer by @sukunrt in #2716
- webrtc: close mux when closing listener by @sukunrt in #2717
- ping: use context.Afterfunc to avoid a lingering goroutine by @Jorropo in #2723
- Small code improvements by @AnomalRoil in #2722
- webrtc: use a common logger for all pion logging by @sukunrt in #2718
- fix: ReserveMemory error cannot be printed by @wlynxg in #2725
- webrtc: fix bug with logger wrapper by @sukunrt in #2727
- chore: update examples to v0.33.0 by @sukunrt in #2728
- webrtc: increase receive buffer size on listener by @sukunrt in #2730
- security: remove unnecessary noise code by @Dreamacro in #2738
- chore: bump quic-go by @MarcoPolo in #2742
- add more info to "protocol mux failed" by @zhiqiangxu in #2734
- webrtc: set sctp receive buffer size to 100kB by @sukunrt in #2745
- ci: uci/copy-templates by @web3-bot in #2747
- use Fx to start and stop the host, swarm, autorelay and quicreuse by @marten-seemann in #2118
- quicreuse: remove workaround for quic-go listener close deadlock by @sukunrt in #2746
- Use any port, not a specific one for HTTP examples by @MarcoPolo in #2748
- feat: add tls
WithKeyLogWriter
option by @wlynxg in #2750 - webrtc: add NullResourceManager, fixes panic by @dozyio in #2752
- webrtc: run onDone callback immediately on close by @sukunrt in #2729
- autonat: Clean up after close by @MarcoPolo in #2749
- quic: make server cmd use RFC 9000 instead of draft-29 by @MarcoPolo in #2753
- libp2phttp: Rename well-known resource by @MarcoPolo in #2757
- fix: revert gorilla/websocket from 1.5.1 to 1.5.0 by @wlynxg in #2763
- Update chat with rendezvous example by @MarcoPolo in #2769
- Identify: emit useful events after identification by @MarcoPolo in #2759
- libp2phttp: Return connection: close when doing http over streams by @MarcoPolo in #2756
- Update: update incomplete readmes by @apenzk in #2767
- Fix comment by @MarcoPolo in #2775
- basichost: append certhash for webrtc addresses provided via address factory by @sukunrt in #2774
- Add a "transient" network connectivity state by @Stebalien in #2696
- webrtc: add webrtc addresses to host normalizer by @sukunrt in #2784
- Update github.com/quic-go/quic-go dependency by @fasmat in #2780
- fix: DNS protocol address is not reserved by @wlynxg in #2792
- identify: refactor observed address manager to do address mapping at thin waist(IP+TCP/UDP) layer by @sukunrt in #2793
- rcmgr: Add conn_limiter to limit number of conns per ip cidr by @MarcoPolo in #2788
New Contributors
- @AnomalRoil made their first contribution in #2722
- @wlynxg made their first contribution in #2725
- @Dreamacro made their first contribution in #2738
- @zhiqiangxu made their first contribution in #2734
- @apenzk made their first contribution in #2767
- @fasmat made their first contribution in #2780
Full Changelog: v0.33.0...v0.34.0