fix: kubo config defaults suited to desktop - #3194
Merged
Merged
Conversation
Kubo defaults to a 12h graceful shutdown cap, sized for servers. ipfsd-ctl SIGKILLs the daemon 60s after stop(), so a hung subsystem meant quitting the app always waited the full minute and then died without a diagnostic. Capping below that deadline lets kubo log which subsystem is stuck and exit on its own terms. Applied to new repos in applyDefaults and to existing ones via migrateConfig revision 7, in both cases only when the user has not set their own value.
Kubo defaults Provide.Strategy to "all", so the node announces every block in its datastore, including anything pulled in while browsing. Desktop users end up telling the network they host content they never chose to keep, and pay the reprovide cost for it. Announce only what they asked for: content they explicitly pinned, plus what they imported into MFS through the Files screen. The "+unique" modifier skips re-walking CIDs shared between pins on every cycle. https://github.com/ipfs/kubo/blob/master/docs/config.md#providestrategy New repos only. Applying this to existing users would quietly shrink what they already announce to the network.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two kubo defaults are sized for servers and land badly on a laptop.
Provide.Strategydefaults toall, so the node announces every block in its datastore. That includes anything pulled in just by browsing, so users tell the network they host content they never chose to keep, and pay the reprovide cost for it on every cycle.Internal.ShutdownTimeoutdefaults to 12 hours. ipfsd-ctl SIGKILLs the daemon 60 seconds afterstop(), so a stuck subsystem meant quitting the app always waited the full minute and then died without leaving a clue why.Fix
pinned+mfs+unique). SeeProvide.Strategy.Both are starting values, not locks. New repos get them from
applyDefaults, existing ones frommigrateConfigrevision 7, and in both cases a value the user already set is left alone. A repo old enough to still carry the removedReprovider.Strategyis skipped entirely, so kubo's own repo migration can move that preference across untouched.