| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-07-13 | 11.0 kB | |
| v2.2.0 source code.tar.gz | 2026-07-13 | 902.7 kB | |
| v2.2.0 source code.zip | 2026-07-13 | 1.2 MB | |
| Totals: 3 Items | 2.1 MB | 2 | |
Highlights
- Removed
minprotobufusage, replacing it instead by nim-protobuf-serialization. - Protobuf metrics are now protocol-wide, with byte and message counters for sent/received protobuf traffic, and C bindings can expose metrics through
libp2p_collect_metrics. - PubSub and GossipSub were hardened with a default per-peer topic cap, bounded partial-message group state, duplicate IHAVE fixes, better validation ordering, and safer extension subscription handling.
- Kademlia gained a bounded local value store, improved routing-table peer admission, and cancellation of timed-out lookup RPCs so RPC slots are not leaked during bootstrap.
- Peerstore and connection-manager behavior was tightened: dial addresses are normalized, signed peer record updates are validated, connected peer addresses no longer expire while the peer is connected, and peer lifecycle event ordering is more consistent around trimming and drops.
- QUIC, yamux, and teardown paths were made more robust by tracking spawned futures, improving muxer close behavior, cleaning flushed-stream tracking, and updating lsquic for pending read/write cancellation.
- C bindings gained
libp2p_decode_xprfor decoding and verifying signed Extended Peer Records, plus stricter handling of invalid configured private keys. - Test coverage were expanded across priority queues, peerstore address TTLs, dual-stack transports, workflow caching, and parallel test execution.
Breaking changes
- PubSub protobuf/RPC structs now use
Opt[T]for fields that are optional on the wire. Code that directly constructs or readsMessage,SubOpts,PeerInfoMsg,ControlIHave,ControlGraft,ControlPrune,PartialMessageExtensionRPC,PingPongExtensionRPC,Preamble, orIMReceivingmay need to wrap values withOpt.some(...)and unwrap with.isSome,.get(), or.valueOr(...). - PubSub protobuf metrics changed. The old
libp2p_pubsub_rpc_bytes_readandlibp2p_pubsub_rpc_bytes_writecounters were replaced bylibp2p_protobuf_bytes_received,libp2p_protobuf_bytes_sent,libp2p_protobuf_messages_received, andlibp2p_protobuf_messages_sent. topicsHighnow defaults to1024instead of being effectively unlimited. Applications that legitimately expect a peer to subscribe to more than 1024 topics should settopicsHighexplicitly.- Kademlia local value storage is now bounded by configuration, with a default aligned to the provider-store capacity. Applications relying on unbounded local
PUT_VALUEretention should configure the limit explicitly.
PubSub Opt migration example
:::nim
# before
let sub = SubOpts(subscribe: true, topic: topic)
if msg.signature.len > 0:
discard msg.verify()
# after
let sub = SubOpts(subscribe: Opt.some(true), topic: Opt.some(topic))
if msg.signature.isSome:
discard msg.verify()
What's Changed
- chore: move
debugutilsfile to utils by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2636 - feat(protobuf): add universal protobuf metrics by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2637
- chore(kad): add local record store limit by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2633
- test(service-disco): improve flaky test by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2629
- test(conn-manager): misc by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2628
- chore(kad): protobuf_serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2617
- test(gossipsub): priority queues by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2642
- fix: strip peeIDs fom dial addresses by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2630
- chore(ci): autobump nimbus-eth2 stable by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2634
- fix(ci): install latest daily deps into nimbledeps/ by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2639
- chore: enable XCannotRaiseY warning-as-error by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2648
- fix(yamux): clean up flushed stream tracking by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2640
- chore(peerstore): validate spr updates by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2641
- test(gossipsub): priority queues 2 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2646
- chore(examples): utilize protobuf_serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2649
- fix(nix): nat traversal build by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2645
- chore(kad): refine routing table peer admission by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2643
- chore(signed-envelope): utilize protobuf-serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2650
- chore(deps): Bump
protobuf_serializationto v0.5.3 by @nitely in https://github.com/vacp2p/nim-libp2p/pull/2655 - chore(yamux): fix send window integer bounds by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2651
- fix(pubsub): peerEventHandler to unsubscribe peer only on left event by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2657
- chore(gossipsub): cap partial-message group state by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2652
- chore: remove outdated performance/reliability tests by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2658
- test(peerstore): Address TTL 1 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2662
- fix: track and cancel asyncSpawn-ed futures on teardown by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2605
- chore(crypto): protobuf_serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2666
- chore(ExtendedPeerRecord): protobuf_serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2665
- test(gossipsub): priority queues 3 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2656
- feat(cbind): expose metrics via libp2p_collect_metrics by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2625
- chore: removing usage of minprotobuf by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2672
- chore(pubsub)!: protobuf_serialization by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2638
- fix(pubsub): cap number of topics a peer can subscribe to by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2667
- fix(quic): guard against concurrent session close by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2675
- test(peerstore): address TTL 3 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2664
- fix(quic):
cancelStreamHandlersnil pointer dereference by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2678 - test(peerstore): address TTL 2 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2663
- chore(protobuf): main type encode/decode metrics by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2677
- fix(gossipsub): keep extension subscriptions within topic cap by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2676
- fix(quic): QuicMuxer.close improvements by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2686
- chore(protobuf): cosmetics by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2682
- chore: bump lsquic by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2685
- chore: bump lsquic to handle cancel of pending reads/writes by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2692
- test: linux i386 asan by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2695
- chore: fix job names in daily jobs by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2694
- chore(protobuf): add metric for count of messages received/set by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2690
- test(transports): dual stack 1 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2698
- feat(cbind): decode and verify XPR by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2683
- fix(connmanager): emit Joined before trimming new peers by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2670
- chore(pubsub): adjust incoming message validation order by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2647
- fix(tests): remove chronicles import hacks by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2687
- test(transports): dual stack 2 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2704
- fix(cbind): error on invalid private key instead of generating a random one by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2717
- fix(autotls): decouple ACME RSA keys from libp2p identity schemes by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2719
- test(ipaddr): dual stack 3 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2712
- test(transports): multiple addresses by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2714
- test(transports): improve hanging test by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2725
- fix(gossipsub): sending duplicate IHAVE by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2724
- fix(pubsub): avoid sink params for small RPC fields by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2729
- fix(kad): cancel timed-out lookup RPCs so they don't leak rpc slots by @radiken in https://github.com/vacp2p/nim-libp2p/pull/2696
- fix(autotls): release certificate keys after CSR generation by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2699
- fix: Cleanup peers from readyEvents list when upgrade timed out by @etan-status in https://github.com/vacp2p/nim-libp2p/pull/2726
- fix(peerstore): keep connected peer addresses from expiring by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2734
- test(autonat): dual stack 4 by @rlve in https://github.com/vacp2p/nim-libp2p/pull/2733
- fix(connmanager): avoid late Joined after peer drop by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2737
- fix(test): use captured variable for closure by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2740
- test: utilize new switch builder with multiple addresses by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/2742
- test(pubsub): cover stale peer cleanup after dropped connection by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2745
- fix: avoid deadlock when dropping peers from stream handler by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/2751
- fix(gossipsub): concurrent peers table access during topic unsubscribe by @gmelodie in https://github.com/vacp2p/nim-libp2p/pull/2815
New Contributors
- @radiken made their first contribution in https://github.com/vacp2p/nim-libp2p/pull/2696
Full Changelog: https://github.com/vacp2p/nim-libp2p/compare/v2.1.0...v2.2.0