Open
Conversation
Add a background checker that automatically pins content when DHT provider counts fall below a configurable replication target and unpins once enough providers exist again after a grace period.
Gated behind Experimental.OnDemandPinningEnabled.
New CLI commands: ipfs pin ondemand {add,rm,ls}
Safety measures:
- storage budget check (respects StorageMax/GCWatermark)
- idle timeout on recursive DAG fetches (2 min without progress)
- pin partitioning via pin name to distinguish on-demand pins from persitent pins.
Author
|
Please focus the review on: 1. Core logic —
|
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.
Summary
Automatically pin content when DHT provider counts fall below a configurable replication target, and unpin once
replication has been above target for a grace period.
Helps keeping critical data around, without wasting storage on overly replicated CIDs.
The feature is described in this draft: ipfs/specs#532
The feature is gated behind
Experimental.OnDemandPinningEnabled.CLI commands for
ipfs pin ondemand:add-- register CIDs for on-demand pinningrm-- deregister and unpinls-- list registered CIDsDesign
pins to avoid accidental deletion. This implementation uses boxo's pin name
field (
"on-demand") for that.StorageMax * StorageGCWatermark.without receiving new blocks (allows large downloads while skipping dead records).
susceptible to Sybil manipulation. Documented as a known limitation.
Configuration Parameters (TBD)
OnDemandPinning.ReplicationTarget5OnDemandPinning.CheckInterval"10m"OnDemandPinning.UnpinGracePeriod"24h"Tests
Unit tests for the checker and store in
ondemandpin/.Visualization of Feature
(out of scope for this CLI PR, but helpful to get the idea)
