* Provide according to strategy
Updates boxo to a version with the changes from https://github.com/ipfs/boxo/pull/976, which decentralize the providing responsibilities (from a central providing.Exchange to blockstore, pinner, mfs).
The changes consist in initializing the Pinner, MFS and the blockstore with the provider.System, which is created first.
Since the provider.System is created first, the reproviding KeyChanFunc is set
later when we can create it once we have the Pinner, MFS and the blockstore.
Some additional work applies to the Add() workflow. Normally, blocks would get provided at the Blockstore or the Pinner, but when adding blocks AND a "pinned" strategy is used, the blockstore does not provide, and the
pinner does not traverse the DAG (and thus doesn't provide either), so we need to provide directly from the Adder. This is resolved by wrapping the DAGService in a "providingDAGService" which provides every added block, when using the "pinned" strategy.
`ipfs --offline add` when the ONLINE daemon is running will now announce blocks per the chosen strategy, where before it did not announce them. This is documented in the changelog. A couple of releases ago, adding with `ipfs --offline add` was faster, but this is no longer the case so we are not incurring in any penalties by sticking to the fact that the daemon is online and has a providing strategy that we follow.
Co-authored-by: gammazero <11790789+gammazero@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
* feat(add): add support for naming pinned CID
Signed-off-by: kapil <kapilsareen584@gmail.com>
* fix(add): no double pinning and simplify pin-name
- modify PinRoot to accept name parameter, eliminating double pinning
- remove automatic filename fallback logic for cleaner behavior
- only create named pins when explicitly requested via --pin-name=value
- replace NoPinName constant with idiomatic empty string literals
- Update help text and tests to reflect explicit-only behavior
* docs: changelog
* chore: lint
* test: negative case for empty pin-name
* chore: gofmt
---------
Signed-off-by: kapil <kapilsareen584@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
The rational is that if the pin list get big, a synchronous call to get the complete list can delay handling unnecessarily. For example, when listing indirect pins, you can start walking the DAGs immediately with the first recursive pin instead of waiting for the full list.
This matters even more on low power device, of if the pin list is stored remotely.
* coreiface: allow to return an error not linked to a specific Cid
* merkledag/test: add a DAG generator
Rationale is that generating a test DAG is quite difficult, and anything that helps writing better tests is helpful.
This commit was moved from ipfs/boxo@e2fc7f2fd0
* feat(block options): add store codec
* refactor: BlockPutSettings.CidPrefix
Removes duplicated fields and replaces them with cid.Prefix
Codec, MhType and MhLength were already in prefix, and we already return
prefix. A lot of duplicated values and code responsible for syncing them
did not really need to exist.
* test: CIDv1 raw and dag-pb cases
* chore: release 0.7.0
Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit was moved from ipfs/interface-go-ipfs-core@a3374d9902
This commit was moved from ipfs/boxo@aca3a1839f
* update go-path and error message
* add node api for prime interactions
* use go-unixfsnode
* update against fetcher
Co-authored-by: acruikshank <acruikshank@example.com>
This commit was moved from ipfs/interface-go-ipfs-core@49cdff8024
This commit was moved from ipfs/boxo@8f0db8f184
We just changed ID/"id" to IDENTITY/"identity" to match the multicodec table and
avoid confusion with peer IDs, CIDs, etc.
Unfortunately, this breaks the `--hash=id` flag. Luckily, I'm pretty sure
nobody's actually using this. As putting a block with an identity hash is
useless. If they are users, we can go about adding in backwards compatibility
hacks later.
This commit was moved from ipfs/interface-go-ipfs-core@6ebdbe7ef3
This commit was moved from ipfs/boxo@3b9a723861