Releases: libp2p/go-libp2p
v0.41.0
⚠︎ Breaking Changes
- This release updates go-multiaddr to v0.15 which has some breaking changes. This should not affect most users, but reference the go-multiaddr v0.15.0 release notes for breaking changes: https://github.com/multiformats/go-multiaddr/releases/tag/v0.15.0.
🔦 Highlights
Overall this is a fairly minor release focused on supporting the go-multiaddr v0.15.0.
- Update to go-multiaddr v0.15. This is a pretty big release for go-multiaddr that should make it harder to misuse. See the v0.15.0 release notes for breaking changes: https://github.com/multiformats/go-multiaddr/releases/tag/v0.15.0
- Uniform HTTP Peer ID Auth over native HTTP transport and HTTP over libp2p streams. See the http.Host Autthenticated HTTP example in the Go doc for an example of usage.
- Some upnp fixes that should make upnp/nat-pmp more reliable and easier to debug. This fixes an issue with FRITZ!Box routers.
What's Changed
- ci: uci/update-go by @web3-bot in #3195
- autorelay: send addresses on eventbus; dont wrap address factory by @sukunrt in #3071
- basichost: add certhashes to addrs in place by @sukunrt in #3200
- chore: move go-nat to internal package by @MarcoPolo in #3154
- chore: update quic-go to v0.50.0 by @MarcoPolo in #3204
- chore: Update go-multiaddr to v0.15 by @MarcoPolo in #3145
- chore(identify): move log to debug level by @lidel in #3206
- feat(libp2phttp): More ergonomic auth by @MarcoPolo in #3188
- fix(dcutr): Fix end to end tests and add legacy behavior flag (default=true) by @MarcoPolo in #3044
- fix(libp2phttp): Fix relative to absolute multiaddr URI logic (#3208) @MarcoPolo
Full Changelog: v0.40.0...v0.41.0
v0.40.0
⚠ Breaking Change!
Introducing error codes mandated changing the error types returned by stream resets. All checks that depended on checking the error string or comparing equality with network.ErrReset
, now need to use errors.Is(err, network.ErrReset)
. More details below in the error codes section.
🔦 Highlights
Error Codes
This releases introduces error codes for Stream Reset and Connection Close. This allows sending for more information to the peer about the error condition causing the abort. go-libp2p has already defined some error codes which are useful for many different use cases. You can find them in:
https://pkg.go.dev/github.com/libp2p/[email protected]/core/network#StreamErrorCode
and: https://pkg.go.dev/github.com/libp2p/[email protected]/core/network#ConnErrorCode
On streams, you can signal an error on reset by using:
str.ResetWithError(errCode)
On connections, you can signal an error on close by using:
conn.ResetWithError(errCode)
Not all transports support error codes. Most notably, WebTransport has no support for sending error codes at the moment. See the spec: libp2p/specs#623 for more details.
If you want to define custom error codes for your application protocol, you can reserve a block for your application by opening a PR in the specs repo. The above mentioned spec has details on reserving error codes for applications. Until the spec is merged, you must open a PR targeting the spec's branch.
Breaking Change!
This introduces a breaking change for users who checked stream reset errors by testing for equality with network.ErrReset
as err == network.ErrReset
. These tests now need to use the errors.Is(err, network.ErrReset)
test. Stream Resets now return either *network.StreamError
if the stream was reset by remote, or *network.ConnError
if the connection was closed by remote.
What's Changed
- chore: update pion/ice to v4 by @achingbrain in #3175
- Implement error codes spec by @sukunrt in #2927
- swarm: remove unnecessary error log by @sukunrt in #3128
- test(p2p/protocol/identify): Fix user agent assertion in Go 1.24 by @Jorropo in #3177
- feat(swarm): logging waitForDirectConn return error by @wlynxg in #3183
- feat: add AutoTLS example by @2color in #3103
- autonatv2: allow multiple concurrent requests per peer by @sukunrt in #3187
New Contributors
- @achingbrain made their first contribution in #3175
Full Changelog: v0.39.0...v0.40.0
v0.39.1
What's Changed
- fix: fix comment by @linchizhen in #3124
- ci: get back on the main release track of release checker by @galargh in #3117
- Upgrade pion/webrtc to v4 by @badgooooor in #3098
- tcp: fix metrics test build directive by @sukunrt in #3052
- Update contribution guidelines by @MarcoPolo in #3134
- tcpreuse: error on using tcpreuse with pnet by @sukunrt in #3129
- nat: ignore mapping if external port is 0 by @sukunrt in #3094
- quicreuse: make it possible to use an application-constructed quic.Transport by @marten-seemann in #3122
- test: fix failing test by @MarcoPolo in #3141
- fix(net/nat): data race problem of
extAddr
by @wlynxg in #3140 - tcpreuse: fix rcmgr accounting when tcp metrics are enabled by @sukunrt in #3142
- ci: move to actions/upload-artifact@v4 by @MarcoPolo in #3152
- feat(transport/websocket): support SOCKS proxy with wss by @MarcoPolo in #3137
- Update quic-go to v0.49.0 by @MarcoPolo in #3153
- feat: Implement Custom TCP Dialers by @MarcoPolo in #3166
- feat(holepunch): add logging when DirectConnect execution fails by @wlynxg in #3146
- chore: update dependencies by @MarcoPolo in #3173
- chore: release v0.39.0 by @MarcoPolo in #3174
New Contributors
- @linchizhen made their first contribution in #3124
- @badgooooor made their first contribution in #3098
Full Changelog: v0.38.1...v0.39.1
v0.38.3
What's Changed
- fix(autorelay): Move relayFinder peer disconnect cleanup to separate goroutine by @MarcoPolo in #3105
- ci: Install specific protoc version when generating protobufs by @MarcoPolo in #3112
- fix(httpauth): Correctly handle concurrent requests on server by @MarcoPolo in #3111
- Release v0382 by @sukunrt in #3147
Full Changelog: v0.38.0...v0.38.3
v0.39.0
🔦 Highlights
This is a small release. The main thing is updating quic-go to v0.49.0 and enabling specific environments with the new WithDialerForAddr
option.
Changelog
- Update quic-go to v0.49.0 #3153
- Support application provided
quic.Transport
s @marten-seemann in #3122 - Support SOCKS proxy with ws(s) #3137
- Support WithDialerForAddr for running TCP over arbitrary user-defined proxies. #3166
Full Changelog: v0.38.1...v0.39.0
v0.38.2
What's Changed
a4433e7 Release v0.38.2
9e08a02 tcpreuse: fix rcmgr accounting when tcp metrics are enabled (#3142)
6735dd5 fix(net/nat): data race problem of extAddr
(#3140)
1ebb404 test: fix failing test (#3141)
8f09a3e nat: ignore mapping if external port is 0 (#3094)
1529945 tcpreuse: error on using tcpreuse with pnet (#3129)
7397e65 chore: Update contribution guidelines (#3134)
05b4afe tcp: fix metrics test build directive (#3052)
1a2387c ci: get back on the main release track of release checker (#3117)
051fe11 webtransport: fix docstring comment for getCurrentBucketStartTime
Full Changelog: v0.38.1...v0.38.2
v0.38.1
What's Changed
- fix(autorelay): Move relayFinder peer disconnect cleanup to separate goroutine by @MarcoPolo in #3105
- ci: Install specific protoc version when generating protobufs by @MarcoPolo in #3112
- fix(httpauth): Correctly handle concurrent requests on server by @MarcoPolo in #3111
Refer the the release notes in v0.38.0 for all things new in v0.38.
Full Changelog: v0.38.0...v0.38.1
v0.38.0
Highlights
-
You can now use the same port for TCP and WebSocket. Refer to the
TestSharedTCPAddr
for an example on how to enable this. Currently this is
opt-in. In a future release, we may enable this as default behavior when you
leave the port unspecified or when you explicitly set the same port. -
The eventbus will now log error messages when it detects slow consumers. It's
important for slow consumers to not stall the eventbus, as this can cause the
core libp2p node to stall. Previously this was visible via metrics. This should
help identify hard-to-debug issues without requiring metrics to be configured.
What's changed
- peerstore: remove sync.Pool for expiringAddrs (#3093) sukun
- webtransport: close quic conn on dial error (#3104) sukun
- peerstore: fix addressbook benchmark timing (#3092) sukun
- swarm: record conn metrics only once (#3091) sukun
- fix(sampledconn): Correctly handle slow bytes and closed conns (#3080) Marco Munizaga
- fix(peerstore): pass options to addrbook constructor (#3090) sukun
- fix(swarm): remove stray print stmt (#3086) sukun
- feat(swarm): delay /webrtc-direct dials by 1 second (#3078) sukun
- ci: free disk space for interop tests (#3084) Piotr Galar
- chore: Update dependencies and fix deprecated function in relay example (#3023) Reymon
- chore: fix broken link to record envelope protobuf file (#3070) hishope
- chore(core): fix function name in interface comment (#3056) wangjingcun
- basichost: avoid modifying slice returned by AddrsFactory (#3068) Ivan Shvedunov
- feat(addrbook): allow passing options to memoryAddrBook (#3062) Daniel Norman
- chore(dashboard/alertmanager): update api version from v1 to v2 (#3054) Carlos Peliciari
- fix(tcpreuse): handle connection that failed to be sampled (#3036) Adin Schmahmann
- fix(tcpreuse): remove windows specific code (#3039) Marco Munizaga
- refactor(core/routing): split ContentRouting interface (#3048) Hector Sanjuan
- fix(holepunch/tracer): replace inline peer struct with peerInfo type (#3049) Carlos Peliciari
- fix(eventbus): Idempotent wildcardSub close (#3045) Marco Munizaga
- fix(identify): push should not dial a new connection (#3035) Marco Munizaga
- eventbus: dont panic on closing Subscription twice (#3034) sukun
- fix(swarm): incorrect error message format order (#3037) 未月
- feat: eventbus: log error on slow consumers (#3031) Marco Munizaga
- chore: make funding.json uppercase to follow meta convention (#3028) (marco/2983) Prithvi Shahi
- chore: add drips entry to funding.json for Filecoin rPGF round 2 (fix/deps) Prithvi Shahi
- tcp: parameterize metrics collector (#3026) Marco Munizaga
- feat(tcpreuse): add options for sharing TCP listeners amongst TCP, WS and WSS transports (#2984) Adin Schmahmann
- pnet: wrap underlying error when reading nonce fails (#2975) sukun
New Contributors
- @cokemine made their first contribution in #3037
- @wangjingcun made their first contribution in #3056
- @hishope made their first contribution in #3070
- @reymom made their first contribution in #3023
Full Changelog: v0.37.0...v0.38.0
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