| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-08-24 | 19.7 kB | |
| v2.3.0 source code.tar.gz | 2026-08-24 | 1.0 MB | |
| v2.3.0 source code.zip | 2026-08-24 | 1.3 MB | |
| Totals: 3 Items | 2.4 MB | 0 | |
Highlights
- The C bindings were rebuilt around generated nim-ffi bindings, replacing the legacy hand-written implementation while restoring API coverage for connectivity, streams, custom protocols, GossipSub, Kademlia, service discovery, relay, peerstore, crypto, and metrics.
- QUIC performance was significantly improved by upgrading to nim-lsquic v0.8.0, with more efficient socket draining and engine scheduling, lower-copy receive/write paths, faster packet routing, and more reliable settlement of pending stream operations during connection close.
- Android and iOS build targets were added for the C bindings, including device and simulator architectures and tests on Android and iOS simulators.
- Kademlia received substantial interoperability and performance improvements: larger protocol-compatible message limits, 48-hour provider records, liveness-gated routing-table admission and eviction, continuous alpha-concurrency lookups, beta convergence, optimistic provider announcements, and dynamic client/server mode driven by network reachability.
- Service Discovery gained automatic bootstrapping for per-service routing tables, safer shutdown and concurrency handling, IPv6-aware peer scoring, routing-table admission checks, registrar-cache improvements, and support for advertising a caller-provided signed Extended Peer Record.
- Protocol interoperability was tightened across the stack: routing records now use the specified proto3 encoding, yamux uses the standard 256 KiB window and rejects invalid versions, QUIC validates the expected peer ID during the TLS handshake, and DCUtR preserves the QUIC server role during hole punching.
- NAT port mapping now uses nim-libplum, providing automatic PCP, NAT-PMP, and UPnP-IGD selection with simpler lifecycle and build integration.
- PubSub protobuf messages now use protobuf Editions. Common
Messageand control-message fields are plain Nim values again, while fields whose wire presence is meaningful remainOpt[T]. - GossipSub ingress controls are exposed through the C bindings, including maximum message size, per-peer protocol-overhead rate limits, and optional disconnection of peers that exceed those limits.
- Runtime log filtering can now be configured before C-binding node construction, avoiding unwanted startup logs.
- Dependency setup was simplified around Nimble’s resolver: contributors can now use
makefollowed bymake test, while lockfiles remain for application-like artifacts such as C bindings and Nix builds.
Breaking changes
- The legacy hand-written C bindings were replaced by nim-ffi generated bindings. C consumers must regenerate
c_bindings/libp2p.h, rebuild against the new ABI, and adapt their context calls and result callbacks. The oldcbind/libp2p.hand legacy threaded implementation were removed. - Additional C ABI changes include:
transport,muxer, and peer direction now use generated enums instead of integer literals.libp2p_ctx_create_cidandlibp2p_ctx_decode_xprbecamelibp2p_static_create_cidandlibp2p_static_decode_xprand no longer require a context.libp2p_ctx_destroynow returns an integer status.- Raw callbacks may receive the non-terminal
RET_STALE_WARNstatus while a long-running request remains in flight. Libp2pConfignow contains a nestedgossipsubconfiguration.mountGossipsubandgossipsubTriggerSelfmoved togossipsub.mountandgossipsub.triggerSelf.- Relay v1 HOP is no longer advertised by the default
Relay.new(). Applications that still need the legacy protocol must explicitly useRelay.new(circuitRelayV1 = true). Relay v2 remains enabled by default. IdentifyPusheris disabled by default. Applications that rely on Identify Push announcements must opt in withSwitchBuilder.new().withIdentifyPusher().KadDHT.new(..., client: bool)becameKadDHT.new(..., isServer: bool = true). Note the inverted meaning: the oldclient = trueis equivalent toisServer = false. Switch-builder users can instead selectKadMode.Client,KadMode.Server, orKadMode.Auto.- AutoNAT v1’s
AutonatMsg.msgTypeandAutonatDialResponse.statusare nowOpt[T]. Code that directly constructs or reads those protobuf structures must wrap or unwrap the values. - NAT port-mapping configuration changed with the move to nim-libplum:
upnpConfig()andnatPmpConfig()no longer acceptrefreshIntervalorleaseDuration; they acceptdiscoveryTimeoutandmappingTimeout.natConfig()is the recommended default and automatically tries PCP, NAT-PMP, and UPnP-IGD.DefaultRefreshIntervalandDefaultLeaseDurationwere removed.- Custom
PortMapperimplementations must removediscover;mapno longer accepts a lease and now returns aMappedPort. - Outbound dialing and identification now have bounded deadlines, dial locks are cleaned up safely, and inbound connection rejection no longer stalls the accept loop or causes unbounded cleanup work.
- Kademlia now reuses per-peer RPC streams, enforces per-bucket IP diversity, backs off failed admission probes, automatically re-seeds undersized routing tables, and preserves peer addresses when admission-probe capacity is exhausted.
What's Changed
- test: remove unnecessary test that takes too much time by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2754
- test(misc): dual stack 5 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2746
- fix: eliminate race condition in "e2e drop peer from inside its own stream handler" test by @vladopajic with @Copilot in https://github.com/vacp2p/nim-libp2p/pull/2760
- test(dcutr): better synchronisation and assertion for "DCUtR establishes a new QUIC connection" by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2762
- test(autonat): fix flaky test "Peer must be not reachable and then reachable" by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2764
- test(mplex): make tests teardown more robust by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2761
- test(transports): accept fails by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2759
- fix(memory-transport): serialize concurrent writes by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2765
- feat(service-disco): service table bootstrapping by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2718
- fix(multiaddress): decode empty optional observedAddr by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2783
- chore(cbind): nim-ffi migration [1/9] — deps + pinning scaffold by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2772
- fix(yamux): align default window with spec and reject invalid versions by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2787
- fix(kademlia): align DHT message and provider limits for interop by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2788
- fix(identify): handle missing optional pub key by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2793
- chore(cbind): nim-ffi migration [2/9] — new-library scaffold + CI by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2773
- chore(makefile): simplify code by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2792
- chore(cbind): change dep commit by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2804
- feat(tests): tests as subproject of repo by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2794
- test(identify): repro test for [#2800] by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2802
- test: fix flakines with "client-mode node successfully completes lookup against server-mode registrars" by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2801
- chore(relay)!: make v1 hop opt-in by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2785
- fix(autonat): optional msgType and status fields by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2790
- fix(protobuf): tolerate empty custom fields by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2789
- fix(routing-record): use proto3 peer record encoding by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2807
- chore: add issue and feature templates by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2770
- chore(cbind): nim-ffi migration [3/9] — connectivity & identity by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2774
- chore(builders): disable IdentifyPusher by default by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2819
- chore(cbind): nim-ffi migration [4/9] — streams & custom protocols (+ echo example) by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2775
- chore(cbind): nim-ffi migration [5/9] — pubsub / gossipsub (+ gossipsub example) by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2776
- fix(service-discovery): drain bootstrap futures on shutdown by @vladopajic with @Copilot in https://github.com/vacp2p/nim-libp2p/pull/2823
- chore(kad-dht): loosen validation on AddProvider for interop tests by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2824
- chore(nat): replace nim-nat-traversal with nim-libplum by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2821
- chore(cbind): nim-ffi migration [6/9] — kademlia + CID + crypto by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2777
- build(android): add libp2p_ffi mobile targets by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2813
- chore(cbind): nim-ffi migration [7/9] — service discovery + extended peer records by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2778
- fix(dialer): reset streams after failed protocol negotiation by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2828
- build(ios): add libp2p_ffi mobile targets by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2814
- feat(android): simulator by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2827
- chore(cbind): nim-ffi migration [8/9] — relay, peerstore, metrics (API parity) by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2779
- feat(ios): simulator by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2833
- fix: avoid unused allFinished copies by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2830
- test(interop): kad-dht for unified-testing by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2832
- fix(quic): propagate accept errors instead of nil by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2837
- test(interop): build unified-testing dockerfiles workflow by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2840
- chore(cbind): nim-ffi migration [9/9] — flip to libp2p.nim, delete legacy cbind by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2780
- fix(dcutr): preserve QUIC server role during hole punching by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2838
- fix(service-disco): wait time cap by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2834
- chore: print selected platform in test_multiformat_exts by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2843
- fix(service-disco): don't rescale bucket index by maxBuckets by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2841
- fix(kad): avoid advertising ephemeral peer addresses by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2844
- fix(service-disco): extend IP-similarity scoring to IPv6 by @tinniaru3005 in https://github.com/vacp2p/nim-libp2p/pull/2805
- fix(kad): exclude the requester from closerPeers by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2850
- fix(kad): target the requested bucket when refreshing by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2842
- fix: ensure memory transport tags directions by @etan-status in https://github.com/vacp2p/nim-libp2p/pull/2809
- chore(tests): use
awaitinsted ofwaitForby @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2867 - fix(kad): retry peers that respond with an error, not just silent ones by @tinniaru3005 in https://github.com/vacp2p/nim-libp2p/pull/2865
- fix(service-disco): apply routing-table admission checks to per-service inserts by @tinniaru3005 in https://github.com/vacp2p/nim-libp2p/pull/2870
- chore(deps): bump nimble to v0.24.1 by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2873
- chore(kad): liveness-gated bucket eviction by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2862
- feat(cbind): list connected peers regardless of direction by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2878
- build(deps): replace custom pins with Nimble resolver setup by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2871
- fix(kad): flaky Get providers returns at most k closest peers by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2879
- feat(quic): validate expected peer id during dial by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2880
- fix(build): remove --noLockFile and dir rm by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2882
- chore(service-disco): add timeouts and refactor for concurency by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2872
- fix(pubsub): resolve flaky FloodSub multiple-peer tests by @paschal533 in https://github.com/vacp2p/nim-libp2p/pull/2810
- chore(cbind): adopt nim-ffi 0.3.0 by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2885
- chore: bump lsquic by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2889
- test: improve checkTrackers by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2886
- feat(cbind): nat config by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2884
- feat(cbind): dial with addrs by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2883
- chore(kad): probe peers before inserting them into the routing table by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2863
- chore(kad): replace round-synchronized lookup with a continuous alpha-concurrency pipeline by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2864
- fix(cbind): bump nim-ffi for CBOR byte-string replies by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2891
- chore(make): format .nimble files by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2894
- chore(.gitignore): cleanup by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2895
- chore(service-disco): refactor registrar cache by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2849
- feat(log): add runtime logs filtering support by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2896
- test(kad): import tables in the find test by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2897
- chore(log):
libp2pSetLogLevelchanged to static by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2899 - fix(logs): adding logLevel to Libp2pConfig to avoid logs created in createLibp2pNode by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2904
- refactor(pubsub): use protobuf proto editions by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2900
- fix(test): guard the logging test on a dynamic chronicles sink by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2905
- chore(kad): batch reprovide by keyspace region by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2902
- chore(kad): evict stale peer on refresh by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2898
- chore(cbind): change procs to static by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2913
- chore(kad): converge lookups on beta and confirm the k closest in a follow-up phase by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2903
- refactor(nat): a ReachabilityObservers store for reachability subscribers by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2915
- fix(service-disco): self registration ticket carry over by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2914
- feat(kad): send optimistic ADD_PROVIDER during lookup by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2911
- feat(kad): dynamic client/server mode via reachability by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2910
- fix(service-disco): let a caller advertise a full XPR by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2917
- fix(service-disco): initialise the network size estimator by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2920
- feat(cbind): expose the GossipSub ingress limits in Libp2pConfig by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2919
- test(quic): pin nim-lsquic close fix by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2925
- chore(kad): refactor probe & evict scheduling by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2907
- ci: change log lvl by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2926
- chore(kad): reuse per-peer streams instead of dialing a fresh stream per RPC by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2901
- chore: adding more metrics by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2927
- fix(service-disco): validate advert length and re-check client mode by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2922
- chore(cbind): use nim-ffi 0.3.0 by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2909
- fix(dialer): bound outbound dials so one stuck peer cannot stall the node by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2929
- refactor(kad): tables into virtual system by @SionoiS in https://github.com/vacp2p/nim-libp2p/pull/2918
- fix(autotls): checkDNSRecords retry loop by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2930
- fix(pubsub): initialize RPC handlers before connecting by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2941
- fix(kad): an admission probe no longer waits out the dialer timeout by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2936
- fix(switch): prevent accept-loop resource exhaustion by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2951
- feat(quic): add stream idle timeouts by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2947
- chore(kad): per-bucket IP diversity caps by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2938
- fix(ipaddr): a public IPv6 address counts as a public address by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2944
- feat(kad): re-seed a routing table that fell below a minimum size by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2937
- fix(ipaddr): compare IPv6 clients too by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2956
- chore(kad): stop re-probing a peer whose admission probe just failed by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2939
- fix(kad): findNode no longer double-hashes a service table's target by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2943
- fix(kad): keep peer addresses when the admission probe cap is full by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2967
- fix(pubsub): bound seen cache and add overhead observability by @richard-ramos in https://github.com/vacp2p/nim-libp2p/commit/fc4169749ea685e2dca93e5845292eb229978012
New Contributors
- @paschal533 made their first contribution in https://github.com/vacp2p/nim-libp2p/pull/2810
Full Changelog: https://github.com/vacp2p/nim-libp2p/compare/v2.2.0...v2.3.0