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
