Skip to content

v2.1.0

Choose a tag to compare

@richard-ramos richard-ramos released this 30 Jun 19:59
fbea8f1

Highlights

  • NAT traversal support was expanded with UPnP, NAT-PMP, NATService, and tighter integration of AutoNAT and hole punching into the NAT service flow.
  • DCUtR gained QUIC hole punching support, with follow-up fixes to enable hole punching and improve AutoNAT v2 address candidate selection.
  • Service Discovery was hardened across registration maintenance, table/key bucketing, record filtering, record/service-data size limits, and invalid ticket handling.
  • Peer IDs now support CIDv1.
  • LPProtocol gained metrics, tests for emitted metric values, and a fast path when stream limits are disabled.
  • GossipSub partial-message handling was fixed for requested partial topics and fanout regressions.
  • Protocol serialization was modernized around protobuf_serialization for Identify, Noise, Relay, routing records, and AutoNAT v2, with protobuf decode APIs moving toward Result.
  • Internal dependencies were reduced by replacing nim-jwt with an internal JWS signer and replacing the unmaintained dnsclient dependency with an internal DNS codec.
  • Builder, Dial, MultistreamSelect, and utility APIs were cleaned up to simplify switch construction and remove older Nim <2 compatibility leftovers.

Unified NAT traversal configuration

NAT traversal is now configured through withNAT(...), with separate helpers for port mapping, reachability probing, and hole punching.

let switch = SwitchBuilder
  .new()
  .withAddress(MultiAddress.init("/ip4/0.0.0.0/tcp/0").tryGet())
  .withTcpTransport()
  .withMplex()
  .withNAT(upnpConfig())
  .withNAT(autonatConfig(AutonatV2))
  .build()

Caution

When using KadDHT, we have noticed that the number of streams seems high when using tcp+(yamux|mplex). We are investigating this and will release a fix in new minor or patch version.

What's Changed

Full Changelog: v2.0.0...v2.1.0