Releases: libp2p/go-libp2p-kad-dht
v0.38.0
What's Changed
- fix(provider): close datastore results by @guillaumemichel in #1226
- chore: go-libdht org transfer by @guillaumemichel in #1229
- refactor: apply go fix modernizers from Go 1.26 by @gammazero in #1231
- update dependencies and minimum go version by @gammazero in #1230
- fix(provider/keystore): protect keystore size during reset by @guillaumemichel in #1227
- chore(deps): bump github.com/pion/dtls/v3 from 3.0.6 to 3.1.0 by @dependabot[bot] in #1232
- chore(deps): bump github.com/pion/dtls/v3 from 3.1.0 to 3.1.1 by @dependabot[bot] in #1234
- update go-datastore to v0.9.1 by @gammazero in #1235
Full Changelog: v0.37.1...v0.38.0
v0.37.1
What's Changed
- fix(routing): add per-peer timeouts for PutValue and Provide by @lidel in #1222
- Update dependencies by @gammazero in #1223
- replace multierr with errors.Join by @gammazero in #1224
Full Changelog: v0.37.0...v0.37.1
v0.37.0
Note
This release was brought to you by the Shipyard team.
Overview
This is a minor release focused on dependency updates and bug fixes. The most significant changes are:
- Breaking change: The deprecated
providers/package has been removed. Users still importing fromproviders/must migrate torecords/. - Dependency update: Upgraded to go-libp2p v0.46.
- Provider bug fixes: Several fixes to improve provider system stability, including proper handling of peers during keyspace exploration.
This release contains no major feature additions but improves overall reliability of the DHT implementation.
What's Changed
- chore: bump go-libp2p to v0.46 by @guillaumemichel in #1209
- tests: fix flaky TestHandleRemotePeerProtocolChanges by @guillaumemichel in #1212
- tests: fix flaky TestOptimisticProvide by @guillaumemichel in #1213
- fix(records): clone addresses received from peerstore by @guillaumemichel in #1210
- fix(provider): don't discard peers if they all share CPL during exploration by @guillaumemichel in #1216
- chore: remove deprecated providers pkg by @guillaumemichel in #1211
- fix(provider): close worker pool before wg.Wait() by @lidel in #1218
- fix(provider): hold scheduleLk when reading schedule.Size() in test by @lidel in #1219
- fix(provider): keyspace exploration should succeed with a single peer by @guillaumemichel in #1220
Full Changelog: v0.36.0...v0.37.0
v0.36.0
Note
This release was brought to you by the Shipyard team.
Overview
This release brings major improvements to the Sweep provider system: detailed runtime statistics, persistence of reprovide state across restarts, and better connection handling. These features ship to Kubo users in v0.39.
Highlights
Sweep provider statistics API
The SweepingProvider now exposes detailed runtime statistics through a new Stats() method, enabling monitoring tools to track provider health and throughput.
Available metrics include:
- Queue sizes and worker utilization
- Reprovide schedule and progress
- Network statistics (connected peers, regions)
- Operation rates and success counts
This powers the ipfs provide stat command in Kubo v0.39+. See #1144.
Reprovide cycle persistence and resume
The Sweep provider now persists its state to the datastore and automatically resumes after restarts:
- Persistent progress: The provider saves its position in the reprovide cycle. On restart, it continues from where it stopped instead of starting over.
- Catch-up reproviding: If the node was offline, all CIDs overdue for reprovide are immediately queued.
- Persistent provide queue: Pending provide operations survive restarts.
This fixes the long-standing issue where restarts would reset the reprovide cycle. See #1167, #1170, #1176,
#1193.
Connectivity callbacks
Users can now register callbacks to be notified when the provider's connectivity status changes. This enables applications to track and react to connectivity state transitions. See #1194.
Connection protection during provides
New option to protect libp2p connections and keep addresses in the peerstore during provide operations. This prevents the connection manager from pruning connections that are actively being used for provides. See #1172.
Metric rename: provider_provides_total
The Sweep provider metric has been renamed from total_provide_count_total to provider_provides_total to follow OpenTelemetry naming conventions and match other kad-dht metrics.
Migration: Update any Prometheus queries or dashboards using the old metric name. See #1195.
What's Changed
- chore(deps): bump github.com/quic-go/quic-go from 0.54.0 to 0.54.1 by @dependabot[bot] in #1168
- Update go-dsqueue to version that does not reuse batch by @gammazero in #1169
- provider: stats by @guillaumemichel in #1144
- feat(provider): persist provide queue by @guillaumemichel in #1167
- provider: custom logger name by @guillaumemichel in #1173
- feat(provider): resume reprovides by @guillaumemichel in #1170
- provider: protect connections by @guillaumemichel in #1172
- feat(provider): exit early region exploration if no new peers discovered by @guillaumemichel in #1174
- tests: fix flaky TestStateTransitions by @guillaumemichel in #1177
- tests: fix flaky TestFindPeerWithQueryFilter by @guillaumemichel in #1178
- tests: fix flaky TestProvidesExpire by @guillaumemichel in #1179
- fix(provider): resume cycle by @guillaumemichel in #1176
- provider: trigger connectivity check when missing libp2p addresses by @guillaumemichel in #1180
- refactor(provider/stats): use int64 to avoid overflows by @guillaumemichel in #1182
- refactor(provider): use adaptive deadline for CycleStats cleanup by @guillaumemichel in #1183
- feat(provider): skip bootstrap reprovide by @guillaumemichel in #1186
- fix(provider):
RegionsFromPeersmay return multiple regions by @guillaumemichel in #1185 - refactor(provider): switch to bit256.NewKeyFromArray by @guillaumemichel in #1188
- Remove go-libp2p-maintainers from codeowners by @MarcoPolo in #1192
- refactor(keystore): track size by @guillaumemichel in #1181
- refactor(provider): optimize memory when allocating keys to peers by @guillaumemichel in #1187
- feat(provider): trie iterators by @guillaumemichel in #1189
- feat(provider): connectivity callbacks by @guillaumemichel in #1194
- fix(provider): resume cycle from persisted keystore by @guillaumemichel in #1193
- fix(provider): rename metric to follow OpenTelemetry conventions by @lidel in #1195
- fix(provider): remove from trie by pruning prefix by @guillaumemichel in #1198
- fix(provider): conflict resolution by @guillaumemichel in #1199
- fix(ResettableKeystore): race when closing during reset by @guillaumemichel in #1201
- fix(provider): protect
SweepingProvider.wgby @guillaumemichel in #1200 - chore(deps): bump golang.org/x/crypto from 0.42.0 to 0.45.0 by @dependabot[bot] in #1203
Full Changelog: v0.35.1...v0.36.0
v0.35.1
Note
This release was brought to you by the Shipyard team.
Provider Memory Optimizations
Memory optimizations for the provider.
What's Changed
- fix(provider): memory usage by @guillaumemichel in #1163
- feat(provider): use Trie.AddMany by @guillaumemichel in #1164
Full Changelog: v0.35.0...v0.35.1
v0.35.0
Note
This release was brought to you by the Shipyard team.
🚀 Introducing the New Provider Package
We're excited to introduce the new provider package - a complete rethinking of content providing works in the DHT, using the Reprovide Sweep technique. Say goodbye to manual reprovide management! The provider package now handles both initial provides and periodic reprovides automatically.
🎯 Why This Matters
This package replaces the boxo provider with a significantly more efficient implementation that addresses key performance bottlenecks:
Intelligent Batching 🧠
Instead of providing records randomly, we now batch provides by keyspace distance. This means fewer DHT lookups, faster provides, and consistent reprovide scheduling.
Smooth Resource Usage 📊
Reprovides are evenly distributed over time rather than creating periodic traffic spikes. Your node's resource consumption is now predictable and steady.
⚠️ Early Access
This is the initial release of the provider package. While fully functional, we're continuing to add features and refine the API in upcoming releases. Expect interface changes as we iterate based on community feedback.
🔜 What's Next
Stay tuned for additional provider features in future releases. Check the provider package documentation for usage examples and current capabilities.
What's Changed
- refactor: apply suggestions in records by @guillaumemichel in #1113
- ci: uci/update-go by @web3-bot in #1134
- chore: remove hardcoded go versions from go-test ci by @guillaumemichel in #1138
- Reprovide Sweep by @guillaumemichel in #1095
- fix(keystore): use new batch after commit by @guillaumemichel in #1154
- provider: default options by @guillaumemichel in #1153
- fix(provider): don't empty mapdatastore keystore on close by @guillaumemichel in #1155
- refactor(provider): closestPeerToPrefix coverage trie by @guillaumemichel in #1156
- refactor: remove provider status command by @guillaumemichel in #1157
- refactor: adjust FIND_NODE response exceptions by @guillaumemichel in #1158
- bump deps by @guillaumemichel in #1161
Full Changelog: v0.34.0...v0.35.0
v0.34.0
What's Changed
- chore(deps): bump github.com/pion/interceptor from 0.1.37 to 0.1.39 by @dependabot[bot] in #1089
- chore: bump boxo by @guillaumemichel in #1091
- refactor(providers): migrate providers/ to records/ by @guillaumemichel in #1094
- fix: move non-error log to warning level by @lidel in #1119
- feat(crawler): configurable protocol messenger by @guillaumemichel in #1128
- chore: update dependencies by @guillaumemichel in #1129
- chore: release v0.34.0 by @guillaumemichel in #1130
Full Changelog: v0.33.1...v0.34.0
v0.33.1
Highlights
- Fix concurrency in
fullrt
What's Changed
- fix: fullrt kMapLk unlock by @guillaumemichel in #1085
- fix(fullrt): use correct mutex for reading keyToPeerMap by @guillaumemichel in #1086
- fix(fullrt): mutex cleanup by @guillaumemichel in #1087
Full Changelog: v0.33.0...v0.33.1
This release was brought to you by the Shipyard team.
v0.33.0
What's Changed
- fix/updates to use context passed in New function for context cancellation by @blockchainluffy in #1081
New Contributors
- @blockchainluffy made their first contribution in #1081
Full Changelog: v0.32.0...v0.33.0
v0.32.0
What's Changed
- chore: bump go-log to v2 by @guillaumemichel in #1074
- chore(deps): bump golang.org/x/net from 0.37.0 to 0.38.0 by @dependabot in #1075
- fix: use correct message type attribute in metrics by @diogo464 in #1076
- fix: netsize warning by @guillaumemichel in #1077
- chore: update deps by @guillaumemichel in #1078
New Contributors
Full Changelog: v0.31.0...v0.32.0
This release was brought to you by the Shipyard team.
