mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
feat: warn users who are falling behind reprovides
Fixes: #9704 Fixes: #9702 Fixes: #9703 Fixes: #9419
This commit is contained in:
parent
5de86ab047
commit
e7294cbdff
@ -425,6 +425,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
|
||||
case routingOptionNoneKwd:
|
||||
ncfg.Routing = libp2p.NilRouterOption
|
||||
case routingOptionCustomKwd:
|
||||
if cfg.Routing.AcceleratedDHTClient {
|
||||
return fmt.Errorf("Routing.AcceleratedDHTClient option is set even tho Routing.Type is custom, using custom .AcceleratedDHTClient needs to be set on DHT routers individually")
|
||||
}
|
||||
ncfg.Routing = libp2p.ConstructDelegatedRouting(
|
||||
cfg.Routing.Routers,
|
||||
cfg.Routing.Methods,
|
||||
|
||||
@ -8,7 +8,7 @@ type Experiments struct {
|
||||
Libp2pStreamMounting bool
|
||||
P2pHttpProxy bool //nolint
|
||||
StrategicProviding bool
|
||||
AcceleratedDHTClient bool
|
||||
AcceleratedDHTClient experimentalAcceleratedDHTClient `json:",omitempty"`
|
||||
OptimisticProvide bool
|
||||
OptimisticProvideJobsPoolSize int
|
||||
}
|
||||
|
||||
@ -15,6 +15,8 @@ type Routing struct {
|
||||
// When "custom" is set, user-provided Routing.Routers is used.
|
||||
Type *OptionalString `json:",omitempty"`
|
||||
|
||||
AcceleratedDHTClient bool
|
||||
|
||||
Routers Routers
|
||||
|
||||
Methods Methods
|
||||
|
||||
@ -438,3 +438,27 @@ func (swarmLimits) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type experimentalAcceleratedDHTClient struct{}
|
||||
|
||||
var _ json.Unmarshaler = experimentalAcceleratedDHTClient{}
|
||||
|
||||
func (experimentalAcceleratedDHTClient) UnmarshalJSON(b []byte) error {
|
||||
d := json.NewDecoder(bytes.NewReader(b))
|
||||
for {
|
||||
switch tok, err := d.Token(); err {
|
||||
case io.EOF:
|
||||
return nil
|
||||
case nil:
|
||||
switch tok {
|
||||
case json.Delim('{'), json.Delim('}'):
|
||||
// accept empty objects
|
||||
continue
|
||||
}
|
||||
//nolint
|
||||
return fmt.Errorf("The Experimental.AcceleratedDHTClient key has been moved to Routing.AcceleratedDHTClient in Kubo 0.21, please use this new key and remove the old one.")
|
||||
default:
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"time"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
"github.com/ipfs/boxo/provider"
|
||||
cmds "github.com/ipfs/go-ipfs-cmds"
|
||||
"github.com/ipfs/kubo/core/commands/cmdenv"
|
||||
|
||||
"github.com/ipfs/boxo/provider/batched"
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
var statProvideCmd = &cmds.Command{
|
||||
@ -34,12 +34,7 @@ This interface is not stable and may change from release to release.
|
||||
return ErrNotOnline
|
||||
}
|
||||
|
||||
sys, ok := nd.Provider.(*batched.BatchProvidingSystem)
|
||||
if !ok {
|
||||
return fmt.Errorf("can only return stats if Experimental.AcceleratedDHTClient is enabled")
|
||||
}
|
||||
|
||||
stats, err := sys.Stat(req.Context)
|
||||
stats, err := nd.Provider.Stat()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -51,7 +46,7 @@ This interface is not stable and may change from release to release.
|
||||
return nil
|
||||
},
|
||||
Encoders: cmds.EncoderMap{
|
||||
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s *batched.BatchedProviderStats) error {
|
||||
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s *provider.ReproviderStats) error {
|
||||
wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0)
|
||||
defer wtr.Flush()
|
||||
|
||||
@ -62,14 +57,14 @@ This interface is not stable and may change from release to release.
|
||||
return nil
|
||||
}),
|
||||
},
|
||||
Type: batched.BatchedProviderStats{},
|
||||
Type: provider.ReproviderStats{},
|
||||
}
|
||||
|
||||
func humanDuration(val time.Duration) string {
|
||||
return val.Truncate(time.Microsecond).String()
|
||||
}
|
||||
|
||||
func humanNumber(n int) string {
|
||||
func humanNumber[T constraints.Float | constraints.Integer](n T) string {
|
||||
nf := float64(n)
|
||||
str := humanSI(nf, 0)
|
||||
fullStr := humanFull(nf, 0)
|
||||
|
||||
@ -238,7 +238,7 @@ func (api *CoreAPI) WithOptions(opts ...options.ApiOption) (coreiface.CoreAPI, e
|
||||
return nil, fmt.Errorf("error constructing namesys: %w", err)
|
||||
}
|
||||
|
||||
subAPI.provider = provider.NewOfflineProvider()
|
||||
subAPI.provider = provider.NewNoopProvider()
|
||||
|
||||
subAPI.peerstore = nil
|
||||
subAPI.peerHost = nil
|
||||
|
||||
@ -304,9 +304,9 @@ func Online(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.Part
|
||||
LibP2P(bcfg, cfg, userResourceOverrides),
|
||||
OnlineProviders(
|
||||
cfg.Experimental.StrategicProviding,
|
||||
cfg.Experimental.AcceleratedDHTClient,
|
||||
cfg.Reprovider.Strategy.WithDefault(config.DefaultReproviderStrategy),
|
||||
cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval),
|
||||
cfg.Routing.AcceleratedDHTClient,
|
||||
),
|
||||
)
|
||||
}
|
||||
@ -320,12 +320,7 @@ func Offline(cfg *config.Config) fx.Option {
|
||||
fx.Provide(libp2p.Routing),
|
||||
fx.Provide(libp2p.ContentRouting),
|
||||
fx.Provide(libp2p.OfflineRouting),
|
||||
OfflineProviders(
|
||||
cfg.Experimental.StrategicProviding,
|
||||
cfg.Experimental.AcceleratedDHTClient,
|
||||
cfg.Reprovider.Strategy.WithDefault(config.DefaultReproviderStrategy),
|
||||
cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval),
|
||||
),
|
||||
OfflineProviders(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ func BaseRouting(cfg *config.Config) interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
if dualDHT != nil && cfg.Experimental.AcceleratedDHTClient {
|
||||
if dualDHT != nil && cfg.Routing.AcceleratedDHTClient {
|
||||
cfg, err := in.Repo.Config()
|
||||
if err != nil {
|
||||
return out, err
|
||||
|
||||
@ -5,145 +5,158 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/boxo/blockstore"
|
||||
"github.com/ipfs/boxo/fetcher"
|
||||
pin "github.com/ipfs/boxo/pinning/pinner"
|
||||
provider "github.com/ipfs/boxo/provider"
|
||||
"github.com/ipfs/boxo/provider/batched"
|
||||
q "github.com/ipfs/boxo/provider/queue"
|
||||
"github.com/ipfs/boxo/provider/simple"
|
||||
"go.uber.org/fx"
|
||||
|
||||
"github.com/ipfs/kubo/core/node/helpers"
|
||||
"github.com/ipfs/kubo/repo"
|
||||
irouting "github.com/ipfs/kubo/routing"
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
// SIMPLE
|
||||
|
||||
// ProviderQueue creates new datastore backed provider queue
|
||||
func ProviderQueue(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo repo.Repo) (*q.Queue, error) {
|
||||
return q.NewQueue(helpers.LifecycleCtx(mctx, lc), "provider-v1", repo.Datastore())
|
||||
}
|
||||
|
||||
// SimpleProvider creates new record provider
|
||||
func SimpleProvider(mctx helpers.MetricsCtx, lc fx.Lifecycle, queue *q.Queue, rt irouting.ProvideManyRouter) provider.Provider {
|
||||
return simple.NewProvider(helpers.LifecycleCtx(mctx, lc), queue, rt)
|
||||
}
|
||||
|
||||
// SimpleReprovider creates new reprovider
|
||||
func SimpleReprovider(reproviderInterval time.Duration) interface{} {
|
||||
return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, rt irouting.ProvideManyRouter, keyProvider simple.KeyChanFunc) (provider.Reprovider, error) {
|
||||
return simple.NewReprovider(helpers.LifecycleCtx(mctx, lc), reproviderInterval, rt, keyProvider), nil
|
||||
}
|
||||
}
|
||||
|
||||
// SimpleProviderSys creates new provider system
|
||||
func SimpleProviderSys(isOnline bool) interface{} {
|
||||
return func(lc fx.Lifecycle, p provider.Provider, r provider.Reprovider) provider.System {
|
||||
sys := provider.NewSystem(p, r)
|
||||
|
||||
if isOnline {
|
||||
lc.Append(fx.Hook{
|
||||
OnStart: func(ctx context.Context) error {
|
||||
sys.Run()
|
||||
return nil
|
||||
},
|
||||
OnStop: func(ctx context.Context) error {
|
||||
return sys.Close()
|
||||
},
|
||||
})
|
||||
func ProviderSys(reprovideInterval time.Duration, acceleratedDHTClient bool) fx.Option {
|
||||
const magicThroughputReportCount = 128
|
||||
return fx.Provide(func(lc fx.Lifecycle, cr irouting.ProvideManyRouter, keyProvider provider.KeyChanFunc, repo repo.Repo, bs blockstore.Blockstore) (provider.System, error) {
|
||||
opts := []provider.Option{
|
||||
provider.Online(cr),
|
||||
provider.ReproviderInterval(reprovideInterval),
|
||||
provider.KeyProvider(keyProvider),
|
||||
}
|
||||
if !acceleratedDHTClient {
|
||||
// The estimation kinda suck if you are running with accelerated DHT client,
|
||||
// given this message is just trying to push people to use the acceleratedDHTClient
|
||||
// let's not report on through if it's in use
|
||||
opts = append(opts,
|
||||
provider.ThroughputReport(func(reprovide bool, complete bool, keysProvided uint, duration time.Duration) bool {
|
||||
avgProvideSpeed := duration / time.Duration(keysProvided)
|
||||
count := uint64(keysProvided)
|
||||
|
||||
return sys
|
||||
}
|
||||
}
|
||||
if !reprovide || !complete {
|
||||
// We don't know how many CIDs we have to provide, try to fetch it from the blockstore.
|
||||
// But don't try for too long as this might be very expensive if you have a huge datastore.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*5)
|
||||
defer cancel()
|
||||
|
||||
// BatchedProviderSys creates new provider system
|
||||
func BatchedProviderSys(isOnline bool, reprovideInterval time.Duration) interface{} {
|
||||
return func(lc fx.Lifecycle, cr irouting.ProvideManyRouter, q *q.Queue, keyProvider simple.KeyChanFunc, repo repo.Repo) (provider.System, error) {
|
||||
sys, err := batched.New(cr, q,
|
||||
batched.ReproviderInterval(reprovideInterval),
|
||||
batched.Datastore(repo.Datastore()),
|
||||
batched.KeyProvider(keyProvider))
|
||||
// FIXME: I want a running counter of blocks so size of blockstore can be an O(1) lookup.
|
||||
ch, err := bs.AllKeysChan(ctx)
|
||||
if err != nil {
|
||||
logger.Errorf("fetching AllKeysChain in provider ThroughputReport: %v", err)
|
||||
return false
|
||||
}
|
||||
count = 0
|
||||
countLoop:
|
||||
for {
|
||||
select {
|
||||
case _, ok := <-ch:
|
||||
if !ok {
|
||||
break countLoop
|
||||
}
|
||||
count++
|
||||
case <-ctx.Done():
|
||||
// really big blockstore mode
|
||||
|
||||
// how many blocks would be in a 10TiB blockstore with 128KiB blocks.
|
||||
const probableBigBlockstore = (10 * 1024 * 1024 * 1024 * 1024) / (128 * 1024)
|
||||
// How long per block that lasts us.
|
||||
expectedProvideSpeed := reprovideInterval / probableBigBlockstore
|
||||
if avgProvideSpeed > expectedProvideSpeed {
|
||||
logger.Errorf(`
|
||||
🔔🔔🔔 YOU MAY BE FALLING BEHIND DHT REPROVIDES! 🔔🔔🔔
|
||||
|
||||
⚠️ Your system might be struggling to keep up with DHT reprovides!
|
||||
This means your content could partially or completely inaccessible on the network.
|
||||
We observed that you recently provided %d keys at an average rate of %v per key.
|
||||
|
||||
🕑 An attempt to estimate your blockstore size timed out after 5 minutes,
|
||||
implying your blockstore might be exceedingly large. Assuming a considerable
|
||||
size of 10TiB, it would take %v to provide the complete set.
|
||||
|
||||
⏰ The total provide time needs to stay under your reprovide interval (%v) to prevent falling behind!
|
||||
|
||||
💡 Consider enabling the Accelerated DHT to enhance your system performance. See:
|
||||
https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient`,
|
||||
keysProvided, avgProvideSpeed, avgProvideSpeed*probableBigBlockstore, reprovideInterval)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// How long per block that lasts us.
|
||||
expectedProvideSpeed := reprovideInterval / time.Duration(count)
|
||||
if avgProvideSpeed > expectedProvideSpeed {
|
||||
// FIXME(@Jorropo): add link to the accelerated DHT client docs once this isn't experimental anymore.
|
||||
logger.Errorf(`
|
||||
🔔🔔🔔 YOU ARE FALLING BEHIND DHT REPROVIDES! 🔔🔔🔔
|
||||
|
||||
⚠️ Your system is struggling to keep up with DHT reprovides!
|
||||
This means your content could partially or completely inaccessible on the network.
|
||||
We observed that you recently provided %d keys at an average rate of %v per key.
|
||||
|
||||
💾 Your total CID count is ~%d which would total at %v reprovide process.
|
||||
|
||||
⏰ The total provide time needs to stay under your reprovide interval (%v) to prevent falling behind!
|
||||
|
||||
💡 Consider enabling the Accelerated DHT to enhance your reprovide throughput. See:
|
||||
https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient`,
|
||||
keysProvided, avgProvideSpeed, count, avgProvideSpeed*time.Duration(count), reprovideInterval)
|
||||
}
|
||||
return false
|
||||
}, magicThroughputReportCount))
|
||||
}
|
||||
sys, err := provider.New(repo.Datastore(), opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if isOnline {
|
||||
lc.Append(fx.Hook{
|
||||
OnStart: func(ctx context.Context) error {
|
||||
sys.Run()
|
||||
return nil
|
||||
},
|
||||
OnStop: func(ctx context.Context) error {
|
||||
return sys.Close()
|
||||
},
|
||||
})
|
||||
}
|
||||
lc.Append(fx.Hook{
|
||||
OnStop: func(ctx context.Context) error {
|
||||
return sys.Close()
|
||||
},
|
||||
})
|
||||
|
||||
return sys, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ONLINE/OFFLINE
|
||||
|
||||
// OnlineProviders groups units managing provider routing records online
|
||||
func OnlineProviders(useStrategicProviding bool, useBatchedProviding bool, reprovideStrategy string, reprovideInterval time.Duration) fx.Option {
|
||||
func OnlineProviders(useStrategicProviding bool, reprovideStrategy string, reprovideInterval time.Duration, acceleratedDHTClient bool) fx.Option {
|
||||
if useStrategicProviding {
|
||||
return fx.Provide(provider.NewOfflineProvider)
|
||||
return OfflineProviders()
|
||||
}
|
||||
|
||||
return fx.Options(
|
||||
SimpleProviders(reprovideStrategy, reprovideInterval),
|
||||
maybeProvide(SimpleProviderSys(true), !useBatchedProviding),
|
||||
maybeProvide(BatchedProviderSys(true, reprovideInterval), useBatchedProviding),
|
||||
)
|
||||
}
|
||||
|
||||
// OfflineProviders groups units managing provider routing records offline
|
||||
func OfflineProviders(useStrategicProviding bool, useBatchedProviding bool, reprovideStrategy string, reprovideInterval time.Duration) fx.Option {
|
||||
if useStrategicProviding {
|
||||
return fx.Provide(provider.NewOfflineProvider)
|
||||
}
|
||||
|
||||
return fx.Options(
|
||||
SimpleProviders(reprovideStrategy, reprovideInterval),
|
||||
maybeProvide(SimpleProviderSys(false), true),
|
||||
//maybeProvide(BatchedProviderSys(false, reprovideInterval), useBatchedProviding),
|
||||
)
|
||||
}
|
||||
|
||||
// SimpleProviders creates the simple provider/reprovider dependencies
|
||||
func SimpleProviders(reprovideStrategy string, reproviderInterval time.Duration) fx.Option {
|
||||
var keyProvider fx.Option
|
||||
switch reprovideStrategy {
|
||||
case "all":
|
||||
fallthrough
|
||||
case "":
|
||||
keyProvider = fx.Provide(simple.NewBlockstoreProvider)
|
||||
case "all", "":
|
||||
keyProvider = fx.Provide(provider.NewBlockstoreProvider)
|
||||
case "roots":
|
||||
keyProvider = fx.Provide(pinnedProviderStrategy(true))
|
||||
case "pinned":
|
||||
keyProvider = fx.Provide(pinnedProviderStrategy(false))
|
||||
default:
|
||||
return fx.Error(fmt.Errorf("unknown reprovider strategy '%s'", reprovideStrategy))
|
||||
return fx.Error(fmt.Errorf("unknown reprovider strategy %q", reprovideStrategy))
|
||||
}
|
||||
|
||||
return fx.Options(
|
||||
fx.Provide(ProviderQueue),
|
||||
fx.Provide(SimpleProvider),
|
||||
keyProvider,
|
||||
fx.Provide(SimpleReprovider(reproviderInterval)),
|
||||
ProviderSys(reprovideInterval, acceleratedDHTClient),
|
||||
)
|
||||
}
|
||||
|
||||
// OfflineProviders groups units managing provider routing records offline
|
||||
func OfflineProviders() fx.Option {
|
||||
return fx.Provide(provider.NewNoopProvider)
|
||||
}
|
||||
|
||||
func pinnedProviderStrategy(onlyRoots bool) interface{} {
|
||||
type input struct {
|
||||
fx.In
|
||||
Pinner pin.Pinner
|
||||
IPLDFetcher fetcher.Factory `name:"ipldFetcher"`
|
||||
}
|
||||
return func(in input) simple.KeyChanFunc {
|
||||
return simple.NewPinnedProvider(onlyRoots, in.Pinner, in.IPLDFetcher)
|
||||
return func(in input) provider.KeyChanFunc {
|
||||
return provider.NewPinnedProvider(onlyRoots, in.Pinner, in.IPLDFetcher)
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
- [Gateway: DAG-CBOR/-JSON previews and improved error pages](#gateway-dag-cbor-json-previews-and-improved-error-pages)
|
||||
- [Gateway: subdomain redirects are now `text/html`](#gateway-subdomain-redirects-are-now-texthtml)
|
||||
- [`ipfs dag stat` deduping statistics](#ipfs-dag-stat-deduping-statistics)
|
||||
- [Accelerated DHT Client is no longer experimental](#--empty-repo-is-now-the-default)
|
||||
- [📝 Changelog](#-changelog)
|
||||
- [👨👩👧👦 Contributors](#-contributors)
|
||||
|
||||
@ -76,7 +77,7 @@ for Kubo `v0.21`.
|
||||
|
||||
In this release, we improved the HTML templates of our HTTP gateway:
|
||||
|
||||
1. You can now preview the contents of a DAG-CBOR and DAG-JSON document from your browser, as well as follow any IPLD Links ([CBOR Tag 42](https://github.com/ipld/cid-cbor/)) contained within them.
|
||||
1. You can now preview the contents of a DAG-CBOR and DAG-JSON document from your browser, as well as follow any IPLD Links ([CBOR Tag 42](https://github.com/ipld/cid-cbor/)) contained within them.
|
||||
2. The HTML directory listings now contain [updated, higher-definition icons](https://user-images.githubusercontent.com/5447088/241224419-5385793a-d3bb-40aa-8cb0-0382b5bc56a0.png).
|
||||
3. On gateway error, instead of a plain text error message, web browsers will now get a friendly HTML response with more details regarding the problem.
|
||||
|
||||
@ -124,6 +125,20 @@ Ratio: 1.615755
|
||||
|
||||
`ipfs --enc=json dag stat`'s keys are a non breaking change, new keys have been added but old keys with previous sementics are still here.
|
||||
|
||||
#### Accelerated DHT Client is no longer experimental
|
||||
|
||||
The [accelerated DHT client](docs/config.md#routingaccelerateddhtclient) is now
|
||||
the main recommended solution for users who are hosting lots of data.
|
||||
By trading some upfront DHT caching and increased memory usage,
|
||||
one gets provider throughput improvements up to 6 millions times bigger dataset.
|
||||
See [the docs](docs/config.md#routingaccelerateddhtclient) for more info.
|
||||
|
||||
The `Experimental.AcceleratedDHTClient` flag moved to `[Routing.AcceleratedDHTClient](docs/config.md#routingaccelerateddhtclient)`.
|
||||
A config migration has been added to handle this automatically.
|
||||
|
||||
A new tracker estimates the providing speed and warns users if they
|
||||
should be using AcceleratedDHTClient because they are falling behind.
|
||||
|
||||
### 📝 Changelog
|
||||
|
||||
### 👨👩👧👦 Contributors
|
||||
|
||||
@ -110,6 +110,7 @@ config file at runtime.
|
||||
- [`Reprovider.Strategy`](#reproviderstrategy)
|
||||
- [`Routing`](#routing)
|
||||
- [`Routing.Type`](#routingtype)
|
||||
- [`Routing.AcceleratedDHTClient`](#routingaccelerateddhtclient)
|
||||
- [`Routing.Routers`](#routingrouters)
|
||||
- [`Routing.Routers: Type`](#routingrouters-type)
|
||||
- [`Routing.Routers: Parameters`](#routingrouters-parameters)
|
||||
@ -1348,7 +1349,7 @@ Type: `array[peering]`
|
||||
### `Reprovider.Interval`
|
||||
|
||||
Sets the time between rounds of reproviding local content to the routing
|
||||
system.
|
||||
system.
|
||||
|
||||
- If unset, it uses the implicit safe default.
|
||||
- If set to the value `"0"` it will disable content reproviding.
|
||||
@ -1423,6 +1424,53 @@ Default: `auto` (DHT + IPNI)
|
||||
|
||||
Type: `optionalString` (`null`/missing means the default)
|
||||
|
||||
|
||||
### `Routing.AcceleratedDHTClient`
|
||||
|
||||
This alternative DHT client with a Full-Routing-Table strategy will
|
||||
do a complete scan of the DHT every hour and record all nodes found.
|
||||
Then when a lookup is tried instead of having to go through multiple Kad hops it
|
||||
is able to find the 20 final nodes by looking up the in-memory recorded network table.
|
||||
|
||||
This means sustained higher memory to store the routing table
|
||||
and extra CPU and network bandwidth for each network scan.
|
||||
However the latency of individual read/write operations should be ~10x faster
|
||||
and the provide throughput up to 6 million times faster on larger datasets!
|
||||
|
||||
This is not compatible with `Routing.Type` `custom`. If you are using composable routers
|
||||
you can configure this individualy on each router.
|
||||
|
||||
When it is enabled:
|
||||
- Client DHT operations (reads and writes) should complete much faster
|
||||
- The provider will now use a keyspace sweeping mode allowing to keep alive
|
||||
CID sets that are multiple orders of magnitude larger.
|
||||
- The standard Bucket-Routing-Table DHT will still run for the DHT server (if
|
||||
the DHT server is enabled). This means the classical routing table will
|
||||
still be used to answer other nodes.
|
||||
This is critical to maintain to not harm the network.
|
||||
- The operations `ipfs stats dht` will default to showing information about the accelerated DHT client
|
||||
|
||||
**Caveats:**
|
||||
1. Running the accelerated client likely will result in more resource consumption (connections, RAM, CPU, bandwidth)
|
||||
- Users that are limited in the number of parallel connections their machines/networks can perform will likely suffer
|
||||
- The resource usage is not smooth as the client crawls the network in rounds and reproviding is similarly done in rounds
|
||||
- Users who previously had a lot of content but were unable to advertise it on the network will see an increase in
|
||||
egress bandwidth as their nodes start to advertise all of their CIDs into the network. If you have lots of data
|
||||
entering your node that you don't want to advertise, then consider using [Reprovider Strategies](#reproviderstrategy)
|
||||
to reduce the number of CIDs that you are reproviding. Similarly, if you are running a node that deals mostly with
|
||||
short-lived temporary data (e.g. you use a separate node for ingesting data then for storing and serving it) then
|
||||
you may benefit from using [Strategic Providing](experimental-features.md#strategic-providing) to prevent advertising
|
||||
of data that you ultimately will not have.
|
||||
2. Currently, the DHT is not usable for queries for the first 5-10 minutes of operation as the routing table is being
|
||||
prepared. This means operations like searching the DHT for particular peers or content will not work initially.
|
||||
- You can see if the DHT has been initially populated by running `ipfs stats dht`
|
||||
3. Currently, the accelerated DHT client is not compatible with LAN-based DHTs and will not perform operations against
|
||||
them
|
||||
|
||||
Default: `false`
|
||||
|
||||
Type: `bool` (missing means `false`)
|
||||
|
||||
### `Routing.Routers`
|
||||
|
||||
**EXPERIMENTAL: `Routing.Routers` configuration may change in future release**
|
||||
@ -1465,7 +1513,7 @@ HTTP:
|
||||
|
||||
DHT:
|
||||
- `"Mode"`: Mode used by the DHT. Possible values: "server", "client", "auto"
|
||||
- `"AcceleratedDHTClient"`: Set to `true` if you want to use the experimentalDHT.
|
||||
- `"AcceleratedDHTClient"`: Set to `true` if you want to use the acceleratedDHT.
|
||||
- `"PublicIPNetwork"`: Set to `true` to create a `WAN` DHT. Set to `false` to create a `LAN` DHT.
|
||||
|
||||
Parallel:
|
||||
|
||||
@ -7,7 +7,7 @@ go 1.18
|
||||
replace github.com/ipfs/kubo => ./../../..
|
||||
|
||||
require (
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393
|
||||
github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
|
||||
github.com/libp2p/go-libp2p v0.27.3
|
||||
github.com/multiformats/go-multiaddr v0.9.0
|
||||
@ -21,7 +21,6 @@ require (
|
||||
github.com/benbjohnson/clock v1.3.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
|
||||
github.com/ceramicnetwork/go-dag-jose v0.1.0 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
@ -108,7 +107,7 @@ require (
|
||||
github.com/libp2p/go-libp2p-pubsub v0.9.3 // indirect
|
||||
github.com/libp2p/go-libp2p-pubsub-router v0.6.0 // indirect
|
||||
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2 // indirect
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0 // indirect
|
||||
github.com/libp2p/go-libp2p-xor v0.1.0 // indirect
|
||||
github.com/libp2p/go-mplex v0.7.0 // indirect
|
||||
github.com/libp2p/go-msgio v0.3.0 // indirect
|
||||
|
||||
@ -74,8 +74,6 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
@ -321,8 +319,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
|
||||
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282 h1:86eDthzBwFRcIgXk/r0dEc3CgZzqmcqpgoU8GDKoYHQ=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282/go.mod h1:T7UvYGLnT4E9IjFbAnbisVfjUGQqMnbWCVT0kduwVck=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393 h1:o3l1Rq7NwXT//tOgd0k+JOYTQgvg+WhgKoLy8tJfLxk=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393/go.mod h1:ic5+bhD5T+A9n0HMkXYHiTzpjjaAZaPeKRQ9dWethTs=
|
||||
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
|
||||
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
|
||||
github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=
|
||||
@ -504,8 +502,8 @@ github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4s
|
||||
github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE=
|
||||
github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0=
|
||||
github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2 h1:u6SWfX+3LoqqTAFxWVl79RkcIDE3Zsay5d+JohlEBaE=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2/go.mod h1:R289GUxUMzRXIbWGSuUUTPrlVJZ3Y/pPz495+qgXJX8=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0 h1:sirOYVD0wGWjkDwHZvinunIpaqPLBXkcnXApVHwZFGA=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0/go.mod h1:R289GUxUMzRXIbWGSuUUTPrlVJZ3Y/pPz495+qgXJX8=
|
||||
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
|
||||
github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA=
|
||||
github.com/libp2p/go-libp2p-xor v0.1.0/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY=
|
||||
|
||||
@ -513,7 +513,7 @@ ipfs config --json Experimental.StrategicProviding true
|
||||
- [ ] provide roots
|
||||
- [ ] provide all
|
||||
- [ ] provide strategic
|
||||
|
||||
|
||||
## GraphSync
|
||||
|
||||
### State
|
||||
@ -546,59 +546,6 @@ Stable, enabled by default
|
||||
|
||||
[Noise](https://github.com/libp2p/specs/tree/master/noise) libp2p transport based on the [Noise Protocol Framework](https://noiseprotocol.org/noise.html). While TLS remains the default transport in Kubo, Noise is easier to implement and is thus the "interop" transport between IPFS and libp2p implementations.
|
||||
|
||||
## Accelerated DHT Client
|
||||
|
||||
### In Version
|
||||
|
||||
0.9.0
|
||||
|
||||
### State
|
||||
|
||||
Experimental, default-disabled.
|
||||
|
||||
Utilizes an alternative DHT client that searches for and maintains more information about the network
|
||||
in exchange for being more performant.
|
||||
|
||||
When it is enabled:
|
||||
- DHT operations should complete much faster than with it disabled
|
||||
- A batching reprovider system will be enabled which takes advantage of some properties of the experimental client to
|
||||
very efficiently put provider records into the network
|
||||
- The standard DHT client (and server if enabled) are run alongside the alternative client
|
||||
- The operations `ipfs stats dht` and `ipfs stats provide` will have different outputs
|
||||
- `ipfs stats provide` only works when the accelerated DHT client is enabled and shows various statistics regarding
|
||||
the provider/reprovider system
|
||||
- `ipfs stats dht` will default to showing information about the new client
|
||||
|
||||
**Caveats:**
|
||||
1. Running the experimental client likely will result in more resource consumption (connections, RAM, CPU, bandwidth)
|
||||
- Users that are limited in the number of parallel connections their machines/networks can perform will likely suffer
|
||||
- Currently, the resource usage is not smooth as the client crawls the network in rounds and reproviding is similarly
|
||||
done in rounds
|
||||
- Users who previously had a lot of content but were unable to advertise it on the network will see an increase in
|
||||
egress bandwidth as their nodes start to advertise all of their CIDs into the network. If you have lots of data
|
||||
entering your node that you don't want to advertise consider using [Reprovider Strategies](config.md#reproviderstrategy)
|
||||
to reduce the number of CIDs that you are reproviding. Similarly, if you are running a node that deals mostly with
|
||||
short-lived temporary data (e.g. you use a separate node for ingesting data then for storing and serving it) then
|
||||
you may benefit from using [Strategic Providing](#strategic-providing) to prevent advertising of data that you
|
||||
ultimately will not have.
|
||||
2. Currently, the DHT is not usable for queries for the first 5-10 minutes of operation as the routing table is being
|
||||
prepared. This means operations like searching the DHT for particular peers or content will not work
|
||||
- You can see if the DHT has been initially populated by running `ipfs stats dht`
|
||||
3. Currently, the accelerated DHT client is not compatible with LAN-based DHTs and will not perform operations against
|
||||
them
|
||||
|
||||
### How to enable
|
||||
|
||||
```
|
||||
ipfs config --json Experimental.AcceleratedDHTClient true
|
||||
```
|
||||
|
||||
### Road to being a real feature
|
||||
|
||||
- [ ] Needs more people to use and report on how well it works
|
||||
- [ ] Should be usable for queries (even if slower/less efficient) shortly after startup
|
||||
- [ ] Should be usable with non-WAN DHTs
|
||||
|
||||
## Optimistic Provide
|
||||
|
||||
### In Version
|
||||
@ -640,7 +587,7 @@ than the classic client.
|
||||
size estimation available the client will transparently fall back to the classic approach.
|
||||
2. The chosen peers to store the provider records might not be the actual closest ones. Measurements showed that this
|
||||
is not a problem.
|
||||
3. The optimistic provide process returns already after 15 out of the 20 provider records were stored with peers. The
|
||||
3. The optimistic provide process returns already after 15 out of the 20 provider records were stored with peers. The
|
||||
reasoning here is that one out of the remaining 5 peers are very likely to time out and delay the whole process. To
|
||||
limit the number of in-flight async requests there is the second `OptimisticProvideJobsPoolSize` setting. Currently,
|
||||
this is set to 60. This means that at most 60 parallel background requests are allowed to be in-flight. If this
|
||||
|
||||
7
go.mod
7
go.mod
@ -16,7 +16,7 @@ require (
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393
|
||||
github.com/ipfs/go-block-format v0.1.2
|
||||
github.com/ipfs/go-cid v0.4.1
|
||||
github.com/ipfs/go-cidutil v0.1.0
|
||||
@ -52,7 +52,7 @@ require (
|
||||
github.com/libp2p/go-libp2p-pubsub v0.9.3
|
||||
github.com/libp2p/go-libp2p-pubsub-router v0.6.0
|
||||
github.com/libp2p/go-libp2p-record v0.2.0
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0
|
||||
github.com/libp2p/go-libp2p-testing v0.12.0
|
||||
github.com/libp2p/go-socket-activation v0.1.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
@ -82,6 +82,7 @@ require (
|
||||
go.uber.org/multierr v1.11.0
|
||||
go.uber.org/zap v1.24.0
|
||||
golang.org/x/crypto v0.9.0
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
|
||||
golang.org/x/mod v0.10.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/sys v0.8.0
|
||||
@ -93,7 +94,6 @@ require (
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
|
||||
github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
@ -215,7 +215,6 @@ require (
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/oauth2 v0.5.0 // indirect
|
||||
golang.org/x/term v0.8.0 // indirect
|
||||
|
||||
10
go.sum
10
go.sum
@ -84,8 +84,6 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
@ -356,8 +354,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
|
||||
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282 h1:86eDthzBwFRcIgXk/r0dEc3CgZzqmcqpgoU8GDKoYHQ=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608072023-5e3d0e035282/go.mod h1:T7UvYGLnT4E9IjFbAnbisVfjUGQqMnbWCVT0kduwVck=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393 h1:o3l1Rq7NwXT//tOgd0k+JOYTQgvg+WhgKoLy8tJfLxk=
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393/go.mod h1:ic5+bhD5T+A9n0HMkXYHiTzpjjaAZaPeKRQ9dWethTs=
|
||||
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
|
||||
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
|
||||
github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=
|
||||
@ -559,8 +557,8 @@ github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4s
|
||||
github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE=
|
||||
github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0=
|
||||
github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2 h1:u6SWfX+3LoqqTAFxWVl79RkcIDE3Zsay5d+JohlEBaE=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.6.2/go.mod h1:R289GUxUMzRXIbWGSuUUTPrlVJZ3Y/pPz495+qgXJX8=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0 h1:sirOYVD0wGWjkDwHZvinunIpaqPLBXkcnXApVHwZFGA=
|
||||
github.com/libp2p/go-libp2p-routing-helpers v0.7.0/go.mod h1:R289GUxUMzRXIbWGSuUUTPrlVJZ3Y/pPz495+qgXJX8=
|
||||
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
|
||||
github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg=
|
||||
github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA=
|
||||
|
||||
@ -37,7 +37,7 @@ const LockFile = "repo.lock"
|
||||
var log = logging.Logger("fsrepo")
|
||||
|
||||
// RepoVersion is the version number that we are currently expecting to see
|
||||
var RepoVersion = 13
|
||||
var RepoVersion = 14
|
||||
|
||||
var migrationInstructions = `See https://github.com/ipfs/fs-repo-migrations/blob/master/run.md
|
||||
Sorry for the inconvenience. In the future, these will run automatically.`
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
|
||||
const (
|
||||
// Current distribution to fetch migrations from
|
||||
CurrentIpfsDist = "/ipfs/Qmf4yftD4LuMo8JMNPqqw3BtUwYd2VkXMiAThuPE6usrbQ" // fs-repo-12-to-13 v1.0.0
|
||||
CurrentIpfsDist = "/ipfs/QmYerugGRCZWA8yQMKDsd9daEVXUR3C5nuw3VXuX1mggHa" // fs-repo-13-to-14 v1.0.0
|
||||
// Latest distribution path. Default for fetchers.
|
||||
LatestIpfsDist = "/ipns/dist.ipfs.tech"
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ func (c *Composer) ProvideMany(ctx context.Context, keys []multihash.Multihash)
|
||||
|
||||
func (c *Composer) Ready() bool {
|
||||
log.Debug("composer: calling ready")
|
||||
pmr, ok := c.ProvideRouter.(routinghelpers.ProvideManyRouter)
|
||||
pmr, ok := c.ProvideRouter.(routinghelpers.ReadyAbleRouter)
|
||||
if !ok {
|
||||
return true
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ replace github.com/ipfs/kubo => ../../
|
||||
require (
|
||||
github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd
|
||||
github.com/golangci/golangci-lint v1.49.0
|
||||
github.com/ipfs/boxo v0.8.0
|
||||
github.com/ipfs/boxo v0.8.2-0.20230608080412-e44e658cb393
|
||||
github.com/ipfs/go-cid v0.4.1
|
||||
github.com/ipfs/go-cidutil v0.1.0
|
||||
github.com/ipfs/go-datastore v0.6.0
|
||||
@ -15,12 +15,12 @@ require (
|
||||
github.com/ipfs/go-log v1.0.5
|
||||
github.com/ipfs/hang-fds v0.1.0
|
||||
github.com/ipfs/iptb v1.4.0
|
||||
github.com/ipfs/iptb-plugins v0.3.0
|
||||
github.com/ipfs/iptb-plugins v0.5.0
|
||||
github.com/ipld/go-ipld-prime v0.20.0
|
||||
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
|
||||
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded
|
||||
github.com/libp2p/go-libp2p v0.26.4
|
||||
github.com/multiformats/go-multiaddr v0.8.0
|
||||
github.com/libp2p/go-libp2p v0.27.3
|
||||
github.com/multiformats/go-multiaddr v0.9.0
|
||||
github.com/multiformats/go-multihash v0.2.1
|
||||
gotest.tools/gotestsum v0.4.2
|
||||
)
|
||||
@ -34,7 +34,7 @@ require (
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.3.0 // indirect
|
||||
@ -46,12 +46,11 @@ require (
|
||||
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
|
||||
github.com/breml/bidichk v0.2.3 // indirect
|
||||
github.com/breml/errchkjson v0.3.0 // indirect
|
||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
||||
github.com/butuzov/ireturn v0.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/charithe/durationcheck v0.0.9 // indirect
|
||||
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
|
||||
github.com/containerd/cgroups v1.0.4 // indirect
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/curioswitch/go-reassign v0.1.2 // indirect
|
||||
@ -61,7 +60,7 @@ require (
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.4.3 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/elastic/gosigar v0.14.2 // indirect
|
||||
github.com/esimonov/ifshort v1.0.4 // indirect
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
@ -76,7 +75,7 @@ require (
|
||||
github.com/go-critic/go-critic v0.6.4 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/go-toolsmith/astcast v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.0.1 // indirect
|
||||
github.com/go-toolsmith/astequal v1.0.2 // indirect
|
||||
@ -90,7 +89,7 @@ require (
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
|
||||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
|
||||
@ -102,10 +101,9 @@ require (
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/gopacket v1.1.19 // indirect
|
||||
github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect
|
||||
github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
@ -118,24 +116,23 @@ require (
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/huin/goupnp v1.0.3 // indirect
|
||||
github.com/huin/goupnp v1.1.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/ipfs/bbloom v0.0.4 // indirect
|
||||
github.com/ipfs/go-bitfield v1.1.0 // indirect
|
||||
github.com/ipfs/go-block-format v0.1.2 // indirect
|
||||
github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect
|
||||
github.com/ipfs/go-ipfs-config v0.5.3 // indirect
|
||||
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
|
||||
github.com/ipfs/go-ipfs-files v0.2.0 // indirect
|
||||
github.com/ipfs/go-ipfs-pq v0.0.3 // indirect
|
||||
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
|
||||
github.com/ipfs/go-ipld-cbor v0.0.6 // indirect
|
||||
github.com/ipfs/go-ipld-format v0.4.0 // indirect
|
||||
github.com/ipfs/go-ipld-legacy v0.1.1 // indirect
|
||||
github.com/ipfs/go-ipld-format v0.5.0 // indirect
|
||||
github.com/ipfs/go-ipld-legacy v0.2.1 // indirect
|
||||
github.com/ipfs/go-log/v2 v2.5.1 // indirect
|
||||
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
|
||||
github.com/ipfs/go-peertaskqueue v0.8.1 // indirect
|
||||
github.com/ipfs/go-unixfsnode v1.6.0 // indirect
|
||||
github.com/ipfs/kubo v0.16.0 // indirect
|
||||
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
|
||||
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
||||
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
|
||||
@ -147,9 +144,9 @@ require (
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.2 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.15.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.3 // indirect
|
||||
github.com/koron/go-ssdp v0.0.3 // indirect
|
||||
github.com/klauspost/compress v1.16.4 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||
github.com/koron/go-ssdp v0.0.4 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.6 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.8 // indirect
|
||||
@ -160,11 +157,9 @@ require (
|
||||
github.com/libp2p/go-cidranger v1.1.0 // indirect
|
||||
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
|
||||
github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect
|
||||
github.com/libp2p/go-libp2p-core v0.5.2 // indirect
|
||||
github.com/libp2p/go-msgio v0.3.0 // indirect
|
||||
github.com/libp2p/go-nat v0.1.0 // indirect
|
||||
github.com/libp2p/go-netroute v0.2.1 // indirect
|
||||
github.com/libp2p/go-openssl v0.1.0 // indirect
|
||||
github.com/libp2p/go-reuseport v0.2.0 // indirect
|
||||
github.com/libp2p/go-yamux/v4 v4.0.0 // indirect
|
||||
github.com/lufeee/execinquery v1.2.1 // indirect
|
||||
@ -174,12 +169,11 @@ require (
|
||||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
||||
github.com/mattn/go-pointer v0.0.1 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.2.3 // indirect
|
||||
github.com/miekg/dns v1.1.50 // indirect
|
||||
github.com/miekg/dns v1.1.53 // indirect
|
||||
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
|
||||
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
|
||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
||||
@ -191,7 +185,7 @@ require (
|
||||
github.com/multiformats/go-base36 v0.2.0 // indirect
|
||||
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
|
||||
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
|
||||
github.com/multiformats/go-multibase v0.1.1 // indirect
|
||||
github.com/multiformats/go-multibase v0.2.0 // indirect
|
||||
github.com/multiformats/go-multicodec v0.8.1 // indirect
|
||||
github.com/multiformats/go-multistream v0.4.1 // indirect
|
||||
github.com/multiformats/go-varint v0.0.7 // indirect
|
||||
@ -200,7 +194,7 @@ require (
|
||||
github.com/nishanths/exhaustive v0.8.1 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.5.1 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.9.2 // indirect
|
||||
github.com/opencontainers/runtime-spec v1.0.2 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
|
||||
@ -213,15 +207,15 @@ require (
|
||||
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
|
||||
github.com/prometheus/client_golang v1.14.0 // indirect
|
||||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
|
||||
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/quic-go/qpack v0.4.0 // indirect
|
||||
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
|
||||
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
|
||||
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
|
||||
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
|
||||
github.com/quic-go/quic-go v0.33.0 // indirect
|
||||
github.com/quic-go/webtransport-go v0.5.2 // indirect
|
||||
github.com/raulk/go-watchdog v1.3.0 // indirect
|
||||
@ -239,7 +233,6 @@ require (
|
||||
github.com/sivchari/tenv v1.7.0 // indirect
|
||||
github.com/sonatard/noctx v0.0.1 // indirect
|
||||
github.com/sourcegraph/go-diff v0.6.1 // indirect
|
||||
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
@ -263,29 +256,27 @@ require (
|
||||
github.com/ultraware/whitespace v0.0.5 // indirect
|
||||
github.com/urfave/cli v1.22.10 // indirect
|
||||
github.com/uudashr/gocognit v1.0.6 // indirect
|
||||
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa // indirect
|
||||
github.com/yagipy/maintidx v1.0.0 // indirect
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.2.3 // indirect
|
||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/dig v1.15.0 // indirect
|
||||
go.uber.org/fx v1.18.2 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
go.uber.org/dig v1.17.0 // indirect
|
||||
go.uber.org/fx v1.19.2 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/crypto v0.6.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
|
||||
golang.org/x/crypto v0.9.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
|
||||
golang.org/x/mod v0.7.0 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/mod v0.10.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/term v0.5.0 // indirect
|
||||
golang.org/x/text v0.7.0 // indirect
|
||||
golang.org/x/tools v0.3.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/term v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
golang.org/x/tools v0.7.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user