diff --git a/CHANGELOG.md b/CHANGELOG.md index bf92b1e6a7a7eedf29d90117c1b3fc7665db6de6..1513562ffd4a1a121a0be381157320e03a6bd9ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Kubo Changelogs +- [v0.35](docs/changelogs/v0.35.md) - [v0.34](docs/changelogs/v0.34.md) - [v0.33](docs/changelogs/v0.33.md) - [v0.32](docs/changelogs/v0.32.md) diff --git a/Dockerfile b/Dockerfile index 1465e5d02d1e15dd0e5fa2b207206983329d24ff..98e44a1b64708561ca5d482279caac075c56a301 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,8 +80,8 @@ RUN mkdir -p $IPFS_PATH \ && chown ipfs:users $IPFS_PATH # Create mount points for `ipfs mount` command -RUN mkdir /ipfs /ipns \ - && chown ipfs:users /ipfs /ipns +RUN mkdir /ipfs /ipns /mfs \ + && chown ipfs:users /ipfs /ipns /mfs # Create the init scripts directory RUN mkdir /container-init.d \ diff --git a/cmd/ipfs/kubo/daemon.go b/cmd/ipfs/kubo/daemon.go index 7ee5953070cde496080e309dc5bcb2258bc73706..94b633f794186e873c38455749441f43364c255a 100644 --- a/cmd/ipfs/kubo/daemon.go +++ b/cmd/ipfs/kubo/daemon.go @@ -56,6 +56,7 @@ const ( initProfileOptionKwd = "init-profile" ipfsMountKwd = "mount-ipfs" ipnsMountKwd = "mount-ipns" + mfsMountKwd = "mount-mfs" migrateKwd = "migrate" mountKwd = "mount" offlineKwd = "offline" // global option @@ -173,6 +174,7 @@ Headers. cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem using FUSE (experimental)"), cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."), cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."), + cmds.StringOption(mfsMountKwd, "Path to the mountpoint for MFS (if using --mount). Defaults to config setting."), cmds.BoolOption(unrestrictedAPIAccessKwd, "Allow RPC API access to unlisted hashes"), cmds.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)"), cmds.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection"), @@ -458,6 +460,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment cfg.Identity.PeerID, cfg.Addresses, cfg.Identity.PrivKey, + cfg.HTTPRetrieval.Enabled.WithDefault(config.DefaultHTTPRetrievalEnabled), ) default: return fmt.Errorf("unrecognized routing option: %s", routingOption) @@ -485,6 +488,14 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment // This should never happen, but better safe than sorry log.Fatal("Private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)") } + if cfg.Provider.Strategy.WithDefault("") != "" && cfg.Reprovider.Strategy.IsDefault() { + log.Fatal("Invalid config. Remove unused Provider.Strategy and set Reprovider.Strategy instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy") + } + if cfg.Experimental.StrategicProviding { + log.Error("Experimental.StrategicProviding was removed. Remove it from your config and set Provider.Enabled=false to remove this message. Documentation: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#strategic-providing") + cfg.Experimental.StrategicProviding = false + cfg.Provider.Enabled = config.False + } printLibp2pPorts(node) @@ -619,17 +630,19 @@ take effect. }() if !offline { - // Warn users who were victims of 'lowprofile' footgun (https://github.com/ipfs/kubo/pull/10524) - if cfg.Experimental.StrategicProviding { + // Warn users when provide systems are disabled + if !cfg.Provider.Enabled.WithDefault(config.DefaultProviderEnabled) { fmt.Print(` -⚠️ Reprovide system is disabled due to 'Experimental.StrategicProviding=true' + +⚠️ Provide and Reprovide systems are disabled due to 'Provide.Enabled=false' ⚠️ Local CIDs will not be announced to Amino DHT, making them impossible to retrieve without manual peering -⚠️ If this is not intentional, call 'ipfs config profile apply announce-on' +⚠️ If this is not intentional, call 'ipfs config profile apply announce-on' or set Provide.Enabled=true' `) } else if cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval) == 0 { fmt.Print(` -⚠️ Reprovider system is disabled due to 'Reprovider.Interval=0' + +⚠️ Provide and Reprovide systems are disabled due to 'Reprovider.Interval=0' ⚠️ Local CIDs will not be announced to Amino DHT, making them impossible to retrieve without manual peering ⚠️ If this is not intentional, call 'ipfs config profile apply announce-on', or set 'Reprovider.Interval=22h' @@ -1052,23 +1065,58 @@ func mountFuse(req *cmds.Request, cctx *oldcmds.Context) error { if !found { fsdir = cfg.Mounts.IPFS } + if err := checkFusePath("Mounts.IPFS", fsdir); err != nil { + return err + } nsdir, found := req.Options[ipnsMountKwd].(string) if !found { nsdir = cfg.Mounts.IPNS } + if err := checkFusePath("Mounts.IPNS", nsdir); err != nil { + return err + } + + mfsdir, found := req.Options[mfsMountKwd].(string) + if !found { + mfsdir = cfg.Mounts.MFS + } + if err := checkFusePath("Mounts.MFS", mfsdir); err != nil { + return err + } node, err := cctx.ConstructNode() if err != nil { return fmt.Errorf("mountFuse: ConstructNode() failed: %s", err) } - err = nodeMount.Mount(node, fsdir, nsdir) + err = nodeMount.Mount(node, fsdir, nsdir, mfsdir) if err != nil { return err } fmt.Printf("IPFS mounted at: %s\n", fsdir) fmt.Printf("IPNS mounted at: %s\n", nsdir) + fmt.Printf("MFS mounted at: %s\n", mfsdir) + return nil +} + +func checkFusePath(name, path string) error { + if path == "" { + return fmt.Errorf("%s path cannot be empty", name) + } + + fileInfo, err := os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return fmt.Errorf("%s path (%q) does not exist: %w", name, path, err) + } + return fmt.Errorf("error while inspecting %s path (%q): %w", name, path, err) + } + + if !fileInfo.IsDir() { + return fmt.Errorf("%s path (%q) is not a directory", name, path) + } + return nil } diff --git a/config/bitswap.go b/config/bitswap.go new file mode 100644 index 0000000000000000000000000000000000000000..5adcdef9c8432a372904d0476bdf4e3434efe62e --- /dev/null +++ b/config/bitswap.go @@ -0,0 +1,15 @@ +package config + +// Bitswap holds Bitswap configuration options +type Bitswap struct { + // Libp2pEnabled controls if the node initializes bitswap over libp2p (enabled by default) + // (This can be disabled if HTTPRetrieval.Enabled is set to true) + Libp2pEnabled Flag `json:",omitempty"` + // ServerEnabled controls if the node responds to WANTs (depends on Libp2pEnabled, enabled by default) + ServerEnabled Flag `json:",omitempty"` +} + +const ( + DefaultBitswapLibp2pEnabled = true + DefaultBitswapServerEnabled = true +) diff --git a/config/config.go b/config/config.go index 3db7573d06c8ed34ea7f2000cfadebb164c8e313..eee7e768b6b31be947c694a6bbb16c0ae2ac0673 100644 --- a/config/config.go +++ b/config/config.go @@ -33,15 +33,18 @@ type Config struct { DNS DNS Migration Migration - Provider Provider - Reprovider Reprovider - Experimental Experiments - Plugins Plugins - Pinning Pinning - Import Import - Version Version + Provider Provider + Reprovider Reprovider + HTTPRetrieval HTTPRetrieval + Experimental Experiments + Plugins Plugins + Pinning Pinning + Import Import + Version Version Internal Internal // experimental/unstable options + + Bitswap Bitswap `json:",omitempty"` } const ( diff --git a/config/config_test.go b/config/config_test.go index d4f38f086620d8a903337868d0cf4115048848e3..16573504370b29772228c4ac6b50a4cf32a19e5f 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -134,9 +134,9 @@ func TestCheckKey(t *testing.T) { t.Fatal("Foo.Bar isn't a valid key in the config") } - err = CheckKey("Provider.Strategy") + err = CheckKey("Reprovider.Strategy") if err != nil { - t.Fatalf("%s: %s", err, "Provider.Strategy is a valid key in the config") + t.Fatalf("%s: %s", err, "Reprovider.Strategy is a valid key in the config") } err = CheckKey("Provider.Foo") diff --git a/config/experiments.go b/config/experiments.go index fab1f953c2e3db1391ad838c057312b1d4e99412..6c43ac04f075af7abf1815b60569237246770e3b 100644 --- a/config/experiments.go +++ b/config/experiments.go @@ -6,7 +6,7 @@ type Experiments struct { ShardingEnabled bool `json:",omitempty"` // deprecated by autosharding: https://github.com/ipfs/kubo/pull/8527 Libp2pStreamMounting bool P2pHttpProxy bool //nolint - StrategicProviding bool + StrategicProviding bool `json:",omitempty"` // removed, use Provider.Enabled instead OptimisticProvide bool OptimisticProvideJobsPoolSize int GatewayOverLibp2p bool `json:",omitempty"` diff --git a/config/http_retrieval.go b/config/http_retrieval.go new file mode 100644 index 0000000000000000000000000000000000000000..a058e26c41c771e8c2e4a92f18132ab448019e3e --- /dev/null +++ b/config/http_retrieval.go @@ -0,0 +1,19 @@ +package config + +// HTTPRetrieval is the configuration object for HTTP Retrieval settings. +// Implicit defaults can be found in core/node/bitswap.go +type HTTPRetrieval struct { + Enabled Flag `json:",omitempty"` + Allowlist []string `json:",omitempty"` + Denylist []string `json:",omitempty"` + NumWorkers *OptionalInteger `json:",omitempty"` + MaxBlockSize *OptionalString `json:",omitempty"` + TLSInsecureSkipVerify Flag `json:",omitempty"` +} + +const ( + DefaultHTTPRetrievalEnabled = false // opt-in for now, until we figure out https://github.com/ipfs/specs/issues/496 + DefaultHTTPRetrievalNumWorkers = 16 + DefaultHTTPRetrievalTLSInsecureSkipVerify = false // only for testing with self-signed HTTPS certs + DefaultHTTPRetrievalMaxBlockSize = "2MiB" // matching bitswap: https://specs.ipfs.tech/bitswap-protocol/#block-sizes +) diff --git a/config/import.go b/config/import.go index 6ea4d060fc26f1db10fa130afc43b6f8abe1f253..21bf232c1c0aa3559d4143cdc44b003ba3039659 100644 --- a/config/import.go +++ b/config/import.go @@ -1,11 +1,18 @@ package config +import ( + "github.com/ipfs/boxo/ipld/unixfs/importer/helpers" + "github.com/ipfs/boxo/ipld/unixfs/io" +) + const ( DefaultCidVersion = 0 DefaultUnixFSRawLeaves = false DefaultUnixFSChunker = "size-262144" DefaultHashFunction = "sha2-256" + DefaultUnixFSHAMTDirectorySizeThreshold = "256KiB" // https://github.com/ipfs/boxo/blob/6c5a07602aed248acc86598f30ab61923a54a83e/ipld/unixfs/io/directory.go#L26 + // DefaultBatchMaxNodes controls the maximum number of nodes in a // write-batch. The total size of the batch is limited by // BatchMaxnodes and BatchMaxSize. @@ -14,15 +21,26 @@ const ( // write-batch. The total size of the batch is limited by // BatchMaxnodes and BatchMaxSize. DefaultBatchMaxSize = 100 << 20 // 20MiB + +) + +var ( + DefaultUnixFSFileMaxLinks = int64(helpers.DefaultLinksPerBlock) + DefaultUnixFSDirectoryMaxLinks = int64(0) + DefaultUnixFSHAMTDirectoryMaxFanout = int64(io.DefaultShardWidth) ) // Import configures the default options for ingesting data. This affects commands // that ingest data, such as 'ipfs add', 'ipfs dag put, 'ipfs block put', 'ipfs files write'. type Import struct { - CidVersion OptionalInteger - UnixFSRawLeaves Flag - UnixFSChunker OptionalString - HashFunction OptionalString - BatchMaxNodes OptionalInteger - BatchMaxSize OptionalInteger + CidVersion OptionalInteger + UnixFSRawLeaves Flag + UnixFSChunker OptionalString + HashFunction OptionalString + UnixFSFileMaxLinks OptionalInteger + UnixFSDirectoryMaxLinks OptionalInteger + UnixFSHAMTDirectoryMaxFanout OptionalInteger + UnixFSHAMTDirectorySizeThreshold OptionalString + BatchMaxNodes OptionalInteger + BatchMaxSize OptionalInteger } diff --git a/config/init.go b/config/init.go index f5217f413f113c138365e992125325abe3b6dae1..40c24bd25d9a5013aca70821948b4594958f0a98 100644 --- a/config/init.go +++ b/config/init.go @@ -7,6 +7,7 @@ import ( "io" "time" + "github.com/cockroachdb/pebble/v2" "github.com/ipfs/kubo/core/coreiface/options" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" @@ -47,16 +48,11 @@ func InitWithIdentity(identity Identity) (*Config, error) { }, }, - Routing: Routing{ - Type: nil, - Methods: nil, - Routers: nil, - }, - // setup the node mount points. Mounts: Mounts{ IPFS: "/ipfs", IPNS: "/ipns", + MFS: "/mfs", }, Ipns: Ipns{ @@ -139,17 +135,37 @@ func DefaultDatastoreConfig() Datastore { } func pebbleSpec() map[string]interface{} { + return map[string]interface{}{ + "type": "pebbleds", + "prefix": "pebble.datastore", + "path": "pebbleds", + "formatMajorVersion": int(pebble.FormatNewest), + } +} + +func pebbleSpecMeasure() map[string]interface{} { return map[string]interface{}{ "type": "measure", "prefix": "pebble.datastore", "child": map[string]interface{}{ - "type": "pebbleds", - "path": "pebbleds", + "formatMajorVersion": int(pebble.FormatNewest), + "type": "pebbleds", + "path": "pebbleds", }, } } func badgerSpec() map[string]interface{} { + return map[string]interface{}{ + "type": "badgerds", + "prefix": "badger.datastore", + "path": "badgerds", + "syncWrites": false, + "truncate": true, + } +} + +func badgerSpecMeasure() map[string]interface{} { return map[string]interface{}{ "type": "measure", "prefix": "badger.datastore", @@ -163,6 +179,29 @@ func badgerSpec() map[string]interface{} { } func flatfsSpec() map[string]interface{} { + return map[string]interface{}{ + "type": "mount", + "mounts": []interface{}{ + map[string]interface{}{ + "mountpoint": "/blocks", + "type": "flatfs", + "prefix": "flatfs.datastore", + "path": "blocks", + "sync": false, + "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2", + }, + map[string]interface{}{ + "mountpoint": "/", + "type": "levelds", + "prefix": "leveldb.datastore", + "path": "datastore", + "compression": "none", + }, + }, + } +} + +func flatfsSpecMeasure() map[string]interface{} { return map[string]interface{}{ "type": "mount", "mounts": []interface{}{ diff --git a/config/internal.go b/config/internal.go index f43746534a3d9b2f5dc31f042baec4a18a93f083..f8300f540b943b7132520713f51af161a65ebf4b 100644 --- a/config/internal.go +++ b/config/internal.go @@ -3,7 +3,7 @@ package config type Internal struct { // All marked as omitempty since we are expecting to make changes to all subcomponents of Internal Bitswap *InternalBitswap `json:",omitempty"` - UnixFSShardingSizeThreshold *OptionalString `json:",omitempty"` + UnixFSShardingSizeThreshold *OptionalString `json:",omitempty"` // moved to Import.UnixFSHAMTDirectorySizeThreshold Libp2pForceReachability *OptionalString `json:",omitempty"` BackupBootstrapInterval *OptionalDuration `json:",omitempty"` } @@ -14,5 +14,6 @@ type InternalBitswap struct { EngineTaskWorkerCount OptionalInteger MaxOutstandingBytesPerPeer OptionalInteger ProviderSearchDelay OptionalDuration + ProviderSearchMaxResults OptionalInteger WantHaveReplaceSize OptionalInteger } diff --git a/config/mounts.go b/config/mounts.go index dfdd1e5bf6cd4bacb47446b5158716fb4afb7737..571316cf386b34272114e9c69ffbd492bb8da8a5 100644 --- a/config/mounts.go +++ b/config/mounts.go @@ -4,5 +4,6 @@ package config type Mounts struct { IPFS string IPNS string + MFS string FuseAllowOther bool } diff --git a/config/profile.go b/config/profile.go index 69aaf66dcb639df870a67125eb3beb5021d1e1ec..ec2e5a0b7ae94e3b4404ed5fb3c6acf54d2d0c11 100644 --- a/config/profile.go +++ b/config/profile.go @@ -150,6 +150,20 @@ NOTE: This profile may only be applied when first initializing node at IPFS_PATH return nil }, }, + "flatfs-measure": { + Description: `Configures the node to use the flatfs datastore with metrics tracking wrapper. +Additional '*_datastore_*' metrics will be exposed on /debug/metrics/prometheus + +NOTE: This profile may only be applied when first initializing node at IPFS_PATH + via 'ipfs init --profile flatfs-measure' +`, + + InitOnly: true, + Transform: func(c *Config) error { + c.Datastore.Spec = flatfsSpecMeasure() + return nil + }, + }, "pebbleds": { Description: `Configures the node to use the pebble high-performance datastore. @@ -176,6 +190,20 @@ NOTE: This profile may only be applied when first initializing node at IPFS_PATH return nil }, }, + "pebbleds-measure": { + Description: `Configures the node to use the pebble datastore with metrics tracking wrapper. +Additional '*_datastore_*' metrics will be exposed on /debug/metrics/prometheus + +NOTE: This profile may only be applied when first initializing node at IPFS_PATH + via 'ipfs init --profile pebbleds-measure' +`, + + InitOnly: true, + Transform: func(c *Config) error { + c.Datastore.Spec = pebbleSpecMeasure() + return nil + }, + }, "badgerds": { Description: `Configures the node to use the legacy badgerv1 datastore. @@ -205,6 +233,20 @@ NOTE: This profile may only be applied when first initializing node at IPFS_PATH return nil }, }, + "badgerds-measure": { + Description: `Configures the node to use the legacy badgerv1 datastore with metrics wrapper. +Additional '*_datastore_*' metrics will be exposed on /debug/metrics/prometheus + +NOTE: This profile may only be applied when first initializing node at IPFS_PATH + via 'ipfs init --profile badgerds-measure' +`, + + InitOnly: true, + Transform: func(c *Config) error { + c.Datastore.Spec = badgerSpecMeasure() + return nil + }, + }, "lowpower": { Description: `Reduces daemon overhead on the system. May affect node functionality - performance of content discovery and data @@ -228,7 +270,7 @@ fetching may be degraded. }, }, "announce-off": { - Description: `Disables Reprovide system (and announcing to Amino DHT). + Description: `Disables Provide and Reprovide systems (announcing to Amino DHT). USE WITH CAUTION: The main use case for this is setups with manual Peering.Peers config. @@ -237,16 +279,16 @@ fetching may be degraded. one hosting it, and other peers are not already connected to it. `, Transform: func(c *Config) error { + c.Provider.Enabled = False c.Reprovider.Interval = NewOptionalDuration(0) // 0 disables periodic reprovide - c.Experimental.StrategicProviding = true // this is not a typo (the name is counter-intuitive) return nil }, }, "announce-on": { - Description: `Re-enables Reprovide system (reverts announce-off profile).`, + Description: `Re-enables Provide and Reprovide systems (reverts announce-off profile).`, Transform: func(c *Config) error { + c.Provider.Enabled = True c.Reprovider.Interval = NewOptionalDuration(DefaultReproviderInterval) // have to apply explicit default because nil would be ignored - c.Experimental.StrategicProviding = false // this is not a typo (the name is counter-intuitive) return nil }, }, @@ -266,24 +308,44 @@ fetching may be degraded. }, }, "legacy-cid-v0": { - Description: `Makes UnixFS import produce legacy CIDv0 with no raw leaves, sha2-256 and 256 KiB chunks.`, - + Description: `Makes UnixFS import produce legacy CIDv0 with no raw leaves, sha2-256 and 256 KiB chunks. This is likely the least optimal preset, use only if legacy behavior is required.`, Transform: func(c *Config) error { c.Import.CidVersion = *NewOptionalInteger(0) c.Import.UnixFSRawLeaves = False c.Import.UnixFSChunker = *NewOptionalString("size-262144") c.Import.HashFunction = *NewOptionalString("sha2-256") + c.Import.UnixFSFileMaxLinks = *NewOptionalInteger(174) + c.Import.UnixFSDirectoryMaxLinks = *NewOptionalInteger(0) + c.Import.UnixFSHAMTDirectoryMaxFanout = *NewOptionalInteger(256) + c.Import.UnixFSHAMTDirectorySizeThreshold = *NewOptionalString("256KiB") return nil }, }, "test-cid-v1": { - Description: `Makes UnixFS import produce modern CIDv1 with raw leaves, sha2-256 and 1 MiB chunks.`, - + Description: `Makes UnixFS import produce CIDv1 with raw leaves, sha2-256 and 1 MiB chunks (max 174 links per file, 256 per HAMT node, switch dir to HAMT above 256KiB).`, Transform: func(c *Config) error { c.Import.CidVersion = *NewOptionalInteger(1) c.Import.UnixFSRawLeaves = True c.Import.UnixFSChunker = *NewOptionalString("size-1048576") c.Import.HashFunction = *NewOptionalString("sha2-256") + c.Import.UnixFSFileMaxLinks = *NewOptionalInteger(174) + c.Import.UnixFSDirectoryMaxLinks = *NewOptionalInteger(0) + c.Import.UnixFSHAMTDirectoryMaxFanout = *NewOptionalInteger(256) + c.Import.UnixFSHAMTDirectorySizeThreshold = *NewOptionalString("256KiB") + return nil + }, + }, + "test-cid-v1-wide": { + Description: `Makes UnixFS import produce CIDv1 with raw leaves, sha2-256 and 1MiB chunks and wider file DAGs (max 1024 links per every node type, switch dir to HAMT above 1MiB).`, + Transform: func(c *Config) error { + c.Import.CidVersion = *NewOptionalInteger(1) + c.Import.UnixFSRawLeaves = True + c.Import.UnixFSChunker = *NewOptionalString("size-1048576") // 1MiB + c.Import.HashFunction = *NewOptionalString("sha2-256") + c.Import.UnixFSFileMaxLinks = *NewOptionalInteger(1024) + c.Import.UnixFSDirectoryMaxLinks = *NewOptionalInteger(0) // no limit here, use size-based Import.UnixFSHAMTDirectorySizeThreshold instead + c.Import.UnixFSHAMTDirectoryMaxFanout = *NewOptionalInteger(1024) + c.Import.UnixFSHAMTDirectorySizeThreshold = *NewOptionalString("1MiB") // 1MiB return nil }, }, diff --git a/config/provider.go b/config/provider.go index f2b5afe05b46f371d13b888041beb5f9f57d237d..4a2243acb077f27013ea8844e93b368e53b933ae 100644 --- a/config/provider.go +++ b/config/provider.go @@ -1,5 +1,14 @@ package config +const ( + DefaultProviderEnabled = true + DefaultProviderWorkerCount = 16 +) + +// Provider configuration describes how NEW CIDs are announced the moment they are created. +// For periodical reprovide configuration, see Reprovider.* type Provider struct { - Strategy string // Which keys to announce + Enabled Flag `json:",omitempty"` + Strategy *OptionalString `json:",omitempty"` // Unused, you are likely looking for Reprovider.Strategy instead + WorkerCount *OptionalInteger `json:",omitempty"` // Number of concurrent provides allowed, 0 means unlimited } diff --git a/config/reprovider.go b/config/reprovider.go index dae9ae6dee99dde39351c7f3ba03e1a965d4034a..3e8a5b476ca13487342eb445d1d00e8c1984a480 100644 --- a/config/reprovider.go +++ b/config/reprovider.go @@ -7,6 +7,8 @@ const ( DefaultReproviderStrategy = "all" ) +// Reprovider configuration describes how CID from local datastore are periodically re-announced to routing systems. +// For provide behavior of ad-hoc or newly created CIDs and their first-time announcement, see Provider.* type Reprovider struct { Interval *OptionalDuration `json:",omitempty"` // Time period to reprovide locally stored objects to the network Strategy *OptionalString `json:",omitempty"` // Which keys to announce diff --git a/config/routing.go b/config/routing.go index 52d8b7296b4f705d67b4c43ec5368fd92eedb91c..aea60c3bd24a7f844b8e4c7d0ac595832f40cc5a 100644 --- a/config/routing.go +++ b/config/routing.go @@ -11,20 +11,25 @@ import ( const ( DefaultAcceleratedDHTClient = false DefaultLoopbackAddressesOnLanDHT = false + CidContactRoutingURL = "https://cid.contact" + PublicGoodDelegatedRoutingURL = "https://delegated-ipfs.dev" // cid.contact + amino dht (incl. IPNS PUTs) + EnvHTTPRouters = "IPFS_HTTP_ROUTERS" + EnvHTTPRoutersFilterProtocols = "IPFS_HTTP_ROUTERS_FILTER_PROTOCOLS" ) var ( // Default HTTP routers used in parallel to DHT when Routing.Type = "auto" - DefaultHTTPRouters = getEnvOrDefault("IPFS_HTTP_ROUTERS", []string{ - "https://cid.contact", // https://github.com/ipfs/kubo/issues/9422#issuecomment-1338142084 + DefaultHTTPRouters = getEnvOrDefault(EnvHTTPRouters, []string{ + CidContactRoutingURL, // https://github.com/ipfs/kubo/issues/9422#issuecomment-1338142084 }) // Default filter-protocols to pass along with delegated routing requests (as defined in IPIP-484) // and also filter out locally - DefaultHTTPRoutersFilterProtocols = getEnvOrDefault("IPFS_HTTP_ROUTERS_FILTER_PROTOCOLS", []string{ + DefaultHTTPRoutersFilterProtocols = getEnvOrDefault(EnvHTTPRoutersFilterProtocols, []string{ "unknown", // allow results without protocol list, we can do libp2p identify to test them "transport-bitswap", - // TODO: add 'transport-ipfs-gateway-http' once https://github.com/ipfs/rainbow/issues/125 is addressed + // http is added dynamically in routing/delegated.go. + // 'transport-ipfs-gateway-http' }) ) @@ -41,9 +46,14 @@ type Routing struct { LoopbackAddressesOnLanDHT Flag `json:",omitempty"` - Routers Routers + IgnoreProviders []string `json:",omitempty"` - Methods Methods + // Simplified configuration used by default when Routing.Type=auto|autoclient + DelegatedRouters []string `json:",omitempty"` + + // Advanced configuration used when Routing.Type=custom + Routers Routers `json:",omitempty"` + Methods Methods `json:",omitempty"` } type Router struct { diff --git a/core/commands/add.go b/core/commands/add.go index a1642f127a368d8869932ed5638970a1560494ce..f800e4f42d0ef43f5f7c21d65c793fac54e6faf3 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -37,23 +37,26 @@ type AddEvent struct { } const ( - quietOptionName = "quiet" - quieterOptionName = "quieter" - silentOptionName = "silent" - progressOptionName = "progress" - trickleOptionName = "trickle" - wrapOptionName = "wrap-with-directory" - onlyHashOptionName = "only-hash" - chunkerOptionName = "chunker" - pinOptionName = "pin" - rawLeavesOptionName = "raw-leaves" - noCopyOptionName = "nocopy" - fstoreCacheOptionName = "fscache" - cidVersionOptionName = "cid-version" - hashOptionName = "hash" - inlineOptionName = "inline" - inlineLimitOptionName = "inline-limit" - toFilesOptionName = "to-files" + quietOptionName = "quiet" + quieterOptionName = "quieter" + silentOptionName = "silent" + progressOptionName = "progress" + trickleOptionName = "trickle" + wrapOptionName = "wrap-with-directory" + onlyHashOptionName = "only-hash" + chunkerOptionName = "chunker" + pinOptionName = "pin" + rawLeavesOptionName = "raw-leaves" + maxFileLinksOptionName = "max-file-links" + maxDirectoryLinksOptionName = "max-directory-links" + maxHAMTFanoutOptionName = "max-hamt-fanout" + noCopyOptionName = "nocopy" + fstoreCacheOptionName = "fscache" + cidVersionOptionName = "cid-version" + hashOptionName = "hash" + inlineOptionName = "inline" + inlineLimitOptionName = "inline-limit" + toFilesOptionName = "to-files" preserveModeOptionName = "preserve-mode" preserveMtimeOptionName = "preserve-mtime" @@ -143,6 +146,9 @@ new flags may be added in the future. It is not guaranteed for the implicit defaults of 'ipfs add' to remain the same in future Kubo releases, or for other IPFS software to use the same import parameters as Kubo. +Use Import.* configuration options to override global implicit defaults: +https://github.com/ipfs/kubo/blob/master/docs/config.md#import + If you need to back up or transport content-addressed data using a non-IPFS medium, CID can be preserved with CAR files. See 'dag export' and 'dag import' for more information. @@ -166,12 +172,15 @@ See 'dag export' and 'dag import' for more information. cmds.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation."), cmds.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk."), cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."), - cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash"), - cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes."), + cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash. Default: Import.UnixFSChunker"), + cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes. Default: Import.UnixFSRawLeaves"), + cmds.IntOption(maxFileLinksOptionName, "Limit the maximum number of links in UnixFS file nodes to this value. (experimental) Default: Import.UnixFSFileMaxLinks"), + cmds.IntOption(maxDirectoryLinksOptionName, "Limit the maximum number of links in UnixFS basic directory nodes to this value. Default: Import.UnixFSDirectoryMaxLinks. WARNING: experimental, Import.UnixFSHAMTThreshold is a safer alternative."), + cmds.IntOption(maxHAMTFanoutOptionName, "Limit the maximum number of links of a UnixFS HAMT directory node to this (power of 2, multiple of 8). Default: Import.UnixFSHAMTDirectoryMaxFanout WARNING: experimental, see Import.UnixFSHAMTDirectorySizeThreshold as well."), cmds.BoolOption(noCopyOptionName, "Add the file using filestore. Implies raw-leaves. (experimental)"), cmds.BoolOption(fstoreCacheOptionName, "Check the filestore for pre-existing blocks. (experimental)"), - cmds.IntOption(cidVersionOptionName, "CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. Passing version 1 will cause the raw-leaves option to default to true."), - cmds.StringOption(hashOptionName, "Hash function to use. Implies CIDv1 if not sha2-256. (experimental)"), + cmds.IntOption(cidVersionOptionName, "CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. Passing version 1 will cause the raw-leaves option to default to true. Default: Import.CidVersion"), + cmds.StringOption(hashOptionName, "Hash function to use. Implies CIDv1 if not sha2-256. Default: Import.HashFunction"), cmds.BoolOption(inlineOptionName, "Inline small blocks into CIDs. (experimental)"), cmds.IntOption(inlineLimitOptionName, "Maximum block size to inline. (experimental)").WithDefault(32), cmds.BoolOption(pinOptionName, "Pin locally to protect added files from garbage collection.").WithDefault(true), @@ -222,6 +231,9 @@ See 'dag export' and 'dag import' for more information. chunker, _ := req.Options[chunkerOptionName].(string) dopin, _ := req.Options[pinOptionName].(bool) rawblks, rbset := req.Options[rawLeavesOptionName].(bool) + maxFileLinks, maxFileLinksSet := req.Options[maxFileLinksOptionName].(int) + maxDirectoryLinks, maxDirectoryLinksSet := req.Options[maxDirectoryLinksOptionName].(int) + maxHAMTFanout, maxHAMTFanoutSet := req.Options[maxHAMTFanoutOptionName].(int) nocopy, _ := req.Options[noCopyOptionName].(bool) fscache, _ := req.Options[fstoreCacheOptionName].(bool) cidVer, cidVerSet := req.Options[cidVersionOptionName].(int) @@ -253,6 +265,21 @@ See 'dag export' and 'dag import' for more information. rawblks = cfg.Import.UnixFSRawLeaves.WithDefault(config.DefaultUnixFSRawLeaves) } + if !maxFileLinksSet && !cfg.Import.UnixFSFileMaxLinks.IsDefault() { + maxFileLinksSet = true + maxFileLinks = int(cfg.Import.UnixFSFileMaxLinks.WithDefault(config.DefaultUnixFSFileMaxLinks)) + } + + if !maxDirectoryLinksSet && !cfg.Import.UnixFSDirectoryMaxLinks.IsDefault() { + maxDirectoryLinksSet = true + maxDirectoryLinks = int(cfg.Import.UnixFSDirectoryMaxLinks.WithDefault(config.DefaultUnixFSDirectoryMaxLinks)) + } + + if !maxHAMTFanoutSet && !cfg.Import.UnixFSHAMTDirectoryMaxFanout.IsDefault() { + maxHAMTFanoutSet = true + maxHAMTFanout = int(cfg.Import.UnixFSHAMTDirectoryMaxFanout.WithDefault(config.DefaultUnixFSHAMTDirectoryMaxFanout)) + } + // Storing optional mode or mtime (UnixFS 1.5) requires root block // to always be 'dag-pb' and not 'raw'. Below adjusts raw-leaves setting, if possible. if preserveMode || preserveMtime || mode != 0 || mtime != 0 { @@ -329,6 +356,18 @@ See 'dag export' and 'dag import' for more information. opts = append(opts, options.Unixfs.RawLeaves(rawblks)) } + if maxFileLinksSet { + opts = append(opts, options.Unixfs.MaxFileLinks(maxFileLinks)) + } + + if maxDirectoryLinksSet { + opts = append(opts, options.Unixfs.MaxDirectoryLinks(maxDirectoryLinks)) + } + + if maxHAMTFanoutSet { + opts = append(opts, options.Unixfs.MaxHAMTFanout(maxHAMTFanout)) + } + if trickle { opts = append(opts, options.Unixfs.Layout(options.TrickleLayout)) } diff --git a/core/commands/commands_test.go b/core/commands/commands_test.go index 2dda639f545933fed09fabb4e8203afc833b9ef0..d8b4c4083805830fce61b4be2a1487a186d33385 100644 --- a/core/commands/commands_test.go +++ b/core/commands/commands_test.go @@ -184,6 +184,7 @@ func TestCommands(t *testing.T) { "/stats/bw", "/stats/dht", "/stats/provide", + "/stats/reprovide", "/stats/repo", "/swarm", "/swarm/addrs", diff --git a/core/commands/mount_nofuse.go b/core/commands/mount_nofuse.go index c425aff0fcfd93b2d9fcccab9ee77c3df3fcd704..103678e77ca65f06840ba015fa5516dbbf843f08 100644 --- a/core/commands/mount_nofuse.go +++ b/core/commands/mount_nofuse.go @@ -14,10 +14,11 @@ var MountCmd = &cmds.Command{ ShortDescription: ` This version of ipfs is compiled without fuse support, which is required for mounting. If you'd like to be able to mount, please use a version of -ipfs compiled with fuse. +Kubo compiled with fuse. For the latest instructions, please check the project's repository: - http://github.com/ipfs/go-ipfs + http://github.com/ipfs/kubo + https://github.com/ipfs/kubo/blob/master/docs/fuse.md `, }, } diff --git a/core/commands/mount_unix.go b/core/commands/mount_unix.go index 52a1b843b8089c9b49aeb8e5f98a62af67c68da0..6051f86aa6fa23939ca2ad3fc50c3e2bd47f2e18 100644 --- a/core/commands/mount_unix.go +++ b/core/commands/mount_unix.go @@ -18,6 +18,7 @@ import ( const ( mountIPFSPathOptionName = "ipfs-path" mountIPNSPathOptionName = "ipns-path" + mountMFSPathOptionName = "mfs-path" ) var MountCmd = &cmds.Command{ @@ -25,14 +26,14 @@ var MountCmd = &cmds.Command{ Helptext: cmds.HelpText{ Tagline: "Mounts IPFS to the filesystem (read-only).", ShortDescription: ` -Mount IPFS at a read-only mountpoint on the OS (default: /ipfs and /ipns). +Mount IPFS at a read-only mountpoint on the OS (default: /ipfs, /ipns, /mfs). All IPFS objects will be accessible under that directory. Note that the root will not be listable, as it is virtual. Access known paths directly. You may have to create /ipfs and /ipns before using 'ipfs mount': -> sudo mkdir /ipfs /ipns -> sudo chown $(whoami) /ipfs /ipns +> sudo mkdir /ipfs /ipns /mfs +> sudo chown $(whoami) /ipfs /ipns /mfs > ipfs daemon & > ipfs mount `, @@ -44,8 +45,8 @@ root will not be listable, as it is virtual. Access known paths directly. You may have to create /ipfs and /ipns before using 'ipfs mount': -> sudo mkdir /ipfs /ipns -> sudo chown $(whoami) /ipfs /ipns +> sudo mkdir /ipfs /ipns /mfs +> sudo chown $(whoami) /ipfs /ipns /mfs > ipfs daemon & > ipfs mount @@ -67,6 +68,7 @@ baz > ipfs mount IPFS mounted at: /ipfs IPNS mounted at: /ipns +MFS mounted at: /mfs > cd /ipfs/QmSh5e7S6fdcu75LAbXNZAFY2nGyZUJXyLCJDvn2zRkWyC > ls bar @@ -81,6 +83,7 @@ baz Options: []cmds.Option{ cmds.StringOption(mountIPFSPathOptionName, "f", "The path where IPFS should be mounted."), cmds.StringOption(mountIPNSPathOptionName, "n", "The path where IPNS should be mounted."), + cmds.StringOption(mountMFSPathOptionName, "m", "The path where MFS should be mounted."), }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { cfg, err := env.(*oldcmds.Context).GetConfig() @@ -109,7 +112,12 @@ baz nsdir = cfg.Mounts.IPNS // NB: be sure to not redeclare! } - err = nodeMount.Mount(nd, fsdir, nsdir) + mfsdir, found := req.Options[mountMFSPathOptionName].(string) + if !found { + mfsdir = cfg.Mounts.MFS + } + + err = nodeMount.Mount(nd, fsdir, nsdir, mfsdir) if err != nil { return err } @@ -117,6 +125,7 @@ baz var output config.Mounts output.IPFS = fsdir output.IPNS = nsdir + output.MFS = mfsdir return cmds.EmitOnce(res, &output) }, Type: config.Mounts{}, @@ -124,6 +133,7 @@ baz cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, mounts *config.Mounts) error { fmt.Fprintf(w, "IPFS mounted at: %s\n", cmdenv.EscNonPrint(mounts.IPFS)) fmt.Fprintf(w, "IPNS mounted at: %s\n", cmdenv.EscNonPrint(mounts.IPNS)) + fmt.Fprintf(w, "MFS mounted at: %s\n", cmdenv.EscNonPrint(mounts.MFS)) return nil }), diff --git a/core/commands/routing.go b/core/commands/routing.go index 3528a94f5eae5dc6eea13886c6e4be2fdea9c410..0804b1f44c31ce244aae512e8b4f918a4ef35d0e 100644 --- a/core/commands/routing.go +++ b/core/commands/routing.go @@ -9,6 +9,7 @@ import ( "strings" "time" + "github.com/ipfs/kubo/config" cmdenv "github.com/ipfs/kubo/core/commands/cmdenv" dag "github.com/ipfs/boxo/ipld/merkledag" @@ -158,6 +159,14 @@ var provideRefRoutingCmd = &cmds.Command{ if !nd.IsOnline { return ErrNotOnline } + // respect global config + cfg, err := nd.Repo.Config() + if err != nil { + return err + } + if !cfg.Provider.Enabled.WithDefault(config.DefaultProviderEnabled) { + return errors.New("invalid configuration: Provider.Enabled is set to 'false'") + } if len(nd.PeerHost.Network().Conns()) == 0 { return errors.New("cannot provide, no connected peers") @@ -254,6 +263,18 @@ Trigger reprovider to announce our data to network. return ErrNotOnline } + // respect global config + cfg, err := nd.Repo.Config() + if err != nil { + return err + } + if !cfg.Provider.Enabled.WithDefault(config.DefaultProviderEnabled) { + return errors.New("invalid configuration: Provider.Enabled is set to 'false'") + } + if cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval) == 0 { + return errors.New("invalid configuration: Reprovider.Interval is set to '0'") + } + err = nd.Provider.Reprovide(req.Context) if err != nil { return err diff --git a/core/commands/stat.go b/core/commands/stat.go index 2632d6aa257d124008b18723dbfbe732b8085bbd..2b4485a9513619869081a39b7ddee9176c252ca9 100644 --- a/core/commands/stat.go +++ b/core/commands/stat.go @@ -27,11 +27,12 @@ for your IPFS node.`, }, Subcommands: map[string]*cmds.Command{ - "bw": statBwCmd, - "repo": repoStatCmd, - "bitswap": bitswapStatCmd, - "dht": statDhtCmd, - "provide": statProvideCmd, + "bw": statBwCmd, + "repo": repoStatCmd, + "bitswap": bitswapStatCmd, + "dht": statDhtCmd, + "provide": statProvideCmd, + "reprovide": statReprovideCmd, }, } diff --git a/core/commands/stat_provide.go b/core/commands/stat_provide.go index 8a3dcff305a5109d56527ece3df6e91b59eb7b56..ef06d8e282801f2b121d37648e7f5e4e18cfcd64 100644 --- a/core/commands/stat_provide.go +++ b/core/commands/stat_provide.go @@ -4,28 +4,20 @@ import ( "fmt" "io" "text/tabwriter" - "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/libp2p/go-libp2p-kad-dht/fullrt" - "golang.org/x/exp/constraints" ) -type reprovideStats struct { - provider.ReproviderStats - fullRT bool -} - var statProvideCmd = &cmds.Command{ + Status: cmds.Deprecated, Helptext: cmds.HelpText{ - Tagline: "Returns statistics about the node's (re)provider system.", + Tagline: "Deprecated command, use 'ipfs stats reprovide' instead.", ShortDescription: ` -Returns statistics about the content the node is advertising. - -This interface is not stable and may change from release to release. +'ipfs stats provide' is deprecated because provide and reprovide operations +are now distinct. This command may be replaced by provide only stats in the +future. `, }, Arguments: []cmds.Argument{}, @@ -57,8 +49,8 @@ This interface is not stable and may change from release to release. wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) defer wtr.Flush() - fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalProvides)) - fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgProvideDuration)) + fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalReprovides)) + fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration)) fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration)) if !s.LastRun.IsZero() { fmt.Fprintf(wtr, "LastRun:\t%s\n", humanTime(s.LastRun)) @@ -71,30 +63,3 @@ This interface is not stable and may change from release to release. }, Type: reprovideStats{}, } - -func humanDuration(val time.Duration) string { - return val.Truncate(time.Microsecond).String() -} - -func humanTime(val time.Time) string { - return val.Format("2006-01-02 15:04:05") -} - -func humanNumber[T constraints.Float | constraints.Integer](n T) string { - nf := float64(n) - str := humanSI(nf, 0) - fullStr := humanFull(nf, 0) - if str != fullStr { - return fmt.Sprintf("%s\t(%s)", str, fullStr) - } - return str -} - -func humanSI(val float64, decimals int) string { - v, unit := humanize.ComputeSI(val) - return fmt.Sprintf("%s%s", humanFull(v, decimals), unit) -} - -func humanFull(val float64, decimals int) string { - return humanize.CommafWithDigits(val, decimals) -} diff --git a/core/commands/stat_reprovide.go b/core/commands/stat_reprovide.go new file mode 100644 index 0000000000000000000000000000000000000000..10dbc727d38f90850ca731e33d1511684176e293 --- /dev/null +++ b/core/commands/stat_reprovide.go @@ -0,0 +1,104 @@ +package commands + +import ( + "fmt" + "io" + "text/tabwriter" + "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/libp2p/go-libp2p-kad-dht/fullrt" + "golang.org/x/exp/constraints" +) + +type reprovideStats struct { + provider.ReproviderStats + fullRT bool +} + +var statReprovideCmd = &cmds.Command{ + Status: cmds.Experimental, + Helptext: cmds.HelpText{ + Tagline: "Returns statistics about the node's reprovider system.", + ShortDescription: ` +Returns statistics about the content the node is reproviding every +Reprovider.Interval according to Reprovider.Strategy: +https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider + +This interface is not stable and may change from release to release. + +`, + }, + Arguments: []cmds.Argument{}, + Options: []cmds.Option{}, + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + nd, err := cmdenv.GetNode(env) + if err != nil { + return err + } + + if !nd.IsOnline { + return ErrNotOnline + } + + stats, err := nd.Provider.Stat() + if err != nil { + return err + } + _, fullRT := nd.DHTClient.(*fullrt.FullRT) + + if err := res.Emit(reprovideStats{stats, fullRT}); err != nil { + return err + } + + return nil + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s reprovideStats) error { + wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) + defer wtr.Flush() + + fmt.Fprintf(wtr, "TotalReprovides:\t%s\n", humanNumber(s.TotalReprovides)) + fmt.Fprintf(wtr, "AvgReprovideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration)) + fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration)) + if !s.LastRun.IsZero() { + fmt.Fprintf(wtr, "LastReprovide:\t%s\n", humanTime(s.LastRun)) + if s.fullRT { + fmt.Fprintf(wtr, "NextReprovide:\t%s\n", humanTime(s.LastRun.Add(s.ReprovideInterval))) + } + } + return nil + }), + }, + Type: reprovideStats{}, +} + +func humanDuration(val time.Duration) string { + return val.Truncate(time.Microsecond).String() +} + +func humanTime(val time.Time) string { + return val.Format("2006-01-02 15:04:05") +} + +func humanNumber[T constraints.Float | constraints.Integer](n T) string { + nf := float64(n) + str := humanSI(nf, 0) + fullStr := humanFull(nf, 0) + if str != fullStr { + return fmt.Sprintf("%s\t(%s)", str, fullStr) + } + return str +} + +func humanSI(val float64, decimals int) string { + v, unit := humanize.ComputeSI(val) + return fmt.Sprintf("%s%s", humanFull(v, decimals), unit) +} + +func humanFull(val float64, decimals int) string { + return humanize.CommafWithDigits(val, decimals) +} diff --git a/core/core.go b/core/core.go index 54c98752762547cd4b0360b1db62fd5961429178..3440895e72b4cb307cb870e4df1ef246be1e0faa 100644 --- a/core/core.go +++ b/core/core.go @@ -134,6 +134,7 @@ type IpfsNode struct { type Mounts struct { Ipfs mount.Mount Ipns mount.Mount + Mfs mount.Mount } // Close calls Close() on the App object diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index 3a74d3046c954e50c49340273d0c5e70b76ebb0a..eece797a5fa0b5eb4327f3fe608387d77a34f67d 100644 --- a/core/coreapi/unixfs.go +++ b/core/coreapi/unixfs.go @@ -50,6 +50,12 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options attribute.Int("inlinelimit", settings.InlineLimit), attribute.Bool("rawleaves", settings.RawLeaves), attribute.Bool("rawleavesset", settings.RawLeavesSet), + attribute.Int("maxfilelinks", settings.MaxFileLinks), + attribute.Bool("maxfilelinksset", settings.MaxFileLinksSet), + attribute.Int("maxdirectorylinks", settings.MaxDirectoryLinks), + attribute.Bool("maxdirectorylinksset", settings.MaxDirectoryLinksSet), + attribute.Int("maxhamtfanout", settings.MaxHAMTFanout), + attribute.Bool("maxhamtfanoutset", settings.MaxHAMTFanoutSet), attribute.Int("layout", int(settings.Layout)), attribute.Bool("pin", settings.Pin), attribute.Bool("onlyhash", settings.OnlyHash), @@ -132,6 +138,16 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options fileAdder.Pin = settings.Pin && !settings.OnlyHash fileAdder.Silent = settings.Silent fileAdder.RawLeaves = settings.RawLeaves + if settings.MaxFileLinksSet { + fileAdder.MaxLinks = settings.MaxFileLinks + } + if settings.MaxDirectoryLinksSet { + fileAdder.MaxDirectoryLinks = settings.MaxDirectoryLinks + } + + if settings.MaxHAMTFanoutSet { + fileAdder.MaxHAMTFanout = settings.MaxHAMTFanout + } fileAdder.NoCopy = settings.NoCopy fileAdder.CidBuilder = prefix fileAdder.PreserveMode = settings.PreserveMode diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index 32d76a49debb8d31453d457f63b5b69416947bad..387a5b9ca725ab1b3ab9357714e4c4fea2306312 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // WebUI version confirmed to work with this Kubo version -const WebUIPath = "/ipfs/bafybeibpaa5kqrj4gkemiswbwndjqiryl65cks64ypwtyerxixu56gnvvm" // v4.6.0 +const WebUIPath = "/ipfs/bafybeibfd5kbebqqruouji6ct5qku3tay273g7mt24mmrfzrsfeewaal5y" // v4.7.0 // WebUIPaths is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeibpaa5kqrj4gkemiswbwndjqiryl65cks64ypwtyerxixu56gnvvm", // v4.6.0 "/ipfs/bafybeiata4qg7xjtwgor6r5dw63jjxyouenyromrrb4lrewxrlvav7gzgi", // v4.5.0 "/ipfs/bafybeigp3zm7cqoiciqk5anlheenqjsgovp7j7zq6hah4nu6iugdgb4nby", // v4.4.2 "/ipfs/bafybeiatztgdllxnp5p6zu7bdwhjmozsmd7jprff4bdjqjljxtylitvss4", // v4.4.1 diff --git a/core/coreiface/options/unixfs.go b/core/coreiface/options/unixfs.go index c837ec1b2db0386f868274ee7fd6416b30bace81..20f18d1e04c291793c485176d8c9c87a0cb2df17 100644 --- a/core/coreiface/options/unixfs.go +++ b/core/coreiface/options/unixfs.go @@ -7,6 +7,8 @@ import ( "time" dag "github.com/ipfs/boxo/ipld/merkledag" + "github.com/ipfs/boxo/ipld/unixfs/importer/helpers" + "github.com/ipfs/boxo/ipld/unixfs/io" cid "github.com/ipfs/go-cid" mh "github.com/multiformats/go-multihash" ) @@ -22,10 +24,16 @@ type UnixfsAddSettings struct { CidVersion int MhType uint64 - Inline bool - InlineLimit int - RawLeaves bool - RawLeavesSet bool + Inline bool + InlineLimit int + RawLeaves bool + RawLeavesSet bool + MaxFileLinks int + MaxFileLinksSet bool + MaxDirectoryLinks int + MaxDirectoryLinksSet bool + MaxHAMTFanout int + MaxHAMTFanoutSet bool Chunker string Layout Layout @@ -60,10 +68,16 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix, CidVersion: -1, MhType: mh.SHA2_256, - Inline: false, - InlineLimit: 32, - RawLeaves: false, - RawLeavesSet: false, + Inline: false, + InlineLimit: 32, + RawLeaves: false, + RawLeavesSet: false, + MaxFileLinks: helpers.DefaultLinksPerBlock, + MaxFileLinksSet: false, + MaxDirectoryLinks: 0, + MaxDirectoryLinksSet: false, + MaxHAMTFanout: io.DefaultShardWidth, + MaxHAMTFanoutSet: false, Chunker: "size-262144", Layout: BalancedLayout, @@ -190,6 +204,35 @@ func (unixfsOpts) RawLeaves(enable bool) UnixfsAddOption { } } +// MaxFileLinks specifies the maximum number of children for UnixFS file +// nodes. +func (unixfsOpts) MaxFileLinks(n int) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.MaxFileLinks = n + settings.MaxFileLinksSet = true + return nil + } +} + +// MaxDirectoryLinks specifies the maximum number of children for UnixFS basic +// directory nodes. +func (unixfsOpts) MaxDirectoryLinks(n int) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.MaxDirectoryLinks = n + settings.MaxDirectoryLinksSet = true + return nil + } +} + +// MaxHAMTFanout specifies the maximum width of the HAMT directory shards. +func (unixfsOpts) MaxHAMTFanout(n int) UnixfsAddOption { + return func(settings *UnixfsAddSettings) error { + settings.MaxHAMTFanout = n + settings.MaxHAMTFanoutSet = true + return nil + } +} + // Inline tells the adder to inline small blocks into CIDs func (unixfsOpts) Inline(enable bool) UnixfsAddOption { return func(settings *UnixfsAddSettings) error { diff --git a/core/coreunix/add.go b/core/coreunix/add.go index 5f7cbb6106524990d3903d8fb861e913ee50ac6f..d9dc555d276b7b280f08e7417358ada5125c67eb 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -19,6 +19,7 @@ import ( "github.com/ipfs/boxo/ipld/unixfs/importer/balanced" ihelper "github.com/ipfs/boxo/ipld/unixfs/importer/helpers" "github.com/ipfs/boxo/ipld/unixfs/importer/trickle" + uio "github.com/ipfs/boxo/ipld/unixfs/io" "github.com/ipfs/boxo/mfs" "github.com/ipfs/boxo/path" pin "github.com/ipfs/boxo/pinning/pinner" @@ -51,38 +52,43 @@ func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCLocker, ds ipld.DAG bufferedDS := ipld.NewBufferedDAG(ctx, ds) return &Adder{ - ctx: ctx, - pinning: p, - gcLocker: bs, - dagService: ds, - bufferedDS: bufferedDS, - Progress: false, - Pin: true, - Trickle: false, - Chunker: "", + ctx: ctx, + pinning: p, + gcLocker: bs, + dagService: ds, + bufferedDS: bufferedDS, + Progress: false, + Pin: true, + Trickle: false, + MaxLinks: ihelper.DefaultLinksPerBlock, + MaxHAMTFanout: uio.DefaultShardWidth, + Chunker: "", }, nil } // Adder holds the switches passed to the `add` command. type Adder struct { - ctx context.Context - pinning pin.Pinner - gcLocker bstore.GCLocker - dagService ipld.DAGService - bufferedDS *ipld.BufferedDAG - Out chan<- interface{} - Progress bool - Pin bool - Trickle bool - RawLeaves bool - Silent bool - NoCopy bool - Chunker string - mroot *mfs.Root - unlocker bstore.Unlocker - tempRoot cid.Cid - CidBuilder cid.Builder - liveNodes uint64 + ctx context.Context + pinning pin.Pinner + gcLocker bstore.GCLocker + dagService ipld.DAGService + bufferedDS *ipld.BufferedDAG + Out chan<- interface{} + Progress bool + Pin bool + Trickle bool + RawLeaves bool + MaxLinks int + MaxDirectoryLinks int + MaxHAMTFanout int + Silent bool + NoCopy bool + Chunker string + mroot *mfs.Root + unlocker bstore.Unlocker + tempRoot cid.Cid + CidBuilder cid.Builder + liveNodes uint64 PreserveMode bool PreserveMtime bool @@ -94,12 +100,13 @@ func (adder *Adder) mfsRoot() (*mfs.Root, error) { if adder.mroot != nil { return adder.mroot, nil } - rnode := unixfs.EmptyDirNode() - err := rnode.SetCidBuilder(adder.CidBuilder) - if err != nil { - return nil, err - } - mr, err := mfs.NewRoot(adder.ctx, adder.dagService, rnode, nil) + + // Note, this adds it to DAGService already. + mr, err := mfs.NewEmptyRoot(adder.ctx, adder.dagService, nil, mfs.MkdirOpts{ + CidBuilder: adder.CidBuilder, + MaxLinks: adder.MaxDirectoryLinks, + MaxHAMTFanout: adder.MaxHAMTFanout, + }) if err != nil { return nil, err } @@ -119,10 +126,15 @@ func (adder *Adder) add(reader io.Reader) (ipld.Node, error) { return nil, err } + maxLinks := ihelper.DefaultLinksPerBlock + if adder.MaxLinks > 0 { + maxLinks = adder.MaxLinks + } + params := ihelper.DagBuilderParams{ Dagserv: adder.bufferedDS, RawLeaves: adder.RawLeaves, - Maxlinks: ihelper.DefaultLinksPerBlock, + Maxlinks: maxLinks, NoCopy: adder.NoCopy, CidBuilder: adder.CidBuilder, FileMode: adder.FileMode, @@ -252,12 +264,15 @@ func (adder *Adder) addNode(node ipld.Node, path string) error { if err != nil { return err } + dir := gopath.Dir(path) if dir != "." { opts := mfs.MkdirOpts{ - Mkparents: true, - Flush: false, - CidBuilder: adder.CidBuilder, + Mkparents: true, + Flush: false, + CidBuilder: adder.CidBuilder, + MaxLinks: adder.MaxDirectoryLinks, + MaxHAMTFanout: adder.MaxHAMTFanout, } if err := mfs.Mkdir(mr, dir, opts); err != nil { return err @@ -460,12 +475,14 @@ func (adder *Adder) addDir(ctx context.Context, path string, dir files.Directory // if we need to store mode or modification time then create a new root which includes that data if toplevel && (adder.FileMode != 0 || !adder.FileMtime.IsZero()) { - nd := unixfs.EmptyDirNodeWithStat(adder.FileMode, adder.FileMtime) - err := nd.SetCidBuilder(adder.CidBuilder) - if err != nil { - return err - } - mr, err := mfs.NewRoot(ctx, adder.dagService, nd, nil) + mr, err := mfs.NewEmptyRoot(ctx, adder.dagService, nil, + mfs.MkdirOpts{ + CidBuilder: adder.CidBuilder, + MaxLinks: adder.MaxDirectoryLinks, + MaxHAMTFanout: adder.MaxHAMTFanout, + ModTime: adder.FileMtime, + Mode: adder.FileMode, + }) if err != nil { return err } @@ -478,11 +495,13 @@ func (adder *Adder) addDir(ctx context.Context, path string, dir files.Directory return err } err = mfs.Mkdir(mr, path, mfs.MkdirOpts{ - Mkparents: true, - Flush: false, - CidBuilder: adder.CidBuilder, - Mode: adder.FileMode, - ModTime: adder.FileMtime, + Mkparents: true, + Flush: false, + CidBuilder: adder.CidBuilder, + Mode: adder.FileMode, + ModTime: adder.FileMtime, + MaxLinks: adder.MaxDirectoryLinks, + MaxHAMTFanout: adder.MaxHAMTFanout, }) if err != nil { return err diff --git a/core/node/bitswap.go b/core/node/bitswap.go index a310709bd6afdd8feba3574cc1b3538af385d22d..e87464b8a67e883e27edf74a8bda1d32ed34af23 100644 --- a/core/node/bitswap.go +++ b/core/node/bitswap.go @@ -2,20 +2,31 @@ package node import ( "context" + "errors" + "io" "time" + "github.com/dustin/go-humanize" "github.com/ipfs/boxo/bitswap" + "github.com/ipfs/boxo/bitswap/client" + "github.com/ipfs/boxo/bitswap/network" bsnet "github.com/ipfs/boxo/bitswap/network/bsnet" + "github.com/ipfs/boxo/bitswap/network/httpnet" blockstore "github.com/ipfs/boxo/blockstore" exchange "github.com/ipfs/boxo/exchange" "github.com/ipfs/boxo/exchange/providing" provider "github.com/ipfs/boxo/provider" + rpqm "github.com/ipfs/boxo/routing/providerquerymanager" + "github.com/ipfs/go-cid" + ipld "github.com/ipfs/go-ipld-format" + version "github.com/ipfs/kubo" "github.com/ipfs/kubo/config" irouting "github.com/ipfs/kubo/routing" "github.com/libp2p/go-libp2p/core/host" - "github.com/libp2p/go-libp2p/core/routing" + peer "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/fx" + blocks "github.com/ipfs/go-block-format" "github.com/ipfs/kubo/core/node/helpers" ) @@ -26,6 +37,7 @@ const ( DefaultEngineTaskWorkerCount = 8 DefaultMaxOutstandingBytesPerPeer = 1 << 20 DefaultProviderSearchDelay = 1000 * time.Millisecond + DefaultMaxProviders = 10 // matching BitswapClientDefaultMaxProviders from https://github.com/ipfs/boxo/blob/v0.29.1/bitswap/internal/defaults/defaults.go#L15 DefaultWantHaveReplaceSize = 1024 ) @@ -61,6 +73,7 @@ type bitswapIn struct { fx.In Mctx helpers.MetricsCtx + Cfg *config.Config Host host.Host Rt irouting.ProvideManyRouter Bs blockstore.GCBlockstore @@ -68,30 +81,83 @@ type bitswapIn struct { } // Bitswap creates the BitSwap server/client instance. -// Additional options to bitswap.New can be provided via the "bitswap-options" -// group. -func Bitswap(provide bool) interface{} { - return func(in bitswapIn, lc fx.Lifecycle) *bitswap.Bitswap { - bitswapNetwork := bsnet.NewFromIpfsHost(in.Host) +// If Bitswap.ServerEnabled is false, the node will act only as a client +// using an empty blockstore to prevent serving blocks to other peers. +func Bitswap(serverEnabled, libp2pEnabled, httpEnabled bool) interface{} { + return func(in bitswapIn, lc fx.Lifecycle) (*bitswap.Bitswap, error) { + var bitswapNetworks, bitswapLibp2p network.BitSwapNetwork + var bitswapBlockstore blockstore.Blockstore = in.Bs + + libp2pEnabled := in.Cfg.Bitswap.Libp2pEnabled.WithDefault(config.DefaultBitswapLibp2pEnabled) + if libp2pEnabled { + bitswapLibp2p = bsnet.NewFromIpfsHost(in.Host) + } - var provider routing.ContentDiscovery - if provide { - provider = in.Rt + if httpEnabled { + httpCfg := in.Cfg.HTTPRetrieval + maxBlockSize, err := humanize.ParseBytes(httpCfg.MaxBlockSize.WithDefault(config.DefaultHTTPRetrievalMaxBlockSize)) + if err != nil { + return nil, err + } + bitswapHTTP := httpnet.New(in.Host, + httpnet.WithHTTPWorkers(int(httpCfg.NumWorkers.WithDefault(config.DefaultHTTPRetrievalNumWorkers))), + httpnet.WithAllowlist(httpCfg.Allowlist), + httpnet.WithDenylist(httpCfg.Denylist), + httpnet.WithInsecureSkipVerify(httpCfg.TLSInsecureSkipVerify.WithDefault(config.DefaultHTTPRetrievalTLSInsecureSkipVerify)), + httpnet.WithMaxBlockSize(int64(maxBlockSize)), + httpnet.WithUserAgent(version.GetUserAgentVersion()), + ) + bitswapNetworks = network.New(in.Host.Peerstore(), bitswapLibp2p, bitswapHTTP) + } else if libp2pEnabled { + bitswapNetworks = bitswapLibp2p + } else { + return nil, errors.New("invalid configuration: Bitswap.Libp2pEnabled and HTTPRetrieval.Enabled are both disabled, unable to initialize Bitswap") + } + + // Kubo uses own, customized ProviderQueryManager + in.BitswapOpts = append(in.BitswapOpts, bitswap.WithClientOption(client.WithDefaultProviderQueryManager(false))) + var maxProviders int = DefaultMaxProviders + if in.Cfg.Internal.Bitswap != nil { + maxProviders = int(in.Cfg.Internal.Bitswap.ProviderSearchMaxResults.WithDefault(DefaultMaxProviders)) + } + ignoredPeerIDs := make([]peer.ID, 0, len(in.Cfg.Routing.IgnoreProviders)) + for _, str := range in.Cfg.Routing.IgnoreProviders { + pid, err := peer.Decode(str) + if err != nil { + return nil, err + } + ignoredPeerIDs = append(ignoredPeerIDs, pid) } - bs := bitswap.New(helpers.LifecycleCtx(in.Mctx, lc), bitswapNetwork, provider, in.Bs, in.BitswapOpts...) + providerQueryMgr, err := rpqm.New(bitswapNetworks, + in.Rt, + rpqm.WithMaxProviders(maxProviders), + rpqm.WithIgnoreProviders(ignoredPeerIDs...), + ) + if err != nil { + return nil, err + } + + // Explicitly enable/disable server + in.BitswapOpts = append(in.BitswapOpts, bitswap.WithServerEnabled(serverEnabled)) + + bs := bitswap.New(helpers.LifecycleCtx(in.Mctx, lc), bitswapNetworks, providerQueryMgr, bitswapBlockstore, in.BitswapOpts...) lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { return bs.Close() }, }) - return bs + return bs, nil } } // OnlineExchange creates new LibP2P backed block exchange. -func OnlineExchange() interface{} { +// Returns a no-op exchange if Bitswap is disabled. +func OnlineExchange(isBitswapActive bool) interface{} { return func(in *bitswap.Bitswap, lc fx.Lifecycle) exchange.Interface { + if !isBitswapActive { + return &noopExchange{closer: in} + } lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { return in.Close() @@ -126,3 +192,25 @@ func ProvidingExchange(provide bool) interface{} { return exch } } + +type noopExchange struct { + closer io.Closer +} + +func (e *noopExchange) GetBlock(ctx context.Context, c cid.Cid) (blocks.Block, error) { + return nil, ipld.ErrNotFound{Cid: c} +} + +func (e *noopExchange) GetBlocks(ctx context.Context, cids []cid.Cid) (<-chan blocks.Block, error) { + ch := make(chan blocks.Block) + close(ch) + return ch, nil +} + +func (e *noopExchange) NotifyNewBlocks(ctx context.Context, blocks ...blocks.Block) error { + return nil +} + +func (e *noopExchange) Close() error { + return e.closer.Close() +} diff --git a/core/node/core.go b/core/node/core.go index 1c372b642c35ddc0fbfd3bd34873609dcad029c8..cb34399394d65a7acbe426eb0b25a9d164e31fef 100644 --- a/core/node/core.go +++ b/core/node/core.go @@ -115,6 +115,7 @@ func FetcherConfig(bs blockservice.BlockService) FetchersOut { // path resolution should not fetch new blocks via exchange. offlineBs := blockservice.New(bs.Blockstore(), offline.Exchange(bs.Blockstore())) offlineIpldFetcher := bsfetcher.NewFetcherConfig(offlineBs) + offlineIpldFetcher.SkipNotFound = true // carries onto the UnixFSFetcher below offlineIpldFetcher.PrototypeChooser = dagpb.AddSupportToChooser(bsfetcher.DefaultPrototypeChooser) offlineUnixFSFetcher := offlineIpldFetcher.WithReifier(unixfsnode.Reify) diff --git a/core/node/groups.go b/core/node/groups.go index e8f9739c36ebf1497f4d5e06e241abdadf42ca4c..3a952ccfe100f75c623975b71c159cf4330ba014 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -335,15 +335,20 @@ func Online(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.Part recordLifetime = d } - /* don't provide from bitswap when the strategic provider service is active */ - shouldBitswapProvide := !cfg.Experimental.StrategicProviding + isBitswapLibp2pEnabled := cfg.Bitswap.Libp2pEnabled.WithDefault(config.DefaultBitswapLibp2pEnabled) + isBitswapServerEnabled := cfg.Bitswap.ServerEnabled.WithDefault(config.DefaultBitswapServerEnabled) + isHTTPRetrievalEnabled := cfg.HTTPRetrieval.Enabled.WithDefault(config.DefaultHTTPRetrievalEnabled) + + // Right now Provider and Reprovider systems are tied together - disabling Reprovider by setting interval to 0 disables Provider + // and vice versa: Provider.Enabled=false will disable both Provider of new CIDs and the Reprovider of old ones. + isProviderEnabled := cfg.Provider.Enabled.WithDefault(config.DefaultProviderEnabled) && cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval) != 0 return fx.Options( fx.Provide(BitswapOptions(cfg)), - fx.Provide(Bitswap(shouldBitswapProvide)), - fx.Provide(OnlineExchange()), + fx.Provide(Bitswap(isBitswapServerEnabled, isBitswapLibp2pEnabled, isHTTPRetrievalEnabled)), + fx.Provide(OnlineExchange(isBitswapLibp2pEnabled)), // Replace our Exchange with a Providing exchange! - fx.Decorate(ProvidingExchange(shouldBitswapProvide)), + fx.Decorate(ProvidingExchange(isProviderEnabled && isBitswapServerEnabled)), fx.Provide(DNSResolver), fx.Provide(Namesys(ipnsCacheSize, cfg.Ipns.MaxCacheTTL.WithDefault(config.DefaultIpnsMaxCacheTTL))), fx.Provide(Peering), @@ -355,10 +360,11 @@ func Online(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.Part LibP2P(bcfg, cfg, userResourceOverrides), OnlineProviders( - cfg.Experimental.StrategicProviding, + isProviderEnabled, cfg.Reprovider.Strategy.WithDefault(config.DefaultReproviderStrategy), cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval), cfg.Routing.AcceleratedDHTClient.WithDefault(config.DefaultAcceleratedDHTClient), + int(cfg.Provider.WorkerCount.WithDefault(config.DefaultProviderWorkerCount)), ), ) } @@ -408,20 +414,29 @@ func IPFS(ctx context.Context, bcfg *BuildCfg) fx.Option { return fx.Error(err) } + // Migrate users of deprecated Experimental.ShardingEnabled flag + if cfg.Experimental.ShardingEnabled { + logger.Fatal("The `Experimental.ShardingEnabled` field is no longer used, please remove it from the config. Use Import.UnixFSHAMTDirectorySizeThreshold instead.") + } + if !cfg.Internal.UnixFSShardingSizeThreshold.IsDefault() { + msg := "The `Internal.UnixFSShardingSizeThreshold` field was renamed to `Import.UnixFSHAMTDirectorySizeThreshold`. Please update your config.\n" + if !cfg.Import.UnixFSHAMTDirectorySizeThreshold.IsDefault() { + logger.Fatal(msg) // conflicting values, hard fail + } + logger.Error(msg) + cfg.Import.UnixFSHAMTDirectorySizeThreshold = *cfg.Internal.UnixFSShardingSizeThreshold + } + // Auto-sharding settings - shardSizeString := cfg.Internal.UnixFSShardingSizeThreshold.WithDefault("256kiB") - shardSizeInt, err := humanize.ParseBytes(shardSizeString) + shardingThresholdString := cfg.Import.UnixFSHAMTDirectorySizeThreshold.WithDefault(config.DefaultUnixFSHAMTDirectorySizeThreshold) + shardSingThresholdInt, err := humanize.ParseBytes(shardingThresholdString) if err != nil { return fx.Error(err) } - uio.HAMTShardingSize = int(shardSizeInt) - - // Migrate users of deprecated Experimental.ShardingEnabled flag - if cfg.Experimental.ShardingEnabled { - logger.Fatal("The `Experimental.ShardingEnabled` field is no longer used, please remove it from the config.\n" + - "go-ipfs now automatically shards when directory block is bigger than `" + shardSizeString + "`.\n" + - "If you need to restore the old behavior (sharding everything) set `Internal.UnixFSShardingSizeThreshold` to `1B`.\n") - } + shardMaxFanout := cfg.Import.UnixFSHAMTDirectoryMaxFanout.WithDefault(config.DefaultUnixFSHAMTDirectoryMaxFanout) + // TODO: avoid overriding this globally, see if we can extend Directory interface like Get/SetMaxLinks from https://github.com/ipfs/boxo/pull/906 + uio.HAMTShardingSize = int(shardSingThresholdInt) + uio.DefaultShardWidth = int(shardMaxFanout) return fx.Options( bcfgOpts, diff --git a/core/node/libp2p/routingopt.go b/core/node/libp2p/routingopt.go index 292f49fe46eff8cc3517da3cbc26a30719e83bc8..43565265b372676414d12e03e5d39bf84740fab1 100644 --- a/core/node/libp2p/routingopt.go +++ b/core/node/libp2p/routingopt.go @@ -2,6 +2,7 @@ package libp2p import ( "context" + "os" "time" "github.com/ipfs/go-datastore" @@ -29,21 +30,44 @@ type RoutingOptionArgs struct { type RoutingOption func(args RoutingOptionArgs) (routing.Routing, error) +var noopRouter = routinghelpers.Null{} + func constructDefaultHTTPRouters(cfg *config.Config) ([]*routinghelpers.ParallelRouter, error) { var routers []*routinghelpers.ParallelRouter + httpRetrievalEnabled := cfg.HTTPRetrieval.Enabled.WithDefault(config.DefaultHTTPRetrievalEnabled) + + // Use config.DefaultHTTPRouters if custom override was sent via config.EnvHTTPRouters + // or if user did not set any preference in cfg.Routing.DelegatedRouters + var httpRouterEndpoints []string + if os.Getenv(config.EnvHTTPRouters) != "" || len(cfg.Routing.DelegatedRouters) == 0 { + httpRouterEndpoints = config.DefaultHTTPRouters + } else { + httpRouterEndpoints = cfg.Routing.DelegatedRouters + } + // Append HTTP routers for additional speed - for _, endpoint := range config.DefaultHTTPRouters { - httpRouter, err := irouting.ConstructHTTPRouter(endpoint, cfg.Identity.PeerID, httpAddrsFromConfig(cfg.Addresses), cfg.Identity.PrivKey) + for _, endpoint := range httpRouterEndpoints { + httpRouter, err := irouting.ConstructHTTPRouter(endpoint, cfg.Identity.PeerID, httpAddrsFromConfig(cfg.Addresses), cfg.Identity.PrivKey, httpRetrievalEnabled) if err != nil { return nil, err } - + // Mapping router to /routing/v1/* endpoints + // https://specs.ipfs.tech/routing/http-routing-v1/ r := &irouting.Composer{ - GetValueRouter: routinghelpers.Null{}, - PutValueRouter: routinghelpers.Null{}, - ProvideRouter: routinghelpers.Null{}, // modify this when indexers supports provide - FindPeersRouter: routinghelpers.Null{}, - FindProvidersRouter: httpRouter, + GetValueRouter: httpRouter, // GET /routing/v1/ipns + PutValueRouter: httpRouter, // PUT /routing/v1/ipns + ProvideRouter: noopRouter, // we don't have spec for sending provides to /routing/v1 (revisit once https://github.com/ipfs/specs/pull/378 or similar is ratified) + FindPeersRouter: httpRouter, // /routing/v1/peers + FindProvidersRouter: httpRouter, // /routing/v1/providers + } + + if endpoint == config.CidContactRoutingURL { + // Special-case: cid.contact only supports /routing/v1/providers/cid + // we disable other endpoints to avoid sending requests that always fail + r.GetValueRouter = noopRouter + r.PutValueRouter = noopRouter + r.ProvideRouter = noopRouter + r.FindPeersRouter = noopRouter } routers = append(routers, &routinghelpers.ParallelRouter{ @@ -119,7 +143,7 @@ func constructDHTRouting(mode dht.ModeOpt) RoutingOption { } // ConstructDelegatedRouting is used when Routing.Type = "custom" -func ConstructDelegatedRouting(routers config.Routers, methods config.Methods, peerID string, addrs config.Addresses, privKey string) RoutingOption { +func ConstructDelegatedRouting(routers config.Routers, methods config.Methods, peerID string, addrs config.Addresses, privKey string, httpRetrieval bool) RoutingOption { return func(args RoutingOptionArgs) (routing.Routing, error) { return irouting.Parse(routers, methods, &irouting.ExtraDHTParams{ @@ -130,9 +154,10 @@ func ConstructDelegatedRouting(routers config.Routers, methods config.Methods, p Context: args.Ctx, }, &irouting.ExtraHTTPParams{ - PeerID: peerID, - Addrs: httpAddrsFromConfig(addrs), - PrivKeyB64: privKey, + PeerID: peerID, + Addrs: httpAddrsFromConfig(addrs), + PrivKeyB64: privKey, + HTTPRetrieval: httpRetrieval, }, ) } diff --git a/core/node/provider.go b/core/node/provider.go index 78f0761cc14776c7860d67feac6bdb41928c5e31..79fed2a4f99bcfbd5d4235c4c57018ec94e51c4f 100644 --- a/core/node/provider.go +++ b/core/node/provider.go @@ -7,8 +7,10 @@ import ( "github.com/ipfs/boxo/blockstore" "github.com/ipfs/boxo/fetcher" + "github.com/ipfs/boxo/mfs" pin "github.com/ipfs/boxo/pinning/pinner" provider "github.com/ipfs/boxo/provider" + "github.com/ipfs/go-cid" "github.com/ipfs/kubo/repo" irouting "github.com/ipfs/kubo/routing" "go.uber.org/fx" @@ -19,14 +21,15 @@ import ( // and in 'ipfs stats provide' report. const sampledBatchSize = 1000 -func ProviderSys(reprovideInterval time.Duration, acceleratedDHTClient bool) fx.Option { +func ProviderSys(reprovideInterval time.Duration, acceleratedDHTClient bool, provideWorkerCount int) fx.Option { 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), + provider.ProvideWorkerCount(provideWorkerCount), } - if !acceleratedDHTClient { + if !acceleratedDHTClient && reprovideInterval > 0 { // 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 @@ -68,7 +71,7 @@ func ProviderSys(reprovideInterval time.Duration, acceleratedDHTClient bool) fx. 🔔🔔🔔 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. +This means your content could be 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, @@ -97,7 +100,7 @@ https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtcli 🔔🔔🔔 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. +This means your content could be 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. @@ -129,28 +132,22 @@ https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtcli // ONLINE/OFFLINE // OnlineProviders groups units managing provider routing records online -func OnlineProviders(useStrategicProviding bool, reprovideStrategy string, reprovideInterval time.Duration, acceleratedDHTClient bool) fx.Option { - if useStrategicProviding { +func OnlineProviders(provide bool, reprovideStrategy string, reprovideInterval time.Duration, acceleratedDHTClient bool, provideWorkerCount int) fx.Option { + if !provide { return OfflineProviders() } var keyProvider fx.Option switch reprovideStrategy { - case "all", "": - keyProvider = fx.Provide(newProvidingStrategy(false, false)) - case "roots": - keyProvider = fx.Provide(newProvidingStrategy(true, true)) - case "pinned": - keyProvider = fx.Provide(newProvidingStrategy(true, false)) - case "flat": - keyProvider = fx.Provide(provider.NewBlockstoreProvider) + case "all", "", "roots", "pinned", "mfs", "pinned+mfs", "flat": + keyProvider = fx.Provide(newProvidingStrategy(reprovideStrategy)) default: return fx.Error(fmt.Errorf("unknown reprovider strategy %q", reprovideStrategy)) } return fx.Options( keyProvider, - ProviderSys(reprovideInterval, acceleratedDHTClient), + ProviderSys(reprovideInterval, acceleratedDHTClient, provideWorkerCount), ) } @@ -159,32 +156,67 @@ func OfflineProviders() fx.Option { return fx.Provide(provider.NewNoopProvider) } -func newProvidingStrategy(onlyPinned, onlyRoots bool) interface{} { +func mfsProvider(mfsRoot *mfs.Root, fetcher fetcher.Factory) provider.KeyChanFunc { + return func(ctx context.Context) (<-chan cid.Cid, error) { + err := mfsRoot.FlushMemFree(ctx) + if err != nil { + return nil, fmt.Errorf("error flushing mfs, cannot provide MFS: %w", err) + } + rootNode, err := mfsRoot.GetDirectory().GetNode() + if err != nil { + return nil, fmt.Errorf("error loading mfs root, cannot provide MFS: %w", err) + } + + kcf := provider.NewDAGProvider(rootNode.Cid(), fetcher) + return kcf(ctx) + } +} + +func mfsRootProvider(mfsRoot *mfs.Root) provider.KeyChanFunc { + return func(ctx context.Context) (<-chan cid.Cid, error) { + rootNode, err := mfsRoot.GetDirectory().GetNode() + if err != nil { + return nil, fmt.Errorf("error loading mfs root, cannot provide MFS: %w", err) + } + ch := make(chan cid.Cid, 1) + ch <- rootNode.Cid() + close(ch) + return ch, nil + } +} + +func newProvidingStrategy(strategy string) interface{} { type input struct { fx.In - Pinner pin.Pinner - Blockstore blockstore.Blockstore - IPLDFetcher fetcher.Factory `name:"ipldFetcher"` + Pinner pin.Pinner + Blockstore blockstore.Blockstore + OfflineIPLDFetcher fetcher.Factory `name:"offlineIpldFetcher"` + OfflineUnixFSFetcher fetcher.Factory `name:"offlineUnixfsFetcher"` + MFSRoot *mfs.Root } return func(in input) provider.KeyChanFunc { - // Pinner-related CIDs will be buffered in memory to avoid - // deadlocking the pinner when the providing process is slow. - - if onlyRoots { - return provider.NewBufferedProvider( - provider.NewPinnedProvider(true, in.Pinner, in.IPLDFetcher), + switch strategy { + case "roots": + return provider.NewBufferedProvider(provider.NewPinnedProvider(true, in.Pinner, in.OfflineIPLDFetcher)) + case "pinned": + return provider.NewBufferedProvider(provider.NewPinnedProvider(false, in.Pinner, in.OfflineIPLDFetcher)) + case "pinned+mfs": + return provider.NewPrioritizedProvider( + provider.NewBufferedProvider(provider.NewPinnedProvider(false, in.Pinner, in.OfflineIPLDFetcher)), + mfsProvider(in.MFSRoot, in.OfflineUnixFSFetcher), ) - } - - if onlyPinned { - return provider.NewBufferedProvider( - provider.NewPinnedProvider(false, in.Pinner, in.IPLDFetcher), + case "mfs": + return mfsProvider(in.MFSRoot, in.OfflineUnixFSFetcher) + case "flat": + return provider.NewBlockstoreProvider(in.Blockstore) + default: // "all", "" + return provider.NewPrioritizedProvider( + provider.NewPrioritizedProvider( + provider.NewBufferedProvider(provider.NewPinnedProvider(true, in.Pinner, in.OfflineIPLDFetcher)), + mfsRootProvider(in.MFSRoot), + ), + provider.NewBlockstoreProvider(in.Blockstore), ) } - - return provider.NewPrioritizedProvider( - provider.NewBufferedProvider(provider.NewPinnedProvider(true, in.Pinner, in.IPLDFetcher)), - provider.NewBlockstoreProvider(in.Blockstore), - ) } } diff --git a/docs/changelogs/v0.34.md b/docs/changelogs/v0.34.md index 670c6244b98aa38dc780ea26a972e802bf89dbf1..2b4761de1f084c8390b2477a3ac6728f6b4593ec 100644 --- a/docs/changelogs/v0.34.md +++ b/docs/changelogs/v0.34.md @@ -1,5 +1,9 @@ # Kubo changelog v0.34 +<a href="http://ipshipyard.com/"><img align="right" src="https://github.com/user-attachments/assets/39ed3504-bb71-47f6-9bf8-cb9a1698f272" /></a> + +This release was brought to you by the [Shipyard](http://ipshipyard.com/) team. + - [v0.34.0](#v0340) - [v0.34.1](#v0341) @@ -144,7 +148,7 @@ Use [`Reprovider.Strategy`](https://github.com/ipfs/kubo/blob/master/docs/config - fix: switch away from IPFS_LOG_LEVEL (#10694) ([ipfs/kubo#10694](https://github.com/ipfs/kubo/pull/10694)) - Merge release v0.33.2 ([ipfs/kubo#10713](https://github.com/ipfs/kubo/pull/10713)) - Remove unused TimeParts struct (#10708) ([ipfs/kubo#10708](https://github.com/ipfs/kubo/pull/10708)) - - fix(rpc): restore and reprecate `bitswap reprovide` (#10699) ([ipfs/kubo#10699](https://github.com/ipfs/kubo/pull/10699)) + - fix(rpc): restore and deprecate `bitswap reprovide` (#10699) ([ipfs/kubo#10699](https://github.com/ipfs/kubo/pull/10699)) - docs(release): update RELEASE_CHECKLIST.md after v0.33.1 (#10697) ([ipfs/kubo#10697](https://github.com/ipfs/kubo/pull/10697)) - docs: update min requirements (#10687) ([ipfs/kubo#10687](https://github.com/ipfs/kubo/pull/10687)) - Merge release v0.33.1 ([ipfs/kubo#10698](https://github.com/ipfs/kubo/pull/10698)) diff --git a/docs/changelogs/v0.35.md b/docs/changelogs/v0.35.md new file mode 100644 index 0000000000000000000000000000000000000000..d94063e0cf4b95ce738cfc3a5cd610e063e37184 --- /dev/null +++ b/docs/changelogs/v0.35.md @@ -0,0 +1,413 @@ +# Kubo changelog v0.35 + +<a href="http://ipshipyard.com/"><img align="right" src="https://github.com/user-attachments/assets/39ed3504-bb71-47f6-9bf8-cb9a1698f272" /></a> + +This release was brought to you by the [Shipyard](http://ipshipyard.com/) team. + +- [v0.35.0](#v0340) + +## v0.35.0 + +- [Overview](#overview) +- [🔦 Highlights](#-highlights) + - [Opt-in HTTP Retrieval client](#opt-in-http-retrieval-client) + - [Dedicated `Reprovider.Strategy` for MFS](#dedicated-reproviderstrategy-for-mfs) + - [Experimental support for MFS as a FUSE mount point](#experimental-support-for-mfs-as-a-fuse-mount-point) + - [Grid view in WebUI](#grid-view-in-webui) + - [Enhanced DAG-Shaping Controls](#enhanced-dag-shaping-controls) + - [New DAG-Shaping `ipfs add` Options](#new-dag-shaping-ipfs-add-options) + - [Persistent DAG-Shaping `Import.*` Configuration](#persistent-dag-shaping-import-configuration) + - [Updated DAG-Shaping `Import` Profiles](#updated-dag-shaping-import-profiles) + - [`Datastore` Metrics Now Opt-In](#datastore-metrics-now-opt-in) + - [Improved performance of data onboarding](#improved-performance-of-data-onboarding) + - [Fast `ipfs add` in online mode](#fast-ipfs-add-in-online-mode) + - [Optimized, dedicated queue for providing fresh CIDs](#optimized-dedicated-queue-for-providing-fresh-cids) + - [Deprecated `ipfs stats provider`](#deprecated-ipfs-stats-provider) + - [New `Bitswap` configuration options](#new-bitswap-configuration-options) + - [New `Routing` configuration options](#new-routing-configuration-options) + - [New Pebble database format config](#new-pebble-database-format-config) + - [New environment variables](#new-environment-variables) + - [Improved Log Output Setting](#improved-log-output-setting) + - [New Repo Lock Optional Wait](#new-repo-lock-optional-wait) + - [📦️ Important dependency updates](#-important-dependency-updates) +- [📝 Changelog](#-changelog) +- [👨👩👧👦 Contributors](#-contributors) + +### Overview + +This release brings significant UX and performance improvements to data onboarding, provisioning, and retrieval systems. + +New configuration options let you customize the shape of UnixFS DAGs generated during the data import, control the scope of DAGs announced on the Amino DHT, select which delegated routing endpoints are queried, and choose whether to enable HTTP retrieval alongside Bitswap over Libp2p. + +Continue reading for more details. + + +### 🔦 Highlights + +#### Opt-in HTTP Retrieval client + +This release adds experimental support for retrieving blocks directly over HTTPS (HTTP/2), complementing the existing Bitswap over Libp2p. + +The opt-in client enables Kubo to use [delegated routing](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters) results with `/tls/http` multiaddrs, connecting to HTTPS servers that support [Trustless HTTP Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway)'s Block Responses (`?format=raw`, `application/vnd.ipld.raw`). Fetching blocks via HTTPS (HTTP/2) simplifies infrastructure and reduces costs for storage providers by leveraging HTTP caching and CDNs. + +To enable this feature for testing and feedback, set: + +```console +$ ipfs config --json HTTPRetrieval.Enabled true +``` + +See [`HTTPRetrieval`](https://github.com/ipfs/kubo/blob/master/docs/config.md#httpretrieval) for more details. + +#### Dedicated `Reprovider.Strategy` for MFS + +The [Mutable File System (MFS)](https://docs.ipfs.tech/concepts/glossary/#mfs) in Kubo is a UnixFS filesystem managed with [`ipfs files`](https://docs.ipfs.tech/reference/kubo/cli/#ipfs-files) commands. It supports familiar file operations like cp and mv within a folder-tree structure, automatically updating a MerkleDAG and a "root CID" that reflects the current MFS state. Files in MFS are protected from garbage collection, offering a simpler alternative to `ipfs pin`. This makes it a popular choice for tools like [IPFS Desktop](https://docs.ipfs.tech/install/ipfs-desktop/) and the [WebUI](https://github.com/ipfs/ipfs-webui/#readme). + +Previously, the `pinned` reprovider strategy required manual pin management: each dataset update meant pinning the new version and unpinning the old one. Now, new strategies—`mfs` and `pinned+mfs`—let users limit announcements to data explicitly placed in MFS. This simplifies updating datasets and announcing only the latest version to the Amino DHT. + +Users relying on the `pinned` strategy can switch to `pinned+mfs` and use MFS alone to manage updates and announcements, eliminating the need for manual pinning and unpinning. We hope this makes it easier to publish just the data that matters to you. + +See [`Reprovider.Strategy`](https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy) for more details. + +#### Experimental support for MFS as a FUSE mount point + +The MFS root (filesystem behind the `ipfs files` API) is now available as a read/write FUSE mount point at `Mounts.MFS`. This filesystem is mounted in the same way as `Mounts.IPFS` and `Mounts.IPNS` when running `ipfs mount` or `ipfs daemon --mount`. + +Note that the operations supported by the MFS FUSE mountpoint are limited, since MFS doesn't store file attributes. + +See [`Mounts`](https://github.com/ipfs/kubo/blob/master/docs/config.md#mounts) and [`docs/fuse.md`](https://github.com/ipfs/kubo/blob/master/docs/fuse.md) for more details. + +#### Grid view in WebUI + +The WebUI, accessible at http://127.0.0.1:5001/webui/, now includes support for the grid view on the _Files_ screen: + +>  + +#### Enhanced DAG-Shaping Controls + +This release advances CIDv1 support by introducing fine-grained control over UnixFS DAG shaping during data ingestion with the `ipfs add` command. + +Wider DAG trees (more links per node, higher fanout, larger thresholds) are beneficial for large files and directories with many files, reducing tree depth and lookup latency in high-latency networks, but they increase node size, straining memory and CPU on resource-constrained devices. Narrower trees (lower link count, lower fanout, smaller thresholds) are preferable for smaller directories, frequent updates, or low-power clients, minimizing overhead and ensuring compatibility, though they may increase traversal steps for very large datasets. + +Kubo now allows users to act on these tradeoffs and customize the width of the DAG created by `ipfs add` command. + +##### New DAG-Shaping `ipfs add` Options + +Three new options allow you to override default settings for specific import operations: + +- `--max-file-links`: Sets the maximum number of child links for a single file chunk. +- `--max-directory-links`: Defines the maximum number of child entries in a "basic" (single-chunk) directory. + - Note: Directories exceeding this limit or the `Import.UnixFSHAMTDirectorySizeThreshold` are converted to HAMT-based (sharded across multiple blocks) structures. +- `--max-hamt-fanout`: Specifies the maximum number of child nodes for HAMT internal structures. + +##### Persistent DAG-Shaping `Import.*` Configuration + +You can set default values for these options using the following configuration settings: +- [`Import.UnixFSFileMaxLinks`](https://github.com/ipfs/kubo/blob/master/docs/config.md#importunixfsfilemaxlinks) +- [`Import.UnixFSDirectoryMaxLinks`](https://github.com/ipfs/kubo/blob/master/docs/config.md#importunixfsdirectorymaxlinks) +- [`Import.UnixFSHAMTDirectoryMaxFanout`](https://github.com/ipfs/kubo/blob/master/docs/config.md#importunixfshamtdirectorymaxfanout) +- [`Import.UnixFSHAMTDirectorySizeThreshold`](https://github.com/ipfs/kubo/blob/master/docs/config.md#importunixfshamtdirectorysizethreshold) + +##### Updated DAG-Shaping `Import` Profiles + +The release updated configuration [profiles](https://github.com/ipfs/kubo/blob/master/docs/config.md#profiles) to incorporate these new `Import.*` settings: +- Updated Profile: `test-cid-v1` now includes current defaults as explicit `Import.UnixFSFileMaxLinks=174`, `Import.UnixFSDirectoryMaxLinks=0`, `Import.UnixFSHAMTDirectoryMaxFanout=256` and `Import.UnixFSHAMTDirectorySizeThreshold=256KiB` +- New Profile: `test-cid-v1-wide` adopts experimental directory DAG-shaping defaults, increasing the maximum file DAG width from 174 to 1024, HAMT fanout from 256 to 1024, and raising the HAMT directory sharding threshold from 256KiB to 1MiB, aligning with 1MiB file chunks. + - Feedback: Try it out and share your thoughts at [discuss.ipfs.tech/t/should-we-profile-cids](https://discuss.ipfs.tech/t/should-we-profile-cids/18507) or [ipfs/specs#499](https://github.com/ipfs/specs/pull/499). + +> [!TIP] +> Apply one of CIDv1 test [profiles](https://github.com/ipfs/kubo/blob/master/docs/config.md#profiles) with `ipfs config profile apply test-cid-v1[-wide]`. + +#### `Datastore` Metrics Now Opt-In + +To reduce overhead in the default configuration, datastore metrics are no longer enabled by default when initializing a Kubo repository with `ipfs init`. +Metrics prefixed with `<dsname>_datastore` (e.g., `flatfs_datastore_...`, `leveldb_datastore_...`) are not exposed unless explicitly enabled. For a complete list of affected default metrics, refer to [`prometheus_metrics_added_by_measure_profile`](https://github.com/ipfs/kubo/blob/master/test/sharness/t0119-prometheus-data/prometheus_metrics_added_by_measure_profile). + +Convenience opt-in [profiles](https://github.com/ipfs/kubo/blob/master/docs/config.md#profiles) can be enabled at initialization time with `ipfs init --profile`: `flatfs-measure`, `pebbleds-measure`, `badgerds-measure` + +It is also possible to manually add the `measure` wrapper. See examples in [`Datastore.Spec`](https://github.com/ipfs/kubo/blob/master/docs/config.md#datastorespec) documentation. + +#### Improved performance of data onboarding + +This Kubo release significantly improves both the speed of ingesting data via `ipfs add` and announcing newly produced CIDs to Amino DHT. + +##### Fast `ipfs add` in online mode + +Adding a large directory of data when `ipfs daemon` was running in online mode took a long time. A significant amount of this time was spent writing to and reading from the persisted provider queue. Due to this, many users had to shut down the daemon and perform data import in offline mode. This release fixes this known limitation, significantly improving the speed of `ipfs add`. + +> [!IMPORTANT] +> Performing `ipfs add` of 10GiB file would take about 30 minutes. +> Now it takes close to 30 seconds. + +Kubo v0.34: + +```console +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-100M > /dev/null + 100.00 MiB / 100.00 MiB [=====================================================================] 100.00% +real 0m6.464s + +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-1G > /dev/null + 1000.00 MiB / 1000.00 MiB [===================================================================] 100.00% +real 1m10.542s + +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-10G > /dev/null + 10.00 GiB / 10.00 GiB [=======================================================================] 100.00% +real 24m5.744s +``` + +Kubo v0.35: + +```console +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-100M > /dev/null + 100.00 MiB / 100.00 MiB [=====================================================================] 100.00% +real 0m0.326s + +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-1G > /dev/null + 1.00 GiB / 1.00 GiB [=========================================================================] 100.00% +real 0m2.819s + +$ time kubo/cmd/ipfs/ipfs add -r /tmp/testfiles-10G > /dev/null + 10.00 GiB / 10.00 GiB [=======================================================================] 100.00% +real 0m28.405s +``` + +##### Optimized, dedicated queue for providing fresh CIDs + +From `kubo` [`v0.33.0`](https://github.com/ipfs/kubo/releases/tag/v0.33.0), +Bitswap stopped advertising newly added and received blocks to the DHT. Since +then `boxo/provider` is responsible for the first time provide and the recurring reprovide logic. Prior +to `v0.35.0`, provides and reprovides were handled together in batches, leading +to delays in initial advertisements (provides). + +Provides and Reprovides now have separate queues, allowing for immediate +provide of new CIDs and optimised batching of reprovides. + +###### New `Provider` configuration options + +This change introduces a new configuration options: + +- [`Provider.Enabled`](https://github.com/ipfs/kubo/blob/master/docs/config.md#providerenabled) is a global flag for disabling both [Provider](https://github.com/ipfs/kubo/blob/master/docs/config.md#provider) and [Reprovider](https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider) systems (announcing new/old CIDs to amino DHT). +- [`Provider.WorkerCount`](https://github.com/ipfs/kubo/blob/master/docs/config.md#providerworkercount) for limiting the number of concurrent provide operations, allows for fine-tuning the trade-off between announcement speed and system load when announcing new CIDs. +- Removed `Experimental.StrategicProviding`. Superseded by `Provider.Enabled`, `Reprovider.Interval` and [`Reprovider.Strategy`](https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy). + +> [!TIP] +> Users who need to provide large volumes of content immediately should consider setting `Routing.AcceleratedDHTClient` to `true`. If that is not enough, consider adjusting `Provider.WorkerCount` to a higher value. + +###### Deprecated `ipfs stats provider` + +Since the `ipfs stats provider` command was displaying statistics for both +provides and reprovides, this command isn't relevant anymore after separating +the two queues. + +The successor command is `ipfs stats reprovide`, showing the same statistics, +but for reprovides only. + +> [!NOTE] +> `ipfs stats provider` still works, but is marked as deprecated and will be removed in a future release. Be mindful that the command provides only statistics about reprovides (similar to `ipfs stats reprovide`) and not the new provide queue (this will be fixed as a part of wider refactor planned for a future release). + +#### New `Bitswap` configuration options + +- [`Bitswap.Libp2pEnabled`](https://github.com/ipfs/kubo/blob/master/docs/config.md#bitswaplibp2penabled) determines whether Kubo will use Bitswap over libp2p (both client and server). +- [`Bitswap.ServerEnabled`](https://github.com/ipfs/kubo/blob/master/docs/config.md#bitswapserverenabled) controls whether Kubo functions as a Bitswap server to host and respond to block requests. +- [`Internal.Bitswap.ProviderSearchMaxResults`](https://github.com/ipfs/kubo/blob/master/docs/config.md#internalbitswapprovidersearchmaxresults) for adjusting the maximum number of providers bitswap client should aim at before it stops searching for new ones. + +#### New `Routing` configuration options + +- [`Routing.IgnoreProviders`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingignoreproviders) allows ignoring specific peer IDs when returned by the content routing system as providers of content. + - Simplifies testing `HTTPRetrieval.Enabled` in setups where Bitswap over Libp2p and HTTP retrieval is served under different PeerIDs. +- [`Routing.DelegatedRouters`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters) allows customizing HTTP routers used by Kubo when `Routing.Type` is set to `auto` or `autoclient`. + - Users are now able to adjust the default routing system and directly query custom routers for increased resiliency or when dataset is too big and CIDs are not announced on Amino DHT. + +> [!TIP] +> +> For example, to use Pinata's routing endpoint in addition to IPNI at `cid.contact`: +> +> ```console +> $ ipfs config --json Routing.DelegatedRouters '["https://cid.contact","https://indexer.pinata.cloud"]' +> ``` + +#### New Pebble database format config + +This Kubo release provides node operators with more control over [Pebble's `FormatMajorVersion`](https://github.com/cockroachdb/pebble/tree/master?tab=readme-ov-file#format-major-versions). This allows testing a new Kubo release without automatically migrating Pebble datastores, keeping the ability to switch back to older Kubo. + +When IPFS is initialized to use the pebbleds datastore (opt-in via `ipfs init --profile=pebbleds`), the latest pebble database format is configured in the pebble datastore config as `"formatMajorVersion"`. Setting this in the datastore config prevents automatically upgrading to the latest available version when Kubo is upgraded. If a later version becomes available, the Kubo daemon prints a startup message to indicate this. The user can them update the config to use the latest format when they are certain a downgrade will not be necessary. + +Without the `"formatMajorVersion"` in the pebble datastore config, the database format is automatically upgraded to the latest version. If this happens, then it is possible a downgrade back to the previous version of Kubo will not work if new format is not compatible with the pebble datastore in the previous version of Kubo. + +When installing a new version of Kubo when `"formatMajorVersion"` is configured, automatic repository migration (`ipfs daemon with --migrate=true`) does not upgrade this to the latest available version. This is done because a user may have reasons not to upgrade the pebble database format, and may want to be able to downgrade Kubo if something else is not working in the new version. If the configured pebble database format in the old Kubo is not supported in the new Kubo, then the configured version must be updated and the old Kubo run, before installing the new Kubo. + +See other caveats and configuration options at [`kubo/docs/datastores.md#pebbleds`](https://github.com/ipfs/kubo/blob/master/docs/datastores.md#pebbleds) + +#### New environment variables + +The [`environment-variables.md`](https://github.com/ipfs/kubo/blob/master/docs/environment-variables.md) was extended with two new features: + +##### Improved Log Output Setting + +When stderr and/or stdout options are configured or specified by the `GOLOG_OUTPUT` environ variable, log only to the output(s) specified. For example: + +- `GOLOG_OUTPUT="stderr"` logs only to stderr +- `GOLOG_OUTPUT="stdout"` logs only to stdout +- `GOLOG_OUTPUT="stderr+stdout"` logs to both stderr and stdout + +##### New Repo Lock Optional Wait + +The environment variable `IPFS_WAIT_REPO_LOCK` specifies the amount of time to wait for the repo lock. Set the value of this variable to a string that can be [parsed](https://pkg.go.dev/time@go1.24.3#ParseDuration) as a golang `time.Duration`. For example: +``` +IPFS_WAIT_REPO_LOCK="15s" +``` + +If the lock cannot be acquired because someone else has the lock, and `IPFS_WAIT_REPO_LOCK` is set to a valid value, then acquiring the lock is retried every second until the lock is acquired or the specified wait time has elapsed. + +#### 📦️ Important dependency updates + +- update `boxo` to [v0.30.0](https://github.com/ipfs/boxo/releases/tag/v0.30.0) +- update `ipfs-webui` to [v4.7.0](https://github.com/ipfs/ipfs-webui/releases/tag/v4.7.0) +- update `go-ds-pebble` to [v0.5.0](https://github.com/ipfs/go-ds-pebble/releases/tag/v0.5.0) + - update `pebble` to [v2.0.3](https://github.com/cockroachdb/pebble/releases/tag/v2.0.3) +- update `go-libp2p-pubsub` to [v0.13.1](https://github.com:/libp2p/go-libp2p-pubsub/releases/tag/v0.13.1) +- update `go-libp2p-kad-dht` to [v0.33.1](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.33.1) (incl. [v0.33.0](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.33.0), [v0.32.0](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.32.0), [v0.31.0](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.31.0)) +- update `go-log` to [v2.6.0](https://github.com/ipfs/go-log/releases/tag/v2.6.0) +- update `p2p-forge/client` to [v0.5.1](https://github.com/ipshipyard/p2p-forge/releases/tag/v0.5.1) + +### 📝 Changelog + +<details><summary>Full Changelog</summary> + +- github.com/ipfs/kubo: + - chore(version): 0.35.0 + - fix: go-libp2p-kad-dht v0.33.1 (#10814) ([ipfs/kubo#10814](https://github.com/ipfs/kubo/pull/10814)) + - fix: p2p-forge v0.5.1 ignoring /p2p-circuit (#10813) ([ipfs/kubo#10813](https://github.com/ipfs/kubo/pull/10813)) + - chore(version): 0.35.0-rc2 + - fix(fuse): ipns error handling and friendly errors (#10807) ([ipfs/kubo#10807](https://github.com/ipfs/kubo/pull/10807)) + - fix(config): wire up `Provider.Enabled` flag (#10804) ([ipfs/kubo#10804](https://github.com/ipfs/kubo/pull/10804)) + - docs(changelog): go-libp2p-kad-dht + - chore(version): 0.35.0-rc1 + - feat: IPFS_WAIT_REPO_LOCK (#10797) ([ipfs/kubo#10797](https://github.com/ipfs/kubo/pull/10797)) + - logging: upgrade to go-log/v2 v2.6.0 (#10798) ([ipfs/kubo#10798](https://github.com/ipfs/kubo/pull/10798)) + - chore: ensure /mfs is present in docker + - feat(fuse): Expose MFS as FUSE mount point (#10781) ([ipfs/kubo#10781](https://github.com/ipfs/kubo/pull/10781)) + - feat: opt-in http retrieval client (#10772) ([ipfs/kubo#10772](https://github.com/ipfs/kubo/pull/10772)) + - Update go-libp2p-pubsub to v0.13.1 (#10795) ([ipfs/kubo#10795](https://github.com/ipfs/kubo/pull/10795)) + - feat(config): ability to disable Bitswap fully or just server (#10782) ([ipfs/kubo#10782](https://github.com/ipfs/kubo/pull/10782)) + - refactor: make datastore metrics opt-in (#10788) ([ipfs/kubo#10788](https://github.com/ipfs/kubo/pull/10788)) + - feat(pebble): support pinning `FormatMajorVersion` (#10789) ([ipfs/kubo#10789](https://github.com/ipfs/kubo/pull/10789)) + - feat: `Provider.WorkerCount` and `stats reprovide` (#10779) ([ipfs/kubo#10779](https://github.com/ipfs/kubo/pull/10779)) + - Upgrade to Boxo v0.30.0 (#10794) ([ipfs/kubo#10794](https://github.com/ipfs/kubo/pull/10794)) + - docs: use latest fuse package (#10791) ([ipfs/kubo#10791](https://github.com/ipfs/kubo/pull/10791)) + - remove duplicate workds (#10790) ([ipfs/kubo#10790](https://github.com/ipfs/kubo/pull/10790)) + - feat(config): `ipfs add` and `Import` options for controling UnixFS DAG Width (#10774) ([ipfs/kubo#10774](https://github.com/ipfs/kubo/pull/10774)) + - feat(config): expose ProviderSearchMaxResults (#10773) ([ipfs/kubo#10773](https://github.com/ipfs/kubo/pull/10773)) + - feat: ipfs-webui v4.7.0 (#10780) ([ipfs/kubo#10780](https://github.com/ipfs/kubo/pull/10780)) + - feat: partial DAG provides with Reprovider.Strategy=mfs|pinned+mfs (#10754) ([ipfs/kubo#10754](https://github.com/ipfs/kubo/pull/10754)) + - chore: update url + - docs: known issues with file/urlstores (#10768) ([ipfs/kubo#10768](https://github.com/ipfs/kubo/pull/10768)) + - fix: Add IPFS & IPNS path details to error (re. #10762) (#10770) ([ipfs/kubo#10770](https://github.com/ipfs/kubo/pull/10770)) + - docs: Fix typo in v0.34 changelog (#10771) ([ipfs/kubo#10771](https://github.com/ipfs/kubo/pull/10771)) + - Support WithIgnoreProviders() in provider query manager ([ipfs/kubo#10765](https://github.com/ipfs/kubo/pull/10765)) + - Merge release v0.34.1 ([ipfs/kubo#10766](https://github.com/ipfs/kubo/pull/10766)) + - fix: reprovides warning (#10761) ([ipfs/kubo#10761](https://github.com/ipfs/kubo/pull/10761)) + - Merge release v0.34.0 ([ipfs/kubo#10759](https://github.com/ipfs/kubo/pull/10759)) + - feat: ipfs-webui v4.6 (#10756) ([ipfs/kubo#10756](https://github.com/ipfs/kubo/pull/10756)) + - docs(readme): update min. requirements + cleanup (#10750) ([ipfs/kubo#10750](https://github.com/ipfs/kubo/pull/10750)) + - Upgrade to Boxo v0.29.1 (#10755) ([ipfs/kubo#10755](https://github.com/ipfs/kubo/pull/10755)) + - Nonfunctional (#10753) ([ipfs/kubo#10753](https://github.com/ipfs/kubo/pull/10753)) + - provider: buffer pin providers ([ipfs/kubo#10746](https://github.com/ipfs/kubo/pull/10746)) + - chore: 0.35.0-dev +- github.com/ipfs/boxo (v0.29.1 -> v0.30.0): + - Release v0.30.0 ([ipfs/boxo#915](https://github.com/ipfs/boxo/pull/915)) + - feat(bitswap): add option to disable Bitswap server (#911) ([ipfs/boxo#911](https://github.com/ipfs/boxo/pull/911)) + - provider: dedicated provide queue (#907) ([ipfs/boxo#907](https://github.com/ipfs/boxo/pull/907)) + - provider: deduplicate cids in queue (#910) ([ipfs/boxo#910](https://github.com/ipfs/boxo/pull/910)) + - feat(unixfs/mfs): support MaxLinks and MaxHAMTFanout (#906) ([ipfs/boxo#906](https://github.com/ipfs/boxo/pull/906)) + - feat(ipld/unixfs): DagModifier: allow specifying MaxLinks per file (#898) ([ipfs/boxo#898](https://github.com/ipfs/boxo/pull/898)) + - feat: NewDAGProvider to walk partial DAGs in offline mode (#905) ([ipfs/boxo#905](https://github.com/ipfs/boxo/pull/905)) + - gateway: check for UseSubdomains with IP addresses (#903) ([ipfs/boxo#903](https://github.com/ipfs/boxo/pull/903)) + - feat(gateway): add cid copy button to directory listings (#899) ([ipfs/boxo#899](https://github.com/ipfs/boxo/pull/899)) + - Improve performance of data onboarding (#888) ([ipfs/boxo#888](https://github.com/ipfs/boxo/pull/888)) + - bitswap: add requestsInFlight metric ([ipfs/boxo#904](https://github.com/ipfs/boxo/pull/904)) + - provider: simplify reprovide (#890) ([ipfs/boxo#890](https://github.com/ipfs/boxo/pull/890)) + - Upgrade to go-libp2p v0.41.1 ([ipfs/boxo#896](https://github.com/ipfs/boxo/pull/896)) + - Update RELEASE.md ([ipfs/boxo#892](https://github.com/ipfs/boxo/pull/892)) + - changelog: document bsnet import path change ([ipfs/boxo#891](https://github.com/ipfs/boxo/pull/891)) + - fix(gateway): preserve query parameters on _redirects ([ipfs/boxo#886](https://github.com/ipfs/boxo/pull/886)) + - bitswap/httpnet: Add WithDenylist option ([ipfs/boxo#877](https://github.com/ipfs/boxo/pull/877)) +- github.com/ipfs/go-block-format (v0.2.0 -> v0.2.1): + - Update version (#60) ([ipfs/go-block-format#60](https://github.com/ipfs/go-block-format/pull/60)) + - Update go-ipfs-util to use boxo (#52) ([ipfs/go-block-format#52](https://github.com/ipfs/go-block-format/pull/52)) +- github.com/ipfs/go-ds-pebble (v0.4.4 -> v0.5.0): + - new version (#53) ([ipfs/go-ds-pebble#53](https://github.com/ipfs/go-ds-pebble/pull/53)) + - Upgrade to pebble v2.0.3 (#45) ([ipfs/go-ds-pebble#45](https://github.com/ipfs/go-ds-pebble/pull/45)) +- github.com/ipfs/go-fs-lock (v0.0.7 -> v0.1.1): + - new version (#48) ([ipfs/go-fs-lock#48](https://github.com/ipfs/go-fs-lock/pull/48)) + - Return original error when WaitLock times out (#47) ([ipfs/go-fs-lock#47](https://github.com/ipfs/go-fs-lock/pull/47)) + - new version (#45) ([ipfs/go-fs-lock#45](https://github.com/ipfs/go-fs-lock/pull/45)) + - Add WaitLock function (#44) ([ipfs/go-fs-lock#44](https://github.com/ipfs/go-fs-lock/pull/44)) + - sync: update CI config files ([ipfs/go-fs-lock#30](https://github.com/ipfs/go-fs-lock/pull/30)) + - sync: update CI config files (#27) ([ipfs/go-fs-lock#27](https://github.com/ipfs/go-fs-lock/pull/27)) + - sync: update CI config files ([ipfs/go-fs-lock#25](https://github.com/ipfs/go-fs-lock/pull/25)) +- github.com/ipfs/go-log/v2 (v2.5.1 -> v2.6.0): + - new version (#155) ([ipfs/go-log#155](https://github.com/ipfs/go-log/pull/155)) + - feat: only log to stderr or to stdout or both if configured (#154) ([ipfs/go-log#154](https://github.com/ipfs/go-log/pull/154)) + - ci: uci/copy-templates ([ipfs/go-log#145](https://github.com/ipfs/go-log/pull/145)) + - sync: update CI config files (#137) ([ipfs/go-log#137](https://github.com/ipfs/go-log/pull/137)) +- github.com/libp2p/go-libp2p-kad-dht (v0.30.2 -> v0.33.1): + - chore: release v0.33.1 (#1088) ([libp2p/go-libp2p-kad-dht#1088](https://github.com/libp2p/go-libp2p-kad-dht/pull/1088)) + - fix(fullrt): mutex cleanup (#1087) ([libp2p/go-libp2p-kad-dht#1087](https://github.com/libp2p/go-libp2p-kad-dht/pull/1087)) + - fix: use correct mutex for reading keyToPeerMap (#1086) ([libp2p/go-libp2p-kad-dht#1086](https://github.com/libp2p/go-libp2p-kad-dht/pull/1086)) + - fix: fullrt kMapLk unlock (#1085) ([libp2p/go-libp2p-kad-dht#1085](https://github.com/libp2p/go-libp2p-kad-dht/pull/1085)) + - chore: release v0.33.0 (#1083) ([libp2p/go-libp2p-kad-dht#1083](https://github.com/libp2p/go-libp2p-kad-dht/pull/1083)) + - fix/updates to use context passed in New function for context cancellation (#1081) ([libp2p/go-libp2p-kad-dht#1081](https://github.com/libp2p/go-libp2p-kad-dht/pull/1081)) + - chore: release v0.31.1 (#1079) ([libp2p/go-libp2p-kad-dht#1079](https://github.com/libp2p/go-libp2p-kad-dht/pull/1079)) + - fix: netsize warning (#1077) ([libp2p/go-libp2p-kad-dht#1077](https://github.com/libp2p/go-libp2p-kad-dht/pull/1077)) + - fix: use correct message type attribute in metrics (#1076) ([libp2p/go-libp2p-kad-dht#1076](https://github.com/libp2p/go-libp2p-kad-dht/pull/1076)) + - chore: bump go-log to v2 (#1074) ([libp2p/go-libp2p-kad-dht#1074](https://github.com/libp2p/go-libp2p-kad-dht/pull/1074)) + - release v0.31.0 (#1072) ([libp2p/go-libp2p-kad-dht#1072](https://github.com/libp2p/go-libp2p-kad-dht/pull/1072)) + - query: ip diversity filter (#1070) ([libp2p/go-libp2p-kad-dht#1070](https://github.com/libp2p/go-libp2p-kad-dht/pull/1070)) + - tests: fix flaky TestProvidesExpire (#1069) ([libp2p/go-libp2p-kad-dht#1069](https://github.com/libp2p/go-libp2p-kad-dht/pull/1069)) + - refactor: replace fmt.Errorf with errors.New when not formatting is required (#1067) ([libp2p/go-libp2p-kad-dht#1067](https://github.com/libp2p/go-libp2p-kad-dht/pull/1067)) + - fix: error on no valid provs (#1065) ([libp2p/go-libp2p-kad-dht#1065](https://github.com/libp2p/go-libp2p-kad-dht/pull/1065)) + - cleanup: remove deprecated opt package (#1064) ([libp2p/go-libp2p-kad-dht#1064](https://github.com/libp2p/go-libp2p-kad-dht/pull/1064)) + - cleanup: fullrt ([libp2p/go-libp2p-kad-dht#1062](https://github.com/libp2p/go-libp2p-kad-dht/pull/1062)) + - fix: remove peerstore no-op (#1063) ([libp2p/go-libp2p-kad-dht#1063](https://github.com/libp2p/go-libp2p-kad-dht/pull/1063)) + - tests: flaky TestSearchValue (dual) (#1060) ([libp2p/go-libp2p-kad-dht#1060](https://github.com/libp2p/go-libp2p-kad-dht/pull/1060)) +- github.com/libp2p/go-libp2p-kbucket (v0.6.5 -> v0.7.0): + - chore: release v0.7.0 (#143) ([libp2p/go-libp2p-kbucket#143](https://github.com/libp2p/go-libp2p-kbucket/pull/143)) + - peerdiversity: export IPGroupKey (#141) ([libp2p/go-libp2p-kbucket#141](https://github.com/libp2p/go-libp2p-kbucket/pull/141)) + - fix: flaky TestUsefulNewPeer (#140) ([libp2p/go-libp2p-kbucket#140](https://github.com/libp2p/go-libp2p-kbucket/pull/140)) + - fix: flaky TestTableFindMultipleBuckets (#139) ([libp2p/go-libp2p-kbucket#139](https://github.com/libp2p/go-libp2p-kbucket/pull/139)) +- github.com/libp2p/go-libp2p-pubsub (v0.13.0 -> v0.13.1): + - feat: WithValidatorData publishing option (#603) ([libp2p/go-libp2p-pubsub#603](https://github.com/libp2p/go-libp2p-pubsub/pull/603)) + - feat: avoid repeated checksum calculations (#599) ([libp2p/go-libp2p-pubsub#599](https://github.com/libp2p/go-libp2p-pubsub/pull/599)) +- github.com/libp2p/go-yamux/v4 (v4.0.1 -> v4.0.2): + - Release v4.0.2 (#124) ([libp2p/go-yamux#124](https://github.com/libp2p/go-yamux/pull/124)) + - fix: remove noisy logs (#116) ([libp2p/go-yamux#116](https://github.com/libp2p/go-yamux/pull/116)) + - check deadline before sending a message (#114) ([libp2p/go-yamux#114](https://github.com/libp2p/go-yamux/pull/114)) + - only check KeepAliveInterval if keep-alives are enabled (#113) ([libp2p/go-yamux#113](https://github.com/libp2p/go-yamux/pull/113)) + - ci: uci/copy-templates ([libp2p/go-yamux#109](https://github.com/libp2p/go-yamux/pull/109)) + +</details> + +### 👨👩👧👦 Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Hector Sanjuan | 16 | +2662/-590 | 71 | +| Guillaume Michel | 27 | +1339/-714 | 69 | +| Andrew Gillis | 22 | +1056/-377 | 54 | +| Sergey Gorbunov | 1 | +962/-42 | 26 | +| Marcin Rataj | 19 | +714/-133 | 47 | +| IGP | 2 | +419/-35 | 11 | +| GITSRC | 1 | +90/-1 | 3 | +| guillaumemichel | 1 | +21/-43 | 1 | +| blockchainluffy | 1 | +27/-26 | 8 | +| web3-bot | 9 | +21/-22 | 13 | +| VersaliX | 1 | +31/-2 | 4 | +| gammazero | 5 | +18/-5 | 5 | +| Hlib Kanunnikov | 1 | +14/-4 | 1 | +| diogo464 | 1 | +6/-7 | 1 | +| Asutorufa | 2 | +7/-1 | 2 | +| Russell Dempsey | 1 | +6/-1 | 1 | +| Steven Allen | 1 | +1/-5 | 1 | +| Michael Vorburger | 2 | +3/-3 | 2 | +| Aayush Rajasekaran | 1 | +2/-2 | 1 | +| sukun | 1 | +1/-1 | 1 | diff --git a/docs/config.md b/docs/config.md index 206d1f719f81dc8584189d4b50365fe929f43b26..e40ac5887e4cdce2b84657ea4494aaac21afd44d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -36,6 +36,9 @@ config file at runtime. - [`AutoTLS.RegistrationToken`](#autotlsregistrationtoken) - [`AutoTLS.RegistrationDelay`](#autotlsregistrationdelay) - [`AutoTLS.CAEndpoint`](#autotlscaendpoint) + - [`Bitswap`](#bitswap) + - [`Bitswap.Libp2pEnabled`](#bitswaplibp2penabled) + - [`Bitswap.ServerEnabled`](#bitswapserverenabled) - [`Bootstrap`](#bootstrap) - [`Datastore`](#datastore) - [`Datastore.StorageMax`](#datastorestoragemax) @@ -79,7 +82,8 @@ config file at runtime. - [`Internal.Bitswap.EngineBlockstoreWorkerCount`](#internalbitswapengineblockstoreworkercount) - [`Internal.Bitswap.EngineTaskWorkerCount`](#internalbitswapenginetaskworkercount) - [`Internal.Bitswap.MaxOutstandingBytesPerPeer`](#internalbitswapmaxoutstandingbytesperpeer) - - [`Internal.Bitswap.ProviderSearchDelay`](#internalbitswapprovidersearchdelay) + - [`Internal.Bitswap.ProviderSearchDelay`](#internalbitswapprovidersearchdelay) + - [`Internal.Bitswap.ProviderSearchMaxResults`](#internalbitswapprovidersearchmaxresults) - [`Internal.UnixFSShardingSizeThreshold`](#internalunixfsshardingsizethreshold) - [`Ipns`](#ipns) - [`Ipns.RepublishPeriod`](#ipnsrepublishperiod) @@ -93,6 +97,7 @@ config file at runtime. - [`Mounts`](#mounts) - [`Mounts.IPFS`](#mountsipfs) - [`Mounts.IPNS`](#mountsipns) + - [`Mounts.MFS`](#mountsmfs) - [`Mounts.FuseAllowOther`](#mountsfuseallowother) - [`Pinning`](#pinning) - [`Pinning.RemoteServices`](#pinningremoteservices) @@ -104,6 +109,10 @@ config file at runtime. - [`Pinning.RemoteServices: Policies.MFS.Enabled`](#pinningremoteservices-policiesmfsenabled) - [`Pinning.RemoteServices: Policies.MFS.PinName`](#pinningremoteservices-policiesmfspinname) - [`Pinning.RemoteServices: Policies.MFS.RepinInterval`](#pinningremoteservices-policiesmfsrepininterval) + - [`Provider`](#provider) + - [`Provider.Enabled`](#providerenabled) + - [`Provider.Strategy`](#providerstrategy) + - [`Provider.WorkerCount`](#providerworkercount) - [`Pubsub`](#pubsub) - [`Pubsub.Enabled`](#pubsubenabled) - [`Pubsub.Router`](#pubsubrouter) @@ -119,6 +128,8 @@ config file at runtime. - [`Routing.Type`](#routingtype) - [`Routing.AcceleratedDHTClient`](#routingaccelerateddhtclient) - [`Routing.LoopbackAddressesOnLanDHT`](#routingloopbackaddressesonlandht) + - [`Routing.IgnoreProviders`](#routingignoreproviders) + - [`Routing.DelegatedRouters`](#routingdelegatedrouters) - [`Routing.Routers`](#routingrouters) - [`Routing.Routers: Type`](#routingrouters-type) - [`Routing.Routers: Parameters`](#routingrouters-parameters) @@ -176,6 +187,13 @@ config file at runtime. - [`DNS`](#dns) - [`DNS.Resolvers`](#dnsresolvers) - [`DNS.MaxCacheTTL`](#dnsmaxcachettl) + - [`HTTPRetrieval`](#httpretrieval) + - [`HTTPRetrieval.Enabled`](#httpretrievalenabled) + - [`HTTPRetrieval.Allowlist`](#httpretrievalallowlist) + - [`HTTPRetrieval.Denylist`](#httpretrievaldenylist) + - [`HTTPRetrieval.NumWorkers`](#httpretrievalnumworkers) + - [`HTTPRetrieval.MaxBlockSize`](#httpretrievalmaxblocksize) + - [`HTTPRetrieval.TLSInsecureSkipVerify`](#httpretrievaltlsinsecureskipverify) - [`Import`](#import) - [`Import.CidVersion`](#importcidversion) - [`Import.UnixFSRawLeaves`](#importunixfsrawleaves) @@ -183,6 +201,10 @@ config file at runtime. - [`Import.HashFunction`](#importhashfunction) - [`Import.BatchMaxNodes`](#importbatchmaxnodes) - [`Import.BatchMaxSize`](#importbatchmaxsize) + - [`Import.UnixFSFileMaxLinks`](#importunixfsfilemaxlinks) + - [`Import.UnixFSDirectoryMaxLinks`](#importunixfsdirectorymaxlinks) + - [`Import.UnixFSHAMTDirectoryMaxFanout`](#importunixfshamtdirectorymaxfanout) + - [`Import.UnixFSHAMTDirectorySizeThreshold`](#importunixfshamtdirectorysizethreshold) - [`Version`](#version) - [`Version.AgentSuffix`](#versionagentsuffix) - [`Version.SwarmCheckEnabled`](#versionswarmcheckenabled) @@ -194,13 +216,17 @@ config file at runtime. - [`local-discovery` profile](#local-discovery-profile) - [`default-networking` profile](#default-networking-profile) - [`flatfs` profile](#flatfs-profile) + - [`flatfs-measure` profile](#flatfs-measure-profile) - [`pebbleds` profile](#pebbleds-profile) + - [`pebbleds-measure` profile](#pebbleds-measure-profile) - [`badgerds` profile](#badgerds-profile) + - [`badgerds-measure` profile](#badgerds-measure-profile) - [`lowpower` profile](#lowpower-profile) - [`announce-off` profile](#announce-off-profile) - [`announce-on` profile](#announce-on-profile) - [`legacy-cid-v0` profile](#legacy-cid-v0-profile) - [`test-cid-v1` profile](#test-cid-v1-profile) + - [`test-cid-v1-wide` profile](#test-cid-v1-wide-profile) - [Types](#types) - [`flag`](#flag) - [`priority`](#priority) @@ -361,7 +387,7 @@ secret. > The RPC API is vast. It grants admin-level access to your Kubo IPFS node, including > configuration and secret key management. > -> - If you need secure access to a subset of RPC, make sure you understand the risk, block everything by default and and allow basic auth access with [`API.Authorizations`](#apiauthorizations) or custom auth middleware running in front of the localhost-only port defined in [`Addresses.API`](#addressesapi). +> - If you need secure access to a subset of RPC, make sure you understand the risk, block everything by default and allow basic auth access with [`API.Authorizations`](#apiauthorizations) or custom auth middleware running in front of the localhost-only port defined in [`Addresses.API`](#addressesapi). > - If you are looking for an interface designed for browsers and public internet, use [`Addresses.Gateway`](#addressesgateway) port instead. Default: `null` @@ -606,6 +632,37 @@ Default: [certmagic.LetsEncryptProductionCA](https://pkg.go.dev/github.com/caddy Type: `optionalString` +## `Bitswap` + +High level client and server configuration of the [Bitswap Protocol](https://specs.ipfs.tech/bitswap-protocol/) over libp2p. + +For internal configuration see [`Internal.Bitswap`](#internalbitswap). + +For HTTP version see [`HTTPRetrieval`](#httpretrieval). + +### `Bitswap.Libp2pEnabled` + +Determines whether Kubo will use Bitswap over libp2p. + +Disabling this, will remove `/ipfs/bitswap/*` protocol support from [libp2p identify](https://github.com/libp2p/specs/blob/master/identify/README.md) responses, effectively shutting down both Bitswap libp2p client and server. + +> [!WARNING] +> Bitswap over libp2p is a core component of Kubo and the oldest way of exchanging blocks. Disabling it completely may cause unpredictable outcomes, such as retrieval failures, if the only providers were libp2p ones. Treat this as experimental and use it solely for testing purposes with `HTTPRetrieval.Enabled`. + +Default: `true` + +Type: `flag` + +### `Bitswap.ServerEnabled` + +Determines whether Kubo functions as a Bitswap server to host and respond to block requests. + +Disabling the server retains client and protocol support in [libp2p identify](https://github.com/libp2p/specs/blob/master/identify/README.md) responses but causes Kubo to reply with "don't have" to all block requests. + +Default: `true` (requires `Bitswap.Libp2pEnabled`) + +Type: `flag` + ## `Bootstrap` Bootstrap is an array of [multiaddrs][multiaddr] of trusted nodes that your node connects to, to fetch other nodes of the network on startup. @@ -725,6 +782,30 @@ datastores to provide extra functionality (eg metrics, logging, or caching). Default: ``` +{ + "mounts": [ + { + "mountpoint": "/blocks", + "path": "blocks", + "prefix": "flatfs.datastore", + "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2", + "sync": false, + "type": "flatfs" + }, + { + "compression": "none", + "mountpoint": "/", + "path": "datastore", + "prefix": "leveldb.datastore", + "type": "levelds" + } + ], + "type": "mount" +} +``` + +With `flatfs-measure` profile: +``` { "mounts": [ { @@ -882,7 +963,7 @@ We are working on developing a modern replacement. To support our efforts, pleas on specified hostnames that point at your Kubo instance. It is useful when you want to run [Path gateway](https://specs.ipfs.tech/http-gateways/path-gateway/) on `example.com/ipfs/cid`, -and [Subdomain gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) on `cid.ipfs.example.org`, +and [Subdomain gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) on `cid.ipfs.example.org`, or limit `verifiable.example.net` to response types defined in [Trustless Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) specification. > [!CAUTION] @@ -920,7 +1001,7 @@ Type: `array[string]` #### `Gateway.PublicGateways: UseSubdomains` A boolean to configure whether the gateway at the hostname should be -a [Subdomain Gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) +a [Subdomain Gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) and provide [Origin isolation](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) between content roots. @@ -1030,7 +1111,7 @@ $ ipfs config --json Gateway.PublicGateways '{"localhost": null }' ### `Gateway` recipes -Below is a list of the most common public gateway setups. +Below is a list of the most common gateway setups. * Public [subdomain gateway](https://docs.ipfs.tech/how-to/address-ipfs-on-web/#subdomain-gateway) at `http://{cid}.ipfs.dweb.link` (each content root gets its own Origin) ```console @@ -1041,6 +1122,7 @@ Below is a list of the most common public gateway setups. } }' ``` + - **Performance:** consider running with `Routing.AcceleratedDHTClient=true` and either `Provider.Enabled=false` (avoid providing newly retrieved blocks) or `Provider.WorkerCount=0` (provide as fast as possible, at the cost of increased load) - **Backward-compatible:** this feature enables automatic redirects from content paths to subdomains: `http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.dweb.link` @@ -1065,6 +1147,7 @@ Below is a list of the most common public gateway setups. } }' ``` + - **Performance:** when running an open, recursive gateway consider running with `Routing.AcceleratedDHTClient=true` and either `Provider.Enabled=false` (avoid providing newly retrieved blocks) or `Provider.WorkerCount=0` (provide as fast as possible, at the cost of increased load) * Public [DNSLink](https://dnslink.io/) gateway resolving every hostname passed in `Host` header. ```console @@ -1114,6 +1197,10 @@ This section includes internal knobs for various subsystems to allow advanced us ### `Internal.Bitswap` `Internal.Bitswap` contains knobs for tuning bitswap resource utilization. + +> [!TIP] +> For high level configuration see [`Bitswap`](#bitswap). + The knobs (below) document how their value should related to each other. Whether their values should be raised or lowered should be determined based on the metrics `ipfs_bitswap_active_tasks`, `ipfs_bitswap_pending_tasks`, @@ -1180,7 +1267,7 @@ deteriorate the quality provided to less aggressively-wanting peers. Type: `optionalInteger` (byte count, `null` means default which is 1MB) -### `Internal.Bitswap.ProviderSearchDelay` +#### `Internal.Bitswap.ProviderSearchDelay` This parameter determines how long to wait before looking for providers outside of bitswap. Other routing systems like the Amino DHT are able to provide results in less than a second, so lowering @@ -1188,17 +1275,16 @@ this number will allow faster peers lookups in some cases. Type: `optionalDuration` (`null` means default which is 1s) -### `Internal.UnixFSShardingSizeThreshold` +#### `Internal.Bitswap.ProviderSearchMaxResults` -The sharding threshold used internally to decide whether a UnixFS directory should be sharded or not. -This value is not strictly related to the size of the UnixFS directory block and any increases in -the threshold should come with being careful that block sizes stay under 2MiB in order for them to be -reliably transferable through the networking stack (IPFS peers on the public swarm tend to ignore requests for blocks bigger than 2MiB). +Maximum number of providers bitswap client should aim at before it stops searching for new ones. +Setting to 0 means unlimited. -Decreasing this value to 1B is functionally equivalent to the previous experimental sharding option to -shard all directories. +Type: `optionalInteger` (`null` means default which is 10) -Type: `optionalBytes` (`null` means default which is 256KiB) +### `Internal.UnixFSShardingSizeThreshold` + +**MOVED:** see [`Import.UnixFSHAMTDirectorySizeThreshold`](#importunixfshamtdirectorysizethreshold) ## `Ipns` @@ -1286,7 +1372,11 @@ Default: `cache` ## `Mounts` -**EXPERIMENTAL:** read about current limitations at [fuse.md](./fuse.md). +> [!CAUTION] +> **EXPERIMENTAL:** +> This feature is disabled by default, requires an explicit opt-in with `ipfs mount` or `ipfs daemon --mount`. +> +> Read about current limitations at [fuse.md](./fuse.md). FUSE mount point configuration options. @@ -1306,6 +1396,18 @@ Default: `/ipns` Type: `string` (filesystem path) +### `Mounts.MFS` + +Mountpoint for Mutable File System (MFS) behind the `ipfs files` API. + +> [!CAUTION] +> - Write support is highly experimental and not recommended for mission-critical deployments. +> - Avoid storing lazy-loaded datasets in MFS. Exposing a partially local, lazy-loaded DAG risks operating system search indexers crawling it, which may trigger unintended network prefetching of non-local DAG components. + +Default: `/mfs` + +Type: `string` (filesystem path) + ### `Mounts.FuseAllowOther` Sets the 'FUSE allow other'-option on the mount point. @@ -1399,6 +1501,56 @@ Default: `"5m"` Type: `duration` +## `Provider` + +Configuration applied to the initial one-time announcement of fresh CIDs +created with `ipfs add`, `ipfs files`, `ipfs dag import`, `ipfs block|dag put` +commands. + +For periodical DHT reprovide settings, see [`Reprovide.*`](#reprovider). + +### `Provider.Enabled` + +Controls whether Kubo provider and reprovide systems are enabled. + +> [!CAUTION] +> Disabling this, will disable BOTH `Provider` system for new CIDs +> and the periodical reprovide ([`Reprovider.Interval`](#reprovider)) of old CIDs. + +Default: `true` + +Type: `flag` + +### `Provider.Strategy` + +Legacy, not used at the moment, see [`Reprovider.Strategy`](#reproviderstrategy) instead. + +### `Provider.WorkerCount` + +Sets the maximum number of _concurrent_ DHT provide operations (announcement of new CIDs). + +[`Reprovider`](#reprovider) operations do **not** count against this limit. +A value of `0` allows an unlimited number of provide workers. + +If the [accelerated DHT client](#routingaccelerateddhtclient) is enabled, each +provide operation opens ~20 connections in parallel. With the standard DHT +client (accelerated disabled), each provide opens between 20 and 60 +connections, with at most 10 active at once. Provides complete more quickly +when using the accelerated client. Be mindful of how many simultaneous +connections this setting can generate. + +> [!CAUTION] +> For nodes without strict connection limits that need to provide large volumes +> of content immediately, we recommend enabling the `Routing.AcceleratedDHTClient` and +> setting `Provider.WorkerCount` to `0` (unlimited). +> +> At the same time, mind that raising this value too high may lead to increased load. +> Proceed with caution, ensure proper hardware and networking are in place. + +Default: `16` + +Type: `optionalInteger` (non-negative; `0` means unlimited number of workers) + ## `Pubsub` **DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717) @@ -1575,7 +1727,11 @@ system. Note: disabling content reproviding will result in other nodes on the network not being able to discover that you have the objects that you have. If you want to have this disabled and keep the network aware of what you have, you must -manually announce your content periodically. +manually announce your content periodically or run your own routing system +and convince users to add it to [`Routing.DelegatedRouters`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters). + +> [!CAUTION] +> To maintain backward-compatibility, setting `Reprovider.Interval=0` will also disable Provider system (equivalent of `Provider.Enabled=false`) Default: `22h` (`DefaultReproviderInterval`) @@ -1586,10 +1742,10 @@ Type: `optionalDuration` (unset for the default) Tells reprovider what should be announced. Valid strategies are: - `"all"` - announce all CIDs of stored blocks - - Order: root blocks of direct and recursive pins are announced first, then the rest of blockstore -- `"pinned"` - only announce pinned CIDs recursively (both roots and child blocks) + - Order: root blocks of direct and recursive pins and MFS root are announced first, then the rest of blockstore +- `"pinned"` - only announce recursively pinned CIDs (`ipfs pin add -r`, both roots and child blocks) - Order: root blocks of direct and recursive pins are announced first, then the child blocks of recursive pins -- `"roots"` - only announce the root block of explicitly pinned CIDs +- `"roots"` - only announce the root block of explicitly pinned CIDs (`ipfs pin add`) - **⚠️ BE CAREFUL:** node with `roots` strategy will not announce child blocks. It makes sense only for use cases where the entire DAG is fetched in full, and a graceful resume does not have to be guaranteed: the lack of child @@ -1597,10 +1753,15 @@ Tells reprovider what should be announced. Valid strategies are: providers for the missing block in the middle of a file, unless the peer happens to already be connected to a provider and ask for child CID over bitswap. +- `"mfs"` - announce only the local CIDs that are part of the MFS (`ipfs files`) + - Note: MFS is lazy-loaded. Only the MFS blocks present in local datastore are announced. +- `"pinned+mfs"` - a combination of the `pinned` and `mfs` strategies. + - **ℹ️ NOTE:** This is the suggested strategy for users who run without GC and don't want to provide everything in cache. + - Order: first `pinned` and then the locally available part of `mfs`. - `"flat"` - same as `all`, announce all CIDs of stored blocks, but without prioritizing anything. > [!IMPORTANT] -> Reproviding larger pinsets using the `all`, `pinned`, or `roots` strategies requires additional memory, with an estimated ~1 GiB of RAM per 20 million items for reproviding to the Amino DHT. +> Reproviding larger pinsets using the `all`, `mfs`, `pinned`, `pinned+mfs` or `roots` strategies requires additional memory, with an estimated ~1 GiB of RAM per 20 million items for reproviding to the Amino DHT. > This is due to the use of a buffered provider, which avoids holding a lock on the entire pinset during the reprovide cycle. > The `flat` strategy can be used to lower memory requirements, but only recommended if memory utilization is too high, prioritization of pins is not necessary, and it is acceptable to announce every block cached in the local repository. @@ -1617,7 +1778,7 @@ Contains options for content, peer, and IPNS routing mechanisms. There are multiple routing options: "auto", "autoclient", "none", "dht", "dhtclient", and "custom". * **DEFAULT:** If unset, or set to "auto", your node will use the public IPFS DHT (aka "Amino") - and parallel HTTP routers listed below for additional speed. + and parallel [`Routing.DelegatedRouters`](#routingdelegatedrouters) for additional speed. * If set to "autoclient", your node will behave as in "auto" but without running a DHT server. @@ -1647,15 +1808,13 @@ To force a specific Amino DHT-only mode, client or server, set `Routing.Type` to unless you're sure your node is reachable from the public network. When `Routing.Type` is set to `auto` or `autoclient` your node will accelerate some types of routing -by leveraging HTTP endpoints compatible with [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) +by leveraging [`Routing.DelegatedRouters`](#routingdelegatedrouters) HTTP endpoints compatible with [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) introduced in [IPIP-337](https://github.com/ipfs/specs/pull/337) in addition to the Amino DHT. -By default, an instance of [IPNI](https://github.com/ipni/specs/blob/main/IPNI.md#readme) -at https://cid.contact is used. -Alternative routing rules can be configured in `Routing.Routers` after setting `Routing.Type` to `custom`. +[Advanced routing rules](https://github.com/ipfs/kubo/blob/master/docs/delegated-routing.md) can be configured in `Routing.Routers` after setting `Routing.Type` to `custom`. -Default: `auto` (DHT + IPNI) +Default: `auto` (DHT + [`Routing.DelegatedRouters`](#routingdelegatedrouters)) Type: `optionalString` (`null`/missing means the default) @@ -1718,13 +1877,46 @@ Default: `false` Type: `bool` (missing means `false`) +### `Routing.IgnoreProviders` + +An array of [string-encoded PeerIDs](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#string-representation). Any provider record associated to one of these peer IDs is ignored. + +Apart from ignoring specific providers for reasons like misbehaviour etc. this +setting is useful to ignore providers as a way to indicate preference, when the same provider +is found under different peerIDs (i.e. one for HTTP and one for Bitswap retrieval). + +> [!TIP] +> This denylist operates on PeerIDs. +> To deny specific HTTP Provider URL, use [`HTTPRetrieval.Denylist`](#httpretrievaldenylist) instead. + +Default: `[]` + +Type: `array[string]` + +### `Routing.DelegatedRouters` + +An array of URL hostnames for delegated routers to be queried in addition to the Amino DHT when `Routing.Type` is set to `auto` (default) or `autoclient`. +These endpoints must support the [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/). + +> [!TIP] +> Delegated routing allows IPFS implementations to offload tasks like content routing, peer routing, and naming to a separate process or server while also benefiting from HTTP caching. +> +> One can run their own delegated router either by implementing the [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) themselves, or by using [Someguy](https://github.com/ipfs/someguy), a turn-key implementation that proxies requests to other routing systems. A public utility instance of Someguy is hosted at [`https://delegated-ipfs.dev`](https://docs.ipfs.tech/concepts/public-utilities/#delegated-routing). + +Default: `["https://cid.contact"]` (empty or `nil` will also use this default; to disable delegated routing, set `Routing.Type` to `dht` or `dhtclient`) + +Type: `array[string]` + ### `Routing.Routers` -**EXPERIMENTAL: `Routing.Routers` configuration may change in future release** +Alternative configuration used when `Routing.Type=custom`. -Map of additional Routers. +> [!WARNING] +> **EXPERIMENTAL: `Routing.Routers` configuration may change in future release** +> +> Consider this advanced low-level config: Most users can simply use `Routing.Type=auto` or `autoclient` and set up basic config in user-friendly [`Routing.DelegatedRouters`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters). -Allows for extending the default routing (Amino DHT) with alternative Router +Allows for replacing the default routing (Amino DHT) with alternative Router implementations. The map key is a name of a Router, and the value is its configuration. @@ -1784,7 +1976,14 @@ Type: `object[string->string]` ### `Routing: Methods` -`Methods:map` will define which routers will be executed per method. The key will be the name of the method: `"provide"`, `"find-providers"`, `"find-peers"`, `"put-ipns"`, `"get-ipns"`. All methods must be added to the list. +`Methods:map` will define which routers will be executed per method used when `Routing.Type=custom`. + +> [!WARNING] +> **EXPERIMENTAL: `Routing.Routers` configuration may change in future release** +> +> Consider this advanced low-level config: Most users can simply use `Routing.Type=auto` or `autoclient` and set up basic config in user-friendly [`Routing.DelegatedRouters`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters). + +The key will be the name of the method: `"provide"`, `"find-providers"`, `"find-peers"`, `"put-ipns"`, `"get-ipns"`. All methods must be added to the list. The value will contain: - `RouterName:string`: Name of the router. It should be one of the previously added to `Routing.Routers` list. @@ -2475,6 +2674,100 @@ Default: Respect DNS Response TTL Type: `optionalDuration` +## `HTTPRetrieval` + +`HTTPRetrieval` is configuration for pure HTTP retrieval based on Trustless HTTP Gateways' +[Block Responses (`application/vnd.ipld.raw`)](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw) +which can be used in addition to or instead of retrieving blocks with [Bitswap over Libp2p](#bitswap). + +Default: `{}` + +Type: `object` + +### `HTTPRetrieval.Enabled` + +> [!CAUTION] +> This feature is **EXPERIMENTAL** and may change in future release. Enable with caution, and provide feedback via GitHub issues. + +Controls whether HTTP-based block retrieval is enabled. + +When enabled, Kubo will be able to act on `/tls/http` (HTTP/2) providers ([Trustless HTTP Gateways](https://specs.ipfs.tech/http-gateways/trustless-gateway/)) returned by the [`Routing.DelegatedRouters`](#routingdelegatedrouters) +to perform pure HTTP [block retrievals](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw) +in addition to [Bitswap over Libp2p](#bitswap). + +HTTP requests for `application/vnd.ipld.raw` will be issued instead of Bitswap if a peer has a `/tls/http` multiaddr +and the HTTPS server returns HTTP 200 for the [probe path](https://specs.ipfs.tech/http-gateways/trustless-gateway/#dedicated-probe-paths). + +> [!IMPORTANT] +> - Requires TLS and HTTP/2. +> - This feature works in the same way as Bitswap: connected HTTP-peers receive optimistic block requests even for content that they are not announcing. +> - HTTP client does not follow redirects. Providers should keep announcements up to date. +> - IPFS ecosystem is working towards [supporting HTTP providers on Amino DHT](https://github.com/ipfs/specs/issues/496). Currently, HTTP providers are mostly limited to results from [`Routing.DelegatedRouters`](#routingdelegatedrouters) endpoints and requires `Routing.Type=auto|autoclient`. + +Default: `false` + +Type: `flag` + +### `HTTPRetrieval.Allowlist` + +Optional list of hostnames for which HTTP retrieval is allowed for. +If this list is not empty, only hosts matching these entries will be allowed for HTTP retrieval. + +> [!TIP] +> To limit HTTP retrieval to a provider at `/dns4/example.com/tcp/443/tls/http` (which would serve `HEAD|GET https://example.com/ipfs/cid?format=raw`), set this to `["example.com"]` + +Default: `[]` + +Type: `array[string]` + +### `HTTPRetrieval.Denylist` + +Optional list of hostnames for which HTTP retrieval is not allowed. +Denylist entries take precedence over Allowlist entries. + + +> [!TIP] +> This denylist operates on HTTP endpoint hostnames. +> To deny specific PeerID, use [`Routing.IgnoreProviders`](#routingignoreproviders) instead. + +Default: `[]` + +Type: `array[string]` + +### `HTTPRetrieval.NumWorkers` + +The number of worker goroutines to use for concurrent HTTP retrieval operations. +This setting controls the level of parallelism for HTTP-based block retrieval operations. +Higher values can improve performance when retrieving many blocks but may increase resource usage. + +Default: `16` + +Type: `optionalInteger` + +### `HTTPRetrieval.MaxBlockSize` + +Sets the maximum size of a block that the HTTP retrieval client will accept. + +> [!NOTE] +> This setting is a security feature designed to protect Kubo from malicious providers who might send excessively large or invalid data. +> Increasing this value allows Kubo to retrieve larger blocks from compatible HTTP providers, but doing so reduces interoperability with Bitswap, and increases potential security risks. +> +> Learn more: [Supporting Large IPLD Blocks: Why block limits?](https://discuss.ipfs.tech/t/supporting-large-ipld-blocks/15093#why-block-limits-5) + +Default: `2MiB` (matching [Bitswap size limit](https://specs.ipfs.tech/bitswap-protocol/#block-sizes)) + +Type: `optionalString` + +### `HTTPRetrieval.TLSInsecureSkipVerify` + +Disables TLS certificate validation. +Allows making HTTPS connections to HTTP/2 test servers with self-signed TLS certificates. +Only for testing, do not use in production. + +Default: `false` + +Type: `flag` + ## `Import` Options to configure the default options used for ingesting data, in commands such as `ipfs add` or `ipfs block put`. All affected commands are detailed per option. @@ -2533,6 +2826,80 @@ Default: `20971520` (20MiB) Type: `optionalInteger` +### `Import.UnixFSFileMaxLinks` + +The maximum number of links that a node part of a UnixFS File can have +when building the DAG while importing. + +This setting controls both the fanout in files that are chunked into several +blocks and grouped as a Unixfs (dag-pb) DAG. + +Default: `174` + +Type: `optionalInteger` + +### `Import.UnixFSDirectoryMaxLinks` + +The maximum number of links that a node part of a UnixFS basic directory can +have when building the DAG while importing. + +This setting controls both the fanout for basic, non-HAMT folder nodes. It +sets a limit after which directories are converted to a HAMT-based structure. + +When unset (0), no limit exists for chilcren. Directories will be converted to +HAMTs based on their estimated size only. + +This setting will cause basic directories to be converted to HAMTs when they +exceed the maximum number of children. This happens transparently during the +add process. The fanout of HAMT nodes is controlled by `MaxHAMTFanout`. + +Commands affected: `ipfs add` + +Default: `0` (no limit, because [`Import.UnixFSHAMTDirectorySizeThreshold`](#importunixfshamtdirectorysizethreshold) triggers controls when to switch to HAMT sharding when a directory grows too big) + +Type: `optionalInteger` + +### `Import.UnixFSHAMTDirectoryMaxFanout` + +The maximum number of children that a node part of a Unixfs HAMT directory +(aka sharded directory) can have. + +HAMT directory have unlimited children and are used when basic directories +become too big or reach `MaxLinks`. A HAMT is an structure made of unixfs +nodes that store the list of elements in the folder. This option controls the +maximum number of children that the HAMT nodes can have. + +Needs to be a power of two (shard entry size) and multiple of 8 (bitfield size). + +Commands affected: `ipfs add`, `ipfs daemon` (globally overrides [`boxo/ipld/unixfs/io.DefaultShardWidth`](https://github.com/ipfs/boxo/blob/6c5a07602aed248acc86598f30ab61923a54a83e/ipld/unixfs/io/directory.go#L30C5-L30C22)) + +Default: `256` + +Type: `optionalInteger` + +### `Import.UnixFSHAMTDirectorySizeThreshold` + +The sharding threshold to decide whether a basic UnixFS directory +should be sharded (converted into HAMT Directory) or not. + +This value is not strictly related to the size of the UnixFS directory block +and any increases in the threshold should come with being careful that block +sizes stay under 2MiB in order for them to be reliably transferable through the +networking stack. At the time of writing this, IPFS peers on the public swarm +tend to ignore requests for blocks bigger than 2MiB. + +Uses implementation from `boxo/ipld/unixfs/io/directory`, where the size is not +the *exact* block size of the encoded directory but just the estimated size +based byte length of DAG-PB Links names and CIDs. + +Setting to `1B` is functionally equivalent to always using HAMT (useful in testing). + +Commands affected: `ipfs add`, `ipfs daemon` (globally overrides [`boxo/ipld/unixfs/io.HAMTShardingSize`](https://github.com/ipfs/boxo/blob/6c5a07602aed248acc86598f30ab61923a54a83e/ipld/unixfs/io/directory.go#L26)) + +Default: `256KiB` (may change, inspect `DefaultUnixFSHAMTDirectorySizeThreshold` to confirm) + +Type: `optionalBytes` + ## `Version` Options to configure agent version announced to the swarm, and leveraging @@ -2639,9 +3006,13 @@ You should use this datastore if: > [!NOTE] > See caveats and configuration options at [`datastores.md#flatfs`](datastores.md#flatfs) +### `flatfs-measure` profile + +Configures the node to use the flatfs datastore with metrics. This is the same as [`flatfs` profile](#flatfs-profile) with the addition of the `measure` datastore wrapper. + ### `pebbleds` profile -Configures the node to use the **EXPERIMENTAL** pebble high-performance datastore. +Configures the node to use the pebble high-performance datastore. Pebble is a LevelDB/RocksDB inspired key-value store focused on performance and internal usage by CockroachDB. You should use this datastore if: @@ -2659,6 +3030,10 @@ You should use this datastore if: > [!NOTE] > See other caveats and configuration options at [`datastores.md#pebbleds`](datastores.md#pebbleds) +### `pebbleds-measure` profile + +Configures the node to use the pebble datastore with metrics. This is the same as [`pebbleds` profile](#pebble-profile) with the addition of the `measure` datastore wrapper. + ### `badgerds` profile Configures the node to use the **legacy** badgerv1 datastore. @@ -2684,6 +3059,10 @@ Also, be aware that: > [!NOTE] > See other caveats and configuration options at [`datastores.md#pebbleds`](datastores.md#pebbleds) +### `badgerds-measure` profile + +Configures the node to use the **legacy** badgerv1 datastore with metrics. This is the same as [`badgerds` profile](#badger-profile) with the addition of the `measure` datastore wrapper. + ### `lowpower` profile Reduces daemon overhead on the system by disabling optional swarm services. @@ -2715,16 +3094,38 @@ Disables [Reprovider](#reprovider) system (and announcing to Amino DHT). Makes UnixFS import (`ipfs add`) produce legacy CIDv0 with no raw leaves, sha2-256 and 256 KiB chunks. +See <https://github.com/ipfs/kubo/blob/master/config/profile.go> for exact [`Import.*`](#import) settings. + > [!NOTE] > This profile is provided for legacy users and should not be used for new projects. ### `test-cid-v1` profile -Makes UnixFS import (`ipfs add`) produce modern CIDv1 with raw leaves, sha2-256 and 1 MiB chunks. +Makes UnixFS import (`ipfs add`) produce modern CIDv1 with raw leaves, sha2-256 +and 1 MiB chunks (max 174 links per file, 256 per HAMT node, switch dir to HAMT +above 256KiB). + +See <https://github.com/ipfs/kubo/blob/master/config/profile.go> for exact [`Import.*`](#import) settings. + +> [!NOTE] +> [`Import.*`](#import) settings applied by this profile MAY change in future release. Provided for testing purposes. +> +> Follow [kubo#4143](https://github.com/ipfs/kubo/issues/4143) for more details, +> and provide feedback in [discuss.ipfs.tech/t/should-we-profile-cids](https://discuss.ipfs.tech/t/should-we-profile-cids/18507) or [ipfs/specs#499](https://github.com/ipfs/specs/pull/499). + +### `test-cid-v1-wide` profile + +Makes UnixFS import (`ipfs add`) produce modern CIDv1 with raw leaves, sha2-256 +and 1 MiB chunks and wider file DAGs (max 1024 links per every node type, +switch dir to HAMT above 1MiB). + +See <https://github.com/ipfs/kubo/blob/master/config/profile.go> for exact [`Import.*`](#import) settings. > [!NOTE] -> This profile will become the new implicit default, provided for testing purposes. -> Follow [kubo#4143](https://github.com/ipfs/kubo/issues/4143) for more details. +> [`Import.*`](#import) settings applied by this profile MAY change in future release. Provided for testing purposes. +> +> Follow [kubo#4143](https://github.com/ipfs/kubo/issues/4143) for more details, +> and provide feedback in [discuss.ipfs.tech/t/should-we-profile-cids](https://discuss.ipfs.tech/t/should-we-profile-cids/18507) or [ipfs/specs#499](https://github.com/ipfs/specs/pull/499). ## Types diff --git a/docs/datastores.md b/docs/datastores.md index 039088ac3186b792c1b9424177f6fcdc1e55cfa8..f574bc6a5ddbf86dbe154db89477575aabab628e 100644 --- a/docs/datastores.md +++ b/docs/datastores.md @@ -46,9 +46,6 @@ Uses a leveldb database to store key value pairs. ## pebbleds -> [!WARNING] -> This is still **EXPERIMENTAL** opt-in. Datastore format can be set when first initializing the node via `ipfs init --profile pebbleds`. - Uses [pebble](https://github.com/cockroachdb/pebble) as a key value store. ```json @@ -64,6 +61,7 @@ If they are not configured (or assigned their zero-valued), then default values * `bytesPerSync`: int, Sync sstables periodically in order to smooth out writes to disk. (default: 512KB) * `disableWAL`: true|false, Disable the write-ahead log (WAL) at expense of prohibiting crash recovery. (default: false) * `cacheSize`: Size of pebble's shared block cache. (default: 8MB) +* `formatVersionMajor`: int, Sets the format of pebble on-disk files. If 0 or unset, automatically convert to latest format. * `l0CompactionThreshold`: int, Count of L0 files necessary to trigger an L0 compaction. * `l0StopWritesThreshold`: int, Limit on L0 read-amplification, computed as the number of L0 sublevels. * `lBaseMaxBytes`: int, Maximum number of bytes for LBase. The base level is the level which L0 is compacted into. @@ -76,6 +74,20 @@ If they are not configured (or assigned their zero-valued), then default values > [!TIP] > Start using pebble with only default values and configure tuning items are needed for your needs. For a more complete description of these values, see: `https://pkg.go.dev/github.com/cockroachdb/pebble@vA.B.C#Options` (where `A.B.C` is pebble version from Kubo's `go.mod`). +Using a pebble datastore can be set when initializing kubo `ipfs init --profile pebbleds`. + +#### Use of `formatMajorVersion` + +[Pebble's `FormatMajorVersion`](https://github.com/cockroachdb/pebble/tree/master?tab=readme-ov-file#format-major-versions) is a constant controlling the format of persisted data. Backwards incompatible changes to durable formats are gated behind new format major versions. + +At any point, a database's format major version may be bumped. However, once a database's format major version is increased, previous versions of Pebble will refuse to open the database. + +When IPFS is initialized to use the pebbleds datastore (`ipfs init --profile=pebbleds`), the latest pebble database format is configured in the pebble datastore config as `"formatMajorVersion"`. Setting this in the datastore config prevents automatically upgrading to the latest available version when kubo is upgraded. If a later version becomes available, the kubo daemon prints a startup message to indicate this. The user can them update the config to use the latest format when they are certain a downgrade will not be necessary. + +Without the `"formatMajorVersion"` in the pebble datastore config, the database format is automatically upgraded to the latest version. If this happens, then it is possible a downgrade back to the previous version of kubo will not work if new format is not compatible with the pebble datastore in the previous version of kubo. + +When installing a new version of kubo when `"formatMajorVersion"` is configured, migration does not upgrade this to the latest available version. This is done because a user may have reasons not to upgrade the pebble database format, and may want to be able to downgrade kubo if something else is not working in the new version. If the configured pebble database format in the old kubo is not supported in the new kubo, then the configured version must be updated and the old kubo run, before installing the new kubo. + ## badgerds Uses [badger](https://github.com/dgraph-io/badger) as a key value store. diff --git a/docs/delegated-routing.md b/docs/delegated-routing.md index 8f80beab6715aa1411ac9830227f292a3b9487f0..ddc4e48ed3c00bba57222c0d508d12ab56ef94d7 100644 --- a/docs/delegated-routing.md +++ b/docs/delegated-routing.md @@ -16,6 +16,14 @@ which then got changed and standardized as [Routing V1 HTTP API](https://specs.i Kubo 0.23.0 release added support for [self-hosting Routing V1 HTTP API server](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.23.md#self-hosting-routingv1-endpoint-for-delegated-routing-needs). + +> [!TIP] +> Kubo 0.35 added support for [`Routing.DelegatedRouters`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingdelegatedrouters). +> +> Most of users are best served by setting delegated HTTP router URLs there and `Routing.Type` to `auto` or `autoclient`, rather than custom routing with complex `Routing.Routers` and `Routing.Methods` directly. +> +> The rest of this documentation should be considered only by advanced users and researchers. + Now we need a better way to add different routers using different protocols like [Routing V1](https://specs.ipfs.tech/routing/http-routing-v1/) or Amino DHT, and be able to configure them (future routing systems to come) to cover different use cases. diff --git a/docs/environment-variables.md b/docs/environment-variables.md index bbbc666266988f0835f4453ea84a30b2bbd7c077..2b763721b00e7e6946203f5cb4daf389b079fa51 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -1,5 +1,32 @@ # Kubo environment variables +- [Variables](#variables) + - [`IPFS_PATH`](#ipfs_path) + - [`IPFS_LOGGING`](#ipfs_logging) + - [`IPFS_LOGGING_FMT`](#ipfs_logging_fmt) + - [`GOLOG_LOG_LEVEL`](#golog_log_level) + - [`GOLOG_LOG_FMT`](#golog_log_fmt) + - [`GOLOG_FILE`](#golog_file) + - [`GOLOG_OUTPUT`](#golog_output) + - [`GOLOG_TRACING_FILE`](#golog_tracing_file) + - [`IPFS_FUSE_DEBUG`](#ipfs_fuse_debug) + - [`YAMUX_DEBUG`](#yamux_debug) + - [`IPFS_FD_MAX`](#ipfs_fd_max) + - [`IPFS_DIST_PATH`](#ipfs_dist_path) + - [`IPFS_NS_MAP`](#ipfs_ns_map) + - [`IPFS_HTTP_ROUTERS`](#ipfs_http_routers) + - [`IPFS_HTTP_ROUTERS_FILTER_PROTOCOLS`](#ipfs_http_routers_filter_protocols) + - [`IPFS_CONTENT_BLOCKING_DISABLE`](#ipfs_content_blocking_disable) + - [`IPFS_WAIT_REPO_LOCK`](#ipfs_wait_repo_lock) + - [`LIBP2P_TCP_REUSEPORT`](#libp2p_tcp_reuseport) + - [`LIBP2P_TCP_MUX`](#libp2p_tcp_mux) + - [`LIBP2P_MUX_PREFS`](#libp2p_mux_prefs) + - [`LIBP2P_RCMGR`](#libp2p_rcmgr) + - [`LIBP2P_DEBUG_RCMGR`](#libp2p_debug_rcmgr) +- [Tracing](#tracing) + +# Variables + ## `IPFS_PATH` Sets the location of the IPFS repo (where the config, blocks, etc. @@ -63,6 +90,14 @@ The logging format defaults to `color` when the output is a terminal, and `nocol Sets the file to which Kubo logs. By default, Kubo logs to standard error. +## `GOLOG_OUTPUT` + +When stderr and/or stdout options are configured or specified by the `GOLOG_OUTPUT` environ variable, log only to the output(s) specified. For example: + +- `GOLOG_OUTPUT="stderr"` logs only to stderr +- `GOLOG_OUTPUT="stdout"` logs only to stdout +- `GOLOG_OUTPUT="stderr+stdout"` logs to both stderr and stdout + ## `GOLOG_TRACING_FILE` Sets the file to which Kubo sends tracing events. By default, tracing is @@ -149,6 +184,15 @@ Default: `config.DefaultHTTPRoutersFilterProtocols` Disables the content-blocking subsystem. No denylists will be watched and no content will be blocked. +## `IPFS_WAIT_REPO_LOCK` + +Specifies the amount of time to wait for the repo lock. Set the value of this variable to a string that can be [parsed](https://pkg.go.dev/time@go1.24.3#ParseDuration) as a golang `time.Duration`. For example: +``` +IPFS_WAIT_REPO_LOCK="15s" +``` + +If the lock cannot be acquired because someone else has the lock, and `IPFS_WAIT_REPO_LOCK` is set to a valid value, then acquiring the lock is retried every second until the lock is acquired or the specified wait time has elapsed. + ## `LIBP2P_TCP_REUSEPORT` Kubo tries to reuse the same source port for all connections to improve NAT diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 38b3e64e9a11235a79f1da06feba2e29238f9794..c5334ab2a78d67f6a6b3c3b6554a36fccbc649e1 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -7,7 +7,7 @@ go 1.24 replace github.com/ipfs/kubo => ./../../.. require ( - github.com/ipfs/boxo v0.29.1 + github.com/ipfs/boxo v0.30.0 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 github.com/libp2p/go-libp2p v0.41.1 github.com/multiformats/go-multiaddr v0.15.0 @@ -16,7 +16,7 @@ require ( require ( bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc // indirect github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect - github.com/DataDog/zstd v1.4.5 // indirect + github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect @@ -28,11 +28,13 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/ceramicnetwork/go-dag-jose v0.1.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.4 // indirect + github.com/cockroachdb/pebble/v2 v2.0.3 // indirect github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect @@ -63,7 +65,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.4 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20250208200701-d0013a598941 // indirect github.com/google/uuid v1.6.0 // indirect @@ -76,7 +78,7 @@ require ( github.com/ipfs-shipyard/nopfs/ipfs v0.25.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.2.0 // indirect + github.com/ipfs/go-block-format v0.2.1 // indirect github.com/ipfs/go-blockservice v0.5.2 // indirect github.com/ipfs/go-cid v0.5.0 // indirect github.com/ipfs/go-cidutil v0.1.0 // indirect @@ -85,8 +87,8 @@ require ( github.com/ipfs/go-ds-flatfs v0.5.5 // indirect github.com/ipfs/go-ds-leveldb v0.5.2 // indirect github.com/ipfs/go-ds-measure v0.2.2 // indirect - github.com/ipfs/go-ds-pebble v0.4.4 // indirect - github.com/ipfs/go-fs-lock v0.0.7 // indirect + github.com/ipfs/go-ds-pebble v0.5.0 // indirect + github.com/ipfs/go-fs-lock v0.1.1 // indirect github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect github.com/ipfs/go-ipfs-delay v0.0.1 // indirect github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect @@ -99,7 +101,7 @@ require ( github.com/ipfs/go-ipld-git v0.1.1 // indirect github.com/ipfs/go-ipld-legacy v0.2.1 // indirect github.com/ipfs/go-log v1.0.5 // indirect - github.com/ipfs/go-log/v2 v2.5.1 // indirect + github.com/ipfs/go-log/v2 v2.6.0 // indirect github.com/ipfs/go-merkledag v0.11.0 // indirect github.com/ipfs/go-metrics-interface v0.3.0 // indirect github.com/ipfs/go-peertaskqueue v0.8.2 // indirect @@ -109,7 +111,7 @@ require ( github.com/ipld/go-car/v2 v2.14.2 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/ipld/go-ipld-prime v0.21.0 // indirect - github.com/ipshipyard/p2p-forge v0.4.0 // indirect + github.com/ipshipyard/p2p-forge v0.5.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect @@ -124,9 +126,9 @@ require ( github.com/libp2p/go-doh-resolver v0.5.0 // indirect github.com/libp2p/go-flow-metrics v0.2.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect - github.com/libp2p/go-libp2p-kad-dht v0.30.2 // indirect - github.com/libp2p/go-libp2p-kbucket v0.6.5 // indirect - github.com/libp2p/go-libp2p-pubsub v0.13.0 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.33.1 // indirect + github.com/libp2p/go-libp2p-kbucket v0.7.0 // indirect + github.com/libp2p/go-libp2p-pubsub v0.13.1 // indirect github.com/libp2p/go-libp2p-pubsub-router v0.6.0 // indirect github.com/libp2p/go-libp2p-record v0.3.1 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.5 // indirect @@ -139,7 +141,7 @@ require ( github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mholt/acmez/v3 v3.0.0 // indirect - github.com/miekg/dns v1.1.63 // indirect + github.com/miekg/dns v1.1.66 // 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.1 // indirect @@ -181,10 +183,10 @@ require ( github.com/pion/webrtc/v4 v4.0.10 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/polydawn/refmt v0.89.0 // indirect - github.com/prometheus/client_golang v1.21.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.63.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.50.1 // indirect github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect @@ -205,15 +207,15 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect go.opentelemetry.io/otel/exporters/zipkin v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.18.0 // indirect @@ -223,20 +225,20 @@ require ( go.uber.org/zap v1.27.0 // indirect go.uber.org/zap/exp v0.3.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect - golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/text v0.22.0 // indirect - golang.org/x/tools v0.30.0 // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/sync v0.14.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/tools v0.33.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - gonum.org/v1/gonum v0.15.1 // indirect + gonum.org/v1/gonum v0.16.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect google.golang.org/grpc v1.67.1 // indirect - google.golang.org/protobuf v1.36.5 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/blake3 v1.4.0 // indirect + lukechampine.com/blake3 v1.4.1 // indirect ) diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index f8fc2a88567771f566e209dd73ee3ec4e76f21c2..0a3f3a329005a87d28f8d588d4e5ed9a2c1b59c1 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -29,11 +29,13 @@ github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIo github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f h1:JjxwchlOepwsUWcQwD2mLUAGE9aCp0/ehy6yCHFBOvo= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f/go.mod h1:tMDTce/yLLN/SK8gMOxQfnyeMeCg8KGzp0D1cbECEeo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= @@ -41,7 +43,6 @@ github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 h1:iW0a5 github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5/go.mod h1:Y2QMoi1vgtOIfc+6DhrMOGkLoGzqSV2rKp4Sm+opsyA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -80,18 +81,24 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 h1:bvJv505UUfjzbaIPdNS4AEkHreDqQk6yuNpsdRHpwFA= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94/go.mod h1:Gq51ZeKaFCXk6QwuGM0w1dnaOqc/F5zKT2zA9D6Xeac= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056 h1:slXychO2uDM6hYRu4c0pD0udNI8uObfeKN6UInWViS8= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.4 h1:5II1uEP4MyHLDnsrbv/EZ36arcb9Mxg3n+owhZ3GrG8= -github.com/cockroachdb/pebble v1.1.4/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA= +github.com/cockroachdb/pebble/v2 v2.0.3 h1:YJ3Sc9jRN/q6OOCNyRHPbcpenbxL1DdgdpUqPlPus6o= +github.com/cockroachdb/pebble/v2 v2.0.3/go.mod h1:NgxgNcWwyG/uxkLUZGM2aelshaLIZvc0hCX7SCfaO8s= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df h1:GUJ4KuZtbOcIfRlprHJFFvIqQ4irtQUl+1fJr+yNmPI= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df/go.mod h1:yBRu/cnL4ks9bgy4vAASdjIW+/xMlFwuHKqtmh3GZQg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= @@ -172,6 +179,8 @@ github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34 github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= @@ -231,8 +240,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e h1:4bw4WeyTYPp0smaXiJZCNnLrvVBqirQVreixayXezGc= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -244,8 +254,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= @@ -298,15 +308,15 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 h1:OqNqsGZPX8zh3eFMO8Lf8EHRRnSGBMqcd github.com/ipfs-shipyard/nopfs/ipfs v0.25.0/go.mod h1:BxhUdtBgOXg1B+gAPEplkg/GpyTZY+kCMSfsJvvydqU= 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.29.1 h1:z61ZT4YDfTHLjXTsu/+3wvJ8aJlExthDSOCpx6Nh8xc= -github.com/ipfs/boxo v0.29.1/go.mod h1:MkDJStXiJS9U99cbAijHdcmwNfVn5DKYBmQCOgjY2NU= +github.com/ipfs/boxo v0.30.0 h1:7afsoxPGGqfoH7Dum/wOTGUB9M5fb8HyKPMlLfBvIEQ= +github.com/ipfs/boxo v0.30.0/go.mod h1:BPqgGGyHB9rZZcPSzah2Dc9C+5Or3U1aQe7EH1H7370= 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-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ= github.com/ipfs/go-bitswap v0.11.0/go.mod h1:05aE8H3XOU+LXpTedeAS0OZpcO1WFsj5niYQH9a1Tmk= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= -github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs= -github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= +github.com/ipfs/go-block-format v0.2.1 h1:96kW71XGNNa+mZw/MTzJrCpMhBWCrd9kBLoKm9Iip/Q= +github.com/ipfs/go-block-format v0.2.1/go.mod h1:frtvXHMQhM6zn7HvEQu+Qz5wSTj+04oEH/I+NjDgEjk= github.com/ipfs/go-blockservice v0.5.2 h1:in9Bc+QcXwd1apOVM7Un9t8tixPKdaHQFdLSUM1Xgk8= github.com/ipfs/go-blockservice v0.5.2/go.mod h1:VpMblFEqG67A/H2sHKAemeH9vlURVavlysbdUI632yk= github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -332,10 +342,10 @@ github.com/ipfs/go-ds-leveldb v0.5.2 h1:6nmxlQ2zbp4LCNdJVsmHfs9GP0eylfBNxpmY1csp github.com/ipfs/go-ds-leveldb v0.5.2/go.mod h1:2fAwmcvD3WoRT72PzEekHBkQmBDhc39DJGoREiuGmYo= github.com/ipfs/go-ds-measure v0.2.2 h1:4kwvBGbbSXNYe4ANlg7qTIYoZU6mNlqzQHdVqICkqGI= github.com/ipfs/go-ds-measure v0.2.2/go.mod h1:b/87ak0jMgH9Ylt7oH0+XGy4P8jHx9KG09Qz+pOeTIs= -github.com/ipfs/go-ds-pebble v0.4.4 h1:V/QlTCjQ4cTYQUvDRbDBKVZNYaMi4QV7Du4acPoRvg0= -github.com/ipfs/go-ds-pebble v0.4.4/go.mod h1:a4F6QyaamnD/MsgQH1KpYf5s0YvPODw6eOk9PBhLQMg= -github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U= -github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= +github.com/ipfs/go-ds-pebble v0.5.0 h1:lXffYCAKVD7nLLPqwJ9D8IxgO7Kz8woiX021tezdsIM= +github.com/ipfs/go-ds-pebble v0.5.0/go.mod h1:aiCRVcj3K60sxc6k5C+HO9C6rouqiSkjR/WKnbTcMfQ= +github.com/ipfs/go-fs-lock v0.1.1 h1:TecsP/Uc7WqYYatasreZQiP9EGRy4ZnKoG4yXxR33nw= +github.com/ipfs/go-fs-lock v0.1.1/go.mod h1:2goSXMCw7QfscHmSe09oXiR34DQeUdm+ei+dhonqly0= github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ= github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= @@ -371,9 +381,8 @@ github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9 github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= -github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= -github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipfs/go-log/v2 v2.6.0 h1:2Nu1KKQQ2ayonKp4MPo6pXCjqw1ULc9iohRqWV5EYqg= +github.com/ipfs/go-log/v2 v2.6.0/go.mod h1:p+Efr3qaY5YXpx9TX7MoLCSEZX5boSWj9wh86P5HJa8= github.com/ipfs/go-merkledag v0.11.0 h1:DgzwK5hprESOzS4O1t/wi6JDpyVQdvm9Bs59N/jqfBY= github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1LsA7+djsM4= github.com/ipfs/go-metrics-interface v0.3.0 h1:YwG7/Cy4R94mYDUuwsBfeziJCVm9pBMJ6q/JR9V40TU= @@ -397,8 +406,8 @@ github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd/go.mod h1:wZ8hH8UxeryOs4kJEJaiui/s00hDSbE37OKsL47g+Sw= -github.com/ipshipyard/p2p-forge v0.4.0 h1:A40PW027nCZn0d/pw5ufMoxnAo9wZwrG+iuz18A8P5I= -github.com/ipshipyard/p2p-forge v0.4.0/go.mod h1:hVGPP24xrRezP2+z6q8udEW36w89M+jWuWBz9meLggY= +github.com/ipshipyard/p2p-forge v0.5.1 h1:9MCpAlk+wNhy7W/yOYKgi9KlXPnyb0abmDpsRPHUDxQ= +github.com/ipshipyard/p2p-forge v0.5.1/go.mod h1:GNDXM2CR8KRS8mJGw7ARIRVlrG9NH8MdewgNVfIIByA= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= @@ -461,14 +470,14 @@ github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl9 github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-libp2p-kad-dht v0.30.2 h1:K0LJPdXynQ+u3rx6uFlrfNy0i11LE6SOCDzwAAaahys= -github.com/libp2p/go-libp2p-kad-dht v0.30.2/go.mod h1:UV0mxF4ufh/ht05jNg5mcjOMrjK82uecgANa+GKi4y0= +github.com/libp2p/go-libp2p-kad-dht v0.33.1 h1:hKFhHMf7WH69LDjaxsJUWOU6qZm71uO47M/a5ijkiP0= +github.com/libp2p/go-libp2p-kad-dht v0.33.1/go.mod h1:CdmNk4VeGJa9EXM9SLNyNVySEvduKvb+5rSC/H4pLAo= github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio= -github.com/libp2p/go-libp2p-kbucket v0.6.5 h1:Fsl1YvZcMwqrR4DYrTO02yo9PGYs2HBQIT3lGXFMTxg= -github.com/libp2p/go-libp2p-kbucket v0.6.5/go.mod h1:U6WOd0BvnSp03IQSrjgM54tg7zh1UUNsXLJqAQzClTA= +github.com/libp2p/go-libp2p-kbucket v0.7.0 h1:vYDvRjkyJPeWunQXqcW2Z6E93Ywx7fX0jgzb/dGOKCs= +github.com/libp2p/go-libp2p-kbucket v0.7.0/go.mod h1:blOINGIj1yiPYlVEX0Rj9QwEkmVnz3EP8LK1dRKBC6g= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= -github.com/libp2p/go-libp2p-pubsub v0.13.0 h1:RmFQ2XAy3zQtbt2iNPy7Tt0/3fwTnHpCQSSnmGnt1Ps= -github.com/libp2p/go-libp2p-pubsub v0.13.0/go.mod h1:m0gpUOyrXKXdE7c8FNQ9/HLfWbxaEw7xku45w+PaqZo= +github.com/libp2p/go-libp2p-pubsub v0.13.1 h1:tV3ttzzZSCk0EtEXnxVmWIXgjVxXx+20Jwjbs/Ctzjo= +github.com/libp2p/go-libp2p-pubsub v0.13.1/go.mod h1:MKPU5vMI8RRFyTP0HfdsF9cLmL1nHAeJm44AxJGJx44= github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4sFAqrUcshIUvVP/s= github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE= github.com/libp2p/go-libp2p-record v0.3.1 h1:cly48Xi5GjNw5Wq+7gmjfBiG9HCzQVkiZOUZ8kUl+Fg= @@ -502,8 +511,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -512,8 +519,8 @@ github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E= github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= -github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs= +github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE= +github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= @@ -666,18 +673,18 @@ github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXx github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= -github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= +github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= github.com/quic-go/quic-go v0.50.1 h1:unsgjFIUqW8a2oopkY7YNONpV1gYND6Nt9hnt1PN94Q= @@ -753,7 +760,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -802,7 +808,6 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7V github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -822,8 +827,8 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= @@ -834,12 +839,12 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6Bm go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= go.opentelemetry.io/otel/exporters/zipkin v1.31.0 h1:CgucL0tj3717DJnni7HVVB2wExzi8c2zJNEA2BhLMvI= go.opentelemetry.io/otel/exporters/zipkin v1.31.0/go.mod h1:rfzOVNiSwIcWtEC2J8epwG26fiaXlYvLySJ7bwsrtAE= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -850,7 +855,6 @@ go.uber.org/dig v1.18.0 h1:imUL1UiY0Mg4bqbFfsRQO5G4CGRBec/ZujWTvSVp3pw= go.uber.org/dig v1.18.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.23.0 h1:lIr/gYWQGfTwGcSXWXu4vP5Ws6iqnNEIY+F/aFzCKTg= go.uber.org/fx v1.23.0/go.mod h1:o/D9n+2mLP6v1EG+qsdT1O8wKopYAsqZasju97SDFCU= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -861,13 +865,11 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= @@ -890,8 +892,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -900,8 +902,8 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -922,11 +924,10 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -945,14 +946,12 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -964,8 +963,8 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -984,8 +983,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1011,10 +1010,8 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1022,12 +1019,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1039,8 +1033,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1060,8 +1054,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1102,11 +1096,10 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1114,8 +1107,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= -gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1181,8 +1174,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1198,12 +1191,10 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= @@ -1213,8 +1204,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -lukechampine.com/blake3 v1.4.0 h1:xDbKOZCVbnZsfzM6mHSYcGRHZ3YrLDzqz8XnV4uaD5w= -lukechampine.com/blake3 v1.4.0/go.mod h1:MQJNQCTnR+kwOP/JEZSxj3MaQjp80FOFSNMMHXcSeX0= +lukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg= +lukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/docs/experimental-features.md b/docs/experimental-features.md index 84a9adfc3a4ffc449f71f569fa82d44459f9722d..fbee3d480b134fc44e341c9929598aba2df53654 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -87,6 +87,10 @@ filestore instead of copying the files into your local IPFS repo. - [ ] Needs more people to use and report on how well it works. - [ ] Need to address error states and failure conditions + - [ ] cleanup of broken filesystem references (if file is deleted) + - [ ] tests that confirm ability to override preexisting filesystem links (allowing user to fix broken link) + - [ ] support for a single block having more than one sources in filesystem (blocks can be shared by unrelated files, and not be broken when some files are unpinned / gc'd) + - [ ] [other known issues](https://github.com/ipfs/kubo/issues/7161) - [ ] Need to write docs on usage, advantages, disadvantages - [ ] Need to merge utility commands to aid in maintenance and repair of filestore @@ -122,6 +126,9 @@ And then add a file at a specific URL using `ipfs urlstore add <url>` ### Road to being a real feature - [ ] Needs more people to use and report on how well it works. - [ ] Need to address error states and failure conditions + - [ ] cleanup of broken URL+range references (if URL starts returning 404 or error) + - [ ] tests that confirm ability to override preexisting URL+range links (allowing user to fix broken link) + - [ ] support for a single block having more than one URL+range (blocks can be shared by unrelated URLs) - [ ] Need to write docs on usage, advantages, disadvantages - [ ] Need to implement caching - [ ] Need to add metrics to monitor performance @@ -397,7 +404,7 @@ We also support the use of protocol names of the form /x/$NAME/http where $NAME ## FUSE -FUSE makes it possible to mount `/ipfs` and `/ipns` namespaces in your OS, +FUSE makes it possible to mount `/ipfs`, `/ipns` and `/mfs` namespaces in your OS, allowing arbitrary apps access to IPFS using a subset of filesystem abstractions. It is considered EXPERIMENTAL due to limited (and buggy) support on some platforms. @@ -530,27 +537,9 @@ ipfs config --json Swarm.RelayClient.Enabled true ### State -Experimental, disabled by default. - -Replaces the existing provide mechanism with a robust, strategic provider system. Currently enabling this option will provide nothing. - -### How to enable - -Modify your ipfs config: - -``` -ipfs config --json Experimental.StrategicProviding true -``` - -### Road to being a real feature +`Experimental.StrategicProviding` was removed in Kubo v0.35. -- [ ] needs real-world testing -- [ ] needs adoption -- [ ] needs to support all provider subsystem features - - [X] provide nothing - - [ ] provide roots - - [ ] provide all - - [ ] provide strategic +Replaced by [`Provide.Enabled`](https://github.com/ipfs/kubo/blob/master/docs/config.md#providerenabled) and [`Reprovider.Strategy`](https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy). ## GraphSync diff --git a/docs/fuse.md b/docs/fuse.md index 7744a0d457ba25660bb86f2aca26d1402ed5eb1f..fde9307fd3770261e693aac51653a10406415a10 100644 --- a/docs/fuse.md +++ b/docs/fuse.md @@ -2,7 +2,7 @@ **EXPERIMENTAL:** FUSE support is limited, YMMV. -Kubo makes it possible to mount `/ipfs` and `/ipns` namespaces in your OS, +Kubo makes it possible to mount `/ipfs`, `/ipns` and `/mfs` namespaces in your OS, allowing arbitrary apps access to IPFS. ## Install FUSE @@ -16,7 +16,7 @@ to your distribution manual to get things working. Install `fuse` with your favorite package manager: ``` -sudo apt-get install fuse +sudo apt-get install fuse3 ``` On some older Linux distributions, you may need to add yourself to the `fuse` group. @@ -50,18 +50,20 @@ speak with us, or if you figure something new out, please add to this document! ## Prepare mountpoints -By default ipfs uses `/ipfs` and `/ipns` directories for mounting, this can be -changed in config. You will have to create the `/ipfs` and `/ipns` directories +By default ipfs uses `/ipfs`, `/ipns` and `/mfs` directories for mounting, this can be +changed in config. You will have to create the `/ipfs`, `/ipns` and `/mfs` directories explicitly. Note that modifying root requires sudo permissions. ```sh # make the directories sudo mkdir /ipfs sudo mkdir /ipns +sudo mkdir /mfs # chown them so ipfs can use them without root permissions sudo chown <username> /ipfs sudo chown <username> /ipns +sudo chown <username> /mfs ``` Depending on whether you are using OSX or Linux, follow the proceeding instructions. @@ -105,6 +107,25 @@ ipfs config --json Mounts.FuseAllowOther true ipfs daemon --mount ``` +## MFS mountpoint + +Kubo v0.35.0 and later supports mounting the MFS (Mutable File System) root as +a FUSE filesystem, enabling manipulation of content-addressed data like regular +files. The CID for any file or directory is retrievable via the `ipfs_cid` +extended attribute. + +```sh +getfattr -n ipfs_cid /mfs/welcome-to-IPFS.jpg +getfattr: Removing leading '/' from absolute path names +# file: mfs/welcome-to-IPFS.jpg +ipfs_cid="QmaeXDdwpUeKQcMy7d5SFBfVB4y7LtREbhm5KizawPsBSH" +``` + +Please note that the operations supported by the MFS FUSE mountpoint are +limited. Since the MFS wasn't designed to store file attributes like ownership +information, permissions and creation date, some applications like `vim` and +`sed` may misbehave due to missing functionality. + ## Troubleshooting #### `Permission denied` or `fusermount: user has no write access to mountpoint` error in Linux @@ -145,6 +166,7 @@ set for user running `ipfs mount` command. ``` sudo umount /ipfs sudo umount /ipns +sudo umount /mfs ``` #### Mounting fails with "error mounting: could not resolve name" diff --git a/fuse/ipns/ipns_unix.go b/fuse/ipns/ipns_unix.go index 23704cabd521d374b58aa79dc5139e2df311cad8..ea2e753017e62fa02a0486e917d57153aabd0290 100644 --- a/fuse/ipns/ipns_unix.go +++ b/fuse/ipns/ipns_unix.go @@ -16,6 +16,7 @@ import ( dag "github.com/ipfs/boxo/ipld/merkledag" ft "github.com/ipfs/boxo/ipld/unixfs" + "github.com/ipfs/boxo/namesys" "github.com/ipfs/boxo/path" fuse "bazil.org/fuse" @@ -95,7 +96,7 @@ func loadRoot(ctx context.Context, ipfs iface.CoreAPI, key iface.Key) (*mfs.Root node, err := ipfs.ResolveNode(ctx, key.Path()) switch err { case nil: - case iface.ErrResolveFailed: + case namesys.ErrResolveFailed: node = ft.EmptyDirNode() default: log.Errorf("looking up %s: %s", key.Path(), err) diff --git a/fuse/mfs/mfs_test.go b/fuse/mfs/mfs_test.go new file mode 100644 index 0000000000000000000000000000000000000000..cedbe996723bad15b1cda8f976c4c7c8ee757d82 --- /dev/null +++ b/fuse/mfs/mfs_test.go @@ -0,0 +1,342 @@ +//go:build !nofuse && !openbsd && !netbsd && !plan9 +// +build !nofuse,!openbsd,!netbsd,!plan9 + +package mfs + +import ( + "bytes" + "context" + "crypto/rand" + "errors" + iofs "io/fs" + "os" + "slices" + "strconv" + "testing" + "time" + + "bazil.org/fuse" + "bazil.org/fuse/fs" + "bazil.org/fuse/fs/fstestutil" + "github.com/ipfs/kubo/core" + "github.com/ipfs/kubo/core/node" + "github.com/libp2p/go-libp2p-testing/ci" +) + +// Create an Ipfs.Node, a filesystem and a mount point. +func setUp(t *testing.T, ipfs *core.IpfsNode) (fs.FS, *fstestutil.Mount) { + if ci.NoFuse() { + t.Skip("Skipping FUSE tests") + } + + if ipfs == nil { + var err error + ipfs, err = core.NewNode(context.Background(), &node.BuildCfg{}) + if err != nil { + t.Fatal(err) + } + } + + fs := NewFileSystem(ipfs) + mnt, err := fstestutil.MountedT(t, fs, nil) + if err == fuse.ErrOSXFUSENotFound { + t.Skip(err) + } + if err != nil { + t.Fatal(err) + } + + return fs, mnt +} + +// Test reading and writing a file. +func TestReadWrite(t *testing.T) { + _, mnt := setUp(t, nil) + defer mnt.Close() + + path := mnt.Dir + "/testrw" + content := make([]byte, 8196) + _, err := rand.Read(content) + if err != nil { + t.Fatal(err) + } + + t.Run("write", func(t *testing.T) { + f, err := os.Create(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + _, err = f.Write(content) + if err != nil { + t.Fatal(err) + } + }) + t.Run("read", func(t *testing.T) { + f, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + buf := make([]byte, 8196) + l, err := f.Read(buf) + if err != nil { + t.Fatal(err) + } + if bytes.Equal(content, buf[:l]) != true { + t.Fatal("read and write not equal") + } + }) +} + +// Test creating a directory. +func TestMkdir(t *testing.T) { + _, mnt := setUp(t, nil) + defer mnt.Close() + + path := mnt.Dir + "/foo/bar/baz/qux/quux" + + t.Run("write", func(t *testing.T) { + err := os.MkdirAll(path, iofs.ModeDir) + if err != nil { + t.Fatal(err) + } + }) + t.Run("read", func(t *testing.T) { + stat, err := os.Stat(path) + if err != nil { + t.Fatal(err) + } + if !stat.IsDir() { + t.Fatal("not dir") + } + }) +} + +// Test file persistence across mounts. +func TestPersistence(t *testing.T) { + ipfs, err := core.NewNode(context.Background(), &node.BuildCfg{}) + if err != nil { + t.Fatal(err) + } + + content := make([]byte, 8196) + _, err = rand.Read(content) + if err != nil { + t.Fatal(err) + } + + t.Run("write", func(t *testing.T) { + _, mnt := setUp(t, ipfs) + defer mnt.Close() + path := mnt.Dir + "/testpersistence" + + f, err := os.Create(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + _, err = f.Write(content) + if err != nil { + t.Fatal(err) + } + }) + t.Run("read", func(t *testing.T) { + _, mnt := setUp(t, ipfs) + defer mnt.Close() + path := mnt.Dir + "/testpersistence" + + f, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + buf := make([]byte, 8196) + l, err := f.Read(buf) + if err != nil { + t.Fatal(err) + } + if bytes.Equal(content, buf[:l]) != true { + t.Fatal("read and write not equal") + } + }) +} + +// Test getting the file attributes. +func TestAttr(t *testing.T) { + _, mnt := setUp(t, nil) + defer mnt.Close() + + path := mnt.Dir + "/testattr" + content := make([]byte, 8196) + _, err := rand.Read(content) + if err != nil { + t.Fatal(err) + } + + t.Run("write", func(t *testing.T) { + f, err := os.Create(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + _, err = f.Write(content) + if err != nil { + t.Fatal(err) + } + }) + t.Run("read", func(t *testing.T) { + fi, err := os.Stat(path) + if err != nil { + t.Fatal(err) + } + + if fi.IsDir() { + t.Fatal("file is a directory") + } + + if fi.ModTime().After(time.Now()) { + t.Fatal("future modtime") + } + if time.Since(fi.ModTime()) > time.Second { + t.Fatal("past modtime") + } + + if fi.Name() != "testattr" { + t.Fatal("invalid filename") + } + + if fi.Size() != 8196 { + t.Fatal("invalid size") + } + }) +} + +// Test concurrent access to the filesystem. +func TestConcurrentRW(t *testing.T) { + _, mnt := setUp(t, nil) + defer mnt.Close() + + files := 5 + fileWorkers := 5 + + path := mnt.Dir + "/testconcurrent" + content := make([][]byte, files) + + for i := range content { + content[i] = make([]byte, 8196) + _, err := rand.Read(content[i]) + if err != nil { + t.Fatal(err) + } + } + + t.Run("write", func(t *testing.T) { + errs := make(chan (error), 1) + for i := 0; i < files; i++ { + go func() { + var err error + defer func() { errs <- err }() + + f, err := os.Create(path + strconv.Itoa(i)) + if err != nil { + return + } + defer f.Close() + + _, err = f.Write(content[i]) + if err != nil { + return + } + }() + } + for i := 0; i < files; i++ { + err := <-errs + if err != nil { + t.Fatal(err) + } + } + }) + t.Run("read", func(t *testing.T) { + errs := make(chan (error), 1) + for i := 0; i < files*fileWorkers; i++ { + go func() { + var err error + defer func() { errs <- err }() + + f, err := os.Open(path + strconv.Itoa(i/fileWorkers)) + if err != nil { + return + } + defer f.Close() + + buf := make([]byte, 8196) + l, err := f.Read(buf) + if err != nil { + return + } + if bytes.Equal(content[i/fileWorkers], buf[:l]) != true { + err = errors.New("read and write not equal") + return + } + }() + } + for i := 0; i < files; i++ { + err := <-errs + if err != nil { + t.Fatal(err) + } + } + }) +} + +// Test ipfs_cid extended attribute +func TestMFSRootXattr(t *testing.T) { + ipfs, err := core.NewNode(context.Background(), &node.BuildCfg{}) + if err != nil { + t.Fatal(err) + } + + fs, mnt := setUp(t, ipfs) + defer mnt.Close() + + node, err := fs.Root() + if err != nil { + t.Fatal(err) + } + + root := node.(*Dir) + + listReq := fuse.ListxattrRequest{} + listRes := fuse.ListxattrResponse{} + err = root.Listxattr(context.Background(), &listReq, &listRes) + if err != nil { + t.Fatal(err) + } + if slices.Compare(listRes.Xattr, []byte("ipfs_cid\x00")) != 0 { + t.Fatal("list xattr returns invalid value") + } + + getReq := fuse.GetxattrRequest{ + Name: "ipfs_cid", + } + getRes := fuse.GetxattrResponse{} + err = root.Getxattr(context.Background(), &getReq, &getRes) + if err != nil { + t.Fatal(err) + } + + ipldNode, err := ipfs.FilesRoot.GetDirectory().GetNode() + if err != nil { + t.Fatal(err) + } + + if slices.Compare(getRes.Xattr, []byte(ipldNode.Cid().String())) != 0 { + t.Fatal("xattr cid not equal to mfs root cid") + } +} diff --git a/fuse/mfs/mfs_unix.go b/fuse/mfs/mfs_unix.go new file mode 100644 index 0000000000000000000000000000000000000000..91cad257d9298cc74952acba28105fc6efea2300 --- /dev/null +++ b/fuse/mfs/mfs_unix.go @@ -0,0 +1,414 @@ +//go:build (linux || darwin || freebsd || netbsd || openbsd) && !nofuse +// +build linux darwin freebsd netbsd openbsd +// +build !nofuse + +package mfs + +import ( + "context" + "io" + "os" + "sync" + "syscall" + "time" + + "bazil.org/fuse" + "bazil.org/fuse/fs" + + dag "github.com/ipfs/boxo/ipld/merkledag" + ft "github.com/ipfs/boxo/ipld/unixfs" + "github.com/ipfs/boxo/mfs" + "github.com/ipfs/kubo/core" +) + +const ( + ipfsCIDXattr = "ipfs_cid" + mfsDirMode = os.ModeDir | 0755 + mfsFileMode = 0644 + blockSize = 512 + dirSize = 8 +) + +// FUSE filesystem mounted at /mfs. +type FileSystem struct { + root Dir +} + +// Get filesystem root. +func (fs *FileSystem) Root() (fs.Node, error) { + return &fs.root, nil +} + +// FUSE Adapter for MFS directories. +type Dir struct { + mfsDir *mfs.Directory +} + +// Directory attributes (stat). +func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error { + attr.Mode = mfsDirMode + attr.Size = dirSize * blockSize + attr.Blocks = dirSize + return nil +} + +// Access files in a directory. +func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error) { + mfsNode, err := dir.mfsDir.Child(req.Name) + switch err { + case os.ErrNotExist: + return nil, syscall.Errno(syscall.ENOENT) + case nil: + default: + return nil, err + } + + switch mfsNode.Type() { + case mfs.TDir: + result := Dir{ + mfsDir: mfsNode.(*mfs.Directory), + } + return &result, nil + case mfs.TFile: + result := File{ + mfsFile: mfsNode.(*mfs.File), + } + return &result, nil + } + + return nil, syscall.Errno(syscall.ENOENT) +} + +// List (ls) MFS directory. +func (dir *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { + var res []fuse.Dirent + nodes, err := dir.mfsDir.List(ctx) + if err != nil { + return nil, err + } + + for _, node := range nodes { + nodeType := fuse.DT_File + if node.Type == 1 { + nodeType = fuse.DT_Dir + } + res = append(res, fuse.Dirent{ + Type: nodeType, + Name: node.Name, + }) + } + return res, nil +} + +// Mkdir (mkdir) in MFS. +func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error) { + mfsDir, err := dir.mfsDir.Mkdir(req.Name) + if err != nil { + return nil, err + } + return &Dir{ + mfsDir: mfsDir, + }, nil +} + +// Remove (rm/rmdir) an MFS file. +func (dir *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error { + // Check for empty directory. + if req.Dir { + targetNode, err := dir.mfsDir.Child(req.Name) + if err != nil { + return err + } + target := targetNode.(*mfs.Directory) + + children, err := target.ListNames(ctx) + if err != nil { + return err + } + if len(children) > 0 { + return os.ErrExist + } + } + err := dir.mfsDir.Unlink(req.Name) + if err != nil { + return err + } + return dir.mfsDir.Flush() +} + +// Move (mv) an MFS file. +func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error { + file, err := dir.mfsDir.Child(req.OldName) + if err != nil { + return err + } + node, err := file.GetNode() + if err != nil { + return err + } + targetDir := newDir.(*Dir) + + // Remove file if exists + err = targetDir.mfsDir.Unlink(req.NewName) + if err != nil && err != os.ErrNotExist { + return err + } + + err = targetDir.mfsDir.AddChild(req.NewName, node) + if err != nil { + return err + } + + err = dir.mfsDir.Unlink(req.OldName) + if err != nil { + return err + } + + return dir.mfsDir.Flush() +} + +// Create (touch) an MFS file. +func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error) { + node := dag.NodeWithData(ft.FilePBData(nil, 0)) + if err := node.SetCidBuilder(dir.mfsDir.GetCidBuilder()); err != nil { + return nil, nil, err + } + + if err := dir.mfsDir.AddChild(req.Name, node); err != nil { + return nil, nil, err + } + + if err := dir.mfsDir.Flush(); err != nil { + return nil, nil, err + } + + mfsNode, err := dir.mfsDir.Child(req.Name) + if err != nil { + return nil, nil, err + } + if err := mfsNode.SetModTime(time.Now()); err != nil { + return nil, nil, err + } + + mfsFile := mfsNode.(*mfs.File) + + file := File{ + mfsFile: mfsFile, + } + + // Read access flags and create a handler. + accessMode := req.Flags & fuse.OpenAccessModeMask + flags := mfs.Flags{ + Read: accessMode == fuse.OpenReadOnly || accessMode == fuse.OpenReadWrite, + Write: accessMode == fuse.OpenWriteOnly || accessMode == fuse.OpenReadWrite, + Sync: req.Flags|fuse.OpenSync > 0, + } + + fd, err := mfsFile.Open(flags) + if err != nil { + return nil, nil, err + } + handler := FileHandler{ + mfsFD: fd, + } + + return &file, &handler, nil +} + +// List dir xattr. +func (dir *Dir) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error { + resp.Append(ipfsCIDXattr) + return nil +} + +// Get dir xattr. +func (dir *Dir) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error { + switch req.Name { + case ipfsCIDXattr: + node, err := dir.mfsDir.GetNode() + if err != nil { + return err + } + resp.Xattr = []byte(node.Cid().String()) + return nil + default: + return fuse.ErrNoXattr + } +} + +// FUSE adapter for MFS files. +type File struct { + mfsFile *mfs.File +} + +// File attributes. +func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error { + size, _ := file.mfsFile.Size() + + attr.Size = uint64(size) + if size%blockSize == 0 { + attr.Blocks = uint64(size / blockSize) + } else { + attr.Blocks = uint64(size/blockSize + 1) + } + + mtime, _ := file.mfsFile.ModTime() + attr.Mtime = mtime + + attr.Mode = mfsFileMode + return nil +} + +// Open an MFS file. +func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) { + accessMode := req.Flags & fuse.OpenAccessModeMask + flags := mfs.Flags{ + Read: accessMode == fuse.OpenReadOnly || accessMode == fuse.OpenReadWrite, + Write: accessMode == fuse.OpenWriteOnly || accessMode == fuse.OpenReadWrite, + Sync: req.Flags|fuse.OpenSync > 0, + } + fd, err := file.mfsFile.Open(flags) + if err != nil { + return nil, err + } + + if flags.Write { + if err := file.mfsFile.SetModTime(time.Now()); err != nil { + return nil, err + } + } + + return &FileHandler{ + mfsFD: fd, + }, nil +} + +// Sync the file's contents to MFS. +func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { + return file.mfsFile.Sync() +} + +// List file xattr. +func (file *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error { + resp.Append(ipfsCIDXattr) + return nil +} + +// Get file xattr. +func (file *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error { + switch req.Name { + case ipfsCIDXattr: + node, err := file.mfsFile.GetNode() + if err != nil { + return err + } + resp.Xattr = []byte(node.Cid().String()) + return nil + default: + return fuse.ErrNoXattr + } +} + +// Wrapper for MFS's file descriptor that conforms to the FUSE fs.Handler +// interface. +type FileHandler struct { + mfsFD mfs.FileDescriptor + mu sync.Mutex +} + +// Read a opened MFS file. +func (fh *FileHandler) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error { + fh.mu.Lock() + defer fh.mu.Unlock() + + _, err := fh.mfsFD.Seek(req.Offset, io.SeekStart) + if err != nil { + return err + } + + buf := make([]byte, req.Size) + l, err := fh.mfsFD.Read(buf) + + resp.Data = buf[:l] + + switch err { + case nil, io.EOF, io.ErrUnexpectedEOF: + return nil + default: + return err + } +} + +// Write writes to an opened MFS file. +func (fh *FileHandler) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error { + fh.mu.Lock() + defer fh.mu.Unlock() + + l, err := fh.mfsFD.WriteAt(req.Data, req.Offset) + if err != nil { + return err + } + resp.Size = l + + return nil +} + +// Flushes the file's buffer. +func (fh *FileHandler) Flush(ctx context.Context, req *fuse.FlushRequest) error { + fh.mu.Lock() + defer fh.mu.Unlock() + + return fh.mfsFD.Flush() +} + +// Closes the file. +func (fh *FileHandler) Release(ctx context.Context, req *fuse.ReleaseRequest) error { + fh.mu.Lock() + defer fh.mu.Unlock() + + return fh.mfsFD.Close() +} + +// Create new filesystem. +func NewFileSystem(ipfs *core.IpfsNode) fs.FS { + return &FileSystem{ + root: Dir{ + mfsDir: ipfs.FilesRoot.GetDirectory(), + }, + } +} + +// Check that our structs implement all the interfaces we want. +type mfsDir interface { + fs.Node + fs.NodeGetxattrer + fs.NodeListxattrer + fs.HandleReadDirAller + fs.NodeRequestLookuper + fs.NodeMkdirer + fs.NodeRenamer + fs.NodeRemover + fs.NodeCreater +} + +var _ mfsDir = (*Dir)(nil) + +type mfsFile interface { + fs.Node + fs.NodeGetxattrer + fs.NodeListxattrer + fs.NodeOpener + fs.NodeFsyncer +} + +var _ mfsFile = (*File)(nil) + +type mfsHandler interface { + fs.Handle + fs.HandleReader + fs.HandleWriter + fs.HandleFlusher + fs.HandleReleaser +} + +var _ mfsHandler = (*FileHandler)(nil) diff --git a/fuse/mfs/mount_unix.go b/fuse/mfs/mount_unix.go new file mode 100644 index 0000000000000000000000000000000000000000..7fe72e8df1758d4ff20874e84ab5f8d26db44dfb --- /dev/null +++ b/fuse/mfs/mount_unix.go @@ -0,0 +1,21 @@ +//go:build (linux || darwin || freebsd || netbsd || openbsd) && !nofuse +// +build linux darwin freebsd netbsd openbsd +// +build !nofuse + +package mfs + +import ( + core "github.com/ipfs/kubo/core" + mount "github.com/ipfs/kubo/fuse/mount" +) + +// Mount mounts MFS at a given location, and returns a mount.Mount instance. +func Mount(ipfs *core.IpfsNode, mountpoint string) (mount.Mount, error) { + cfg, err := ipfs.Repo.Config() + if err != nil { + return nil, err + } + allowOther := cfg.Mounts.FuseAllowOther + fsys := NewFileSystem(ipfs) + return mount.NewMount(ipfs.Process, fsys, mountpoint, allowOther) +} diff --git a/fuse/node/mount_nofuse.go b/fuse/node/mount_nofuse.go index e6f512f8eef00120691db88a9f47325555b03418..7423cb24d345c26323f9d23d4838441d59eed1cf 100644 --- a/fuse/node/mount_nofuse.go +++ b/fuse/node/mount_nofuse.go @@ -9,6 +9,6 @@ import ( core "github.com/ipfs/kubo/core" ) -func Mount(node *core.IpfsNode, fsdir, nsdir string) error { +func Mount(node *core.IpfsNode, fsdir, nsdir, mfsdir string) error { return errors.New("not compiled in") } diff --git a/fuse/node/mount_notsupp.go b/fuse/node/mount_notsupp.go index e9762a3e4bd9738da9ddeaa416e02be65ce1d335..79ac0e79165fa3d323403aa0d1a41451d9801707 100644 --- a/fuse/node/mount_notsupp.go +++ b/fuse/node/mount_notsupp.go @@ -9,6 +9,6 @@ import ( core "github.com/ipfs/kubo/core" ) -func Mount(node *core.IpfsNode, fsdir, nsdir string) error { +func Mount(node *core.IpfsNode, fsdir, nsdir, mfsdir string) error { return errors.New("FUSE not supported on OpenBSD or NetBSD. See #5334 (https://github.com/ipfs/kubo/issues/5334).") } diff --git a/fuse/node/mount_test.go b/fuse/node/mount_test.go index 178fddcf665e7e80890ba658de88774e68c9d95e..1947f759ffa7445168df6ac030baa0b98ec8d2b0 100644 --- a/fuse/node/mount_test.go +++ b/fuse/node/mount_test.go @@ -56,10 +56,12 @@ func TestExternalUnmount(t *testing.T) { ipfsDir := dir + "/ipfs" ipnsDir := dir + "/ipns" + mfsDir := dir + "/mfs" mkdir(t, ipfsDir) mkdir(t, ipnsDir) + mkdir(t, mfsDir) - err = Mount(node, ipfsDir, ipnsDir) + err = Mount(node, ipfsDir, ipnsDir, mfsDir) if err != nil { if strings.Contains(err.Error(), "unable to check fuse version") || err == fuse.ErrOSXFUSENotFound { t.Skip(err) diff --git a/fuse/node/mount_unix.go b/fuse/node/mount_unix.go index 63763996b2f255eac9b7d4fcd780e9f727538d93..9846d7a42db80e8061757e05b560b8a7d776247f 100644 --- a/fuse/node/mount_unix.go +++ b/fuse/node/mount_unix.go @@ -11,6 +11,7 @@ import ( core "github.com/ipfs/kubo/core" ipns "github.com/ipfs/kubo/fuse/ipns" + mfs "github.com/ipfs/kubo/fuse/mfs" mount "github.com/ipfs/kubo/fuse/mount" rofs "github.com/ipfs/kubo/fuse/readonly" @@ -31,7 +32,7 @@ var platformFuseChecks = func(*core.IpfsNode) error { return nil } -func Mount(node *core.IpfsNode, fsdir, nsdir string) error { +func Mount(node *core.IpfsNode, fsdir, nsdir, mfsdir string) error { // check if we already have live mounts. // if the user said "Mount", then there must be something wrong. // so, close them and try again. @@ -43,15 +44,19 @@ func Mount(node *core.IpfsNode, fsdir, nsdir string) error { // best effort _ = node.Mounts.Ipns.Unmount() } + if node.Mounts.Mfs != nil && node.Mounts.Mfs.IsActive() { + // best effort + _ = node.Mounts.Mfs.Unmount() + } if err := platformFuseChecks(node); err != nil { return err } - return doMount(node, fsdir, nsdir) + return doMount(node, fsdir, nsdir, mfsdir) } -func doMount(node *core.IpfsNode, fsdir, nsdir string) error { +func doMount(node *core.IpfsNode, fsdir, nsdir, mfsdir string) error { fmtFuseErr := func(err error, mountpoint string) error { s := err.Error() if strings.Contains(s, fuseNoDirectory) { @@ -67,8 +72,8 @@ func doMount(node *core.IpfsNode, fsdir, nsdir string) error { } // this sync stuff is so that both can be mounted simultaneously. - var fsmount, nsmount mount.Mount - var err1, err2 error + var fsmount, nsmount, mfmount mount.Mount + var err1, err2, err3 error var wg sync.WaitGroup @@ -86,32 +91,49 @@ func doMount(node *core.IpfsNode, fsdir, nsdir string) error { }() } + wg.Add(1) + go func() { + defer wg.Done() + mfmount, err3 = mfs.Mount(node, mfsdir) + }() + wg.Wait() if err1 != nil { - log.Errorf("error mounting: %s", err1) + log.Errorf("error mounting IPFS %s: %s", fsdir, err1) } if err2 != nil { - log.Errorf("error mounting: %s", err2) + log.Errorf("error mounting IPNS %s for IPFS %s: %s", nsdir, fsdir, err2) + } + + if err3 != nil { + log.Errorf("error mounting MFS %s: %s", mfsdir, err3) } - if err1 != nil || err2 != nil { + if err1 != nil || err2 != nil || err3 != nil { if fsmount != nil { _ = fsmount.Unmount() } if nsmount != nil { _ = nsmount.Unmount() } + if mfmount != nil { + _ = mfmount.Unmount() + } if err1 != nil { return fmtFuseErr(err1, fsdir) } - return fmtFuseErr(err2, nsdir) + if err2 != nil { + return fmtFuseErr(err2, nsdir) + } + return fmtFuseErr(err3, mfsdir) } // setup node state, so that it can be canceled node.Mounts.Ipfs = fsmount node.Mounts.Ipns = nsmount + node.Mounts.Mfs = mfmount return nil } diff --git a/fuse/node/mount_windows.go b/fuse/node/mount_windows.go index 33393f99a902f8f2f43e72d86e847b41ae47f1b2..42e6bc10b9ba39560db619feefe33d665addefe9 100644 --- a/fuse/node/mount_windows.go +++ b/fuse/node/mount_windows.go @@ -4,7 +4,7 @@ import ( "github.com/ipfs/kubo/core" ) -func Mount(node *core.IpfsNode, fsdir, nsdir string) error { +func Mount(node *core.IpfsNode, fsdir, nsdir, mfsdir string) error { // TODO // currently a no-op, but we don't want to return an error return nil diff --git a/fuse/readonly/ipfs_test.go b/fuse/readonly/ipfs_test.go index 6d667843cdf81bb51f438fbf9a875ee094e454ae..e7dfbcb2abdfc754ba530b48d04b5a8e6f62828a 100644 --- a/fuse/readonly/ipfs_test.go +++ b/fuse/readonly/ipfs_test.go @@ -150,7 +150,10 @@ func TestIpfsStressRead(t *testing.T) { // Now make a bunch of dirs for i := 0; i < ndiriter; i++ { - db := uio.NewDirectory(nd.DAG) + db, err := uio.NewDirectory(nd.DAG) + if err != nil { + t.Fatal(err) + } for j := 0; j < 1+rand.Intn(10); j++ { name := fmt.Sprintf("child%d", j) @@ -245,8 +248,11 @@ func TestIpfsBasicDirRead(t *testing.T) { fi, data := randObj(t, nd, 10000) // Make a directory and put that file in it - db := uio.NewDirectory(nd.DAG) - err := db.AddChild(nd.Context(), "actual", fi) + db, err := uio.NewDirectory(nd.DAG) + if err != nil { + t.Fatal(err) + } + err = db.AddChild(nd.Context(), "actual", fi) if err != nil { t.Fatal(err) } diff --git a/go.mod b/go.mod index 1abbe78123d6e11e6f114ec0b87d4fbfcbebde65..74ecb4bf78ecf97729f2d387d351ee59904d26cb 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/ceramicnetwork/go-dag-jose v0.1.1 github.com/cheggaaa/pb v1.0.29 - github.com/cockroachdb/pebble v1.1.4 + github.com/cockroachdb/pebble/v2 v2.0.3 github.com/coreos/go-systemd/v22 v22.5.0 github.com/dustin/go-humanize v1.0.1 github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302 @@ -21,8 +21,8 @@ require ( github.com/hashicorp/go-version v1.7.0 github.com/ipfs-shipyard/nopfs v0.0.14 github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 - github.com/ipfs/boxo v0.29.1 - github.com/ipfs/go-block-format v0.2.0 + github.com/ipfs/boxo v0.30.0 + github.com/ipfs/go-block-format v0.2.1 github.com/ipfs/go-cid v0.5.0 github.com/ipfs/go-cidutil v0.1.0 github.com/ipfs/go-datastore v0.8.2 @@ -31,15 +31,15 @@ require ( github.com/ipfs/go-ds-flatfs v0.5.5 github.com/ipfs/go-ds-leveldb v0.5.2 github.com/ipfs/go-ds-measure v0.2.2 - github.com/ipfs/go-ds-pebble v0.4.4 - github.com/ipfs/go-fs-lock v0.0.7 + github.com/ipfs/go-ds-pebble v0.5.0 + github.com/ipfs/go-fs-lock v0.1.1 github.com/ipfs/go-ipfs-cmds v0.14.1 github.com/ipfs/go-ipld-cbor v0.2.0 github.com/ipfs/go-ipld-format v0.6.0 github.com/ipfs/go-ipld-git v0.1.1 github.com/ipfs/go-ipld-legacy v0.2.1 github.com/ipfs/go-log v1.0.5 - github.com/ipfs/go-log/v2 v2.5.1 + github.com/ipfs/go-log/v2 v2.6.0 github.com/ipfs/go-metrics-interface v0.3.0 github.com/ipfs/go-metrics-prometheus v0.1.0 github.com/ipfs/go-test v0.2.1 @@ -48,16 +48,16 @@ require ( github.com/ipld/go-car/v2 v2.14.2 github.com/ipld/go-codec-dagpb v1.6.0 github.com/ipld/go-ipld-prime v0.21.0 - github.com/ipshipyard/p2p-forge v0.4.0 + github.com/ipshipyard/p2p-forge v0.5.1 github.com/jbenet/go-temp-err-catcher v0.1.0 github.com/jbenet/goprocess v0.1.4 github.com/julienschmidt/httprouter v1.3.0 github.com/libp2p/go-doh-resolver v0.5.0 github.com/libp2p/go-libp2p v0.41.1 github.com/libp2p/go-libp2p-http v0.5.0 - github.com/libp2p/go-libp2p-kad-dht v0.30.2 - github.com/libp2p/go-libp2p-kbucket v0.6.5 - github.com/libp2p/go-libp2p-pubsub v0.13.0 + github.com/libp2p/go-libp2p-kad-dht v0.33.1 + github.com/libp2p/go-libp2p-kbucket v0.7.0 + github.com/libp2p/go-libp2p-pubsub v0.13.1 github.com/libp2p/go-libp2p-pubsub-router v0.6.0 github.com/libp2p/go-libp2p-record v0.3.1 github.com/libp2p/go-libp2p-routing-helpers v0.7.5 @@ -70,7 +70,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 github.com/opentracing/opentracing-go v1.2.0 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 - github.com/prometheus/client_golang v1.21.1 + github.com/prometheus/client_golang v1.22.0 github.com/stretchr/testify v1.10.0 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d github.com/tidwall/gjson v1.16.0 @@ -80,24 +80,24 @@ require ( go.opencensus.io v0.24.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 go.opentelemetry.io/contrib/propagators/autoprop v0.46.1 - go.opentelemetry.io/otel v1.34.0 + go.opentelemetry.io/otel v1.35.0 go.opentelemetry.io/otel/sdk v1.31.0 - go.opentelemetry.io/otel/trace v1.34.0 + go.opentelemetry.io/otel/trace v1.35.0 go.uber.org/dig v1.18.0 go.uber.org/fx v1.23.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.35.0 - golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa - golang.org/x/mod v0.23.0 - golang.org/x/sync v0.11.0 - golang.org/x/sys v0.30.0 - google.golang.org/protobuf v1.36.5 + golang.org/x/crypto v0.38.0 + golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 + golang.org/x/mod v0.24.0 + golang.org/x/sync v0.14.0 + golang.org/x/sys v0.33.0 + google.golang.org/protobuf v1.36.6 ) require ( github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect - github.com/DataDog/zstd v1.4.5 // indirect + github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect @@ -105,10 +105,12 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/caddyserver/zerossl v0.1.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf // indirect @@ -139,7 +141,7 @@ require ( github.com/golang/glog v1.2.4 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20250208200701-d0013a598941 // indirect github.com/gorilla/mux v1.8.1 // indirect @@ -185,7 +187,7 @@ require ( github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect github.com/mholt/acmez/v3 v3.0.0 // indirect - github.com/miekg/dns v1.1.63 // indirect + github.com/miekg/dns v1.1.66 // 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.1 // indirect @@ -222,9 +224,9 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polydawn/refmt v0.89.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.63.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/prometheus/statsd_exporter v0.27.1 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.50.1 // indirect @@ -257,23 +259,23 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect go.opentelemetry.io/otel/exporters/zipkin v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/mock v0.5.0 // indirect go.uber.org/zap/exp v0.3.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/term v0.29.0 // indirect - golang.org/x/text v0.22.0 // indirect - golang.org/x/tools v0.30.0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/oauth2 v0.25.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/tools v0.33.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - gonum.org/v1/gonum v0.15.1 // indirect + gonum.org/v1/gonum v0.16.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect google.golang.org/grpc v1.67.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/blake3 v1.4.0 // indirect + lukechampine.com/blake3 v1.4.1 // indirect ) diff --git a/go.sum b/go.sum index 91d34dbbdb0682ddc1c9ffacf5c384e47adf1c04..6eafdb1ddec5c2bb10f9b5ce37214c7e538bd145 100644 --- a/go.sum +++ b/go.sum @@ -47,11 +47,13 @@ github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIo github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f h1:JjxwchlOepwsUWcQwD2mLUAGE9aCp0/ehy6yCHFBOvo= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f/go.mod h1:tMDTce/yLLN/SK8gMOxQfnyeMeCg8KGzp0D1cbECEeo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -65,7 +67,6 @@ github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 h1:iW0a5 github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5/go.mod h1:Y2QMoi1vgtOIfc+6DhrMOGkLoGzqSV2rKp4Sm+opsyA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -108,18 +109,24 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 h1:bvJv505UUfjzbaIPdNS4AEkHreDqQk6yuNpsdRHpwFA= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94/go.mod h1:Gq51ZeKaFCXk6QwuGM0w1dnaOqc/F5zKT2zA9D6Xeac= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056 h1:slXychO2uDM6hYRu4c0pD0udNI8uObfeKN6UInWViS8= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.4 h1:5II1uEP4MyHLDnsrbv/EZ36arcb9Mxg3n+owhZ3GrG8= -github.com/cockroachdb/pebble v1.1.4/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA= +github.com/cockroachdb/pebble/v2 v2.0.3 h1:YJ3Sc9jRN/q6OOCNyRHPbcpenbxL1DdgdpUqPlPus6o= +github.com/cockroachdb/pebble/v2 v2.0.3/go.mod h1:NgxgNcWwyG/uxkLUZGM2aelshaLIZvc0hCX7SCfaO8s= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df h1:GUJ4KuZtbOcIfRlprHJFFvIqQ4irtQUl+1fJr+yNmPI= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df/go.mod h1:yBRu/cnL4ks9bgy4vAASdjIW+/xMlFwuHKqtmh3GZQg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= @@ -206,6 +213,8 @@ github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34 github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= @@ -284,8 +293,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e h1:4bw4WeyTYPp0smaXiJZCNnLrvVBqirQVreixayXezGc= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -300,8 +310,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -362,15 +372,15 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 h1:OqNqsGZPX8zh3eFMO8Lf8EHRRnSGBMqcd github.com/ipfs-shipyard/nopfs/ipfs v0.25.0/go.mod h1:BxhUdtBgOXg1B+gAPEplkg/GpyTZY+kCMSfsJvvydqU= 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.29.1 h1:z61ZT4YDfTHLjXTsu/+3wvJ8aJlExthDSOCpx6Nh8xc= -github.com/ipfs/boxo v0.29.1/go.mod h1:MkDJStXiJS9U99cbAijHdcmwNfVn5DKYBmQCOgjY2NU= +github.com/ipfs/boxo v0.30.0 h1:7afsoxPGGqfoH7Dum/wOTGUB9M5fb8HyKPMlLfBvIEQ= +github.com/ipfs/boxo v0.30.0/go.mod h1:BPqgGGyHB9rZZcPSzah2Dc9C+5Or3U1aQe7EH1H7370= 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-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ= github.com/ipfs/go-bitswap v0.11.0/go.mod h1:05aE8H3XOU+LXpTedeAS0OZpcO1WFsj5niYQH9a1Tmk= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= -github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs= -github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= +github.com/ipfs/go-block-format v0.2.1 h1:96kW71XGNNa+mZw/MTzJrCpMhBWCrd9kBLoKm9Iip/Q= +github.com/ipfs/go-block-format v0.2.1/go.mod h1:frtvXHMQhM6zn7HvEQu+Qz5wSTj+04oEH/I+NjDgEjk= github.com/ipfs/go-blockservice v0.5.2 h1:in9Bc+QcXwd1apOVM7Un9t8tixPKdaHQFdLSUM1Xgk8= github.com/ipfs/go-blockservice v0.5.2/go.mod h1:VpMblFEqG67A/H2sHKAemeH9vlURVavlysbdUI632yk= github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -396,10 +406,10 @@ github.com/ipfs/go-ds-leveldb v0.5.2 h1:6nmxlQ2zbp4LCNdJVsmHfs9GP0eylfBNxpmY1csp github.com/ipfs/go-ds-leveldb v0.5.2/go.mod h1:2fAwmcvD3WoRT72PzEekHBkQmBDhc39DJGoREiuGmYo= github.com/ipfs/go-ds-measure v0.2.2 h1:4kwvBGbbSXNYe4ANlg7qTIYoZU6mNlqzQHdVqICkqGI= github.com/ipfs/go-ds-measure v0.2.2/go.mod h1:b/87ak0jMgH9Ylt7oH0+XGy4P8jHx9KG09Qz+pOeTIs= -github.com/ipfs/go-ds-pebble v0.4.4 h1:V/QlTCjQ4cTYQUvDRbDBKVZNYaMi4QV7Du4acPoRvg0= -github.com/ipfs/go-ds-pebble v0.4.4/go.mod h1:a4F6QyaamnD/MsgQH1KpYf5s0YvPODw6eOk9PBhLQMg= -github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U= -github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= +github.com/ipfs/go-ds-pebble v0.5.0 h1:lXffYCAKVD7nLLPqwJ9D8IxgO7Kz8woiX021tezdsIM= +github.com/ipfs/go-ds-pebble v0.5.0/go.mod h1:aiCRVcj3K60sxc6k5C+HO9C6rouqiSkjR/WKnbTcMfQ= +github.com/ipfs/go-fs-lock v0.1.1 h1:TecsP/Uc7WqYYatasreZQiP9EGRy4ZnKoG4yXxR33nw= +github.com/ipfs/go-fs-lock v0.1.1/go.mod h1:2goSXMCw7QfscHmSe09oXiR34DQeUdm+ei+dhonqly0= github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ= github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= @@ -439,9 +449,8 @@ github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= -github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= -github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipfs/go-log/v2 v2.6.0 h1:2Nu1KKQQ2ayonKp4MPo6pXCjqw1ULc9iohRqWV5EYqg= +github.com/ipfs/go-log/v2 v2.6.0/go.mod h1:p+Efr3qaY5YXpx9TX7MoLCSEZX5boSWj9wh86P5HJa8= github.com/ipfs/go-merkledag v0.11.0 h1:DgzwK5hprESOzS4O1t/wi6JDpyVQdvm9Bs59N/jqfBY= github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1LsA7+djsM4= github.com/ipfs/go-metrics-interface v0.3.0 h1:YwG7/Cy4R94mYDUuwsBfeziJCVm9pBMJ6q/JR9V40TU= @@ -467,8 +476,8 @@ github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd/go.mod h1:wZ8hH8UxeryOs4kJEJaiui/s00hDSbE37OKsL47g+Sw= -github.com/ipshipyard/p2p-forge v0.4.0 h1:A40PW027nCZn0d/pw5ufMoxnAo9wZwrG+iuz18A8P5I= -github.com/ipshipyard/p2p-forge v0.4.0/go.mod h1:hVGPP24xrRezP2+z6q8udEW36w89M+jWuWBz9meLggY= +github.com/ipshipyard/p2p-forge v0.5.1 h1:9MCpAlk+wNhy7W/yOYKgi9KlXPnyb0abmDpsRPHUDxQ= +github.com/ipshipyard/p2p-forge v0.5.1/go.mod h1:GNDXM2CR8KRS8mJGw7ARIRVlrG9NH8MdewgNVfIIByA= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.1.0 h1:Vc/s0QbQtoxX8MwwSLWWh+xNNZvM3Lw7NsTcHrvvhMc= @@ -547,14 +556,14 @@ github.com/libp2p/go-libp2p-gostream v0.6.0 h1:QfAiWeQRce6pqnYfmIVWJFXNdDyfiR/qk github.com/libp2p/go-libp2p-gostream v0.6.0/go.mod h1:Nywu0gYZwfj7Jc91PQvbGU8dIpqbQQkjWgDuOrFaRdA= github.com/libp2p/go-libp2p-http v0.5.0 h1:+x0AbLaUuLBArHubbbNRTsgWz0RjNTy6DJLOxQ3/QBc= github.com/libp2p/go-libp2p-http v0.5.0/go.mod h1:glh87nZ35XCQyFsdzZps6+F4HYI6DctVFY5u1fehwSg= -github.com/libp2p/go-libp2p-kad-dht v0.30.2 h1:K0LJPdXynQ+u3rx6uFlrfNy0i11LE6SOCDzwAAaahys= -github.com/libp2p/go-libp2p-kad-dht v0.30.2/go.mod h1:UV0mxF4ufh/ht05jNg5mcjOMrjK82uecgANa+GKi4y0= +github.com/libp2p/go-libp2p-kad-dht v0.33.1 h1:hKFhHMf7WH69LDjaxsJUWOU6qZm71uO47M/a5ijkiP0= +github.com/libp2p/go-libp2p-kad-dht v0.33.1/go.mod h1:CdmNk4VeGJa9EXM9SLNyNVySEvduKvb+5rSC/H4pLAo= github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio= -github.com/libp2p/go-libp2p-kbucket v0.6.5 h1:Fsl1YvZcMwqrR4DYrTO02yo9PGYs2HBQIT3lGXFMTxg= -github.com/libp2p/go-libp2p-kbucket v0.6.5/go.mod h1:U6WOd0BvnSp03IQSrjgM54tg7zh1UUNsXLJqAQzClTA= +github.com/libp2p/go-libp2p-kbucket v0.7.0 h1:vYDvRjkyJPeWunQXqcW2Z6E93Ywx7fX0jgzb/dGOKCs= +github.com/libp2p/go-libp2p-kbucket v0.7.0/go.mod h1:blOINGIj1yiPYlVEX0Rj9QwEkmVnz3EP8LK1dRKBC6g= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= -github.com/libp2p/go-libp2p-pubsub v0.13.0 h1:RmFQ2XAy3zQtbt2iNPy7Tt0/3fwTnHpCQSSnmGnt1Ps= -github.com/libp2p/go-libp2p-pubsub v0.13.0/go.mod h1:m0gpUOyrXKXdE7c8FNQ9/HLfWbxaEw7xku45w+PaqZo= +github.com/libp2p/go-libp2p-pubsub v0.13.1 h1:tV3ttzzZSCk0EtEXnxVmWIXgjVxXx+20Jwjbs/Ctzjo= +github.com/libp2p/go-libp2p-pubsub v0.13.1/go.mod h1:MKPU5vMI8RRFyTP0HfdsF9cLmL1nHAeJm44AxJGJx44= github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4sFAqrUcshIUvVP/s= github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE= github.com/libp2p/go-libp2p-record v0.3.1 h1:cly48Xi5GjNw5Wq+7gmjfBiG9HCzQVkiZOUZ8kUl+Fg= @@ -595,8 +604,6 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -610,8 +617,8 @@ github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E= github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= -github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs= +github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE= +github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= @@ -779,14 +786,14 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= -github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -794,8 +801,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= +github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -803,8 +810,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/prometheus/statsd_exporter v0.27.1 h1:tcRJOmwlA83HPfWzosAgr2+zEN5XDFv+M2mn/uYkn5Y= github.com/prometheus/statsd_exporter v0.27.1/go.mod h1:vA6ryDfsN7py/3JApEst6nLTJboq66XsNcJGNmC88NQ= @@ -891,7 +898,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -957,7 +963,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -989,8 +994,8 @@ go.opentelemetry.io/contrib/propagators/jaeger v1.21.1 h1:f4beMGDKiVzg9IcX7/VuWV go.opentelemetry.io/contrib/propagators/jaeger v1.21.1/go.mod h1:U9jhkEl8d1LL+QXY7q3kneJWJugiN3kZJV2OWz3hkBY= go.opentelemetry.io/contrib/propagators/ot v1.21.1 h1:3TN5vkXjKYWp0YdMcnUEC/A+pBPvqz9V3nCS2xmcurk= go.opentelemetry.io/contrib/propagators/ot v1.21.1/go.mod h1:oy0MYCbS/b3cqUDW37wBWtlwBIsutngS++Lklpgh+fc= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= @@ -1001,12 +1006,12 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6Bm go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= go.opentelemetry.io/otel/exporters/zipkin v1.31.0 h1:CgucL0tj3717DJnni7HVVB2wExzi8c2zJNEA2BhLMvI= go.opentelemetry.io/otel/exporters/zipkin v1.31.0/go.mod h1:rfzOVNiSwIcWtEC2J8epwG26fiaXlYvLySJ7bwsrtAE= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1018,7 +1023,6 @@ go.uber.org/dig v1.18.0 h1:imUL1UiY0Mg4bqbFfsRQO5G4CGRBec/ZujWTvSVp3pw= go.uber.org/dig v1.18.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.23.0 h1:lIr/gYWQGfTwGcSXWXu4vP5Ws6iqnNEIY+F/aFzCKTg= go.uber.org/fx v1.23.0/go.mod h1:o/D9n+2mLP6v1EG+qsdT1O8wKopYAsqZasju97SDFCU= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -1031,13 +1035,11 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= @@ -1060,8 +1062,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1072,8 +1074,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1095,11 +1097,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1138,7 +1139,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1152,8 +1152,8 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1163,8 +1163,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= +golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1180,8 +1180,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1212,7 +1212,6 @@ golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1235,13 +1234,10 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1256,8 +1252,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1266,8 +1262,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1279,8 +1275,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1338,11 +1334,10 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1350,8 +1345,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= -gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1448,8 +1443,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1467,12 +1462,10 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= @@ -1484,8 +1477,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -lukechampine.com/blake3 v1.4.0 h1:xDbKOZCVbnZsfzM6mHSYcGRHZ3YrLDzqz8XnV4uaD5w= -lukechampine.com/blake3 v1.4.0/go.mod h1:MQJNQCTnR+kwOP/JEZSxj3MaQjp80FOFSNMMHXcSeX0= +lukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg= +lukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/plugin/plugins/badgerds/badgerds.go b/plugin/plugins/badgerds/badgerds.go index 5f5781f8fc3f130a62e3060261df122c09e0ecb4..2410f196c60b95c20243a2b202840f159af4f1dd 100644 --- a/plugin/plugins/badgerds/badgerds.go +++ b/plugin/plugins/badgerds/badgerds.go @@ -108,6 +108,7 @@ func (c *datastoreConfig) DiskSpec() fsrepo.DiskSpec { } func (c *datastoreConfig) Create(path string) (repo.Datastore, error) { + fmt.Fprintln(os.Stderr, "⚠️ badgerds is based on badger 1.x, which has known bugs and is no longer supported by the upstream team. Please switch to a newer datastore such as pebbleds or flatfs.") p := c.path if !filepath.IsAbs(p) { p = filepath.Join(path, p) diff --git a/plugin/plugins/pebbleds/pebbleds.go b/plugin/plugins/pebbleds/pebbleds.go index 13287a5f34d0eddc5346b3b718e8d5da9440a3c2..fab1cc16a88dfa1315d22a4195da6a1e3da054f6 100644 --- a/plugin/plugins/pebbleds/pebbleds.go +++ b/plugin/plugins/pebbleds/pebbleds.go @@ -5,7 +5,7 @@ import ( "path/filepath" "time" - "github.com/cockroachdb/pebble" + "github.com/cockroachdb/pebble/v2" pebbleds "github.com/ipfs/go-ds-pebble" "github.com/ipfs/kubo/misc/fsutil" "github.com/ipfs/kubo/plugin" @@ -110,10 +110,15 @@ func (*pebbledsPlugin) DatastoreConfigParser() fsrepo.ConfigFromMap { return nil, err } - // Use latest version by default. This will ensure that format is - // compatible across database upgrades. if formatMajorVersion == 0 { + // Pebble DB format not configured. Automatically ratchet the + // database to the latest format. This may prevent downgrade. formatMajorVersion = pebble.FormatNewest + } else if formatMajorVersion < pebble.FormatNewest { + // Pebble DB format is configured, but is not the latest. + fmt.Println("⚠️ A newer pebble db format is available.") + fmt.Println(" To upgrade, set the following in the pebble datastore config:") + fmt.Println(" \"formatMajorVersion\":", int(pebble.FormatNewest)) } if bytesPerSync != 0 || disableWAL || formatMajorVersion != 0 || l0CompactionThreshold != 0 || l0StopWritesThreshold != 0 || lBaseMaxBytes != 0 || maxConcurrentCompactions != 0 || memTableSize != 0 || memTableStopWritesThreshold != 0 || walBytesPerSync != 0 || walMinSyncSec != 0 { diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index e7577f9dc19b6cae994f65297e8653bb078deb2b..609b988a627cfef99430ca1544c671696e41e2fd 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -10,6 +10,7 @@ import ( "path/filepath" "strings" "sync" + "time" filestore "github.com/ipfs/boxo/filestore" keystore "github.com/ipfs/boxo/keystore" @@ -146,7 +147,23 @@ func open(repoPath string, userConfigFilePath string) (repo.Repo, error) { return nil, err } - r.lockfile, err = lockfile.Lock(r.path, LockFile) + text := os.Getenv("IPFS_WAIT_REPO_LOCK") + if text != "" { + var lockWaitTime time.Duration + lockWaitTime, err = time.ParseDuration(text) + if err != nil { + log.Errorw("Cannot parse value of IPFS_WAIT_REPO_LOCK as duration, not waiting for repo lock", "err", err, "value", text) + r.lockfile, err = lockfile.Lock(r.path, LockFile) + } else if lockWaitTime <= 0 { + r.lockfile, err = lockfile.WaitLock(context.Background(), r.path, LockFile) + } else { + ctx, cancel := context.WithTimeout(context.Background(), lockWaitTime) + r.lockfile, err = lockfile.WaitLock(ctx, r.path, LockFile) + cancel() + } + } else { + r.lockfile, err = lockfile.Lock(r.path, LockFile) + } if err != nil { return nil, err } diff --git a/routing/delegated.go b/routing/delegated.go index f5f98a03f2517aee544004662447c5a38c1065ff..420f30c832f5f179b2c50a22ea59ada786a9e19a 100644 --- a/routing/delegated.go +++ b/routing/delegated.go @@ -149,12 +149,13 @@ func parse(visited map[string]bool, } type ExtraHTTPParams struct { - PeerID string - Addrs []string - PrivKeyB64 string + PeerID string + Addrs []string + PrivKeyB64 string + HTTPRetrieval bool } -func ConstructHTTPRouter(endpoint string, peerID string, addrs []string, privKey string) (routing.Routing, error) { +func ConstructHTTPRouter(endpoint string, peerID string, addrs []string, privKey string, httpRetrieval bool) (routing.Routing, error) { return httpRoutingFromConfig( config.Router{ Type: "http", @@ -163,9 +164,10 @@ func ConstructHTTPRouter(endpoint string, peerID string, addrs []string, privKey }, }, &ExtraHTTPParams{ - PeerID: peerID, - Addrs: addrs, - PrivKeyB64: privKey, + PeerID: peerID, + Addrs: addrs, + PrivKeyB64: privKey, + HTTPRetrieval: httpRetrieval, }, ) } @@ -200,13 +202,18 @@ func httpRoutingFromConfig(conf config.Router, extraHTTP *ExtraHTTPParams) (rout return nil, err } + protocols := config.DefaultHTTPRoutersFilterProtocols + if extraHTTP.HTTPRetrieval { + protocols = append(protocols, "transport-ipfs-gateway-http") + } + cli, err := drclient.New( params.Endpoint, drclient.WithHTTPClient(delegateHTTPClient), drclient.WithIdentity(key), drclient.WithProviderInfo(addrInfo.ID, addrInfo.Addrs), drclient.WithUserAgent(version.GetUserAgentVersion()), - drclient.WithProtocolFilter(config.DefaultHTTPRoutersFilterProtocols), + drclient.WithProtocolFilter(protocols), drclient.WithStreamResultsRequired(), // https://specs.ipfs.tech/routing/http-routing-v1/#streaming drclient.WithDisabledLocalFiltering(false), // force local filtering in case remote server does not support IPIP-484 ) diff --git a/test/3nodetest/bootstrap/config b/test/3nodetest/bootstrap/config index ac441a19f16e1660e11ad5e68092de3464e38d48..e22f25e909b141e2653181b932b1aed791327fbf 100644 --- a/test/3nodetest/bootstrap/config +++ b/test/3nodetest/bootstrap/config @@ -15,7 +15,8 @@ }, "Mounts": { "IPFS": "/ipfs", - "IPNS": "/ipns" + "IPNS": "/ipns", + "MFS": "/mfs" }, "Version": { "Current": "0.1.7", diff --git a/test/3nodetest/client/config b/test/3nodetest/client/config index 86ef0668d725eeb40f76ec1ce261bfafe53772a3..fa8f923d5c32fc189e3755736deaafcb1e8c1d62 100644 --- a/test/3nodetest/client/config +++ b/test/3nodetest/client/config @@ -17,7 +17,8 @@ }, "Mounts": { "IPFS": "/ipfs", - "IPNS": "/ipns" + "IPNS": "/ipns", + "MFS": "/mfs" }, "Version": { "AutoUpdate": "minor", diff --git a/test/3nodetest/server/config b/test/3nodetest/server/config index fb16a6d7a87d388aa1aa2032514792ec4a1032af..1e9db2a63320208e7a6f86f488165170f9a31a1c 100644 --- a/test/3nodetest/server/config +++ b/test/3nodetest/server/config @@ -17,7 +17,8 @@ }, "Mounts": { "IPFS": "/ipfs", - "IPNS": "/ipns" + "IPNS": "/ipns", + "MFS": "/mfs" }, "Version": { "AutoUpdate": "minor", diff --git a/test/cli/add_test.go b/test/cli/add_test.go index ae652989ab51e1d2043b1a4a894221fe49c1dffc..775a6063baa821940e269c06ef2b5372e472c586 100644 --- a/test/cli/add_test.go +++ b/test/cli/add_test.go @@ -1,10 +1,17 @@ package cli import ( + "io" + "os" + "path/filepath" + "strings" "testing" + "github.com/dustin/go-humanize" "github.com/ipfs/kubo/config" "github.com/ipfs/kubo/test/cli/harness" + "github.com/ipfs/kubo/test/cli/testutils" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -19,6 +26,11 @@ func TestAdd(t *testing.T) { shortStringCidV1Sha512 = "bafkrgqbqt3gerhas23vuzrapkdeqf4vu2dwxp3srdj6hvg6nhsug2tgyn6mj3u23yx7utftq3i2ckw2fwdh5qmhid5qf3t35yvkc5e5ottlw6" ) + const ( + cidV0Length = 34 // cidv0 sha2-256 + cidV1Length = 36 // cidv1 sha2-256 + ) + t.Run("produced cid version: implicit default (CIDv0)", func(t *testing.T) { t.Parallel() node := harness.NewT(t).NewNode().Init().StartDaemon() @@ -96,6 +108,33 @@ func TestAdd(t *testing.T) { require.Equal(t, shortStringCidV1NoRawLeaves, cidStr) }) + t.Run("produced unixfs max file links: command flag --max-file-links overrides configuration in Import.UnixFSFileMaxLinks", func(t *testing.T) { + t.Parallel() + + // + // UnixFSChunker=size-262144 (256KiB) + // Import.UnixFSFileMaxLinks=174 + node := harness.NewT(t).NewNode().Init("--profile=legacy-cid-v0") // legacy-cid-v0 for determinism across all params + node.UpdateConfig(func(cfg *config.Config) { + cfg.Import.UnixFSChunker = *config.NewOptionalString("size-262144") // 256 KiB chunks + cfg.Import.UnixFSFileMaxLinks = *config.NewOptionalInteger(174) // max 174 per level + }) + node.StartDaemon() + defer node.StopDaemon() + + // Add 174MiB file: + // 1024 * 256KiB should fit in single layer + seed := shortString + cidStr := node.IPFSAddDeterministic("262144KiB", seed, "--max-file-links", "1024") + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + + // Expect 1024 links due to cli parameter raising link limit from 174 to 1024 + require.Equal(t, 1024, len(root.Links)) + // expect same CID every time + require.Equal(t, "QmbBftNHWmjSWKLC49dMVrfnY8pjrJYntiAXirFJ7oJrNk", cidStr) + }) + t.Run("ipfs init --profile=legacy-cid-v0 sets config that produces legacy CIDv0", func(t *testing.T) { t.Parallel() node := harness.NewT(t).NewNode().Init("--profile=legacy-cid-v0") @@ -106,13 +145,307 @@ func TestAdd(t *testing.T) { require.Equal(t, shortStringCidV0, cidStr) }) - t.Run("ipfs init --profile=test-cid-v1 produces modern CIDv1", func(t *testing.T) { + t.Run("ipfs init --profile=legacy-cid-v0 applies UnixFSChunker=size-262144 and UnixFSFileMaxLinks", func(t *testing.T) { + t.Parallel() + seed := "v0-seed" + profile := "--profile=legacy-cid-v0" + + t.Run("under UnixFSFileMaxLinks=174", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // Add 44544KiB file: + // 174 * 256KiB should fit in single DAG layer + cidStr := node.IPFSAddDeterministic("44544KiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 174, len(root.Links)) + // expect same CID every time + require.Equal(t, "QmUbBALi174SnogsUzLpYbD4xPiBSFANF4iztWCsHbMKh2", cidStr) + }) + + t.Run("above UnixFSFileMaxLinks=174", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // add 256KiB (one more block), it should force rebalancing DAG and moving most to second layer + cidStr := node.IPFSAddDeterministic("44800KiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 2, len(root.Links)) + // expect same CID every time + require.Equal(t, "QmepeWtdmS1hHXx1oZXsPUv6bMrfRRKfZcoPPU4eEfjnbf", cidStr) + }) + }) + + t.Run("ipfs init --profile=legacy-cid-v0 applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + seed := "hamt-legacy-cid-v0" + profile := "--profile=legacy-cid-v0" + + t.Run("under UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV0Length, "255KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm the number of links is more than UnixFSHAMTDirectorySizeThreshold (indicating regular "basic" directory" + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 903, len(root.Links)) + }) + + t.Run("above UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV0Length, "257KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm this time, the number of links is less than UnixFSHAMTDirectorySizeThreshold + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 252, len(root.Links)) + }) + }) + + t.Run("ipfs init --profile=test-cid-v1 produces CIDv1 with raw leaves", func(t *testing.T) { t.Parallel() node := harness.NewT(t).NewNode().Init("--profile=test-cid-v1") node.StartDaemon() defer node.StopDaemon() cidStr := node.IPFSAddStr(shortString) - require.Equal(t, shortStringCidV1, cidStr) + require.Equal(t, shortStringCidV1, cidStr) // raw leaf + }) + + t.Run("ipfs init --profile=test-cid-v1 applies UnixFSChunker=size-1048576", func(t *testing.T) { + t.Parallel() + seed := "v1-seed" + profile := "--profile=test-cid-v1" + + t.Run("under UnixFSFileMaxLinks=174", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // Add 174MiB file: + // 174 * 1MiB should fit in single layer + cidStr := node.IPFSAddDeterministic("174MiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 174, len(root.Links)) + // expect same CID every time + require.Equal(t, "bafybeigwduxcf2aawppv3isnfeshnimkyplvw3hthxjhr2bdeje4tdaicu", cidStr) + }) + + t.Run("above UnixFSFileMaxLinks=174", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // add +1MiB (one more block), it should force rebalancing DAG and moving most to second layer + cidStr := node.IPFSAddDeterministic("175MiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 2, len(root.Links)) + // expect same CID every time + require.Equal(t, "bafybeidhd7lo2n2v7lta5yamob3xwhbxcczmmtmhquwhjesi35jntf7mpu", cidStr) + }) + }) + + t.Run("ipfs init --profile=test-cid-v1 applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + seed := "hamt-cid-v1" + profile := "--profile=test-cid-v1" + + t.Run("under UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV1Length, "255KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm the number of links is more than UnixFSHAMTDirectoryMaxFanout (indicating regular "basic" directory" + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 897, len(root.Links)) + }) + + t.Run("above UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV1Length, "257KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm this time, the number of links is less than UnixFSHAMTDirectoryMaxFanout + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 252, len(root.Links)) + }) + }) + + t.Run("ipfs init --profile=test-cid-v1-wide applies UnixFSChunker=size-1048576 and UnixFSFileMaxLinks=1024", func(t *testing.T) { + t.Parallel() + seed := "v1-seed-1024" + profile := "--profile=test-cid-v1-wide" + + t.Run("under UnixFSFileMaxLinks=1024", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // Add 174MiB file: + // 1024 * 1MiB should fit in single layer + cidStr := node.IPFSAddDeterministic("1024MiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 1024, len(root.Links)) + // expect same CID every time + require.Equal(t, "bafybeiej5w63ir64oxgkr5htqmlerh5k2rqflurn2howimexrlkae64xru", cidStr) + }) + + t.Run("above UnixFSFileMaxLinks=1024", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + // add +1MiB (one more block), it should force rebalancing DAG and moving most to second layer + cidStr := node.IPFSAddDeterministic("1025MiB", seed) + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 2, len(root.Links)) + // expect same CID every time + require.Equal(t, "bafybeieilp2qx24pe76hxrxe6bpef5meuxto3kj5dd6mhb5kplfeglskdm", cidStr) + }) }) + + t.Run("ipfs init --profile=test-cid-v1-wide applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=1MiB", func(t *testing.T) { + t.Parallel() + seed := "hamt-cid-v1" + profile := "--profile=test-cid-v1-wide" + + t.Run("under UnixFSHAMTDirectorySizeThreshold=1MiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV1Length, "1023KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm the number of links is more than UnixFSHAMTDirectoryMaxFanout (indicating regular "basic" directory" + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 3599, len(root.Links)) + }) + + t.Run("above UnixFSHAMTDirectorySizeThreshold=1MiB", func(t *testing.T) { + t.Parallel() + node := harness.NewT(t).NewNode().Init(profile) + node.StartDaemon() + defer node.StopDaemon() + + randDir, err := os.MkdirTemp(node.Dir, seed) + require.NoError(t, err) + + // Create directory with a lot of files that have filenames which together take close to UnixFSHAMTDirectorySizeThreshold in total + err = createDirectoryForHAMT(randDir, cidV1Length, "1025KiB", seed) + require.NoError(t, err) + cidStr := node.IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + + // Confirm this time, the number of links is less than UnixFSHAMTDirectoryMaxFanout + root, err := node.InspectPBNode(cidStr) + assert.NoError(t, err) + require.Equal(t, 992, len(root.Links)) + }) + }) + +} + +// createDirectoryForHAMT aims to create enough files with long names for the directory block to be close to the UnixFSHAMTDirectorySizeThreshold. +// The calculation is based on boxo's HAMTShardingSize and sizeBelowThreshold which calculates ballpark size of the block +// by adding length of link names and the binary cid length. +// See https://github.com/ipfs/boxo/blob/6c5a07602aed248acc86598f30ab61923a54a83e/ipld/unixfs/io/directory.go#L491 +func createDirectoryForHAMT(dirPath string, cidLength int, unixfsNodeSizeTarget, seed string) error { + hamtThreshold, err := humanize.ParseBytes(unixfsNodeSizeTarget) + if err != nil { + return err + } + + // Calculate how many files with long filenames are needed to hit UnixFSHAMTDirectorySizeThreshold + nameLen := 255 // max that works across windows/macos/linux + alphabetLen := len(testutils.AlphabetEasy) + numFiles := int(hamtThreshold) / (nameLen + cidLength) + + // Deterministic pseudo-random bytes for static CID + drand, err := testutils.DeterministicRandomReader(unixfsNodeSizeTarget, seed) + if err != nil { + return err + } + + // Create necessary files in a single, flat directory + for i := 0; i < numFiles; i++ { + buf := make([]byte, nameLen) + _, err := io.ReadFull(drand, buf) + if err != nil { + return err + } + + // Convert deterministic pseudo-random bytes to ASCII + var sb strings.Builder + + for _, b := range buf { + // Map byte to printable ASCII range (33-126) + char := testutils.AlphabetEasy[int(b)%alphabetLen] + sb.WriteRune(char) + } + filename := sb.String()[:nameLen] + filePath := filepath.Join(dirPath, filename) + + // Create empty file + f, err := os.Create(filePath) + if err != nil { + return err + } + f.Close() + } + return nil } diff --git a/test/cli/bitswap_config_test.go b/test/cli/bitswap_config_test.go new file mode 100644 index 0000000000000000000000000000000000000000..9674d3cb6b3db5b12f2578cbbc9d425a67af769c --- /dev/null +++ b/test/cli/bitswap_config_test.go @@ -0,0 +1,176 @@ +package cli + +import ( + "strings" + "testing" + "time" + + "github.com/ipfs/boxo/bitswap/network/bsnet" + "github.com/ipfs/kubo/config" + "github.com/ipfs/kubo/test/cli/harness" + "github.com/ipfs/kubo/test/cli/testutils" + "github.com/stretchr/testify/assert" +) + +func TestBitswapConfig(t *testing.T) { + t.Parallel() + + // Create test data that will be shared between nodes + testData := testutils.RandomBytes(100) + + t.Run("server enabled (default)", func(t *testing.T) { + t.Parallel() + h := harness.NewT(t) + provider := h.NewNode().Init().StartDaemon() + requester := h.NewNode().Init().StartDaemon() + + hash := provider.IPFSAddStr(string(testData)) + requester.Connect(provider) + + res := requester.IPFS("cat", hash) + assert.Equal(t, testData, res.Stdout.Bytes(), "retrieved data should match original") + }) + + t.Run("server disabled", func(t *testing.T) { + t.Parallel() + h := harness.NewT(t) + + provider := h.NewNode().Init() + provider.SetIPFSConfig("Bitswap.ServerEnabled", false) + provider = provider.StartDaemon() + + requester := h.NewNode().Init().StartDaemon() + + hash := provider.IPFSAddStr(string(testData)) + requester.Connect(provider) + + // If the data was available, it would be retrieved immediately. + // Therefore, after the timeout, we can assume the data is not available + // i.e. the server is disabled + timeout := time.After(3 * time.Second) + dataChan := make(chan []byte) + + go func() { + res := requester.RunIPFS("cat", hash) + dataChan <- res.Stdout.Bytes() + }() + + select { + case data := <-dataChan: + assert.NotEqual(t, testData, data, "retrieved data should not match original") + case <-timeout: + t.Log("Test passed: operation timed out after 3 seconds as expected") + } + }) + + t.Run("client still works when server disabled", func(t *testing.T) { + t.Parallel() + h := harness.NewT(t) + + requester := h.NewNode().Init() + requester.SetIPFSConfig("Bitswap.ServerEnabled", false) + requester.StartDaemon() + + provider := h.NewNode().Init().StartDaemon() + hash := provider.IPFSAddStr(string(testData)) + requester.Connect(provider) + + // Even when the server is disabled, the client should be able to retrieve data + res := requester.RunIPFS("cat", hash) + assert.Equal(t, testData, res.Stdout.Bytes(), "retrieved data should match original") + }) + + t.Run("bitswap over libp2p disabled", func(t *testing.T) { + t.Parallel() + h := harness.NewT(t) + + requester := h.NewNode().Init() + requester.UpdateConfig(func(cfg *config.Config) { + cfg.Bitswap.Libp2pEnabled = config.False + cfg.Bitswap.ServerEnabled = config.False + cfg.HTTPRetrieval.Enabled = config.True + }) + requester.StartDaemon() + + provider := h.NewNode().Init().StartDaemon() + hash := provider.IPFSAddStr(string(testData)) + + requester.Connect(provider) + res := requester.RunIPFS("cat", hash) + assert.Equal(t, []byte{}, res.Stdout.Bytes(), "cat should not return any data") + assert.Contains(t, res.Stderr.String(), "Error: ipld: could not find") + + // Verify that basic operations still work with bitswap disabled + res = requester.IPFS("id") + assert.Equal(t, 0, res.ExitCode(), "basic IPFS operations should work") + res = requester.IPFS("bitswap", "stat") + assert.Equal(t, 0, res.ExitCode(), "bitswap stat should work even with bitswap disabled") + res = requester.IPFS("bitswap", "wantlist") + assert.Equal(t, 0, res.ExitCode(), "bitswap wantlist should work even with bitswap disabled") + + // Verify local operations still work + hashNew := requester.IPFSAddStr("random") + res = requester.IPFS("cat", hashNew) + assert.Equal(t, []byte("random"), res.Stdout.Bytes(), "cat should return the added data") + }) + + // Disabling Bitswap.Libp2pEnabled should remove /ipfs/bitswap* protocols from `ipfs id` + t.Run("disabling bitswap over libp2p removes it from identify protocol list", func(t *testing.T) { + t.Parallel() + h := harness.NewT(t) + + provider := h.NewNode().Init() + provider.UpdateConfig(func(cfg *config.Config) { + cfg.Bitswap.Libp2pEnabled = config.False + cfg.Bitswap.ServerEnabled = config.False + cfg.HTTPRetrieval.Enabled = config.True + }) + provider = provider.StartDaemon() + requester := h.NewNode().Init().StartDaemon() + requester.Connect(provider) + + // read libp2p identify from remote peer, and print protocols + res := requester.IPFS("id", "-f", "<protocols>", provider.PeerID().String()) + protocols := strings.Split(strings.TrimSpace(res.Stdout.String()), "\n") + + // No bitswap protocols should be present + for _, proto := range protocols { + assert.NotContains(t, proto, bsnet.ProtocolBitswap, "bitswap protocol %s should not be advertised when server is disabled", proto) + assert.NotContains(t, proto, bsnet.ProtocolBitswapNoVers, "bitswap protocol %s should not be advertised when server is disabled", proto) + assert.NotContains(t, proto, bsnet.ProtocolBitswapOneOne, "bitswap protocol %s should not be advertised when server is disabled", proto) + assert.NotContains(t, proto, bsnet.ProtocolBitswapOneZero, "bitswap protocol %s should not be advertised when server is disabled", proto) + } + }) + + // HTTPRetrieval uses bitswap engine, we need it + t.Run("errors when both HTTP and libp2p are disabled", func(t *testing.T) { + t.Parallel() + + // init Kubo repo + node := harness.NewT(t).NewNode().Init() + node.UpdateConfig(func(cfg *config.Config) { + cfg.HTTPRetrieval.Enabled = config.False + cfg.Bitswap.Libp2pEnabled = config.False + cfg.Bitswap.ServerEnabled = config.Default + }) + res := node.RunIPFS("daemon") + assert.Contains(t, res.Stderr.Trimmed(), "invalid configuration: Bitswap.Libp2pEnabled and HTTPRetrieval.Enabled are both disabled, unable to initialize Bitswap") + assert.Equal(t, 1, res.ExitCode()) + }) + + // HTTPRetrieval uses bitswap engine, we need it + t.Run("errors when user set conflicting HTTP and libp2p flags", func(t *testing.T) { + t.Parallel() + + // init Kubo repo + node := harness.NewT(t).NewNode().Init() + node.UpdateConfig(func(cfg *config.Config) { + cfg.HTTPRetrieval.Enabled = config.False + cfg.Bitswap.Libp2pEnabled = config.False + cfg.Bitswap.ServerEnabled = config.True // bad user config: can't enable server when libp2p is down + }) + res := node.RunIPFS("daemon") + assert.Contains(t, res.Stderr.Trimmed(), "invalid configuration: Bitswap.Libp2pEnabled and HTTPRetrieval.Enabled are both disabled, unable to initialize Bitswap") + assert.Equal(t, 1, res.ExitCode()) + }) +} diff --git a/test/cli/content_routing_http_test.go b/test/cli/content_routing_http_test.go index aea5c41caeb30121993f80de0944a76de2a7f887..4b210cfbaef593e26d5a5b9087d451daf4d75404 100644 --- a/test/cli/content_routing_http_test.go +++ b/test/cli/content_routing_http_test.go @@ -1,69 +1,20 @@ package cli import ( - "context" "net/http" "net/http/httptest" "os/exec" - "sync" "testing" "time" - "github.com/ipfs/boxo/ipns" "github.com/ipfs/boxo/routing/http/server" - "github.com/ipfs/boxo/routing/http/types" - "github.com/ipfs/boxo/routing/http/types/iter" - "github.com/ipfs/go-cid" + "github.com/ipfs/kubo/config" "github.com/ipfs/kubo/test/cli/harness" "github.com/ipfs/kubo/test/cli/testutils" - "github.com/libp2p/go-libp2p/core/peer" - "github.com/libp2p/go-libp2p/core/routing" + "github.com/ipfs/kubo/test/cli/testutils/httprouting" "github.com/stretchr/testify/assert" ) -type fakeHTTPContentRouter struct { - m sync.Mutex - provideBitswapCalls int - findProvidersCalls int - findPeersCalls int -} - -func (r *fakeHTTPContentRouter) FindProviders(ctx context.Context, key cid.Cid, limit int) (iter.ResultIter[types.Record], error) { - r.m.Lock() - defer r.m.Unlock() - r.findProvidersCalls++ - return iter.FromSlice([]iter.Result[types.Record]{}), nil -} - -// nolint deprecated -func (r *fakeHTTPContentRouter) ProvideBitswap(ctx context.Context, req *server.BitswapWriteProvideRequest) (time.Duration, error) { - r.m.Lock() - defer r.m.Unlock() - r.provideBitswapCalls++ - return 0, nil -} - -func (r *fakeHTTPContentRouter) FindPeers(ctx context.Context, pid peer.ID, limit int) (iter.ResultIter[*types.PeerRecord], error) { - r.m.Lock() - defer r.m.Unlock() - r.findPeersCalls++ - return iter.FromSlice([]iter.Result[*types.PeerRecord]{}), nil -} - -func (r *fakeHTTPContentRouter) GetIPNS(ctx context.Context, name ipns.Name) (*ipns.Record, error) { - return nil, routing.ErrNotSupported -} - -func (r *fakeHTTPContentRouter) PutIPNS(ctx context.Context, name ipns.Name, rec *ipns.Record) error { - return routing.ErrNotSupported -} - -func (r *fakeHTTPContentRouter) numFindProvidersCalls() int { - r.m.Lock() - defer r.m.Unlock() - return r.findProvidersCalls -} - // userAgentRecorder records the user agent of every HTTP request type userAgentRecorder struct { delegate http.Handler @@ -76,16 +27,19 @@ func (r *userAgentRecorder) ServeHTTP(w http.ResponseWriter, req *http.Request) } func TestContentRoutingHTTP(t *testing.T) { - cr := &fakeHTTPContentRouter{} + mockRouter := &httprouting.MockHTTPContentRouter{} // run the content routing HTTP server - userAgentRecorder := &userAgentRecorder{delegate: server.Handler(cr)} + userAgentRecorder := &userAgentRecorder{delegate: server.Handler(mockRouter)} server := httptest.NewServer(userAgentRecorder) t.Cleanup(func() { server.Close() }) // setup the node node := harness.NewT(t).NewNode().Init() - node.Runner.Env["IPFS_HTTP_ROUTERS"] = server.URL + node.UpdateConfig(func(cfg *config.Config) { + // setup Kubo node to use mocked HTTP Router + cfg.Routing.DelegatedRouters = []string{server.URL} + }) node.StartDaemon() // compute a random CID @@ -107,7 +61,7 @@ func TestContentRoutingHTTP(t *testing.T) { // verify the content router was called assert.Eventually(t, func() bool { - return cr.numFindProvidersCalls() > 0 + return mockRouter.NumFindProvidersCalls() > 0 }, time.Minute, 10*time.Millisecond) assert.NotEmpty(t, userAgentRecorder.userAgents) diff --git a/test/cli/harness/ipfs.go b/test/cli/harness/ipfs.go index 8537e2aa25dddc058f92bdab413387d3f9354df5..0842d3627276e5be509a8a6e8541fe7838c6a967 100644 --- a/test/cli/harness/ipfs.go +++ b/test/cli/harness/ipfs.go @@ -76,6 +76,17 @@ func (n *Node) IPFSAddStr(content string, args ...string) string { return n.IPFSAdd(strings.NewReader(content), args...) } +// IPFSAddDeterministic produces a CID of a file of a certain size, filled with deterministically generated bytes based on some seed. +// This ensures deterministic CID on the other end, that can be used in tests. +func (n *Node) IPFSAddDeterministic(size string, seed string, args ...string) string { + log.Debugf("node %d adding %s of deterministic pseudo-random data with seed %q and args: %v", n.ID, size, seed, args) + reader, err := DeterministicRandomReader(size, seed) + if err != nil { + panic(err) + } + return n.IPFSAdd(reader, args...) +} + func (n *Node) IPFSAdd(content io.Reader, args ...string) string { log.Debugf("node %d adding with args: %v", n.ID, args) fullArgs := []string{"add", "-q"} @@ -108,3 +119,15 @@ func (n *Node) IPFSDagImport(content io.Reader, cid string, args ...string) erro }) return res.Err } + +/* +func (n *Node) IPFSDagExport(cid string, car *os.File) error { + log.Debugf("node %d dag export of %s to %q with args: %v", n.ID, cid, car.Name()) + res := n.Runner.MustRun(RunRequest{ + Path: n.IPFSBin, + Args: []string{"dag", "export", cid}, + CmdOpts: []CmdOpt{RunWithStdout(car)}, + }) + return res.Err +} +*/ diff --git a/test/cli/harness/pbinspect.go b/test/cli/harness/pbinspect.go new file mode 100644 index 0000000000000000000000000000000000000000..6abddb61f10ba6d8db88d4fab44af82b18587641 --- /dev/null +++ b/test/cli/harness/pbinspect.go @@ -0,0 +1,54 @@ +package harness + +import ( + "bytes" + "encoding/json" +) + +// InspectPBNode uses dag-json output of 'ipfs dag get' to inspect +// "Logical Format" of DAG-PB as defined in +// https://web.archive.org/web/20250403194752/https://ipld.io/specs/codecs/dag-pb/spec/#logical-format +// (mainly used for inspecting Links without depending on any libraries) +func (n *Node) InspectPBNode(cid string) (PBNode, error) { + log.Debugf("node %d dag get %s as dag-json", n.ID, cid) + + var root PBNode + var dagJsonOutput bytes.Buffer + res := n.Runner.MustRun(RunRequest{ + Path: n.IPFSBin, + Args: []string{"dag", "get", "--output-codec=dag-json", cid}, + CmdOpts: []CmdOpt{RunWithStdout(&dagJsonOutput)}, + }) + if res.Err != nil { + return root, res.Err + } + + err := json.Unmarshal(dagJsonOutput.Bytes(), &root) + if err != nil { + return root, err + } + return root, nil + +} + +// Define structs to match the JSON for +type PBHash struct { + Slash string `json:"/"` +} + +type PBLink struct { + Hash PBHash `json:"Hash"` + Name string `json:"Name"` + Tsize int `json:"Tsize"` +} + +type PBData struct { + Slash struct { + Bytes string `json:"bytes"` + } `json:"/"` +} + +type PBNode struct { + Data PBData `json:"Data"` + Links []PBLink `json:"Links"` +} diff --git a/test/cli/http_retrieval_client_test.go b/test/cli/http_retrieval_client_test.go new file mode 100644 index 0000000000000000000000000000000000000000..f845c818ef589d6bf87e03ab8b5f63c0100be89c --- /dev/null +++ b/test/cli/http_retrieval_client_test.go @@ -0,0 +1,145 @@ +package cli + +import ( + "fmt" + "net" + "net/http" + "net/http/httptest" + "net/url" + "os" + "strings" + "testing" + + "github.com/ipfs/boxo/routing/http/server" + "github.com/ipfs/boxo/routing/http/types" + "github.com/ipfs/go-cid" + "github.com/ipfs/kubo/config" + "github.com/ipfs/kubo/test/cli/harness" + "github.com/ipfs/kubo/test/cli/testutils" + "github.com/ipfs/kubo/test/cli/testutils/httprouting" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/multiformats/go-multiaddr" + "github.com/stretchr/testify/assert" +) + +func TestHTTPRetrievalClient(t *testing.T) { + t.Parallel() + + // many moving pieces here, show more when debug is needed + debug := os.Getenv("DEBUG") == "true" + + // usee local /routing/v1/providers/{cid} and + // /ipfs/{cid} HTTP servers to confirm HTTP-only retrieval works end-to-end. + t.Run("works end-to-end with an HTTP-only provider", func(t *testing.T) { + // setup mocked HTTP Router to handle /routing/v1/providers/cid + mockRouter := &httprouting.MockHTTPContentRouter{Debug: debug} + delegatedRoutingServer := httptest.NewServer(server.Handler(mockRouter)) + t.Cleanup(func() { delegatedRoutingServer.Close() }) + + // init Kubo repo + node := harness.NewT(t).NewNode().Init() + + node.UpdateConfig(func(cfg *config.Config) { + // explicitly enable http client + cfg.HTTPRetrieval.Enabled = config.True + // allow NewMockHTTPProviderServer to use self-signed TLS cert + cfg.HTTPRetrieval.TLSInsecureSkipVerify = config.True + // setup client-only routing which asks both HTTP + DHT + // cfg.Routing.Type = config.NewOptionalString("autoclient") + // setup Kubo node to use mocked HTTP Router + cfg.Routing.DelegatedRouters = []string{delegatedRoutingServer.URL} + }) + + // compute a random CID + randStr := string(testutils.RandomBytes(100)) + res := node.PipeStrToIPFS(randStr, "add", "-qn", "--cid-version", "1") // -n means dont add to local repo, just produce CID + wantCIDStr := res.Stdout.Trimmed() + testCid := cid.MustParse(wantCIDStr) + + // setup mock HTTP provider + httpProviderServer := NewMockHTTPProviderServer(testCid, randStr, debug) + t.Cleanup(func() { httpProviderServer.Close() }) + httpHost, httpPort, err := splitHostPort(httpProviderServer.URL) + assert.NoError(t, err) + + // setup /routing/v1/providers/cid result that points at our mocked HTTP provider + mockHTTPProviderPeerID := "12D3KooWCjfPiojcCUmv78Wd1NJzi4Mraj1moxigp7AfQVQvGLwH" // static, it does not matter, we only care about multiaddr + mockHTTPMultiaddr, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/ip4/%s/tcp/%s/tls/http", httpHost, httpPort)) + mpid, _ := peer.Decode(mockHTTPProviderPeerID) + mockRouter.AddProvider(testCid, &types.PeerRecord{ + Schema: types.SchemaPeer, + ID: &mpid, + Addrs: []types.Multiaddr{{Multiaddr: mockHTTPMultiaddr}}, + // no explicit Protocols, ensure multiaddr alone is enough + }) + + // Start Kubo + node.StartDaemon() + + if debug { + fmt.Printf("delegatedRoutingServer.URL: %s\n", delegatedRoutingServer.URL) + fmt.Printf("httpProviderServer.URL: %s\n", httpProviderServer.URL) + fmt.Printf("httpProviderServer.Multiaddr: %s\n", mockHTTPMultiaddr) + fmt.Printf("testCid: %s\n", testCid) + } + + // Now, make Kubo to read testCid. it was not added to local blockstore, so it has only one provider -- a HTTP server. + + // First, confirm delegatedRoutingServer returned HTTP provider + findprovsRes := node.IPFS("routing", "findprovs", testCid.String()) + assert.Equal(t, mockHTTPProviderPeerID, findprovsRes.Stdout.Trimmed()) + + // Ok, now attempt retrieval. + // If there was no timeout and returned bytes match expected body, HTTP routing and retrieval worked end-to-end. + catRes := node.IPFS("cat", testCid.String()) + assert.Equal(t, randStr, catRes.Stdout.Trimmed()) + }) +} + +// NewMockHTTPProviderServer pretends to be http provider that supports +// block response https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw +func NewMockHTTPProviderServer(c cid.Cid, body string, debug bool) *httptest.Server { + expectedPathPrefix := "/ipfs/" + c.String() + handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if debug { + fmt.Printf("NewMockHTTPProviderServer GET %s\n", req.URL.Path) + } + if strings.HasPrefix(req.URL.Path, expectedPathPrefix) { + w.Header().Set("Content-Type", "application/vnd.ipld.raw") + w.WriteHeader(http.StatusOK) + if req.Method == "GET" { + _, err := w.Write([]byte(body)) + if err != nil { + fmt.Fprintf(os.Stderr, "NewMockHTTPProviderServer GET %s error: %v\n", req.URL.Path, err) + } + } + } else if strings.HasPrefix(req.URL.Path, "/ipfs/bafkqaaa") { + // This is probe from https://specs.ipfs.tech/http-gateways/trustless-gateway/#dedicated-probe-paths + w.Header().Set("Content-Type", "application/vnd.ipld.raw") + w.WriteHeader(http.StatusOK) + } else { + http.Error(w, "Not Found", http.StatusNotFound) + } + }) + + // Make it HTTP/2 with self-signed TLS cert + srv := httptest.NewUnstartedServer(handler) + srv.EnableHTTP2 = true + srv.StartTLS() + return srv +} + +func splitHostPort(httpUrl string) (ipAddr string, port string, err error) { + u, err := url.Parse(httpUrl) + if err != nil { + return "", "", err + } + if u.Scheme == "" || u.Host == "" { + return "", "", fmt.Errorf("invalid URL format: missing scheme or host") + } + ipAddr, port, err = net.SplitHostPort(u.Host) + if err != nil { + return "", "", fmt.Errorf("failed to split host and port from %q: %w", u.Host, err) + } + return ipAddr, port, nil +} diff --git a/test/cli/provider_test.go b/test/cli/provider_test.go index 81af7814954ea77da591c6e8a6ddcde965a594f5..7e2bee411c09a9c715eb05262f3ab7998095e13b 100644 --- a/test/cli/provider_test.go +++ b/test/cli/provider_test.go @@ -7,6 +7,7 @@ import ( "github.com/ipfs/kubo/test/cli/harness" "github.com/ipfs/kubo/test/cli/testutils" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -33,11 +34,11 @@ func TestProvider(t *testing.T) { } } - t.Run("Basic Providing", func(t *testing.T) { + t.Run("Provider.Enabled=true announces new CIDs created by ipfs add", func(t *testing.T) { t.Parallel() nodes := initNodes(t, 2, func(n *harness.Node) { - n.SetIPFSConfig("Experimental.StrategicProviding", false) + n.SetIPFSConfig("Provider.Enabled", true) }) defer nodes.StopDaemons() @@ -48,11 +49,11 @@ func TestProvider(t *testing.T) { expectProviders(t, cid, nodes[0].PeerID().String(), nodes[1:]...) }) - t.Run("Basic Strategic Providing", func(t *testing.T) { + t.Run("Provider.Enabled=false disables announcement of new CID from ipfs add", func(t *testing.T) { t.Parallel() nodes := initNodes(t, 2, func(n *harness.Node) { - n.SetIPFSConfig("Experimental.StrategicProviding", true) + n.SetIPFSConfig("Provider.Enabled", false) }) defer nodes.StopDaemons() @@ -60,6 +61,75 @@ func TestProvider(t *testing.T) { expectNoProviders(t, cid, nodes[1:]...) }) + t.Run("Provider.Enabled=false disables manual announcement via RPC command", func(t *testing.T) { + t.Parallel() + + nodes := initNodes(t, 2, func(n *harness.Node) { + n.SetIPFSConfig("Provider.Enabled", false) + }) + defer nodes.StopDaemons() + + cid := nodes[0].IPFSAddStr(time.Now().String()) + res := nodes[0].RunIPFS("routing", "provide", cid) + assert.Contains(t, res.Stderr.Trimmed(), "invalid configuration: Provider.Enabled is set to 'false'") + assert.Equal(t, 1, res.ExitCode()) + + expectNoProviders(t, cid, nodes[1:]...) + }) + + // Right now Provide and Reprovide are tied together + t.Run("Reprovide.Interval=0 disables announcement of new CID too", func(t *testing.T) { + t.Parallel() + + nodes := initNodes(t, 2, func(n *harness.Node) { + n.SetIPFSConfig("Reprovider.Interval", "0") + }) + defer nodes.StopDaemons() + + cid := nodes[0].IPFSAddStr(time.Now().String()) + expectNoProviders(t, cid, nodes[1:]...) + }) + + // It is a lesser evil - forces users to fix their config and have some sort of interval + t.Run("Manual Reprovider trigger does not work when periodic Reprovider is disabled", func(t *testing.T) { + t.Parallel() + + nodes := initNodes(t, 2, func(n *harness.Node) { + n.SetIPFSConfig("Reprovider.Interval", "0") + }) + defer nodes.StopDaemons() + + cid := nodes[0].IPFSAddStr(time.Now().String(), "--offline") + + expectNoProviders(t, cid, nodes[1:]...) + + res := nodes[0].RunIPFS("routing", "reprovide") + assert.Contains(t, res.Stderr.Trimmed(), "invalid configuration: Reprovider.Interval is set to '0'") + assert.Equal(t, 1, res.ExitCode()) + + expectNoProviders(t, cid, nodes[1:]...) + }) + + // It is a lesser evil - forces users to fix their config and have some sort of interval + t.Run("Manual Reprovider trigger does not work when Provider system is disabled", func(t *testing.T) { + t.Parallel() + + nodes := initNodes(t, 2, func(n *harness.Node) { + n.SetIPFSConfig("Provider.Enabled", false) + }) + defer nodes.StopDaemons() + + cid := nodes[0].IPFSAddStr(time.Now().String(), "--offline") + + expectNoProviders(t, cid, nodes[1:]...) + + res := nodes[0].RunIPFS("routing", "reprovide") + assert.Contains(t, res.Stderr.Trimmed(), "invalid configuration: Provider.Enabled is set to 'false'") + assert.Equal(t, 1, res.ExitCode()) + + expectNoProviders(t, cid, nodes[1:]...) + }) + t.Run("Reprovides with 'all' strategy", func(t *testing.T) { t.Parallel() @@ -149,20 +219,4 @@ func TestProvider(t *testing.T) { expectProviders(t, cidBarDir, nodes[0].PeerID().String(), nodes[1:]...) }) - t.Run("Providing works without ticking", func(t *testing.T) { - t.Parallel() - - nodes := initNodes(t, 2, func(n *harness.Node) { - n.SetIPFSConfig("Reprovider.Interval", "0") - }) - defer nodes.StopDaemons() - - cid := nodes[0].IPFSAddStr(time.Now().String(), "--offline") - - expectNoProviders(t, cid, nodes[1:]...) - - nodes[0].IPFS("routing", "reprovide") - - expectProviders(t, cid, nodes[0].PeerID().String(), nodes[1:]...) - }) } diff --git a/test/cli/testutils/httprouting/mock_http_content_router.go b/test/cli/testutils/httprouting/mock_http_content_router.go new file mode 100644 index 0000000000000000000000000000000000000000..8f6f31023872ad5aa93b117312cb94a332ef73f8 --- /dev/null +++ b/test/cli/testutils/httprouting/mock_http_content_router.go @@ -0,0 +1,117 @@ +package httprouting + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/ipfs/boxo/ipns" + "github.com/ipfs/boxo/routing/http/server" + "github.com/ipfs/boxo/routing/http/types" + "github.com/ipfs/boxo/routing/http/types/iter" + "github.com/ipfs/go-cid" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/routing" +) + +// MockHTTPContentRouter provides /routing/v1 +// (https://specs.ipfs.tech/routing/http-routing-v1/) server implementation +// based on github.com/ipfs/boxo/routing/http/server +type MockHTTPContentRouter struct { + m sync.Mutex + provideBitswapCalls int + findProvidersCalls int + findPeersCalls int + providers map[cid.Cid][]types.Record + peers map[peer.ID][]*types.PeerRecord + Debug bool +} + +func (r *MockHTTPContentRouter) FindProviders(ctx context.Context, key cid.Cid, limit int) (iter.ResultIter[types.Record], error) { + if r.Debug { + fmt.Printf("MockHTTPContentRouter.FindProviders(%s)\n", key.String()) + } + r.m.Lock() + defer r.m.Unlock() + r.findProvidersCalls++ + if r.providers == nil { + r.providers = make(map[cid.Cid][]types.Record) + } + records, found := r.providers[key] + if !found { + return iter.FromSlice([]iter.Result[types.Record]{}), nil + } + results := make([]iter.Result[types.Record], len(records)) + for i, rec := range records { + results[i] = iter.Result[types.Record]{Val: rec} + if r.Debug { + fmt.Printf("MockHTTPContentRouter.FindProviders(%s) result: %+v\n", key.String(), rec) + } + } + return iter.FromSlice(results), nil +} + +// nolint deprecated +func (r *MockHTTPContentRouter) ProvideBitswap(ctx context.Context, req *server.BitswapWriteProvideRequest) (time.Duration, error) { + r.m.Lock() + defer r.m.Unlock() + r.provideBitswapCalls++ + return 0, nil +} + +func (r *MockHTTPContentRouter) FindPeers(ctx context.Context, pid peer.ID, limit int) (iter.ResultIter[*types.PeerRecord], error) { + r.m.Lock() + defer r.m.Unlock() + r.findPeersCalls++ + + if r.peers == nil { + r.peers = make(map[peer.ID][]*types.PeerRecord) + } + records, found := r.peers[pid] + if !found { + return iter.FromSlice([]iter.Result[*types.PeerRecord]{}), nil + } + + results := make([]iter.Result[*types.PeerRecord], len(records)) + for i, rec := range records { + results[i] = iter.Result[*types.PeerRecord]{Val: rec} + if r.Debug { + fmt.Printf("MockHTTPContentRouter.FindPeers(%s) result: %+v\n", pid.String(), rec) + } + } + return iter.FromSlice(results), nil +} + +func (r *MockHTTPContentRouter) GetIPNS(ctx context.Context, name ipns.Name) (*ipns.Record, error) { + return nil, routing.ErrNotSupported +} + +func (r *MockHTTPContentRouter) PutIPNS(ctx context.Context, name ipns.Name, rec *ipns.Record) error { + return routing.ErrNotSupported +} + +func (r *MockHTTPContentRouter) NumFindProvidersCalls() int { + r.m.Lock() + defer r.m.Unlock() + return r.findProvidersCalls +} + +// AddProvider adds a record for a given CID +func (r *MockHTTPContentRouter) AddProvider(key cid.Cid, record types.Record) { + r.m.Lock() + defer r.m.Unlock() + if r.providers == nil { + r.providers = make(map[cid.Cid][]types.Record) + } + r.providers[key] = append(r.providers[key], record) + + peerRecord, ok := record.(*types.PeerRecord) + if ok { + if r.peers == nil { + r.peers = make(map[peer.ID][]*types.PeerRecord) + } + pid := peerRecord.ID + r.peers[*pid] = append(r.peers[*pid], peerRecord) + } +} diff --git a/test/cli/testutils/random_deterministic.go b/test/cli/testutils/random_deterministic.go new file mode 100644 index 0000000000000000000000000000000000000000..e55404168f62e939ba16376d0d916b321de93611 --- /dev/null +++ b/test/cli/testutils/random_deterministic.go @@ -0,0 +1,46 @@ +package testutils + +import ( + "crypto/sha256" + "io" + + "github.com/dustin/go-humanize" + "golang.org/x/crypto/chacha20" +) + +type randomReader struct { + cipher *chacha20.Cipher + remaining int64 +} + +func (r *randomReader) Read(p []byte) (int, error) { + if r.remaining <= 0 { + return 0, io.EOF + } + n := int64(len(p)) + if n > r.remaining { + n = r.remaining + } + // Generate random bytes directly into the provided buffer + r.cipher.XORKeyStream(p[:n], make([]byte, n)) + r.remaining -= n + return int(n), nil +} + +// createRandomReader produces specified number of pseudo-random bytes +// from a seed. +func DeterministicRandomReader(sizeStr string, seed string) (io.Reader, error) { + size, err := humanize.ParseBytes(sizeStr) + if err != nil { + return nil, err + } + // Hash the seed string to a 32-byte key for ChaCha20 + key := sha256.Sum256([]byte(seed)) + // Use ChaCha20 for deterministic random bytes + var nonce [chacha20.NonceSize]byte // Zero nonce for simplicity + cipher, err := chacha20.NewUnauthenticatedCipher(key[:chacha20.KeySize], nonce[:]) + if err != nil { + return nil, err + } + return &randomReader{cipher: cipher, remaining: int64(size)}, nil +} diff --git a/test/cli/testutils/random_files.go b/test/cli/testutils/random_files.go index c7dca10d6de12965fc8630f9ed99ddd58e07fd32..7991cad8309bcda4c9eabd20f09ea65995445ac1 100644 --- a/test/cli/testutils/random_files.go +++ b/test/cli/testutils/random_files.go @@ -24,20 +24,22 @@ type RandFiles struct { FanoutFiles int // how many files per dir FanoutDirs int // how many dirs per dir - RandomSize bool // randomize file sizes - RandomFanout bool // randomize fanout numbers + RandomSize bool // randomize file sizes + RandomNameSize bool // randomize filename lengths + RandomFanout bool // randomize fanout numbers } func NewRandFiles() *RandFiles { return &RandFiles{ - Rand: rand.New(rand.NewSource(time.Now().UnixNano())), - FileSize: 4096, - FilenameSize: 16, - Alphabet: AlphabetEasy, - FanoutDepth: 2, - FanoutDirs: 5, - FanoutFiles: 10, - RandomSize: true, + Rand: rand.New(rand.NewSource(time.Now().UnixNano())), + FileSize: 4096, + FilenameSize: 16, + Alphabet: AlphabetEasy, + FanoutDepth: 2, + FanoutDirs: 5, + FanoutFiles: 10, + RandomSize: true, + RandomNameSize: true, } } @@ -83,7 +85,10 @@ func (r *RandFiles) WriteRandomFile(root string) error { filesize = r.Rand.Int63n(filesize) + 1 } - n := rand.Intn(r.FilenameSize-4) + 4 + n := r.FilenameSize + if r.RandomNameSize { + n = rand.Intn(r.FilenameSize-4) + 4 + } name := r.RandomFilename(n) filepath := path.Join(root, name) f, err := os.Create(filepath) diff --git a/test/dependencies/go.mod b/test/dependencies/go.mod index 3f6a1e39bcd84ce070fd1a23057385d5ffcdfce3..a73c6d6605fdfb44aa146ac68790b2261ac53dd6 100644 --- a/test/dependencies/go.mod +++ b/test/dependencies/go.mod @@ -8,7 +8,7 @@ require ( github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd github.com/golangci/golangci-lint v1.60.2 github.com/ipfs/go-cidutil v0.1.0 - github.com/ipfs/go-log/v2 v2.5.1 + github.com/ipfs/go-log/v2 v2.6.0 github.com/ipfs/go-test v0.2.1 github.com/ipfs/hang-fds v0.1.0 github.com/ipfs/iptb v1.4.1 @@ -28,11 +28,13 @@ require ( github.com/Antonboom/testifylint v1.4.3 // indirect github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Crocmagnon/fatcontext v0.4.0 // indirect + github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/alecthomas/go-check-sumtype v0.1.4 // indirect + github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect @@ -56,7 +58,16 @@ require ( github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect github.com/ckaznocha/intrange v0.1.2 // indirect + github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble/v2 v2.0.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect + github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.13.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -74,6 +85,7 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/gammazero/deque v1.0.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/ghostiam/protogetter v0.3.6 // indirect github.com/go-critic/go-critic v0.11.4 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -91,6 +103,7 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 // indirect github.com/golangci/misspell v0.6.0 // indirect @@ -98,7 +111,7 @@ require ( github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20250208200701-d0013a598941 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -116,19 +129,18 @@ require ( github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect - github.com/ipfs/boxo v0.29.1 // indirect - github.com/ipfs/go-block-format v0.2.0 // indirect + github.com/ipfs/boxo v0.30.0 // indirect + github.com/ipfs/go-bitfield v1.1.0 // indirect + github.com/ipfs/go-block-format v0.2.1 // indirect github.com/ipfs/go-cid v0.5.0 // indirect github.com/ipfs/go-datastore v0.8.2 // indirect - github.com/ipfs/go-ipfs-util v0.0.3 // indirect github.com/ipfs/go-ipld-format v0.6.0 // indirect github.com/ipfs/go-ipld-legacy v0.2.1 // indirect - github.com/ipfs/go-log v1.0.5 // indirect github.com/ipfs/go-metrics-interface v0.3.0 // indirect github.com/ipfs/kubo v0.31.0 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/ipld/go-ipld-prime v0.21.0 // indirect - github.com/ipshipyard/p2p-forge v0.4.0 // indirect + github.com/ipshipyard/p2p-forge v0.5.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jgautheron/goconst v1.7.1 // indirect @@ -142,6 +154,8 @@ require ( github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/koron/go-ssdp v0.0.5 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect @@ -155,8 +169,8 @@ require ( github.com/libp2p/go-flow-metrics v0.2.0 // indirect github.com/libp2p/go-libp2p v0.41.1 // indirect github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect - github.com/libp2p/go-libp2p-kad-dht v0.30.2 // indirect - github.com/libp2p/go-libp2p-kbucket v0.6.5 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.33.1 // indirect + github.com/libp2p/go-libp2p-kbucket v0.7.0 // indirect github.com/libp2p/go-libp2p-record v0.3.1 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.5 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect @@ -174,7 +188,7 @@ require ( github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mgechev/revive v1.3.9 // indirect github.com/mholt/acmez/v3 v3.0.0 // indirect - github.com/miekg/dns v1.1.63 // indirect + github.com/miekg/dns v1.1.66 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -195,7 +209,6 @@ require ( github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onsi/ginkgo/v2 v2.22.2 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pion/datachannel v1.5.10 // indirect @@ -217,13 +230,14 @@ require ( github.com/pion/transport/v3 v3.0.7 // indirect github.com/pion/turn/v4 v4.0.0 // indirect github.com/pion/webrtc/v4 v4.0.10 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/polyfloyd/go-errorlint v1.6.0 // indirect - github.com/prometheus/client_golang v1.21.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.63.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect @@ -233,6 +247,7 @@ require ( github.com/quic-go/quic-go v0.50.1 // indirect github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.3 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect @@ -273,6 +288,7 @@ require ( github.com/urfave/cli v1.22.16 // indirect github.com/uudashr/gocognit v1.1.3 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect + github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect github.com/wlynxg/anet v0.0.5 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect @@ -284,9 +300,9 @@ require ( go-simpler.org/musttag v0.12.2 // indirect go-simpler.org/sloglint v0.7.2 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.23.0 // indirect @@ -294,23 +310,23 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.uber.org/zap/exp v0.3.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/term v0.29.0 // indirect - golang.org/x/text v0.22.0 // indirect - golang.org/x/tools v0.30.0 // indirect - gonum.org/v1/gonum v0.15.1 // indirect - google.golang.org/protobuf v1.36.5 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/sync v0.14.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/tools v0.33.0 // indirect + gonum.org/v1/gonum v0.16.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.5.1 // indirect - lukechampine.com/blake3 v1.4.0 // indirect + lukechampine.com/blake3 v1.4.1 // indirect mvdan.cc/gofumpt v0.7.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect ) diff --git a/test/dependencies/go.sum b/test/dependencies/go.sum index 757ab2b7c52ca74fee5c2cc27e2d0e23b3ffa63c..c1d2937e0aa4b5d4e45a4c350a0b6d02fff478be 100644 --- a/test/dependencies/go.sum +++ b/test/dependencies/go.sum @@ -27,6 +27,8 @@ github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/k github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Crocmagnon/fatcontext v0.4.0 h1:4ykozu23YHA0JB6+thiuEv7iT6xq995qS1vcuWZq0tg= github.com/Crocmagnon/fatcontext v0.4.0/go.mod h1:ZtWrXkgyfsYPzS6K3O88va6t2GEglG93vnII/F94WC0= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= @@ -37,12 +39,16 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f h1:JjxwchlOepwsUWcQwD2mLUAGE9aCp0/ehy6yCHFBOvo= +github.com/aclements/go-perfevent v0.0.0-20240301234650-f7843625020f/go.mod h1:tMDTce/yLLN/SK8gMOxQfnyeMeCg8KGzp0D1cbECEeo= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= @@ -54,7 +60,6 @@ github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8ger github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -95,6 +100,26 @@ github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+U github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 h1:bvJv505UUfjzbaIPdNS4AEkHreDqQk6yuNpsdRHpwFA= +github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94/go.mod h1:Gq51ZeKaFCXk6QwuGM0w1dnaOqc/F5zKT2zA9D6Xeac= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056 h1:slXychO2uDM6hYRu4c0pD0udNI8uObfeKN6UInWViS8= +github.com/cockroachdb/datadriven v1.0.3-0.20240530155848-7682d40af056/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA= +github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA= +github.com/cockroachdb/pebble/v2 v2.0.3 h1:YJ3Sc9jRN/q6OOCNyRHPbcpenbxL1DdgdpUqPlPus6o= +github.com/cockroachdb/pebble/v2 v2.0.3/go.mod h1:NgxgNcWwyG/uxkLUZGM2aelshaLIZvc0hCX7SCfaO8s= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df h1:GUJ4KuZtbOcIfRlprHJFFvIqQ4irtQUl+1fJr+yNmPI= +github.com/cockroachdb/swiss v0.0.0-20250327203710-2932b022f6df/go.mod h1:yBRu/cnL4ks9bgy4vAASdjIW+/xMlFwuHKqtmh3GZQg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI= @@ -105,6 +130,9 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf h1:dwGgBWn84wUS1pVikGiruW+x5XM4amhjaZO20vCjay4= +github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= @@ -160,6 +188,10 @@ github.com/gammazero/chanqueue v1.1.0 h1:yiwtloc1azhgGLFo2gMloJtQvkYD936Ai7tBfa+ github.com/gammazero/chanqueue v1.1.0/go.mod h1:fMwpwEiuUgpab0sH4VHiVcEoji1pSi+EIzeG4TPeKPc= github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34= github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= @@ -167,6 +199,8 @@ github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aev github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -215,6 +249,8 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e h1:4bw4WeyTYPp0smaXiJZCNnLrvVBqirQVreixayXezGc= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= @@ -239,8 +275,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= @@ -249,7 +286,6 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20250208200701-d0013a598941 h1:43XjGa6toxLpeksjcxs1jIoIyr+vUfOqY2c6HB4bpoc= github.com/google/pprof v0.0.0-20250208200701-d0013a598941/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -294,10 +330,12 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 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.29.1 h1:z61ZT4YDfTHLjXTsu/+3wvJ8aJlExthDSOCpx6Nh8xc= -github.com/ipfs/boxo v0.29.1/go.mod h1:MkDJStXiJS9U99cbAijHdcmwNfVn5DKYBmQCOgjY2NU= -github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs= -github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= +github.com/ipfs/boxo v0.30.0 h1:7afsoxPGGqfoH7Dum/wOTGUB9M5fb8HyKPMlLfBvIEQ= +github.com/ipfs/boxo v0.30.0/go.mod h1:BPqgGGyHB9rZZcPSzah2Dc9C+5Or3U1aQe7EH1H7370= +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.2.1 h1:96kW71XGNNa+mZw/MTzJrCpMhBWCrd9kBLoKm9Iip/Q= +github.com/ipfs/go-block-format v0.2.1/go.mod h1:frtvXHMQhM6zn7HvEQu+Qz5wSTj+04oEH/I+NjDgEjk= github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg= github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= @@ -310,17 +348,12 @@ github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1I github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-pq v0.0.3 h1:YpoHVJB+jzK15mr/xsWC574tyDLkezVrDNeaalQBsTE= github.com/ipfs/go-ipfs-pq v0.0.3/go.mod h1:btNw5hsHBpRcSSgZtiNm/SLj5gYIZ18AKtv3kERkRb4= -github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0= -github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs= github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg= github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk= github.com/ipfs/go-ipld-legacy v0.2.1/go.mod h1:782MOUghNzMO2DER0FlBR94mllfdCJCkTtDtPM51otM= -github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= -github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= -github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= -github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipfs/go-log/v2 v2.6.0 h1:2Nu1KKQQ2ayonKp4MPo6pXCjqw1ULc9iohRqWV5EYqg= +github.com/ipfs/go-log/v2 v2.6.0/go.mod h1:p+Efr3qaY5YXpx9TX7MoLCSEZX5boSWj9wh86P5HJa8= github.com/ipfs/go-metrics-interface v0.3.0 h1:YwG7/Cy4R94mYDUuwsBfeziJCVm9pBMJ6q/JR9V40TU= github.com/ipfs/go-metrics-interface v0.3.0/go.mod h1:OxxQjZDGocXVdyTPocns6cOLwHieqej/jos7H4POwoY= github.com/ipfs/go-peertaskqueue v0.8.2 h1:PaHFRaVFdxQk1Qo3OKiHPYjmmusQy7gKQUaL8JDszAU= @@ -337,8 +370,8 @@ github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6 github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= -github.com/ipshipyard/p2p-forge v0.4.0 h1:A40PW027nCZn0d/pw5ufMoxnAo9wZwrG+iuz18A8P5I= -github.com/ipshipyard/p2p-forge v0.4.0/go.mod h1:hVGPP24xrRezP2+z6q8udEW36w89M+jWuWBz9meLggY= +github.com/ipshipyard/p2p-forge v0.5.1 h1:9MCpAlk+wNhy7W/yOYKgi9KlXPnyb0abmDpsRPHUDxQ= +github.com/ipshipyard/p2p-forge v0.5.1/go.mod h1:GNDXM2CR8KRS8mJGw7ARIRVlrG9NH8MdewgNVfIIByA= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= @@ -407,10 +440,10 @@ github.com/libp2p/go-libp2p v0.41.1 h1:8ecNQVT5ev/jqALTvisSJeVNvXYJyK4NhQx1nNRXQ github.com/libp2p/go-libp2p v0.41.1/go.mod h1:DcGTovJzQl/I7HMrby5ZRjeD0kQkGiy+9w6aEkSZpRI= github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= -github.com/libp2p/go-libp2p-kad-dht v0.30.2 h1:K0LJPdXynQ+u3rx6uFlrfNy0i11LE6SOCDzwAAaahys= -github.com/libp2p/go-libp2p-kad-dht v0.30.2/go.mod h1:UV0mxF4ufh/ht05jNg5mcjOMrjK82uecgANa+GKi4y0= -github.com/libp2p/go-libp2p-kbucket v0.6.5 h1:Fsl1YvZcMwqrR4DYrTO02yo9PGYs2HBQIT3lGXFMTxg= -github.com/libp2p/go-libp2p-kbucket v0.6.5/go.mod h1:U6WOd0BvnSp03IQSrjgM54tg7zh1UUNsXLJqAQzClTA= +github.com/libp2p/go-libp2p-kad-dht v0.33.1 h1:hKFhHMf7WH69LDjaxsJUWOU6qZm71uO47M/a5ijkiP0= +github.com/libp2p/go-libp2p-kad-dht v0.33.1/go.mod h1:CdmNk4VeGJa9EXM9SLNyNVySEvduKvb+5rSC/H4pLAo= +github.com/libp2p/go-libp2p-kbucket v0.7.0 h1:vYDvRjkyJPeWunQXqcW2Z6E93Ywx7fX0jgzb/dGOKCs= +github.com/libp2p/go-libp2p-kbucket v0.7.0/go.mod h1:blOINGIj1yiPYlVEX0Rj9QwEkmVnz3EP8LK1dRKBC6g= github.com/libp2p/go-libp2p-record v0.3.1 h1:cly48Xi5GjNw5Wq+7gmjfBiG9HCzQVkiZOUZ8kUl+Fg= github.com/libp2p/go-libp2p-record v0.3.1/go.mod h1:T8itUkLcWQLCYMqtX7Th6r7SexyUJpIyPgks757td/E= github.com/libp2p/go-libp2p-routing-helpers v0.7.5 h1:HdwZj9NKovMx0vqq6YNPTh6aaNzey5zHD7HeLJtq6fI= @@ -445,7 +478,6 @@ github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -462,8 +494,8 @@ github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E= github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= -github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs= +github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE= +github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= @@ -525,8 +557,6 @@ github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= @@ -539,6 +569,8 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o= github.com/pion/datachannel v1.5.10/go.mod h1:p/jJfC9arb29W7WrxyKbepTU20CFgyx5oLo8Rs4Py/M= github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= @@ -581,6 +613,7 @@ github.com/pion/turn/v4 v4.0.0 h1:qxplo3Rxa9Yg1xXDxxH8xaqcyGUtbHYw4QSCvmFWvhM= github.com/pion/turn/v4 v4.0.0/go.mod h1:MuPDkm15nYSklKpN8vWJ9W2M0PlyQZqYt1McGuxG7mA= github.com/pion/webrtc/v4 v4.0.10 h1:Hq/JLjhqLxi+NmCtE8lnRPDr8H4LcNvwg8OxVcdv56Q= github.com/pion/webrtc/v4 v4.0.10/go.mod h1:ViHLVaNpiuvaH8pdiuQxuA9awuE6KVzAXx3vVWilOck= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -594,17 +627,17 @@ github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPP github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= -github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= +github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= @@ -626,7 +659,7 @@ github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtD github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -767,6 +800,8 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSD github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= +github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= +github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= @@ -804,32 +839,24 @@ go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3pp go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/dig v1.18.0 h1:imUL1UiY0Mg4bqbFfsRQO5G4CGRBec/ZujWTvSVp3pw= go.uber.org/dig v1.18.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.23.0 h1:lIr/gYWQGfTwGcSXWXu4vP5Ws6iqnNEIY+F/aFzCKTg= go.uber.org/fx v1.23.0/go.mod h1:o/D9n+2mLP6v1EG+qsdT1O8wKopYAsqZasju97SDFCU= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= @@ -839,7 +866,6 @@ golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -855,11 +881,11 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= -golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI= +golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= @@ -867,9 +893,7 @@ golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -886,8 +910,8 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -919,8 +943,8 @@ golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -940,8 +964,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -958,7 +982,6 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -980,8 +1003,8 @@ golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -998,8 +1021,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -1014,8 +1037,8 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= @@ -1025,12 +1048,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1057,14 +1076,14 @@ golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8 golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= -gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1081,23 +1100,19 @@ google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmE google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/gotestsum v1.12.0 h1:CmwtaGDkHxrZm4Ib0Vob89MTfpc3GrEFMJKovliPwGk= @@ -1108,11 +1123,10 @@ grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJd honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= -lukechampine.com/blake3 v1.4.0 h1:xDbKOZCVbnZsfzM6mHSYcGRHZ3YrLDzqz8XnV4uaD5w= -lukechampine.com/blake3 v1.4.0/go.mod h1:MQJNQCTnR+kwOP/JEZSxj3MaQjp80FOFSNMMHXcSeX0= +lukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg= +lukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo= mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= diff --git a/test/sharness/lib/test-lib.sh b/test/sharness/lib/test-lib.sh index e5714d6223b866a374764ae7ea2d4fa61444fd06..f9292cb237cc860c06164d233a5e8ecdcb0cb7cb 100644 --- a/test/sharness/lib/test-lib.sh +++ b/test/sharness/lib/test-lib.sh @@ -205,6 +205,28 @@ test_init_ipfs() { ipfs init "${args[@]}" --profile=test > /dev/null ' + test_expect_success "prepare config -- mounting" ' + mkdir mountdir ipfs ipns mfs && + test_config_set Mounts.IPFS "$(pwd)/ipfs" && + test_config_set Mounts.IPNS "$(pwd)/ipns" && + test_config_set Mounts.MFS "$(pwd)/mfs" || + test_fsh cat "\"$IPFS_PATH/config\"" + ' + +} + +test_init_ipfs_measure() { + args=("$@") + + # we set the Addresses.API config variable. + # the cli client knows to use it, so only need to set. + # todo: in the future, use env? + + test_expect_success "ipfs init succeeds" ' + export IPFS_PATH="$(pwd)/.ipfs" && + ipfs init "${args[@]}" --profile=test,flatfs-measure > /dev/null + ' + test_expect_success "prepare config -- mounting" ' mkdir mountdir ipfs ipns && test_config_set Mounts.IPFS "$(pwd)/ipfs" && @@ -300,12 +322,14 @@ test_mount_ipfs() { test_expect_success FUSE "'ipfs mount' succeeds" ' do_umount "$(pwd)/ipfs" || true && do_umount "$(pwd)/ipns" || true && + do_umount "$(pwd)/mfs" || true && ipfs mount >actual ' test_expect_success FUSE "'ipfs mount' output looks good" ' echo "IPFS mounted at: $(pwd)/ipfs" >expected && echo "IPNS mounted at: $(pwd)/ipns" >>expected && + echo "MFS mounted at: $(pwd)/mfs" >>expected && test_cmp expected actual ' diff --git a/test/sharness/t0002-docker-image.sh b/test/sharness/t0002-docker-image.sh index 8812c277a74f5ffed48790c302faf57b32ca8b5f..81bb8d4493fdcf0bb9815b28f44a78cf3d75eea7 100755 --- a/test/sharness/t0002-docker-image.sh +++ b/test/sharness/t0002-docker-image.sh @@ -36,7 +36,7 @@ test_expect_success "docker image build succeeds" ' ' test_expect_success "write init scripts" ' - echo "ipfs config Provider.Strategy Bar" > 001.sh && + echo "ipfs config Mounts.IPFS Bar" > 001.sh && echo "ipfs config Pubsub.Router Qux" > 002.sh && chmod +x 002.sh ' @@ -65,7 +65,7 @@ test_expect_success "check that init scripts were run correctly and in the corre test_expect_success "check that init script configs were applied" ' echo Bar > expected && - docker exec "$DOC_ID" ipfs config Provider.Strategy > actual && + docker exec "$DOC_ID" ipfs config Mounts.IPFS > actual && test_cmp actual expected && echo Qux > expected && docker exec "$DOC_ID" ipfs config Pubsub.Router > actual && diff --git a/test/sharness/t0030-mount.sh b/test/sharness/t0030-mount.sh index 0c0983d0c41152bd2ae5a1833384904a14d5124a..6df7a26bbef03b6a803751a031c7776bc4129d4c 100755 --- a/test/sharness/t0030-mount.sh +++ b/test/sharness/t0030-mount.sh @@ -16,7 +16,8 @@ if ! test_have_prereq FUSE; then fi -export IPFS_NS_MAP="welcome.example.com:/ipfs/$HASH_WELCOME_DOCS" +# echo -n "ipfs" > expected && ipfs add --cid-version 1 -Q -w expected +export IPFS_NS_MAP="welcome.example.com:/ipfs/bafybeicq7bvn5lz42qlmghaoiwrve74pzi53auqetbantp5kajucsabike" # start iptb + wait for peering NUM_NODES=5 @@ -27,17 +28,17 @@ startup_cluster $NUM_NODES # test mount failure before mounting properly. test_expect_success "'ipfs mount' fails when there is no mount dir" ' - tmp_ipfs_mount() { ipfsi 0 mount -f=not_ipfs -n=not_ipns >output 2>output.err; } && + tmp_ipfs_mount() { ipfsi 0 mount -f=not_ipfs -n=not_ipns -m=not_mfs >output 2>output.err; } && test_must_fail tmp_ipfs_mount ' test_expect_success "'ipfs mount' output looks good" ' test_must_be_empty output && - test_should_contain "not_ipns\|not_ipfs" output.err + test_should_contain "not_ipns\|not_ipfs\|not_mfs" output.err ' test_expect_success "setup and publish default IPNS value" ' - mkdir "$(pwd)/ipfs" "$(pwd)/ipns" && + mkdir "$(pwd)/ipfs" "$(pwd)/ipns" "$(pwd)/mfs" && ipfsi 0 name publish QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn ' @@ -46,12 +47,14 @@ test_expect_success "setup and publish default IPNS value" ' test_expect_success FUSE "'ipfs mount' succeeds" ' do_umount "$(pwd)/ipfs" || true && do_umount "$(pwd)/ipns" || true && - ipfsi 0 mount -f "$(pwd)/ipfs" -n "$(pwd)/ipns" >actual + do_umount "$(pwd)/mfs" || true && + ipfsi 0 mount -f "$(pwd)/ipfs" -n "$(pwd)/ipns" -m "$(pwd)/mfs" >actual ' test_expect_success FUSE "'ipfs mount' output looks good" ' echo "IPFS mounted at: $(pwd)/ipfs" >expected && echo "IPNS mounted at: $(pwd)/ipns" >>expected && + echo "MFS mounted at: $(pwd)/mfs" >>expected && test_cmp expected actual ' @@ -63,21 +66,64 @@ test_expect_success FUSE "local symlink works" ' test_expect_success FUSE "can resolve ipns names" ' echo -n "ipfs" > expected && - cat ipns/welcome.example.com/ping > actual && + ipfsi 0 add --cid-version 1 -Q -w expected && + cat ipns/welcome.example.com/expected > actual && test_cmp expected actual ' +test_expect_success FUSE "create mfs file via fuse" ' + touch mfs/testfile && + ipfsi 0 files ls | grep testfile +' + +test_expect_success FUSE "create mfs dir via fuse" ' + mkdir mfs/testdir && + ipfsi 0 files ls | grep testdir +' + +test_expect_success FUSE "read mfs file from fuse" ' + echo content > mfs/testfile && + getfattr -n ipfs_cid mfs/testfile +' +test_expect_success FUSE "ipfs add file and read it back via fuse" ' + echo content3 | ipfsi 0 files write -e /testfile3 && + grep content3 mfs/testfile3 +' + +test_expect_success FUSE "ipfs add file and read it back via fuse" ' + echo content > testfile2 && + ipfsi 0 add --to-files /testfile2 testfile2 && + grep content mfs/testfile2 +' + +test_expect_success FUSE "test file xattr" ' + echo content > mfs/testfile && + getfattr -n ipfs_cid mfs/testfile +' + +test_expect_success FUSE "test file removal" ' + touch mfs/testfile && + rm mfs/testfile +' + +test_expect_success FUSE "test nested dirs" ' + mkdir -p mfs/foo/bar/baz/qux && + echo content > mfs/foo/bar/baz/qux/quux && + ipfsi 0 files stat /foo/bar/baz/qux/quux +' + test_expect_success "mount directories cannot be removed while active" ' - test_must_fail rmdir ipfs ipns 2>/dev/null + test_must_fail rmdir ipfs ipns mfs 2>/dev/null ' test_expect_success "unmount directories" ' do_umount "$(pwd)/ipfs" && - do_umount "$(pwd)/ipns" + do_umount "$(pwd)/ipns" && + do_umount "$(pwd)/mfs" ' test_expect_success "mount directories can be removed after shutdown" ' - rmdir ipfs ipns + rmdir ipfs ipns mfs ' test_expect_success 'stop iptb' ' diff --git a/test/sharness/t0032-mount-sharded.sh b/test/sharness/t0032-mount-sharded.sh index 10ba421a225f7938411ef2fbf5ed39d24e9687eb..7a3e518585bee434149d4f9b3318b0c8b2d34889 100755 --- a/test/sharness/t0032-mount-sharded.sh +++ b/test/sharness/t0032-mount-sharded.sh @@ -16,7 +16,7 @@ fi test_init_ipfs test_expect_success 'force sharding' ' - ipfs config --json Internal.UnixFSShardingSizeThreshold "\"1B\"" + ipfs config --json Import.UnixFSHAMTDirectorySizeThreshold "\"1B\"" ' test_launch_ipfs_daemon diff --git a/test/sharness/t0060-daemon.sh b/test/sharness/t0060-daemon.sh index 2a25f5852abf47d2adc232b0d32e7ca6b13745dd..5dbbd852febeb962b9d1f2e631819c350b3a037c 100755 --- a/test/sharness/t0060-daemon.sh +++ b/test/sharness/t0060-daemon.sh @@ -8,8 +8,8 @@ test_description="Test daemon command" . lib/test-lib.sh -test_expect_success "create badger config" ' - ipfs init --profile=badgerds,test > /dev/null && +test_expect_success "create pebble config" ' + ipfs init --profile=pebbleds,test > /dev/null && cp "$IPFS_PATH/config" init-config ' @@ -21,8 +21,8 @@ test_launch_ipfs_daemon --init --init-config="$(pwd)/init-config" --init-profile test_kill_ipfs_daemon test_expect_success "daemon initialization with existing config works" ' - ipfs config "Datastore.Spec.child.path" >actual && - test $(cat actual) = "badgerds" && + ipfs config "Datastore.Spec.path" >actual && + test $(cat actual) = "pebbleds" && ipfs config Addresses > orig_addrs ' diff --git a/test/sharness/t0070-user-config.sh b/test/sharness/t0070-user-config.sh index 1dc4c0369a02626ecf1cc34096c6535f237ebc57..5a8180c7317b07b9f13ce5f5d0e9fa23417646cb 100755 --- a/test/sharness/t0070-user-config.sh +++ b/test/sharness/t0070-user-config.sh @@ -11,12 +11,12 @@ test_description="Test user-provided config values" test_init_ipfs test_expect_success "bootstrap doesn't overwrite user-provided config keys (top-level)" ' - ipfs config Provider.Strategy >previous && - ipfs config Provider.Strategy foo && + ipfs config Identity.PeerID >previous && + ipfs config Identity.PeerID foo && ipfs bootstrap rm --all && echo "foo" >expected && - ipfs config Provider.Strategy >actual && - ipfs config Provider.Strategy $(cat previous) && + ipfs config Identity.PeerID >actual && + ipfs config Identity.PeerID $(cat previous) && test_cmp expected actual ' diff --git a/test/sharness/t0119-prometheus-data/prometheus_metrics b/test/sharness/t0119-prometheus-data/prometheus_metrics index 60475da439fe6f61141531c0c7ca5870420f9ec1..d0900322b28dccb2f87148739713502d063c454e 100644 --- a/test/sharness/t0119-prometheus-data/prometheus_metrics +++ b/test/sharness/t0119-prometheus-data/prometheus_metrics @@ -1,3 +1,4 @@ +exchange_bitswap_requests_in_flight exchange_bitswap_response_bytes_bucket exchange_bitswap_response_bytes_count exchange_bitswap_response_bytes_sum @@ -6,85 +7,6 @@ exchange_bitswap_wantlists_seconds_bucket exchange_bitswap_wantlists_seconds_count exchange_bitswap_wantlists_seconds_sum exchange_bitswap_wantlists_total -flatfs_datastore_batchcommit_errors_total -flatfs_datastore_batchcommit_latency_seconds_bucket -flatfs_datastore_batchcommit_latency_seconds_count -flatfs_datastore_batchcommit_latency_seconds_sum -flatfs_datastore_batchcommit_total -flatfs_datastore_batchdelete_errors_total -flatfs_datastore_batchdelete_latency_seconds_bucket -flatfs_datastore_batchdelete_latency_seconds_count -flatfs_datastore_batchdelete_latency_seconds_sum -flatfs_datastore_batchdelete_total -flatfs_datastore_batchput_errors_total -flatfs_datastore_batchput_latency_seconds_bucket -flatfs_datastore_batchput_latency_seconds_count -flatfs_datastore_batchput_latency_seconds_sum -flatfs_datastore_batchput_size_bytes_bucket -flatfs_datastore_batchput_size_bytes_count -flatfs_datastore_batchput_size_bytes_sum -flatfs_datastore_batchput_total -flatfs_datastore_check_errors_total -flatfs_datastore_check_latency_seconds_bucket -flatfs_datastore_check_latency_seconds_count -flatfs_datastore_check_latency_seconds_sum -flatfs_datastore_check_total -flatfs_datastore_delete_errors_total -flatfs_datastore_delete_latency_seconds_bucket -flatfs_datastore_delete_latency_seconds_count -flatfs_datastore_delete_latency_seconds_sum -flatfs_datastore_delete_total -flatfs_datastore_du_errors_total -flatfs_datastore_du_latency_seconds_bucket -flatfs_datastore_du_latency_seconds_count -flatfs_datastore_du_latency_seconds_sum -flatfs_datastore_du_total -flatfs_datastore_gc_errors_total -flatfs_datastore_gc_latency_seconds_bucket -flatfs_datastore_gc_latency_seconds_count -flatfs_datastore_gc_latency_seconds_sum -flatfs_datastore_gc_total -flatfs_datastore_get_errors_total -flatfs_datastore_get_latency_seconds_bucket -flatfs_datastore_get_latency_seconds_count -flatfs_datastore_get_latency_seconds_sum -flatfs_datastore_get_size_bytes_bucket -flatfs_datastore_get_size_bytes_count -flatfs_datastore_get_size_bytes_sum -flatfs_datastore_get_total -flatfs_datastore_getsize_errors_total -flatfs_datastore_getsize_latency_seconds_bucket -flatfs_datastore_getsize_latency_seconds_count -flatfs_datastore_getsize_latency_seconds_sum -flatfs_datastore_getsize_total -flatfs_datastore_has_errors_total -flatfs_datastore_has_latency_seconds_bucket -flatfs_datastore_has_latency_seconds_count -flatfs_datastore_has_latency_seconds_sum -flatfs_datastore_has_total -flatfs_datastore_put_errors_total -flatfs_datastore_put_latency_seconds_bucket -flatfs_datastore_put_latency_seconds_count -flatfs_datastore_put_latency_seconds_sum -flatfs_datastore_put_size_bytes_bucket -flatfs_datastore_put_size_bytes_count -flatfs_datastore_put_size_bytes_sum -flatfs_datastore_put_total -flatfs_datastore_query_errors_total -flatfs_datastore_query_latency_seconds_bucket -flatfs_datastore_query_latency_seconds_count -flatfs_datastore_query_latency_seconds_sum -flatfs_datastore_query_total -flatfs_datastore_scrub_errors_total -flatfs_datastore_scrub_latency_seconds_bucket -flatfs_datastore_scrub_latency_seconds_count -flatfs_datastore_scrub_latency_seconds_sum -flatfs_datastore_scrub_total -flatfs_datastore_sync_errors_total -flatfs_datastore_sync_latency_seconds_bucket -flatfs_datastore_sync_latency_seconds_count -flatfs_datastore_sync_latency_seconds_sum -flatfs_datastore_sync_total go_gc_duration_seconds go_gc_duration_seconds_count go_gc_duration_seconds_sum @@ -226,85 +148,6 @@ ipfs_http_response_size_bytes ipfs_http_response_size_bytes_count ipfs_http_response_size_bytes_sum ipfs_info -leveldb_datastore_batchcommit_errors_total -leveldb_datastore_batchcommit_latency_seconds_bucket -leveldb_datastore_batchcommit_latency_seconds_count -leveldb_datastore_batchcommit_latency_seconds_sum -leveldb_datastore_batchcommit_total -leveldb_datastore_batchdelete_errors_total -leveldb_datastore_batchdelete_latency_seconds_bucket -leveldb_datastore_batchdelete_latency_seconds_count -leveldb_datastore_batchdelete_latency_seconds_sum -leveldb_datastore_batchdelete_total -leveldb_datastore_batchput_errors_total -leveldb_datastore_batchput_latency_seconds_bucket -leveldb_datastore_batchput_latency_seconds_count -leveldb_datastore_batchput_latency_seconds_sum -leveldb_datastore_batchput_size_bytes_bucket -leveldb_datastore_batchput_size_bytes_count -leveldb_datastore_batchput_size_bytes_sum -leveldb_datastore_batchput_total -leveldb_datastore_check_errors_total -leveldb_datastore_check_latency_seconds_bucket -leveldb_datastore_check_latency_seconds_count -leveldb_datastore_check_latency_seconds_sum -leveldb_datastore_check_total -leveldb_datastore_delete_errors_total -leveldb_datastore_delete_latency_seconds_bucket -leveldb_datastore_delete_latency_seconds_count -leveldb_datastore_delete_latency_seconds_sum -leveldb_datastore_delete_total -leveldb_datastore_du_errors_total -leveldb_datastore_du_latency_seconds_bucket -leveldb_datastore_du_latency_seconds_count -leveldb_datastore_du_latency_seconds_sum -leveldb_datastore_du_total -leveldb_datastore_gc_errors_total -leveldb_datastore_gc_latency_seconds_bucket -leveldb_datastore_gc_latency_seconds_count -leveldb_datastore_gc_latency_seconds_sum -leveldb_datastore_gc_total -leveldb_datastore_get_errors_total -leveldb_datastore_get_latency_seconds_bucket -leveldb_datastore_get_latency_seconds_count -leveldb_datastore_get_latency_seconds_sum -leveldb_datastore_get_size_bytes_bucket -leveldb_datastore_get_size_bytes_count -leveldb_datastore_get_size_bytes_sum -leveldb_datastore_get_total -leveldb_datastore_getsize_errors_total -leveldb_datastore_getsize_latency_seconds_bucket -leveldb_datastore_getsize_latency_seconds_count -leveldb_datastore_getsize_latency_seconds_sum -leveldb_datastore_getsize_total -leveldb_datastore_has_errors_total -leveldb_datastore_has_latency_seconds_bucket -leveldb_datastore_has_latency_seconds_count -leveldb_datastore_has_latency_seconds_sum -leveldb_datastore_has_total -leveldb_datastore_put_errors_total -leveldb_datastore_put_latency_seconds_bucket -leveldb_datastore_put_latency_seconds_count -leveldb_datastore_put_latency_seconds_sum -leveldb_datastore_put_size_bytes_bucket -leveldb_datastore_put_size_bytes_count -leveldb_datastore_put_size_bytes_sum -leveldb_datastore_put_total -leveldb_datastore_query_errors_total -leveldb_datastore_query_latency_seconds_bucket -leveldb_datastore_query_latency_seconds_count -leveldb_datastore_query_latency_seconds_sum -leveldb_datastore_query_total -leveldb_datastore_scrub_errors_total -leveldb_datastore_scrub_latency_seconds_bucket -leveldb_datastore_scrub_latency_seconds_count -leveldb_datastore_scrub_latency_seconds_sum -leveldb_datastore_scrub_total -leveldb_datastore_sync_errors_total -leveldb_datastore_sync_latency_seconds_bucket -leveldb_datastore_sync_latency_seconds_count -leveldb_datastore_sync_latency_seconds_sum -leveldb_datastore_sync_total libp2p_autonat_next_probe_timestamp libp2p_autonat_reachability_status libp2p_autonat_reachability_status_confidence diff --git a/test/sharness/t0119-prometheus-data/prometheus_metrics_added_by_measure_profile b/test/sharness/t0119-prometheus-data/prometheus_metrics_added_by_measure_profile new file mode 100644 index 0000000000000000000000000000000000000000..03f132701f6e6228554c37862410b1682e347114 --- /dev/null +++ b/test/sharness/t0119-prometheus-data/prometheus_metrics_added_by_measure_profile @@ -0,0 +1,158 @@ +flatfs_datastore_batchcommit_errors_total +flatfs_datastore_batchcommit_latency_seconds_bucket +flatfs_datastore_batchcommit_latency_seconds_count +flatfs_datastore_batchcommit_latency_seconds_sum +flatfs_datastore_batchcommit_total +flatfs_datastore_batchdelete_errors_total +flatfs_datastore_batchdelete_latency_seconds_bucket +flatfs_datastore_batchdelete_latency_seconds_count +flatfs_datastore_batchdelete_latency_seconds_sum +flatfs_datastore_batchdelete_total +flatfs_datastore_batchput_errors_total +flatfs_datastore_batchput_latency_seconds_bucket +flatfs_datastore_batchput_latency_seconds_count +flatfs_datastore_batchput_latency_seconds_sum +flatfs_datastore_batchput_size_bytes_bucket +flatfs_datastore_batchput_size_bytes_count +flatfs_datastore_batchput_size_bytes_sum +flatfs_datastore_batchput_total +flatfs_datastore_check_errors_total +flatfs_datastore_check_latency_seconds_bucket +flatfs_datastore_check_latency_seconds_count +flatfs_datastore_check_latency_seconds_sum +flatfs_datastore_check_total +flatfs_datastore_delete_errors_total +flatfs_datastore_delete_latency_seconds_bucket +flatfs_datastore_delete_latency_seconds_count +flatfs_datastore_delete_latency_seconds_sum +flatfs_datastore_delete_total +flatfs_datastore_du_errors_total +flatfs_datastore_du_latency_seconds_bucket +flatfs_datastore_du_latency_seconds_count +flatfs_datastore_du_latency_seconds_sum +flatfs_datastore_du_total +flatfs_datastore_gc_errors_total +flatfs_datastore_gc_latency_seconds_bucket +flatfs_datastore_gc_latency_seconds_count +flatfs_datastore_gc_latency_seconds_sum +flatfs_datastore_gc_total +flatfs_datastore_get_errors_total +flatfs_datastore_get_latency_seconds_bucket +flatfs_datastore_get_latency_seconds_count +flatfs_datastore_get_latency_seconds_sum +flatfs_datastore_get_size_bytes_bucket +flatfs_datastore_get_size_bytes_count +flatfs_datastore_get_size_bytes_sum +flatfs_datastore_get_total +flatfs_datastore_getsize_errors_total +flatfs_datastore_getsize_latency_seconds_bucket +flatfs_datastore_getsize_latency_seconds_count +flatfs_datastore_getsize_latency_seconds_sum +flatfs_datastore_getsize_total +flatfs_datastore_has_errors_total +flatfs_datastore_has_latency_seconds_bucket +flatfs_datastore_has_latency_seconds_count +flatfs_datastore_has_latency_seconds_sum +flatfs_datastore_has_total +flatfs_datastore_put_errors_total +flatfs_datastore_put_latency_seconds_bucket +flatfs_datastore_put_latency_seconds_count +flatfs_datastore_put_latency_seconds_sum +flatfs_datastore_put_size_bytes_bucket +flatfs_datastore_put_size_bytes_count +flatfs_datastore_put_size_bytes_sum +flatfs_datastore_put_total +flatfs_datastore_query_errors_total +flatfs_datastore_query_latency_seconds_bucket +flatfs_datastore_query_latency_seconds_count +flatfs_datastore_query_latency_seconds_sum +flatfs_datastore_query_total +flatfs_datastore_scrub_errors_total +flatfs_datastore_scrub_latency_seconds_bucket +flatfs_datastore_scrub_latency_seconds_count +flatfs_datastore_scrub_latency_seconds_sum +flatfs_datastore_scrub_total +flatfs_datastore_sync_errors_total +flatfs_datastore_sync_latency_seconds_bucket +flatfs_datastore_sync_latency_seconds_count +flatfs_datastore_sync_latency_seconds_sum +flatfs_datastore_sync_total +leveldb_datastore_batchcommit_errors_total +leveldb_datastore_batchcommit_latency_seconds_bucket +leveldb_datastore_batchcommit_latency_seconds_count +leveldb_datastore_batchcommit_latency_seconds_sum +leveldb_datastore_batchcommit_total +leveldb_datastore_batchdelete_errors_total +leveldb_datastore_batchdelete_latency_seconds_bucket +leveldb_datastore_batchdelete_latency_seconds_count +leveldb_datastore_batchdelete_latency_seconds_sum +leveldb_datastore_batchdelete_total +leveldb_datastore_batchput_errors_total +leveldb_datastore_batchput_latency_seconds_bucket +leveldb_datastore_batchput_latency_seconds_count +leveldb_datastore_batchput_latency_seconds_sum +leveldb_datastore_batchput_size_bytes_bucket +leveldb_datastore_batchput_size_bytes_count +leveldb_datastore_batchput_size_bytes_sum +leveldb_datastore_batchput_total +leveldb_datastore_check_errors_total +leveldb_datastore_check_latency_seconds_bucket +leveldb_datastore_check_latency_seconds_count +leveldb_datastore_check_latency_seconds_sum +leveldb_datastore_check_total +leveldb_datastore_delete_errors_total +leveldb_datastore_delete_latency_seconds_bucket +leveldb_datastore_delete_latency_seconds_count +leveldb_datastore_delete_latency_seconds_sum +leveldb_datastore_delete_total +leveldb_datastore_du_errors_total +leveldb_datastore_du_latency_seconds_bucket +leveldb_datastore_du_latency_seconds_count +leveldb_datastore_du_latency_seconds_sum +leveldb_datastore_du_total +leveldb_datastore_gc_errors_total +leveldb_datastore_gc_latency_seconds_bucket +leveldb_datastore_gc_latency_seconds_count +leveldb_datastore_gc_latency_seconds_sum +leveldb_datastore_gc_total +leveldb_datastore_get_errors_total +leveldb_datastore_get_latency_seconds_bucket +leveldb_datastore_get_latency_seconds_count +leveldb_datastore_get_latency_seconds_sum +leveldb_datastore_get_size_bytes_bucket +leveldb_datastore_get_size_bytes_count +leveldb_datastore_get_size_bytes_sum +leveldb_datastore_get_total +leveldb_datastore_getsize_errors_total +leveldb_datastore_getsize_latency_seconds_bucket +leveldb_datastore_getsize_latency_seconds_count +leveldb_datastore_getsize_latency_seconds_sum +leveldb_datastore_getsize_total +leveldb_datastore_has_errors_total +leveldb_datastore_has_latency_seconds_bucket +leveldb_datastore_has_latency_seconds_count +leveldb_datastore_has_latency_seconds_sum +leveldb_datastore_has_total +leveldb_datastore_put_errors_total +leveldb_datastore_put_latency_seconds_bucket +leveldb_datastore_put_latency_seconds_count +leveldb_datastore_put_latency_seconds_sum +leveldb_datastore_put_size_bytes_bucket +leveldb_datastore_put_size_bytes_count +leveldb_datastore_put_size_bytes_sum +leveldb_datastore_put_total +leveldb_datastore_query_errors_total +leveldb_datastore_query_latency_seconds_bucket +leveldb_datastore_query_latency_seconds_count +leveldb_datastore_query_latency_seconds_sum +leveldb_datastore_query_total +leveldb_datastore_scrub_errors_total +leveldb_datastore_scrub_latency_seconds_bucket +leveldb_datastore_scrub_latency_seconds_count +leveldb_datastore_scrub_latency_seconds_sum +leveldb_datastore_scrub_total +leveldb_datastore_sync_errors_total +leveldb_datastore_sync_latency_seconds_bucket +leveldb_datastore_sync_latency_seconds_count +leveldb_datastore_sync_latency_seconds_sum +leveldb_datastore_sync_total diff --git a/test/sharness/t0119-prometheus.sh b/test/sharness/t0119-prometheus.sh index fef204e23124fb5649a91943d41deb1f785faa39..4daf8281b7c12a9648facbc1c4c35ad8e4b5eb6b 100755 --- a/test/sharness/t0119-prometheus.sh +++ b/test/sharness/t0119-prometheus.sh @@ -57,4 +57,28 @@ test_expect_success "make sure initial metrics added by setting ResourceMgr.Enab diff -u ../t0119-prometheus-data/prometheus_metrics_added_by_enabling_rcmgr rcmgr_metrics ' +# Reinitialize ipfs with --profile=flatfs-measure and check metrics. + +test_expect_success "remove ipfs directory" ' + rm -rf .ipfs mountdir ipfs ipns +' + +test_init_ipfs_measure + +test_launch_ipfs_daemon + +test_expect_success "collect metrics" ' + curl "$API_ADDR/debug/metrics/prometheus" > raw_metrics +' +test_kill_ipfs_daemon + +test_expect_success "filter metrics and find ones added by enabling flatfs-measure profile" ' + sed -ne "s/^\([a-z0-9_]\+\).*/\1/p" raw_metrics | LC_ALL=C sort > filtered_metrics && + grep -v -x -f ../t0119-prometheus-data/prometheus_metrics filtered_metrics | LC_ALL=C sort | uniq > measure_metrics +' + +test_expect_success "make sure initial metrics added by initializing with flatfs-measure profile haven't changed" ' + diff -u ../t0119-prometheus-data/prometheus_metrics_added_by_measure_profile measure_metrics +' + test_done diff --git a/test/sharness/t0165-keystore-data/README.md b/test/sharness/t0165-keystore-data/README.md index 4c0a68b516961a6d9815da16c8dea810b4d0e490..298b7708e9539ad9cd19b5b8c52a2ae99df238d6 100644 --- a/test/sharness/t0165-keystore-data/README.md +++ b/test/sharness/t0165-keystore-data/README.md @@ -8,7 +8,7 @@ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 > openssl_rsa.pem ``` secp key used in the 'restrict import key' test. -From: https://www.openssl.org/docs/man1.1.1/man1/openssl-genpkey.html +From: https://docs.openssl.org/1.1.1/man1/genpkey/ ```bash openssl genpkey -genparam -algorithm EC -out ecp.pem \ -pkeyopt ec_paramgen_curve:secp384r1 \ diff --git a/test/sharness/t0250-files-api.sh b/test/sharness/t0250-files-api.sh index 9c01a5bcf17ed5f00fbb1c6478846b70d21942f0..63dacf7d40796486739c82f28cc8096680298bdb 100755 --- a/test/sharness/t0250-files-api.sh +++ b/test/sharness/t0250-files-api.sh @@ -849,7 +849,7 @@ tests_for_files_api "with-daemon" test_kill_ipfs_daemon test_expect_success "enable sharding in config" ' - ipfs config --json Internal.UnixFSShardingSizeThreshold "\"1B\"" + ipfs config --json Import.UnixFSHAMTDirectorySizeThreshold "\"1B\"" ' test_launch_ipfs_daemon_without_network @@ -880,7 +880,7 @@ test_expect_success "set up automatic sharding/unsharding data" ' ' test_expect_success "reset automatic sharding" ' - ipfs config --json Internal.UnixFSShardingSizeThreshold null + ipfs config --json Import.UnixFSHAMTDirectorySizeThreshold null ' test_launch_ipfs_daemon_without_network diff --git a/test/sharness/t0260-sharding.sh b/test/sharness/t0260-sharding.sh index 85e4a7ca708f38abc8833915f40e97714a6d3ece..7b0094fd4eae492c1a80a6c76c6a8a1c883f86b9 100755 --- a/test/sharness/t0260-sharding.sh +++ b/test/sharness/t0260-sharding.sh @@ -34,7 +34,7 @@ test_init_ipfs UNSHARDED="QmavrTrQG4VhoJmantURAYuw3bowq3E2WcvP36NRQDAC1N" test_expect_success "force sharding off" ' -ipfs config --json Internal.UnixFSShardingSizeThreshold "\"1G\"" +ipfs config --json Import.UnixFSHAMTDirectorySizeThreshold "\"1G\"" ' test_add_dir "$UNSHARDED" @@ -46,7 +46,7 @@ test_add_dir "$UNSHARDED" test_kill_ipfs_daemon test_expect_success "force sharding on" ' - ipfs config --json Internal.UnixFSShardingSizeThreshold "\"1B\"" + ipfs config --json Import.UnixFSHAMTDirectorySizeThreshold "\"1B\"" ' SHARDED="QmSCJD1KYLhVVHqBK3YyXuoEqHt7vggyJhzoFYbT8v1XYL" diff --git a/test/sharness/t0270-filestore.sh b/test/sharness/t0270-filestore.sh index f2f63b0de8079c299a1b221160de9b9af0afea70..fc377c2d264ae71c90ca788f0320afc7484d4edb 100755 --- a/test/sharness/t0270-filestore.sh +++ b/test/sharness/t0270-filestore.sh @@ -63,7 +63,7 @@ test_filestore_adds() { init_ipfs_filestore() { test_expect_success "clean up old node" ' - rm -rf "$IPFS_PATH" mountdir ipfs ipns + rm -rf "$IPFS_PATH" mountdir ipfs ipns mfs ' test_init_ipfs diff --git a/test/sharness/t0271-filestore-utils.sh b/test/sharness/t0271-filestore-utils.sh index e7c11646cda3ab27d615b09c3ae7c6562693ae6f..5fd335659325621e20b2a9a65b283bca85a3fce4 100755 --- a/test/sharness/t0271-filestore-utils.sh +++ b/test/sharness/t0271-filestore-utils.sh @@ -10,7 +10,7 @@ test_description="Test out the filestore nocopy functionality" test_init_filestore() { test_expect_success "clean up old node" ' - rm -rf "$IPFS_PATH" mountdir ipfs ipns + rm -rf "$IPFS_PATH" mountdir ipfs ipns mfs ' test_init_ipfs diff --git a/version.go b/version.go index eafff69f35fe6e022e5846ec7e72d60d0ab7b353..26cb836b9769aef65dba8a7980ed08478b55459c 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal. -const CurrentVersionNumber = "0.34.1" +const CurrentVersionNumber = "0.35.0" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint