chore: bump go-libp2p-kad-dht to v0.42#1189
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #1189 +/- ##
==========================================
- Coverage 63.88% 63.87% -0.01%
==========================================
Files 269 269
Lines 27119 27115 -4
==========================================
- Hits 17325 17320 -5
- Misses 8082 8085 +3
+ Partials 1712 1710 -2
... and 10 files with indirect coverage changes 🚀 New features to boost your workflow:
|
The offline router no longer imposes a receive-age cap on stored records. By default it serves a record until it stops being valid (for IPNS, its EOL), as it did before moving to the go-libp2p-kad-dht value store. WithMaxRecordAge adds an opt-in store-age cap for callers that want to bound a datastore nothing else prunes.
Bumps boxo, bringing the offline router retention change (records are served until their EOL, no receive-age cap by default; ipfs/boxo#1189) and a gateway 304 cache-freshness fix (ipfs/boxo#1188). The v0.43 "Unified IPNS record storage" highlight now spells out how retention works: with the offline router and the DHT sharing the /dht datastore prefix, online nodes drop value records 48h after storage (the DHT's value-store GC) while offline nodes keep them until EOL.
There was a problem hiding this comment.
Pushed small change that restores old behavior of routing/offline but allow for opt-in cap in offline one.
And +1 to the failing sharness job is expected: it builds kubo master against this branch, and master won't compile against kad-dht v0.42 until the companion ipfs/kubo#11398 lands. It shouldn't block this PR as long as the kubo PR is green.
| // A stored record is served for as long as it stays valid (for IPNS, until its | ||
| // EOL); see WithMaxRecordAge to also cap retention by store age. | ||
| func NewOfflineRouter(dstore ds.Datastore, validator record.Validator, opts ...Option) routing.Routing { | ||
| r := &offlineRouting{ | ||
| validator: validator, | ||
| } | ||
| for _, opt := range opts { | ||
| opt(r) | ||
| } | ||
| r.vs = records.NewValueStore(dstore, validator, r.maxRecordAge) |
There was a problem hiding this comment.
@guillaumemichel I made change here in routing/offline to remove cap by default, it is intentional: it restores the offline router's long-standing behavior of serving a record until its EOL (still validated on read). Without it, an offline node, which has no republisher to refresh records, would silently drop still-valid records at amino.DefaultMaxRecordAge. Online nodes still get that cap: the kad-dht value store shares this datastore and its GC evicts records past that age. WithMaxRecordAge is there for callers that do want a store-age cap.
iiuc this is necessary to not break ipfs daemon --offline nodes which dont use DHT and serve imported ipns records that are valid for many years.
Pick up boxo main HEAD (4794174d), which includes the merged offline router value-store change (ipfs/boxo#1189). This brings the root module, the kubo-as-a-library example, and test/dependencies onto one boxo pin; they previously pointed at three different commits. - go-libp2p moves to ec408fcc as a transitive floor required by boxo - changelog: note the one-time full-datastore key scan on first start after upgrading, and update the pinned boxo and go-libp2p hashes
* chore: bump go-libp2p-kad-dht to v0.42.0 * bump kad-dht * fix(init): stop publishing an empty-directory IPNS record * bump kad-dht to v0.42.1 * bump boxo * chore: bump boxo, clarify IPNS storage changelog Bumps boxo, bringing the offline router retention change (records are served until their EOL, no receive-age cap by default; ipfs/boxo#1189) and a gateway 304 cache-freshness fix (ipfs/boxo#1188). The v0.43 "Unified IPNS record storage" highlight now spells out how retention works: with the offline router and the DHT sharing the /dht datastore prefix, online nodes drop value records 48h after storage (the DHT's value-store GC) while offline nodes keep them until EOL. * fix: sync DHT purge once after deletion * bump boxo * depend on boxo@master * chore: bump boxo to main, align module pins Pick up boxo main HEAD (4794174d), which includes the merged offline router value-store change (ipfs/boxo#1189). This brings the root module, the kubo-as-a-library example, and test/dependencies onto one boxo pin; they previously pointed at three different commits. - go-libp2p moves to ec408fcc as a transitive floor required by boxo - changelog: note the one-time full-datastore key scan on first start after upgrading, and update the pinned boxo and go-libp2p hashes * chore: require make mod_tidy before commit/push Spell out that the repo has three go.mod files that must stay on the same dependency versions, and that a bare `go mod tidy` only tidies one module and lets pins drift between them. --------- Co-authored-by: Marcin Rataj <lidel@lidel.org>
Companion of ipfs/kubo#11398
Summary
WithMaxRecordAgeretention cap.Compatibility
The offline router now reads and writes the go-libp2p-kad-dht v0.42+ value-store layout. Records stored using the previous offline-router layout are not migrated or read.