-
- Downloads
fix: Provide according to Reprovider.Strategy (#10886)
* 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>
Showing
- client/rpc/api_test.go 4 additions, 0 deletionsclient/rpc/api_test.go
- config/reprovider.go 33 additions, 1 deletionconfig/reprovider.go
- core/core.go 2 additions, 0 deletionscore/core.go
- core/coreapi/coreapi.go 7 additions, 4 deletionscore/coreapi/coreapi.go
- core/coreapi/pin.go 0 additions, 4 deletionscore/coreapi/pin.go
- core/coreapi/test/api_test.go 3 additions, 0 deletionscore/coreapi/test/api_test.go
- core/coreapi/unixfs.go 61 additions, 8 deletionscore/coreapi/unixfs.go
- core/coreiface/tests/routing.go 7 additions, 0 deletionscore/coreiface/tests/routing.go
- core/coreunix/add.go 4 additions, 4 deletionscore/coreunix/add.go
- core/node/bitswap.go 0 additions, 28 deletionscore/node/bitswap.go
- core/node/core.go 104 additions, 64 deletionscore/node/core.go
- core/node/groups.go 10 additions, 5 deletionscore/node/groups.go
- core/node/provider.go 152 additions, 70 deletionscore/node/provider.go
- core/node/storage.go 25 additions, 4 deletionscore/node/storage.go
- docs/changelogs/v0.37.md 16 additions, 1 deletiondocs/changelogs/v0.37.md
- docs/examples/kubo-as-a-library/go.mod 1 addition, 1 deletiondocs/examples/kubo-as-a-library/go.mod
- docs/examples/kubo-as-a-library/go.sum 2 additions, 2 deletionsdocs/examples/kubo-as-a-library/go.sum
- fuse/ipns/ipns_unix.go 4 additions, 1 deletionfuse/ipns/ipns_unix.go
- go.mod 1 addition, 1 deletiongo.mod
- go.sum 2 additions, 2 deletionsgo.sum
Loading
Please sign in to comment