v0.16.0
We're happy to announce go-libp2p v0.16.0. This is a big release, which adds support for the circuit v2 protocol, paving the way to decentralized hole punching.
Running a circuit v1 relay turned out to be very expensive, which is why only a few nodes could afford to act as a relay. Circuit v2 changes this dramatically: By introducing the concept of relay reservations (limiting the number of nodes connected to a relay at any given point), as well as connection limits (limiting the amount of data and the duration of relayed connections), every node on the network will be able to afford running the relay service.
When circuit v2 relay service is enabled (using the EnableRelayService
option), AutoNAT enables the relay v2 service if the node is publicly reachable. Note that currently, AutoRelay does not yet automatically discover relay v2 nodes. This will be added in a future libp2p release very soon. In this release, it is possible to configure known relay servers using the StaticRelays
configuration option.
Features
- Added support for the circuitv2 protocol. Use
EnableRelayService
to enable the circuit v2 relay service. - Added support for DCUtR protocol (decentralized hole punching). Use
EnableHolePunching
to activate.
Breaking Changes
- The
context.Context
in the host constructor (libp2p.New
) was removed (#1190). UseHost.Close()
to shut down a host. - Remove support for relays running the circuitv1 protocol.
Fixes
- Fix non-ASCII mDNS peer names (#1222).
Changelog
- github.com/libp2p/go-libp2p:
- release v0.16.0 (libp2p/go-libp2p#1246)
- chore: update go-libp2p-tls to v0.3.1 (libp2p/go-libp2p#1245)
- allow the ping protocol on transient connections (libp2p/go-libp2p#1244)
- make the Type field required in the HolePunch protobuf (libp2p/go-libp2p#1241)
- chore: update yamux and QUIC (libp2p/go-libp2p#1242)
- reject hole punching attempts when we don't have any public addresses (libp2p/go-libp2p#1214)
- refactor the AutoRelay code (libp2p/go-libp2p#1240)
- remove dead API link in README (libp2p/go-libp2p#1233)
- pass static relays to EnableAutoRelay, deprecate libp2p.StaticRelays and libp2p.DefaultStaticRelays (libp2p/go-libp2p#1239)
- feat: plumb through peerstore context changes (#1237) (libp2p/go-libp2p#1237)
- emit the EvtPeerConnectednessChanged event (libp2p/go-libp2p#1230)
- chore: update deps (libp2p/go-libp2p#1227)
- update go-libp2p-swarm to v0.7.0 (libp2p/go-libp2p#1226)
- simplify circuitv2 package structure (libp2p/go-libp2p#1224)
- use a random string for the mDNS peer-name (libp2p/go-libp2p#1222)
- chore: update zeroconf to v2.1.1 (libp2p/go-libp2p#1206)
- remove {Un}RegisterNotifee functions from mDNS service (libp2p/go-libp2p#1220)
- fix structured logging in holepunch coordination (libp2p/go-libp2p#1213)
- fix flaky TestStBackpressureStreamWrite test (libp2p/go-libp2p#1212)
- properly close hosts in mDNS tests (libp2p/go-libp2p#1216)
- close the ObserverAddrManager when the ID service is closed (libp2p/go-libp2p#1218)
- make it possible to pass options to a transport constructor (libp2p/go-libp2p#1205)
- remove goprocess from the NATManager (libp2p/go-libp2p#1193)
- add an option to start the relay v2 (libp2p/go-libp2p#1197)
- fix flaky TestFastDisconnect identify test (libp2p/go-libp2p#1200)
- chore: update go-tcp-transport to v0.3.0 (libp2p/go-libp2p#1203)
- fix: skip variadic params in constructors (libp2p/go-libp2p#1204)
- fix flaky BasicHost tests (libp2p/go-libp2p#1202)
- remove dependency on github.com/ipfs/go-detect-race (libp2p/go-libp2p#1201)
- fix flaky TestEndToEndSimConnect holepunching test (libp2p/go-libp2p#1191)
- autorelay support for circuitv2 relays (#1198) (libp2p/go-libp2p#1198)
- reject circuitv2 reservations with nonsensical expiration times (libp2p/go-libp2p#1199)
- Tag relay hops in relay implementations (libp2p/go-libp2p#1188)
- Add standalone implementation of v1 Relay (#1186) (libp2p/go-libp2p#1186)
- remove the context from the libp2p and the Host constructor (libp2p/go-libp2p#1190)
- don't use a context to shut down the circuitv2 (libp2p/go-libp2p#1185)
- fix: remove v1 go-log dep (libp2p/go-libp2p#1189)
- don't use the context to shut down the relay (libp2p/go-libp2p#1184)
- Use circuitv2 code (#1183) (libp2p/go-libp2p#1183)
- clean up badges in README (libp2p/go-libp2p#1179)
- remove recommendation about Go module proxy from README (libp2p/go-libp2p#1180)
- merge branch 'hole-punching'
- don't use a context for closing the ObservedAddrManager (libp2p/go-libp2p#1175)
- move the circuit v2 code here (libp2p/go-libp2p#1174)
- make QUIC a default transport (libp2p/go-libp2p#1128)
- stop using jbenet/go-cienv (libp2p/go-libp2p#1176)
- fix flaky TestObsAddrSet test (libp2p/go-libp2p#1172)
- clean up messy defer logic in IDService.sendIdentifyResp (libp2p/go-libp2p#1169)
- remove secio from README, add noise (libp2p/go-libp2p#1165)
- github.com/ipfs/go-datastore (v0.4.6 -> v0.5.0):
- Update version.json (#183) (ipfs/go-datastore#183)
- feat: add context to interfaces (#181) (ipfs/go-datastore#181)
- github.com/ipfs/go-ds-badger (v0.2.7 -> v0.3.0):
- feat: plumb through contexts (#119) (ipfs/go-ds-badger#119)
- github.com/ipfs/go-ds-leveldb (v0.4.2 -> v0.5.0):
- Version 0.5.0 (#58) (ipfs/go-ds-leveldb#58)
- feat: plumb through contexts (#57) (ipfs/go-ds-leveldb#57)
- fix closing of datastore in tests (ipfs/go-ds-leveldb#52)
- fix staticcheck (ipfs/go-ds-leveldb#49)
- fix typo in function documentation (ipfs/go-ds-leveldb#46)
- Add autocomment configuration
- Add standard issue template
- github.com/libp2p/go-conn-security-multistream (v0.2.1 -> v0.3.0):
- use the new SecureTransport and SecureMuxer interfaces (#36) (libp2p/go-conn-security-multistream#36)
- fix go vet and staticcheck (libp2p/go-conn-security-multistream#33)
- github.com/libp2p/go-libp2p-autonat (v0.4.2 -> v0.6.0):
- Version 0.6.0 (#112) (libp2p/go-libp2p-autonat#112)
- feat: plumb through contexts from peerstore (#111) (libp2p/go-libp2p-autonat#111)
- remove context from constructor, implement a proper Close method (libp2p/go-libp2p-autonat#109)
- fix stream deadlines (libp2p/go-libp2p-autonat#107)
- disable failing integration test (libp2p/go-libp2p-autonat#108)
- fix staticcheck (libp2p/go-libp2p-autonat#103)
- github.com/libp2p/go-libp2p-core (v0.9.0 -> v0.11.0):
- release v0.11.0 (#217) (libp2p/go-libp2p-core#217)
- remove the ConnHandler (#214) (libp2p/go-libp2p-core#214)
- make go-compat post a comment on the PR (#213) (libp2p/go-libp2p-core#213)
- remove the Process from the Network interface (#212) (libp2p/go-libp2p-core#212)
- pass the peer ID to SecureInbound in the SecureTransport and SecureMuxer (#211) (libp2p/go-libp2p-core#211)
- save the role (client, server) in the simultaneous connect context (#210) (libp2p/go-libp2p-core#210)
- github.com/libp2p/go-libp2p-discovery (v0.5.1 -> v0.6.0):
- feat: plumb peerstore contexts changes through (#75) (libp2p/go-libp2p-discovery#75)
- remove deprecated types (libp2p/go-libp2p-discovery#73)
- github.com/libp2p/go-libp2p-nat (v0.0.6 -> v0.1.0):
- remove Codecov config file (libp2p/go-libp2p-nat#39)
- stop using goprocess for shutdown (libp2p/go-libp2p-nat#38)
- chore: update go-log (libp2p/go-libp2p-nat#37)
- remove unused field permanent from mapping (libp2p/go-libp2p-nat#33)
- github.com/libp2p/go-libp2p-noise (v0.2.2 -> v0.3.0):
- add the peer ID to SecureInbound (libp2p/go-libp2p-noise#104)
- update go-libp2p-core, remove integration test (libp2p/go-libp2p-noise#102)
- github.com/libp2p/go-libp2p-peerstore (v0.2.8 -> v0.4.0):
- Update version.json (#178) (libp2p/go-libp2p-peerstore#178)
- limit the number of protocols we store per peer (libp2p/go-libp2p-peerstore#172)
- feat: plumb through datastore contexts (#176) (libp2p/go-libp2p-peerstore#176)
- remove leftover peerstore implementation in the root package (libp2p/go-libp2p-peerstore#173)
- retract v0.2.9 (libp2p/go-libp2p-peerstore#171)
- fix: replace deprecated call (libp2p/go-libp2p-peerstore#168)
- feat: remove queue (libp2p/go-libp2p-peerstore#166)
- remove deprecated types (libp2p/go-libp2p-peerstore#165)
- github.com/libp2p/go-libp2p-quic-transport (v0.11.2 -> v0.15.0):
- release v0.15.0 (#241) (libp2p/go-libp2p-quic-transport#241)
- reuse the same router until we change listeners (libp2p/go-libp2p-quic-transport#240)
- release v0.14.0 (libp2p/go-libp2p-quic-transport#237)
- chore: update quic-go to v0.24.0 (libp2p/go-libp2p-quic-transport#236)
- fix error assertions in the tracer (libp2p/go-libp2p-quic-transport#234)
- read the client option from the simultaneous connect context (libp2p/go-libp2p-quic-transport#230)
- chore: update quic-go to v0.23.0 (libp2p/go-libp2p-quic-transport#229)
- chore: update go-libp2p-tls to v0.2.0 (libp2p/go-libp2p-quic-transport#227)
- chore: update quic-go to v0.22.1 (libp2p/go-libp2p-quic-transport#225)
- update interop matrix with more recent versions (libp2p/go-libp2p-quic-transport#223)
- fix closing of streams in example (libp2p/go-libp2p-quic-transport#221)
- chore: update quic-go to v0.22.0 (libp2p/go-libp2p-quic-transport#218)
- close all UDP connections when the reuse is closed (libp2p/go-libp2p-quic-transport#216)
- fix staticcheck (libp2p/go-libp2p-quic-transport#217)
- implement a Transport.Close that waits for the reuse's GC to finish (libp2p/go-libp2p-quic-transport#211)
- update quic-go to v0.21.2 (libp2p/go-libp2p-quic-transport#212)
- don't compare peer IDs when hole punching (libp2p/go-libp2p-quic-transport#210)
- add hole punching support (#194) (libp2p/go-libp2p-quic-transport#194)
- github.com/libp2p/go-libp2p-swarm (v0.5.3 -> v0.8.0):
- Version 0.8.0 (#292) (libp2p/go-libp2p-swarm#292)
- feat: plumb contexts through from peerstore (#290) (libp2p/go-libp2p-swarm#290)
- release v0.7.0 (libp2p/go-libp2p-swarm#289)
- update go-tcp-transport to v0.4.0 (libp2p/go-libp2p-swarm#287)
- remove the ConnHandler (libp2p/go-libp2p-swarm#286)
- remove a lot of incorrect statements from the README (libp2p/go-libp2p-swarm#284)
- unexport the DialSync (libp2p/go-libp2p-swarm#281)
- add an error return value to the constructor (libp2p/go-libp2p-swarm#280)
- use functional options to configure the swarm (libp2p/go-libp2p-swarm#279)
- stop using goprocess to control teardown (libp2p/go-libp2p-swarm#278)
- read and use the direction from the simultaneous connect context (libp2p/go-libp2p-swarm#277)
- simplify the DialSync code (libp2p/go-libp2p-swarm#272)
- remove redundant self-dialing check, simplify starting of dialWorkerLoop (libp2p/go-libp2p-swarm#273)
- add a test case for the testing package (libp2p/go-libp2p-swarm#276)
- simplify limiter by removing the injected isFdConsumingFnc (libp2p/go-libp2p-swarm#274)
- update badges (libp2p/go-libp2p-swarm#271)
- remove unused context in Swarm.dialWorkerLoop (libp2p/go-libp2p-swarm#268)
- remove Codecov config (libp2p/go-libp2p-swarm#270)
- fix race condition in TestFailFirst (libp2p/go-libp2p-swarm#269)
- github.com/libp2p/go-libp2p-testing (v0.4.2 -> v0.5.0):
- chore: update go-libp2p-core to v0.10.0 (libp2p/go-libp2p-testing#38)
- github.com/libp2p/go-libp2p-tls (v0.2.0 -> v0.3.1):
- release v0.3.1 (libp2p/go-libp2p-tls#101)
- set a random certificate subject (libp2p/go-libp2p-tls#100)
- add the peer ID to SecureInbound (libp2p/go-libp2p-tls#94)
- github.com/libp2p/go-libp2p-transport-upgrader (v0.4.6 -> v0.5.0):
- increase timeout in TestConnectionsClosedIfNotAccepted on CI (libp2p/go-libp2p-transport-upgrader#85)
- add the peer ID to SecureInbound (libp2p/go-libp2p-transport-upgrader#83)
- github.com/libp2p/go-libp2p-yamux (v0.5.4 -> v0.6.0):
- chore: update go-yamux to v2.3.0 (libp2p/go-libp2p-yamux#40)
- github.com/libp2p/go-msgio (v0.0.6 -> v0.1.0):
- remove .gxignore file (libp2p/go-msgio#24)
- remove Codecov config (libp2p/go-msgio#26)
- remove "Chan" type (libp2p/go-msgio#23)
- github.com/libp2p/go-nat (v0.0.5 -> v0.1.0):
- pass a context to DiscoverGateway (libp2p/go-nat#23)
- github.com/libp2p/go-reuseport (v0.0.2 -> v0.1.0):
- stop using github.com/pkg/errors (libp2p/go-reuseport#85)
- github.com/libp2p/go-reuseport-transport (v0.0.5 -> v0.1.0):
- remove Codecov config file (libp2p/go-reuseport-transport#36)
- chore: update go-log to v2 (libp2p/go-reuseport-transport#35)
- chore: update go-reuseport to v0.1.0 (libp2p/go-reuseport-transport#34)
- github.com/libp2p/go-tcp-transport (v0.2.8 -> v0.4.0):
- release v0.4.0 (libp2p/go-tcp-transport#108)
- remove the deprecated IPFS_REUSEPORT command line flag (libp2p/go-tcp-transport#104)
- add options to the constructor (libp2p/go-tcp-transport#99)
- remove the context from the libp2p constructor in README (libp2p/go-tcp-transport#101)
- don't use libp2p.ChainOption in README (libp2p/go-tcp-transport#102)
- remove incorrect statement about dns addresses in README (libp2p/go-tcp-transport#100)
- use the assigned role when upgrading a sim open connection (libp2p/go-tcp-transport#95)
- chore: update go-reuseport-transport (libp2p/go-tcp-transport#96)
- chore: update go-log to v2 (libp2p/go-tcp-transport#97)
- simplify dial timeout context (libp2p/go-tcp-transport#94)
- github.com/libp2p/go-yamux/v2 (v2.2.0 -> v2.3.0):
- limit the number of concurrent incoming streams (libp2p/go-yamux#66)
- drastically reduce allocations in ring buffer implementation (#64) (libp2p/go-yamux#64)
- remove call to asyncNotify in Stream.Read
- github.com/libp2p/zeroconf/v2 (v2.1.0 -> v2.1.1):
- chore: update miekg/dns to v1.1.43 (libp2p/zeroconf#19)
- github.com/lucas-clemente/quic-go (v0.21.2 -> v0.24.0):
- don't unlock the receive stream mutex for copying from STREAM frames (lucas-clemente/quic-go#3290)
- run integration tests with Go 1.17.x
- List projects using quic-go (lucas-clemente/quic-go#3266)
- disable Path MTU Discovery on Windows (lucas-clemente/quic-go#3276)
- enter the regular run loop if no undecryptable packet was processed (lucas-clemente/quic-go#3268)
- Allow use of custom port value in Alt-Svc header. (lucas-clemente/quic-go#3272)
- disable the goconst linter (lucas-clemente/quic-go#3286)
- use x/net/ipv{4,6} to construct oob info when writing packets (#3278) (lucas-clemente/quic-go#3278)
- run gofmt to add the new go:build tags (lucas-clemente/quic-go#3277)
- fix log string in client example (lucas-clemente/quic-go#3264)
- update to Go 1.17.x (lucas-clemente/quic-go#3258)
- quicvarint: export Min and Max (#3253) (lucas-clemente/quic-go#3253)
- drop support for Go 1.15 (lucas-clemente/quic-go#3247)
- quicvarint: add Reader and Writer interfaces (#3233) (lucas-clemente/quic-go#3233)
- stop using the legacy CircleCI Go images (lucas-clemente/quic-go#3249)
- fix race when stream.Read and CancelRead are called concurrently (lucas-clemente/quic-go#3241)
- remove Travis config file (lucas-clemente/quic-go#3248)
- also count coalesced 0-RTT packets in the integration tests (lucas-clemente/quic-go#3251)
- remove draft versions 32 and 34 from README (#3244) (lucas-clemente/quic-go#3244)
- update Changelog (lucas-clemente/quic-go#3245)
- optimize hasOutstandingCryptoPackets in sentPacketHandler (lucas-clemente/quic-go#3230)
- permit underlying conn to implement batch interface directly (lucas-clemente/quic-go#3237)
- update qtls to include the crypto/tls fix of Go 1.16.6 / 1.15.14 (lucas-clemente/quic-go#3229)
- cancel the PTO timer when all Handshake packets are acknowledged (lucas-clemente/quic-go#3231)
- update to Go 1.17rc1 (lucas-clemente/quic-go#3232)
- fix flaky INVALID_TOKEN server test (lucas-clemente/quic-go#3223)
- drop support for QUIC draft version 32 and 34 (lucas-clemente/quic-go#3217)
- fix flaky 0-RTT integration test (lucas-clemente/quic-go#3224)
- use batched reads (lucas-clemente/quic-go#3142)
- add a config option to disable sending of Version Negotiation packets (lucas-clemente/quic-go#3216)
- remove the RetireBugBackwardsCompatibilityMode (lucas-clemente/quic-go#3213)
- remove outdated ackhandler test case (lucas-clemente/quic-go#3212)
- remove unused StripGreasedVersions function (lucas-clemente/quic-go#3214)
- fix incorrect usage of errors.Is (lucas-clemente/quic-go#3215)
- return error on SendMessage when session is closed (lucas-clemente/quic-go#3218)
- remove a redundant error check (lucas-clemente/quic-go#3210)
- update golangci-lint to v1.41.1 (lucas-clemente/quic-go#3205)
- Update doc for dialer in http3.RoundTripper (lucas-clemente/quic-go#3208)
Contributors
Contributor | Commits | Lines ± | Files Changed |
---|---|---|---|
Marten Seemann | 286 | +85457/-19526 | 1382 |
vyzo | 9 | +6764/-190 | 107 |
Gus Eggert | 13 | +2267/-1113 | 73 |
Steven Allen | 7 | +63/-594 | 22 |
Randy Reddig | 2 | +187/-53 | 8 |
Aaron Riekenberg | 4 | +64/-52 | 6 |
Hector Sanjuan | 2 | +95/-0 | 3 |
Sudarshan Reddy | 1 | +9/-40 | 1 |
pymq | 1 | +32/-8 | 2 |
bt90 | 3 | +30/-2 | 3 |
Audrius Butkevicius | 1 | +12/-1 | 1 |
muXxer | 1 | +3/-3 | 1 |
市川恭佑 (ebi) | 1 | +1/-3 | 1 |
Song Zhu | 1 | +2/-2 | 1 |
Mathis Engelbart | 1 | +1/-2 | 1 |
folbrich | 1 | +1/-1 | 1 |
George Xie | 1 | +1/-1 | 1 |