Releases: libp2p/go-libp2p
v0.28.0
🔦 Highlights
Smart Dialing
This release introduces smart dialing logic. Currently, libp2p dials all addresses of a remote peer in parallel, and
aborts all outstanding dials as soon as the first one succeeds.
Dialing many addresses in parallel creates a lot of churn on the client side, and unnecessary load on the network and
on the server side, and is heavily discouraged by the networking community (see RFC 8305 for example).
When connecting to a peer we first determine the order to dial its addresses. This ranking logic considers a number of corner cases
described in detail in the documentation of the swarm package (swarm.DefaultDialRanker
).
At a high level, this is what happens:
- If a peer offers a WebTransport and a QUIC address (on the same IP:port), the QUIC address is preferred.
- If a peer has a QUIC and a TCP address, the QUIC address is dialed first. Only if the connection attempt doesn't succeed within 250ms, a TCP connection is started.
Our measurements on the IPFS network show that for >90% of established libp2p connections, the first connection attempt succeeds,
leading a dramatic decrease in the number of aborted connection attempts.
We also added new metrics to the swarm Grafana dashboard, showing:
- The number of connection attempts it took to establish a connection
- The delay introduced by the ranking logic
This feature should be safe to enable for nodes running in data centers and for most nodes in home networks.
However, there are some (mostly home and corporate networks) that block all UDP traffic. If enabled, the current implementation
of the smart dialing logic will lead to a regression, since it preferes QUIC addresses over TCP addresses. Nodes would still be
able to connect, but connection establishment of the TCP connection would be delayed by 250ms.
In a future release (see #1605 for details), we will introduce a feature called blackhole detection. By observing the outcome of
QUIC connection attempts, we can determine if UDP traffic is blocked (namely, if all QUIC connection attempts fail), and stop
dialing QUIC in this case altogether. Once this detection logic is in place, smart dialing will be enabled by default.
More Metrics!
Since the last release, we've added metrics for:
- Holepunching
- Smart Dialing (see above)
WebTransport
- #2251: Infer public WebTransport address from
quic-v1
addresses if both transports are using the same port for both quic-v1 and WebTransport addresses. - #2271: Only add certificate hashes to WebTransport mulitaddress if listening on WebTransport
Housekeeping updates
- Identify
- WebSocket
- #2280: Reverted back to the Gorilla library for WebSocket
- NAT
- #2248: Move NAT mapping logic out of the host
🐞 Bugfixes
- Identify
- Reject signed peer records on peer ID mismatch
- #2299: Avoid spuriously pushing updates
- Swarm
- QUIC
New Contributors
- @chaitanyaprem made their first contribution in #2312
Full Changelog: v0.27.0...v0.28.0
v0.27.6
v0.27.5
v0.27.4
What's Changed
- identify
- Fixed an issue where we now avoid spuriously triggering pushes
- Fixed an issue where signed peer records weren’t rejected if the signature didn’t match
- swarm
- Fixed duplicate tracking in dial worker loop
v0.27.3
This patch release contains a fix for a rare panic that occurs on Windows systems (backport of #2276).
Full Changelog: v0.27.1...v0.27.3
v0.27.2
What's Changed
quic: fix race condition when generating random holepunch packet (#2263)
webtransport: initialize the certmanager when creating the transport (#2268)
Full Changelog: v0.27.1...v0.27.2
v0.27.1
This patch release fixes a couple of bugs. Most importantly, go-libp2p now infers WebTransport listen addresses from the observation (via Identify) of QUIC addresses, if QUIC and WebTransport are run on the same IP and port.
What's Changed
- swarm: fix multiaddr comparison in ListenClose by @marten-seemann in #2247
- basichost: remove stray print statement in test by @marten-seemann in #2249
- autonat: fix flaky TestAutoNATDialRefused by @sukunrt in #2245
- identify: fix normalization of interface listen addresses by @MarcoPolo in #2250
- basichost: don't allocate when deduplicating multiaddrs by @marten-seemann in #2206
- Infer public webtransport addrs from quic-v1 addrs. by @MarcoPolo in #2251
Full Changelog: v0.27.0...v0.27.1
v0.27.0
Breaking Changes
- The
LocalPrivateKey
method was removed from thenetwork.Conn
interface. #2144
🔦 Highlights
Additional metrics
Since the last release, we've added metrics for:
- Relay Service: RequestStatus, RequestCounts, RejectionReasons for Reservation and Connection Requests,
ConnectionDuration, BytesTransferred, Relay Service Status. - Autorelay: relay finder status, reservation request outcomes, current reservations, candidate circuit v2 support, current candidates, relay addresses updated, num relay address, and scheduled work times
🐞 Bugfixes
- autonat: don't change status on dial request refused 2225
- relaysvc: fix flaky TestReachabilityChangeEvent 2215
- basichost: prevent duplicate dials 2196
- websocket: don't set a WSS multiaddr for accepted unencrypted conns 2199
- identify: Fix IdentifyWait when Connected events happen out of order 2173
- circuitv2: cleanup relay service properly 2164
Changelog
- github.com/libp2p/go-libp2p:
- release v0.27.0
- chore: update all deps (#2240) (libp2p/go-libp2p#2240)
- add a security policy (#2238) (libp2p/go-libp2p#2238)
- chore: 0.27.0 changelog entries (#2241) (libp2p/go-libp2p#2241)
- correctly handle WebTransport addresses without certhashes (#2239) (libp2p/go-libp2p#2239)
- autorelay: add metrics (#2185) (libp2p/go-libp2p#2185)
- autonat: don't change status on dial request refused (#2225) (libp2p/go-libp2p#2225)
- autonat: fix closing of listeners in dialPolicy tests (#2226) (libp2p/go-libp2p#2226)
- discovery (backoff): fix typo in comment (#2214) (libp2p/go-libp2p#2214)
- relaysvc: flaky TestReachabilityChangeEvent (#2215) (libp2p/go-libp2p#2215)
- Add wss transport to interop tester impl (#2178) (libp2p/go-libp2p#2178)
- tests: add a stream read deadline transport test (#2210) (libp2p/go-libp2p#2210)
- autorelay: fix busy loop bug and flaky tests in relay finder (#2208) (libp2p/go-libp2p#2208)
- tests: test mplex and Yamux, Noise and TLS in transport tests (#2209) (libp2p/go-libp2p#2209)
- tests: add some basic transport integration tests (#2207) (libp2p/go-libp2p#2207)
- autorelay: remove unused semaphore (#2184) (libp2p/go-libp2p#2184)
- basichost: prevent duplicate dials (#2196) (libp2p/go-libp2p#2196)
- websocket: don't set a WSS multiaddr for accepted unencrypted conns (#2199) (libp2p/go-libp2p#2199)
- websocket: Don't limit message sizes in the websocket reader (#2193) (libp2p/go-libp2p#2193)
- identify: fix stale comment (#2179) (libp2p/go-libp2p#2179)
- relay service: add metrics (#2154) (libp2p/go-libp2p#2154)
- identify: Fix IdentifyWait when Connected events happen out of order (#2173) (libp2p/go-libp2p#2173)
- chore: fix ressource manager's README (#2168) (libp2p/go-libp2p#2168)
- relay: fix deadlock when closing (#2171) (libp2p/go-libp2p#2171)
- core: remove LocalPrivateKey method from network.Conn interface (#2144) (libp2p/go-libp2p#2144)
- routed host: return connection error instead of routing error (#2169) (libp2p/go-libp2p#2169)
- connmgr: reduce log level for closing connections (#2165) (libp2p/go-libp2p#2165)
- circuitv2: cleanup relay service properly (#2164) (libp2p/go-libp2p#2164)
- chore: add patch release to changelog (#2151) (libp2p/go-libp2p#2151)
- chore: remove superfluous testing section from README (#2150) (libp2p/go-libp2p#2150)
- autonat: don't use autonat for address discovery (#2148) (libp2p/go-libp2p#2148)
- chore: update webtransport-go to v0.5.2 (#2149) (libp2p/go-libp2p#2149)
- swarm metrics: fix connection direction (#2147) (libp2p/go-libp2p#2147)
- connmgr: Use eventually equal helper in connmgr tests (#2128) (libp2p/go-libp2p#2128)
- swarm: emit PeerConnectedness event from swarm instead of from hosts (#1574) (libp2p/go-libp2p#1574)
- relay: initialize the ASN util when starting the service (#2143) (libp2p/go-libp2p#2143)
- Fix flaky TestMetricsNoAllocNoCover test (#2142) (libp2p/go-libp2p#2142)
- identify: Bump timeouts/sleep in tests (#2135) (libp2p/go-libp2p#2135)
- Add sleep to fix flaky test (#2129) (libp2p/go-libp2p#2129)
- basic_host: Fix flaky tests (#2136) (libp2p/go-libp2p#2136)
- swarm: Check context once more before dialing (#2139) (libp2p/go-libp2p#2139)
- chore: update examples to v0.26.0 (#2134) (libp2p/go-libp2p#2134)
- github.com/ipfs/go-cid (v0.3.2 -> v0.4.1):
- v0.4.1
- Add unit test for unexpected eof
- Update cid.go
- CidFromReader should not wrap valid EOF return.
- chore: version 0.4.0
- feat: wrap parsing errors into ErrInvalidCid
- build(deps): bump golang.org/x/crypto
- build(deps): bump golang.org/x/sys
- fix: use crypto/rand.Read
- update .github/workflows/release-check.yml
- update .github/workflows/go-check.yml
- update .github/workflows/go-test.yml
- bump go.mod to Go 1.19 and run go fix
- Fix README.md example error (#146) (ipfs/go-cid#146)
- github.com/libp2p/go-libp2p-asn-util (v0.2.0 -> v0.3.0):
- release v0.3.0 (#26) (libp2p/go-libp2p-asn-util#26)
- initialize the store lazily (#25) (libp2p/go-libp2p-asn-util#25)
- chore: Update .github/workflows/stale.yml [skip ci]
- github.com/multiformats/go-multiaddr (v0.8.0 -> v0.9.0):
- Release v0.9.0 (multiformats/go-multiaddr#196)
- Update webrtc protocols after rename (multiformats/go-multiaddr#195)
- Bump golang.org/x/crypto from 0.0.0-20190611184440-5c40567a22f8 to 0.1.0 (#191) (multiformats/go-multiaddr#191)
- github.com/multiformats/go-multicodec (v0.7.0 -> v0.8.1):
- Bump version to release
ipns-record
code - chore: update submodules and go generate
- deps: upgrade stringer to compatible version
- update .github/workflows/release-check.yml
- update .github/workflows/go-check.yml
- update .github/workflows/go-test.yml
- bump go.mod to Go 1.19 and run go fix
- v0.8.0
- chore: update submodules and go generate
- fix: make go-generate workflow pull latest remote (multiformats/go-multicodec#73)
- ci: create Go Generate workflow (multiformats/go-multicodec#72)
- Bump version to release
Contributors
Contributor | Commits | Lines ± | Files Changed |
---|---|---|---|
Sukun | 11 | +3526/-262 | 33 |
Marten Seemann | 15 | +615/-1396 | 75 |
galargh | 2 | +876/-804 | 6 |
Marco Munizaga | 14 | +1173/-134 | 44 |
Henrique Dias | 2 | +185/-40 | 3 |
Prithvi Shahi | 2 | +55/-14 | 2 |
gammazero | 2 | +31/-0 | 4 |
libp2p-mgmt-read-write[bot] | 1 | +26/-0 | 1 |
Piotr Galar | 1 | +25/-0 | 1 |
dependabot[bot] | 3 | +12/-9 | 6 |
Rod Vagg | 5 | +6/-6 | 5 |
Laurent Senta | 1 | +2/-2 | 1 |
Hlib Kanunnikov | 1 | +2/-1 | 1 |
Andrew Gillis | 1 | +2/-1 | 1 |
RichΛrd | 1 | +1/-1 | 1 |
Nikhilesh Susarla | 1 | +1/-1 | 1 |
Masih H. Derkani | 1 | +1/-1 | 1 |
Bryan White | 1 | +1/-1 | 1 |
Full Changelog: v0.26.4...v0.27.0
v0.26.4
v0.26.3
What's Changed
- release v0.26.1 by @marten-seemann in #2146
- rcmgr: fix JSON marshalling of ResourceManagerStat peer map by @MarcoPolo in #2156
- retract v0.26.1, release v0.26.2 by @marten-seemann in #2153
- websocket: Don't limit message sizes in the websocket reader by @MarcoPolo in #2193
Full Changelog: v0.26.0...v0.26.3