From 0c0296074f1665faa93459c8470597f970f7411b Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:58:53 +0800 Subject: [PATCH 1/6] feat: add index provider --- cmd/droplet/run.go | 3 + config/common.go | 91 ++++ go.mod | 93 ++-- go.sum | 178 ++++---- indexprovider/disabled_index_provider.go | 51 +++ indexprovider/index_provider.go | 532 +++++++++++++++++++++++ indexprovider/index_provider_mgr.go | 274 ++++++++++++ indexprovider/mesh.go | 54 +++ indexprovider/modules.go | 30 ++ utils/addr.go | 27 ++ 10 files changed, 1209 insertions(+), 124 deletions(-) create mode 100644 indexprovider/disabled_index_provider.go create mode 100644 indexprovider/index_provider.go create mode 100644 indexprovider/index_provider_mgr.go create mode 100644 indexprovider/mesh.go create mode 100644 indexprovider/modules.go create mode 100644 utils/addr.go diff --git a/cmd/droplet/run.go b/cmd/droplet/run.go index 94b5ff0e..bcc41dbe 100644 --- a/cmd/droplet/run.go +++ b/cmd/droplet/run.go @@ -21,6 +21,7 @@ import ( "github.com/ipfs-force-community/droplet/v2/config" "github.com/ipfs-force-community/droplet/v2/dagstore" "github.com/ipfs-force-community/droplet/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/indexprovider" "github.com/ipfs-force-community/droplet/v2/metrics" "github.com/ipfs-force-community/droplet/v2/minermgr" "github.com/ipfs-force-community/droplet/v2/models" @@ -253,6 +254,8 @@ func runDaemon(cctx *cli.Context) error { storageprovider.StorageProviderOpts(cfg), retrievalprovider.RetrievalProviderOpts(cfg), + indexprovider.IndexProviderOpts, + func(s *builder.Settings) error { s.Invokes[ExtractApiKey] = builder.InvokeOption{ Priority: 10, diff --git a/config/common.go b/config/common.go index 412e15d2..1a07e3ba 100644 --- a/config/common.go +++ b/config/common.go @@ -66,6 +66,75 @@ type Signer struct { Token string } +type IndexProviderConfig struct { + // Enable set whether to enable indexing announcement to the network and expose endpoints that + // allow indexer nodes to process announcements. Enabled by default. + Enable bool + + // EntriesCacheCapacity sets the maximum capacity to use for caching the indexing advertisement + // entries. Defaults to 1024 if not specified. The cache is evicted using LRU policy. The + // maximum storage used by the cache is a factor of EntriesCacheCapacity, EntriesChunkSize and + // the length of multihashes being advertised. For example, advertising 128-bit long multihashes + // with the default EntriesCacheCapacity, and EntriesChunkSize means the cache size can grow to + // 256MiB when full. + EntriesCacheCapacity int + + // EntriesChunkSize sets the maximum number of multihashes to include in a single entries chunk. + // Defaults to 16384 if not specified. Note that chunks are chained together for indexing + // advertisements that include more multihashes than the configured EntriesChunkSize. + EntriesChunkSize int + + // TopicName sets the topic name on which the changes to the advertised content are announced. + // If not explicitly specified, the topic name is automatically inferred from the network name + // in following format: '/indexer/ingest/' + // Defaults to empty, which implies the topic name is inferred from network name. + TopicName string + + // PurgeCacheOnStart sets whether to clear any cached entries chunks when the provider engine + // starts. By default, the cache is rehydrated from previously cached entries stored in + // datastore if any is present. + PurgeCacheOnStart bool + + // The network indexer host that the web UI should link to for published announcements + WebHost string + + Announce IndexProviderAnnounceConfig + + HttpPublisher IndexProviderHttpPublisherConfig + + // Set this to true to use the legacy data-transfer/graphsync publisher. + // This should only be used as a temporary fall-back if publishing ipnisync + // over libp2p or HTTP is not working, and publishing over + // data-transfer/graphsync was previously working. + DataTransferPublisher bool +} + +type IndexProviderAnnounceConfig struct { + // Make a direct announcement to a list of indexing nodes over http. + // Note that announcements are already made over pubsub regardless + // of this setting. + AnnounceOverHttp bool + + // The list of URLs of indexing nodes to announce to. + DirectAnnounceURLs []string +} + +type IndexProviderHttpPublisherConfig struct { + // If enabled, requests are served over HTTP instead of libp2p. + Enabled bool + // Set the public hostname / IP for the index provider listener. + // eg "82.129.73.111" + // This is usually the same as the for the boost node. + PublicHostname string + // Set the port on which to listen for index provider requests over HTTP. + // Note that this port must be open on the firewall. + Port int + // Set this to true to publish HTTP over libp2p in addition to plain HTTP, + // Otherwise, the publisher will publish content advertisements using only + // plain HTTP if Enabled is true. + WithLibp2p bool +} + // ProviderConfig is common config for provider type ProviderConfig struct { // When enabled, the miner can accept online deals @@ -123,6 +192,8 @@ type ProviderConfig struct { // The public multi-address for retrieving deals with droplet. // Note: Must be in multiaddr format, eg /ip4/127.0.0.1/tcp/41235/http HTTPRetrievalMultiaddr string + + IndexProvider IndexProviderConfig } func defaultProviderConfig() *ProviderConfig { @@ -159,5 +230,25 @@ func defaultProviderConfig() *ProviderConfig { MaxPublishDealsFee: types.FIL(types.NewInt(0)), MaxMarketBalanceAddFee: types.FIL(types.NewInt(0)), HTTPRetrievalMultiaddr: "", + + IndexProvider: IndexProviderConfig{ + Enable: false, + EntriesCacheCapacity: 1024, + EntriesChunkSize: 16384, + TopicName: "", + PurgeCacheOnStart: false, + WebHost: "cid.contact", + Announce: IndexProviderAnnounceConfig{ + AnnounceOverHttp: true, + DirectAnnounceURLs: []string{"https://cid.contact/ingest/announce"}, + }, + HttpPublisher: IndexProviderHttpPublisherConfig{ + Enabled: true, + PublicHostname: "", + Port: 0, + WithLibp2p: true, + }, + DataTransferPublisher: true, + }, } } diff --git a/go.mod b/go.mod index 45d0a9c4..702a2a78 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/chzyer/readline v1.5.1 github.com/docker/go-units v0.5.0 github.com/etherlabsio/healthcheck/v2 v2.0.0 - github.com/fatih/color v1.15.0 + github.com/fatih/color v1.16.0 github.com/filecoin-project/dagstore v0.6.0 github.com/filecoin-project/go-address v1.1.0 github.com/filecoin-project/go-bitfield v0.2.4 @@ -42,7 +42,7 @@ require ( github.com/ipfs-force-community/sophon-gateway v1.16.0-rc1 github.com/ipfs-force-community/sophon-messager v1.16.0-rc1 github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 - github.com/ipfs/boxo v0.20.0 + github.com/ipfs/boxo v0.21.0 github.com/ipfs/go-blockservice v0.5.2 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 @@ -50,7 +50,7 @@ require ( github.com/ipfs/go-ds-badger2 v0.1.3 github.com/ipfs/go-ds-leveldb v0.5.0 github.com/ipfs/go-ds-measure v0.2.0 - github.com/ipfs/go-graphsync v0.16.0 + github.com/ipfs/go-graphsync v0.17.0 github.com/ipfs/go-ipfs-blocksutil v0.0.1 github.com/ipfs/go-ipfs-chunker v0.0.5 github.com/ipfs/go-ipfs-exchange-offline v0.3.0 @@ -67,10 +67,10 @@ require ( github.com/ipld/go-codec-dagpb v1.6.0 github.com/ipld/go-ipld-prime v0.21.0 github.com/ipld/go-ipld-selector-text-lite v0.0.1 - github.com/libp2p/go-libp2p v0.35.0 + github.com/libp2p/go-libp2p v0.35.2 github.com/libp2p/go-maddr-filter v0.1.0 github.com/mitchellh/go-homedir v1.1.0 - github.com/multiformats/go-multiaddr v0.12.4 + github.com/multiformats/go-multiaddr v0.13.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/multiformats/go-varint v0.0.7 @@ -78,12 +78,12 @@ require ( github.com/stretchr/testify v1.9.0 github.com/strikesecurity/strikememongo v0.2.4 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/urfave/cli/v2 v2.25.7 - github.com/whyrusleeping/cbor-gen v0.1.1 + github.com/urfave/cli/v2 v2.27.2 + github.com/whyrusleeping/cbor-gen v0.1.2 github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 go.mongodb.org/mongo-driver v1.8.4 go.opencensus.io v0.24.0 - go.uber.org/fx v1.21.1 + go.uber.org/fx v1.22.1 go.uber.org/multierr v1.11.0 golang.org/x/sync v0.7.0 golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 @@ -93,10 +93,21 @@ require ( ) require ( + github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4 // indirect + github.com/gammazero/channelqueue v0.2.1 // indirect + github.com/gammazero/deque v0.2.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect + github.com/libp2p/go-cidranger v1.1.0 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.25.2 // indirect + github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect + github.com/libp2p/go-libp2p-record v0.2.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.3 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pion/datachannel v1.5.6 // indirect github.com/pion/dtls/v2 v2.2.11 // indirect - github.com/pion/ice/v2 v2.3.24 // indirect + github.com/pion/ice/v2 v2.3.25 // indirect github.com/pion/interceptor v0.1.29 // indirect github.com/pion/logging v0.2.2 // indirect github.com/pion/mdns v0.0.12 // indirect @@ -109,8 +120,10 @@ require ( github.com/pion/stun v0.6.1 // indirect github.com/pion/transport/v2 v2.2.5 // indirect github.com/pion/turn/v2 v2.1.6 // indirect - github.com/pion/webrtc/v3 v3.2.40 // indirect + github.com/pion/webrtc/v3 v3.2.42 // indirect + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect go.uber.org/mock v0.4.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect ) require ( @@ -142,7 +155,7 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/elastic/gosigar v0.14.2 // indirect + github.com/elastic/gosigar v0.14.3 // indirect github.com/filecoin-project/filecoin-ffi v0.30.4-0.20220519234331-bfd1f5f9fe38 // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 // indirect github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 // indirect @@ -159,13 +172,13 @@ require ( github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/gbrlsnchs/jwt/v3 v3.0.1 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.9.1 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect @@ -184,8 +197,8 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/google/pprof v0.0.0-20240618054019-d3b898a103f8 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/hannahhoward/cbor-gen-for v0.0.0-20230214144701-5d17c9d5243c // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect @@ -211,10 +224,10 @@ require ( github.com/ipfs/go-peertaskqueue v0.8.1 // indirect github.com/ipfs/go-unixfsnode v1.9.0 // indirect github.com/ipfs/go-verifcid v0.0.3 // indirect - github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 // indirect + github.com/ipld/go-ipld-adl-hamt v0.0.0-20240322071803-376decb85801 // indirect github.com/ipld/go-trustless-utils v0.4.1 // indirect - github.com/ipni/go-libipni v0.5.2 // indirect - github.com/ipni/index-provider v0.14.2 // indirect + github.com/ipni/go-libipni v0.6.9 + github.com/ipni/index-provider v0.15.4 github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c // indirect @@ -225,14 +238,14 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.8 // indirect - github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect - github.com/libp2p/go-libp2p-pubsub v0.11.0 // indirect + github.com/libp2p/go-libp2p-pubsub v0.11.0 github.com/libp2p/go-msgio v0.3.0 // indirect github.com/libp2p/go-nat v0.2.0 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect @@ -244,7 +257,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v1.14.22 // indirect - github.com/miekg/dns v1.1.59 // indirect + github.com/miekg/dns v1.1.61 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect @@ -259,7 +272,7 @@ require ( github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect - github.com/onsi/ginkgo/v2 v2.17.3 // indirect + github.com/onsi/ginkgo/v2 v2.19.0 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect @@ -272,11 +285,11 @@ require ( github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/statsd_exporter v0.23.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/quic-go v0.44.0 // indirect + github.com/quic-go/quic-go v0.45.0 // indirect github.com/quic-go/webtransport-go v0.8.0 // indirect github.com/raulk/clock v1.1.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect @@ -300,29 +313,29 @@ require ( github.com/xdg-go/stringprep v1.0.3 // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect - go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/bridge/opencensus v0.39.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/zap v1.27.0 go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/api v0.155.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 77768fb9..abc97163 100644 --- a/go.sum +++ b/go.sum @@ -482,8 +482,9 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= -github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= +github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/uo= +github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -508,8 +509,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7 github.com/etherlabsio/healthcheck/v2 v2.0.0 h1:oKq8cbpwM/yNGPXf2Sff6MIjVUjx/pGYFydWzeK2MpA= github.com/etherlabsio/healthcheck/v2 v2.0.0/go.mod h1:huNVOjKzu6FI1eaO1CGD3ZjhrmPWf5Obu/pzpI6/wog= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= @@ -543,6 +544,8 @@ github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 h1:v+zJS5B6pA3ptWZS4t github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7/go.mod h1:V3Y4KbttaCwyg1gwkP7iai8CbQx4mZUGjd3h9GZWLKE= github.com/filecoin-project/go-ds-versioning v0.1.2 h1:to4pTadv3IeV1wvgbCbN6Vqd+fu+7tveXgv/rCEZy6w= github.com/filecoin-project/go-ds-versioning v0.1.2/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= +github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4 h1:eQW2fyKyMuiweuySEb/zMIc3WLSAnIOY8lpqCVQM7pU= +github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4/go.mod h1:Wry0mNa8z767TBHb7N0cVb+9j00KsHbD2pzsC3li4R8= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -620,8 +623,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= -github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= +github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/gammazero/channelqueue v0.2.1 h1:AcK6wnLrj8koTTn3RxjRCyfmS677TjhIZb1FSMi14qc= github.com/gammazero/channelqueue v0.2.1/go.mod h1:824o5HHE+yO1xokh36BIuSv8YWwXW0364ku91eRMFS4= github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0= @@ -666,8 +669,8 @@ github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= @@ -839,8 +842,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 h1:velgFPYr1X9TDwLIfkV7fWqsFlf7TeP11M/7kPd/dVI= -github.com/google/pprof v0.0.0-20240509144519-723abb6459b7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240618054019-d3b898a103f8 h1:ASJ/LAqdCHOyMYI+dwNxn7Rd8FscNkMyTr1KZU1JI/M= +github.com/google/pprof v0.0.0-20240618054019-d3b898a103f8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -897,8 +900,8 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -921,13 +924,15 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= -github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= @@ -987,8 +992,8 @@ github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6b github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= 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.20.0 h1:umUl7q1v5g5AX8FPLTnZBvvagLmT+V0Tt61EigP81ec= -github.com/ipfs/boxo v0.20.0/go.mod h1:mwttn53Eibgska2DhVIj7ln3UViq7MVHRxOMb+ehSDM= +github.com/ipfs/boxo v0.21.0 h1:XpGXb+TQQ0IUdYaeAxGzWjSs6ow/Lce148A/2IbRDVE= +github.com/ipfs/boxo v0.21.0/go.mod h1:NmweAYeY1USOaJJxouy7DLr/Y5M8UBSsCI2KRivO+TY= github.com/ipfs/go-bitfield v1.0.0/go.mod h1:N/UiujQy+K+ceU1EF5EkVd1TNqevLrCQMIcAEPrdtus= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= @@ -1057,8 +1062,8 @@ github.com/ipfs/go-ds-measure v0.2.0 h1:sG4goQe0KDTccHMyT45CY1XyUbxe5VwTKpg2LjAp github.com/ipfs/go-ds-measure v0.2.0/go.mod h1:SEUD/rE2PwRa4IQEC5FuNAmjJCyYObZr9UvVh8V3JxE= 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-graphsync v0.16.0 h1:0BX7whXlV13Y9FZ/jRg+xaGHaGYbtGxGppKD6tncw6k= -github.com/ipfs/go-graphsync v0.16.0/go.mod h1:WfbMW3hhmX5GQEQ+KJxsFzVJVBKgC5szfrYK7Zc7xIM= +github.com/ipfs/go-graphsync v0.17.0 h1:1gh10v94G/vSGzfApVtbZSvSKkK906Y+2sRqewjDTm4= +github.com/ipfs/go-graphsync v0.17.0/go.mod h1:HXHiTRIw3wrN3InMwdV+IzpBAtreEf/KqFlEibhfVgo= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.2.1/go.mod h1:jGesd8EtCM3/zPgx+qr0/feTXGUeRai6adgwC+Q+JvE= @@ -1161,6 +1166,8 @@ github.com/ipfs/go-peertaskqueue v0.7.0/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68 github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= +github.com/ipfs/go-test v0.0.2 h1:Wdxl4bKEdjEM8SLiulXMHlAQwHYOhX3CSBoUoEvncmM= +github.com/ipfs/go-test v0.0.2/go.mod h1:qhIM1EluEfElKKM6fnWxGn822/z9knUGM1+I/OAQNKI= github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= github.com/ipfs/go-unixfs v0.4.5 h1:wj8JhxvV1G6CD7swACwSKYa+NgtdWC1RUit+gFnymDU= @@ -1187,8 +1194,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-fixtureplate v0.0.2 h1:q7dSdIXeyY5v4AAFvB6M1nPWuRzTeYcgpbeqGygSLu8= github.com/ipld/go-fixtureplate v0.0.2/go.mod h1:z7AnsVOetEl6sQ7j5iMyqVGrS9BgGGE4u69TtsLhJGU= -github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 h1:QAI/Ridj0+foHD6epbxmB4ugxz9B4vmNdYSmQLGa05E= -github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0/go.mod h1:odxGcpiQZLzP5+yGu84Ljo8y3EzCvNAQKEodHNsHLXA= +github.com/ipld/go-ipld-adl-hamt v0.0.0-20240322071803-376decb85801 h1:B5P5TdYpNt0ZEbbZ4Tjj7mO3dWENbT5PxOJ3xgj+lnQ= +github.com/ipld/go-ipld-adl-hamt v0.0.0-20240322071803-376decb85801/go.mod h1:xisTNW7Sm8GTyY+n3XfQKScTPcOlVyZrzU71lTb7kuE= github.com/ipld/go-ipld-prime v0.0.2-0.20191108012745-28a82f04c785/go.mod h1:bDDSvVz7vaK12FNvMeRYnpRFkSUPNQOiCYQezMD/P3w= github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= @@ -1209,10 +1216,10 @@ github.com/ipld/go-trustless-utils v0.4.1 h1:puA14381Hg2LzH724mZ5ZFKFx+FFjjT5fPF github.com/ipld/go-trustless-utils v0.4.1/go.mod h1:DgGuyfJ33goYwYVisjnxrlra0HVmZuHWVisVIkzVo1o= github.com/ipld/ipld/specs v0.0.0-20231012031213-54d3b21deda4 h1:0VXv637/xpI0Pb5J8K+K8iRtTw4DOcxs0MB1HMzfwNY= github.com/ipld/ipld/specs v0.0.0-20231012031213-54d3b21deda4/go.mod h1:WcT0DfRe+e2QFY0kcbsOnuT6jL5Q0JNZ83I5DHIdStg= -github.com/ipni/go-libipni v0.5.2 h1:9vaYOnR4dskd8p88NOboqI6yVqBwYPNCQ/zOaRSr59I= -github.com/ipni/go-libipni v0.5.2/go.mod h1:UnrhEqjVI2Z2HXlaieOBONJmtW557nZkYpB4IIsMD+s= -github.com/ipni/index-provider v0.14.2 h1:daA3IFnI2n2x/mL0K91SQHNLq6Vvfp5q4uFX9G4glvE= -github.com/ipni/index-provider v0.14.2/go.mod h1:mArx7Ou3Y62fIDSj9a1Neh5G14xQcwXGbfEbf47vyuM= +github.com/ipni/go-libipni v0.6.9 h1:eoV+7RjJVEqvBgJFZPU5BrlAjzItLnPcJ43zbSnvDjs= +github.com/ipni/go-libipni v0.6.9/go.mod h1:ejZ1Q67X3Id9/mQ1VTUQ7aFhCofaAxUTPSYHzQKPwXg= +github.com/ipni/index-provider v0.15.4 h1:K64q94r6M/QFyIvRwMxC6oOv92cOixCzy/awGmsBEXI= +github.com/ipni/index-provider v0.15.4/go.mod h1:R08LoUrA12fiqtDVUwLAv+g09BPY0FsCG58JvFEyVzo= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -1283,16 +1290,16 @@ github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= -github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1343,8 +1350,8 @@ github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniV github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= -github.com/libp2p/go-libp2p v0.35.0 h1:1xS1Bkr9X7GtdvV6ntLnDV9xB1kNjHK1lZ0eaO6gnhc= -github.com/libp2p/go-libp2p v0.35.0/go.mod h1:snyJQix4ET6Tj+LeI0VPjjxTtdWpeOhYt5lEY0KirkQ= +github.com/libp2p/go-libp2p v0.35.2 h1:287oHbuplkrLdAF+syB0n/qDgd50AUBtEODqS0e0HDs= +github.com/libp2p/go-libp2p v0.35.2/go.mod h1:RKCDNt30IkFipGL0tl8wQW/3zVWEGFUZo8g2gAKxwjU= github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= 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= @@ -1596,8 +1603,8 @@ github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7 github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs= -github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk= +github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= +github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= 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= @@ -1663,8 +1670,8 @@ github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDye github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= -github.com/multiformats/go-multiaddr v0.12.4 h1:rrKqpY9h+n80EwhhC/kkcunCZZ7URIF8yN1WEUt2Hvc= -github.com/multiformats/go-multiaddr v0.12.4/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= +github.com/multiformats/go-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ= +github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= @@ -1719,6 +1726,8 @@ github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXS github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1750,8 +1759,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= -github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1761,8 +1770,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= -github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= @@ -1806,8 +1815,8 @@ github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNI github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= github.com/pion/dtls/v2 v2.2.11 h1:9U/dpCYl1ySttROPWJgqWKEylUdT0fXp/xst6JwY5Ks= github.com/pion/dtls/v2 v2.2.11/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= -github.com/pion/ice/v2 v2.3.24 h1:RYgzhH/u5lH0XO+ABatVKCtRd+4U1GEaCXSMjNr13tI= -github.com/pion/ice/v2 v2.3.24/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= +github.com/pion/ice/v2 v2.3.25 h1:M5rJA07dqhi3nobJIg+uPtcVjFECTrhcR3n0ns8kDZs= +github.com/pion/ice/v2 v2.3.25/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= github.com/pion/interceptor v0.1.29 h1:39fsnlP1U8gw2JzOFWdfCU82vHvhW9o0rZnZF56wF+M= github.com/pion/interceptor v0.1.29/go.mod h1:ri+LGNjRUc5xUNtDEPzfdkmSqISixVTBF/z/Zms/6T4= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= @@ -1843,8 +1852,8 @@ github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37 github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= -github.com/pion/webrtc/v3 v3.2.40 h1:Wtfi6AZMQg+624cvCXUuSmrKWepSB7zfgYDOYqsSOVU= -github.com/pion/webrtc/v3 v3.2.40/go.mod h1:M1RAe3TNTD1tzyvqHrbVODfwdPGSXOUo/OgpoGGJqFY= +github.com/pion/webrtc/v3 v3.2.42 h1:WN/ZuMjtpQOoGRCZUg/zFG+JHEvYLVyDKOxU6H1qWlE= +github.com/pion/webrtc/v3 v3.2.42/go.mod h1:M1RAe3TNTD1tzyvqHrbVODfwdPGSXOUo/OgpoGGJqFY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1898,8 +1907,8 @@ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ 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.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= 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.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1910,8 +1919,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 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.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +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/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/prometheus/statsd_exporter v0.23.0 h1:GEkriUCmARYh1gSA0gzpvmTg/oHMc5MfDFNlS/che4E= github.com/prometheus/statsd_exporter v0.23.0/go.mod h1:1itCY9XMa2p5pjO5HseGjs5cnaIA5qxLCYmn3OUna58= @@ -1919,8 +1928,8 @@ github.com/puzpuzpuz/xsync/v2 v2.4.1 h1:aGdE1C/HaR/QC6YAFdtZXi60Df8/qBIrs8PKrzkI github.com/puzpuzpuz/xsync/v2 v2.4.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= -github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= +github.com/quic-go/quic-go v0.45.0 h1:OHmkQGM37luZITyTSu6ff03HP/2IrwDX1ZFiNEhSFUE= +github.com/quic-go/quic-go v0.45.0/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI= github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg= github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM= github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= @@ -1937,8 +1946,8 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -2075,8 +2084,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -2108,8 +2117,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.1.0/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= -github.com/whyrusleeping/cbor-gen v0.1.1 h1:eKfcJIoxivjMtwfCfmJAqSF56MHcWqyIScXwaC1VBgw= -github.com/whyrusleeping/cbor-gen v0.1.1/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= +github.com/whyrusleeping/cbor-gen v0.1.2 h1:WQFlrPhpcQl+M2/3dP5cvlTLWPVsL6LGBb9jJt6l/cA= +github.com/whyrusleeping/cbor-gen v0.1.2/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= 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= @@ -2177,8 +2186,8 @@ go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+n go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/bridge/opencensus v0.39.0 h1:YHivttTaDhbZIHuPlg1sWsy2P5gj57vzqPfkHItgbwQ= go.opentelemetry.io/otel/bridge/opencensus v0.39.0/go.mod h1:vZ4537pNjFDXEx//WldAR6Ro2LC8wwmFC76njAXwNPE= go.opentelemetry.io/otel/exporters/jaeger v1.7.0/go.mod h1:PwQAOqBgqbLQRKlj466DuD2qyMjbtcPpfPfj+AqbSBs= @@ -2188,25 +2197,26 @@ go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9deb go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -2225,8 +2235,8 @@ go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.15.0/go.mod h1:jI3RazQUhGv5KkpZIRv+kuP4CcgX3fnc0qX8bLnzbx8= go.uber.org/fx v1.17.1/go.mod h1:yO7KN5rhlARljyo4LR047AjaV6J+KFzd/Z7rnTbEn0A= -go.uber.org/fx v1.21.1 h1:RqBh3cYdzZS0uqwVeEjOX2p73dddLpym315myy/Bpb0= -go.uber.org/fx v1.21.1/go.mod h1:HT2M7d7RHo+ebKGh9NRcrsrHHfpZ60nW3QRubMRfv48= +go.uber.org/fx v1.22.1 h1:nvvln7mwyT5s1q201YE29V/BFrGor6vMiDNpU/78Mys= +go.uber.org/fx v1.22.1/go.mod h1:HT2M7d7RHo+ebKGh9NRcrsrHHfpZ60nW3QRubMRfv48= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -2320,8 +2330,8 @@ golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq 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.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2340,8 +2350,8 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20210615023648-acb5c1269671/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= golang.org/x/exp v0.0.0-20210714144626-1041f73d31d8/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -2389,8 +2399,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -2488,8 +2498,8 @@ golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= 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.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= 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= @@ -2697,8 +2707,8 @@ golang.org/x/sys v0.15.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.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -2720,8 +2730,8 @@ golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= 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.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= 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= @@ -2743,8 +2753,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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -2838,8 +2848,8 @@ golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 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= @@ -2972,8 +2982,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= 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= @@ -3051,8 +3061,8 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= diff --git a/indexprovider/disabled_index_provider.go b/indexprovider/disabled_index_provider.go new file mode 100644 index 00000000..f1affb2a --- /dev/null +++ b/indexprovider/disabled_index_provider.go @@ -0,0 +1,51 @@ +package indexprovider + +import ( + "context" + "fmt" + + "github.com/ipfs/go-cid" + "github.com/ipni/go-libipni/ingest/schema" + "github.com/ipni/go-libipni/metadata" + provider "github.com/ipni/index-provider" + "github.com/libp2p/go-libp2p/core/peer" +) + +type DisabledIndexProvider struct{} + +var _ provider.Interface = (*DisabledIndexProvider)(nil) + +func NewDisabledIndexProvider() *DisabledIndexProvider { + return &DisabledIndexProvider{} +} + +func (d DisabledIndexProvider) PublishLocal(ctx context.Context, advertisement schema.Advertisement) (cid.Cid, error) { + return cid.Undef, fmt.Errorf("could not publish locally: index provider disabled") +} + +func (d DisabledIndexProvider) Publish(ctx context.Context, advertisement schema.Advertisement) (cid.Cid, error) { + return cid.Undef, fmt.Errorf("could not publish: index provider disabled") +} + +func (d DisabledIndexProvider) RegisterMultihashLister(lister provider.MultihashLister) { +} + +func (d DisabledIndexProvider) NotifyPut(ctx context.Context, provider *peer.AddrInfo, contextID []byte, md metadata.Metadata) (cid.Cid, error) { + return cid.Undef, fmt.Errorf("could not notify put: index provider disabled") +} + +func (d DisabledIndexProvider) NotifyRemove(ctx context.Context, providerID peer.ID, contextID []byte) (cid.Cid, error) { + return cid.Undef, fmt.Errorf("could not notify remove: index provider disabled") +} + +func (d DisabledIndexProvider) GetAdv(ctx context.Context, cid cid.Cid) (*schema.Advertisement, error) { + return nil, fmt.Errorf("could not get advertisement: index provider disabled") +} + +func (d DisabledIndexProvider) GetLatestAdv(ctx context.Context) (cid.Cid, *schema.Advertisement, error) { + return cid.Undef, nil, fmt.Errorf("could not get latest advertisement: index provider disabled") +} + +func (d DisabledIndexProvider) Shutdown() error { + return nil +} diff --git a/indexprovider/index_provider.go b/indexprovider/index_provider.go new file mode 100644 index 00000000..e60d4837 --- /dev/null +++ b/indexprovider/index_provider.go @@ -0,0 +1,532 @@ +package indexprovider + +import ( + "context" + "errors" + "fmt" + "net/url" + "strings" + + "github.com/google/uuid" + "github.com/ipfs/go-cid" + logging "github.com/ipfs/go-log/v2" + "github.com/ipld/go-ipld-prime" + "github.com/ipni/go-libipni/metadata" + provider "github.com/ipni/index-provider" + "github.com/ipni/index-provider/engine" + "github.com/ipni/index-provider/engine/xproviders" + "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/multiformats/go-multihash" + "go.mongodb.org/mongo-driver/mongo" + + v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/dagstore" + "github.com/ipfs-force-community/droplet/v2/models/repo" +) + +var log = logging.Logger("index-provider-wrapper") + +type Wrapper struct { + enabled bool + + h host.Host + dagWrapper *dagstore.Wrapper + full v1.FullNode + cfg *config.ProviderConfig + dealsDB repo.StorageDealRepo + directDealsDB repo.DirectDealRepo + prov provider.Interface + + meshCreator MeshCreator + // bitswapEnabled records whether to announce bitswap as an available + // protocol to the network indexer + bitswapEnabled bool + httpEnabled bool + stop context.CancelFunc +} + +func NewWrapper(h host.Host, + cfg *config.ProviderConfig, + full v1.FullNode, + r repo.Repo, + dagWrapper *dagstore.Wrapper, + prov provider.Interface, +) (*Wrapper, error) { + _, isDisabled := prov.(*DisabledIndexProvider) + + // todo: support bitswap + // bitswap is enabled if there is a bitswap peer id + bitswapEnabled := false + // http is considered enabled if there is an http retrieval multiaddr set + httpEnabled := cfg.HTTPRetrievalMultiaddr != "" + + // setup bitswap extended provider if there is a public multi addr for bitswap + w := &Wrapper{ + h: h, + dealsDB: r.StorageDealRepo(), + directDealsDB: r.DirectDealRepo(), + prov: prov, + meshCreator: NewMeshCreator(full, h), + cfg: cfg, + enabled: !isDisabled, + bitswapEnabled: bitswapEnabled, + httpEnabled: httpEnabled, + full: full, + dagWrapper: dagWrapper, + } + + return w, nil +} + +func (w *Wrapper) Start(ctx context.Context) { + w.prov.RegisterMultihashLister(w.MultihashLister) + + runCtx, runCancel := context.WithCancel(ctx) + w.stop = runCancel + + // Announce all deals on startup in case of a config change + go func() { + err := w.AnnounceExtendedProviders(runCtx) + if err != nil { + log.Warnf("announcing extended providers: %s", err) + } + }() + + log.Info("starting index provider") +} + +func (w *Wrapper) Stop() { + w.stop() +} + +func (w *Wrapper) Enabled() bool { + return w.enabled +} + +// AnnounceExtendedProviders announces changes to Market configuration in the context of retrieval +// methods. +// +// The advertisement published by this function covers 2 protocols: +// +// Bitswap: +// +// 1. bitswap is completely disabled: in which case an advertisement is +// published with http(or empty if http is disabled) extended providers +// that should wipe previous support on indexer side. +// +// 2. bitswap is enabled with public addresses: in which case publish an +// advertisement with extended providers records corresponding to the +// public addresses. Note, according the IPNI spec, the host ID will +// also be added to the extended providers for signing reasons with empty +// metadata making a total of 2 extended provider records. +// +// 3. bitswap with droplet address: in which case public an advertisement +// with one extended provider record that just adds bitswap metadata. +// +// HTTP: +// +// 1. http is completely disabled: in which case an advertisement is +// published with bitswap(or empty if bitswap is disabled) extended providers +// that should wipe previous support on indexer side +// +// 2. http is enabled: in which case an advertisement is published with +// bitswap and http(or only http if bitswap is disabled) extended providers +// that should wipe previous support on indexer side +// +// Note that in any case one advertisement is published by droplet on startup +// to reflect on extended provider configuration, even if the config remains the +// same. Future work should detect config change and only publish ads when +// config changes. +func (w *Wrapper) AnnounceExtendedProviders(ctx context.Context) error { + if !w.enabled { + return errors.New("cannot announce all deals: index provider is disabled") + } + // for now, only generate an indexer provider announcement if bitswap announcements + // are enabled -- all other graphsync announcements are context ID specific + + // build the extended providers announcement + key := w.h.Peerstore().PrivKey(w.h.ID()) + adBuilder := xproviders.NewAdBuilder(w.h.ID(), key, w.h.Addrs()) + + err := w.appendExtendedProviders(ctx, adBuilder, key) + if err != nil { + return err + } + + last, _, err := w.prov.GetLatestAdv(ctx) + if err != nil { + return err + } + adBuilder.WithLastAdID(last) + ad, err := adBuilder.BuildAndSign() + if err != nil { + return err + } + + // make sure we're connected to the mesh so that the message will go through + // pubsub and reach the indexer + err = w.meshCreator.Connect(ctx) + if err != nil { + log.Warnf("could not connect to pubsub mesh before announcing extended provider: %w", err) + } + + // publish the extended providers announcement + adCid, err := w.prov.Publish(ctx, *ad) + if err != nil { + return err + } + + log.Infof("announced endpoint to indexer with advertisement cid %s", adCid) + + return nil +} + +func (w *Wrapper) appendExtendedProviders(_ context.Context, adBuilder *xproviders.AdBuilder, key crypto.PrivKey) error { + // if !w.bitswapEnabled { + // // If bitswap is completely disabled, publish an advertisement with empty extended providers + // // which should override previously published extended providers associated to w.h.ID(). + // log.Info("bitswap is not enabled - announcing bitswap disabled to Indexer") + // } else { + // if we're exposing bitswap publicly, we announce bitswap as an extended provider. If we're not + // we announce it as metadata on the main provider + + // marshal bitswap metadata + // meta := metadata.Default.New(metadata.Bitswap{}) + // mbytes, err := meta.MarshalBinary() + // if err != nil { + // return err + // } + // var ep xproviders.Info + // if len(w.cfg.Retrievals.Bitswap.BitswapPublicAddresses) > 0 { + // if w.cfg.Retrievals.Bitswap.BitswapPrivKeyFile == "" { + // return fmt.Errorf("missing required configuration key BitswapPrivKeyFile: " + + // "droplet is configured with BitswapPublicAddresses but the BitswapPrivKeyFile configuration key is empty") + // } + + // // we need the private key for bitswaps peerID in order to announce publicly + // keyFile, err := os.ReadFile(w.cfg.Retrievals.Bitswap.BitswapPrivKeyFile) + // if err != nil { + // return fmt.Errorf("opening BitswapPrivKeyFile %s: %w", w.cfg.Retrievals.Bitswap.BitswapPrivKeyFile, err) + // } + // privKey, err := crypto.UnmarshalPrivateKey(keyFile) + // if err != nil { + // return fmt.Errorf("unmarshalling BitswapPrivKeyFile %s: %w", w.cfg.Retrievals.Bitswap.BitswapPrivKeyFile, err) + // } + // // setup an extended provider record, containing the booster-bitswap multi addr, + // // peer ID, private key for signing, and metadata + // ep = xproviders.Info{ + // ID: w.cfg.Retrievals.Bitswap.BitswapPeerID, + // Addrs: w.cfg.Retrievals.Bitswap.BitswapPublicAddresses, + // Priv: privKey, + // Metadata: mbytes, + // } + // log.Infof("bitswap is enabled and endpoint is public - "+ + // "announcing bitswap endpoint to indexer as extended provider: %s %s", + // ep.ID, ep.Addrs) + // } else { + // log.Infof("bitswap is enabled with boostd as proxy - "+ + // "announcing boostd as endpoint for bitswap to indexer: %s %s", + // w.h.ID(), w.h.Addrs()) + + // addrs := make([]string, 0, len(w.h.Addrs())) + // for _, addr := range w.h.Addrs() { + // addrs = append(addrs, addr.String()) + // } + + // ep = xproviders.Info{ + // ID: w.h.ID().String(), + // Addrs: addrs, + // Priv: key, + // Metadata: mbytes, + // } + // } + // adBuilder.WithExtendedProviders(ep) + // } + + if !w.httpEnabled { + log.Info("ProviderConfig.HTTPRetrievalMultiaddr is not set - announcing http disabled to Indexer") + } else { + // marshal http metadata + meta := metadata.Default.New(metadata.IpfsGatewayHttp{}) + mbytes, err := meta.MarshalBinary() + if err != nil { + return err + } + var ep = xproviders.Info{ + ID: w.h.ID().String(), + Addrs: []string{w.cfg.HTTPRetrievalMultiaddr}, + Metadata: mbytes, + Priv: key, + } + + log.Infof("announcing http endpoint to indexer as extended provider: %s", ep.Addrs) + + adBuilder.WithExtendedProviders(ep) + } + + return nil +} + +// ErrStringSkipAdIngest - While ingesting cids for each piece, if there is an error the indexer +// checks if the error contains the string "content not found": +// - if so, the indexer skips the piece and continues ingestion +// - if not, the indexer pauses ingestion +var ErrStringSkipAdIngest = "content not found" + +func skipError(err error) error { + return fmt.Errorf("%s: %s: %w", ErrStringSkipAdIngest, err.Error(), ipld.ErrNotExists{}) +} + +func (w *Wrapper) IndexerAnnounceLatest(ctx context.Context) (cid.Cid, error) { + e, ok := w.prov.(*engine.Engine) + if !ok { + return cid.Undef, fmt.Errorf("index provider is disabled") + } + return e.PublishLatest(ctx) +} + +func (w *Wrapper) IndexerAnnounceLatestHttp(ctx context.Context, announceUrls []string) (cid.Cid, error) { + e, ok := w.prov.(*engine.Engine) + if !ok { + return cid.Undef, fmt.Errorf("index provider is disabled") + } + + if len(announceUrls) == 0 { + announceUrls = w.cfg.IndexProvider.Announce.DirectAnnounceURLs + } + + urls := make([]*url.URL, 0, len(announceUrls)) + for _, us := range announceUrls { + u, err := url.Parse(us) + if err != nil { + return cid.Undef, fmt.Errorf("parsing url %s: %w", us, err) + } + urls = append(urls, u) + } + return e.PublishLatestHTTP(ctx, urls...) +} + +func (w *Wrapper) MultihashLister(ctx context.Context, prov peer.ID, contextID []byte) (provider.MultihashIterator, error) { + provideF := func(identifier string, isDD bool, pieceCid cid.Cid) (provider.MultihashIterator, error) { + idName := "propCid" + if isDD { + idName = "UUID" + } + llog := log.With(idName, identifier, "piece", pieceCid) + ii, err := w.dagWrapper.GetIterableIndexForPiece(pieceCid) + if err != nil { + e := fmt.Errorf("failed to get iterable index: %w", err) + if strings.Contains(err.Error(), "file does not exist") || + strings.Contains(err.Error(), mongo.ErrNoDocuments.Error()) { + // If it's a not found error, skip over this piece and continue ingesting + llog.Infow("skipping ingestion: piece not found", "err", e) + return nil, skipError(e) + } + + // Some other error, pause ingestion + llog.Infow("pausing ingestion: error getting piece", "err", e) + return nil, e + } + + // Check if there are any records in the iterator. + hasRecords := ii.ForEach(func(_ multihash.Multihash, _ uint64) error { + return fmt.Errorf("has at least one record") + }) + if hasRecords == nil { + // If there are no records, it's effectively the same as a not + // found error. Skip over this piece and continue ingesting. + e := fmt.Errorf("no records found for piece %s", pieceCid) + llog.Infow("skipping ingestion: piece has no records", "err", e) + return nil, skipError(e) + } + + mhi, err := provider.CarMultihashIterator(ii) + if err != nil { + // Bad index, skip over this piece and continue ingesting + err = fmt.Errorf("failed to get mhiterator: %w", err) + llog.Infow("skipping ingestion", "err", err) + return nil, skipError(err) + } + + llog.Debugw("returning piece iterator", "err", err) + return mhi, nil + } + + // Try to cast the context to a proposal CID for droplet deals and legacy deals + proposalCid, err := cid.Cast(contextID) + if err == nil { + // Look up deal by proposal cid in the droplet database. + // If we can't find it there check legacy markets DB. + pds, dealErr := w.dealsDB.GetDeal(ctx, proposalCid) + if dealErr == nil { + // Found the deal, get an iterator over the piece + pieceCid := pds.ClientDealProposal.Proposal.PieceCID + return provideF(proposalCid.String(), false, pieceCid) + } + + // Check if it's a "not found" error + if !errors.Is(dealErr, repo.ErrNotFound) { + // It's not a "not found" error: there was a problem accessing the + // database. Pause ingestion until the user can fix the DB. + e := fmt.Errorf("getting deal with proposal cid %s from droplet database: %w", proposalCid, dealErr) + log.Infow("pausing ingestion", "proposalCid", proposalCid, "err", e) + return nil, e + } + + // The deal was not found in the droplet or legacy database. + // Skip this deal and continue ingestion. + err = fmt.Errorf("deal with proposal cid %s not found", proposalCid) + log.Infow("skipping ingestion", "proposalCid", proposalCid, "err", err) + return nil, skipError(err) + } + + dealUUID, err := uuid.FromBytes(contextID) + if err == nil { + // Look up deal by dealUUID in the direct deals database + entry, dderr := w.directDealsDB.GetDeal(ctx, dealUUID) + if dderr == nil { + // Found the deal, get an iterator over the piece + return provideF(dealUUID.String(), true, entry.PieceCID) + } + + // Check if it's a "not found" error + if !errors.Is(dderr, repo.ErrNotFound) { + // It's not a "not found" error: there was a problem accessing the + // database. Pause ingestion until the user can fix the DB. + e := fmt.Errorf("getting deal with UUID %s from direct deal database: %w", dealUUID, dderr) + log.Infow("pausing ingestion", "deal UUID", dealUUID, "err", e) + return nil, e + } + + // The deal was not found in the droplet, legacy or direct deal database. + // Skip this deal and continue ingestion. + err = fmt.Errorf("deal with UUID %s not found", dealUUID) + log.Infow("skipping ingestion", "deal UUID", dealUUID, "err", err) + return nil, skipError(err) + } + + // Bad contextID or UUID skip over this piece and continue ingesting + err = fmt.Errorf("failed to cast context ID to a cid and UUID") + log.Infow("skipping ingestion", "context ID", string(contextID), "err", err) + return nil, skipError(err) +} + +func (w *Wrapper) AnnounceDeal(ctx context.Context, deal *types.MinerDeal) (cid.Cid, error) { + // Filter out deals that should not be announced + // if !deal.AnnounceToIPNI { + // return cid.Undef, nil + // } + + propCid := deal.ProposalCid + md := metadata.GraphsyncFilecoinV1{ + PieceCID: deal.ClientDealProposal.Proposal.PieceCID, + FastRetrieval: deal.FastRetrieval, + VerifiedDeal: deal.ClientDealProposal.Proposal.VerifiedDeal, + } + return w.AnnounceDealMetadata(ctx, md, propCid.Bytes()) +} + +func (w *Wrapper) AnnounceDealMetadata(ctx context.Context, md metadata.GraphsyncFilecoinV1, contextID []byte) (cid.Cid, error) { + if !w.enabled { + return cid.Undef, errors.New("cannot announce deal: index provider is disabled") + } + + // Ensure we have a connection with the full node host so that the index provider gossip sub announcements make their + // way to the filecoin bootstrapper network + if err := w.meshCreator.Connect(ctx); err != nil { + log.Errorw("failed to connect node to full daemon node", "err", err) + } + + // Announce deal to network Indexer + fm := metadata.Default.New(&md) + annCid, err := w.prov.NotifyPut(ctx, nil, contextID, fm) + if err != nil { + // Check if the error is because the deal was already advertised + // (we can safely ignore this error) + if !errors.Is(err, provider.ErrAlreadyAdvertised) { + return cid.Undef, fmt.Errorf("failed to announce deal to index provider: %w", err) + } + } + return annCid, nil +} + +func (w *Wrapper) AnnounceDealRemoved(ctx context.Context, propCid cid.Cid) (cid.Cid, error) { + if !w.enabled { + return cid.Undef, errors.New("cannot announce deal removal: index provider is disabled") + } + + // Ensure we have a connection with the full node host so that the index provider gossip sub announcements make their + // way to the filecoin bootstrapper network + if err := w.meshCreator.Connect(ctx); err != nil { + log.Errorw("failed to connect node to full daemon node", "err", err) + } + + // Announce deal removal to network Indexer + annCid, err := w.prov.NotifyRemove(ctx, "", propCid.Bytes()) + if err != nil { + return cid.Undef, fmt.Errorf("failed to announce deal removal to index provider: %w", err) + } + return annCid, err +} + +func (w *Wrapper) AnnounceLegcayDealToIndexer(ctx context.Context, proposalCid cid.Cid) (cid.Cid, error) { + deal, err := w.dealsDB.GetDeal(ctx, proposalCid) + if err != nil { + return cid.Undef, fmt.Errorf("failed getting deal %s: %w", proposalCid, err) + } + + mt := metadata.GraphsyncFilecoinV1{ + PieceCID: deal.Proposal.PieceCID, + FastRetrieval: deal.FastRetrieval, + VerifiedDeal: deal.Proposal.VerifiedDeal, + } + + return w.AnnounceDealMetadata(ctx, mt, proposalCid.Bytes()) +} + +func (w *Wrapper) AnnounceDirectDeal(ctx context.Context, entry *types.DirectDeal) (cid.Cid, error) { + // Filter out deals that should not be announced + // if !entry.AnnounceToIPNI { + // return cid.Undef, nil + // } + + contextID, err := entry.ID.MarshalBinary() + if err != nil { + return cid.Undef, fmt.Errorf("marshalling the deal UUID: %w", err) + } + + md := metadata.GraphsyncFilecoinV1{ + PieceCID: entry.PieceCID, + FastRetrieval: true, + VerifiedDeal: true, + } + return w.AnnounceDealMetadata(ctx, md, contextID) +} + +func (w *Wrapper) AnnounceDirectDealRemoved(ctx context.Context, dealUUID uuid.UUID) (cid.Cid, error) { + if !w.enabled { + return cid.Undef, errors.New("cannot announce deal removal: index provider is disabled") + } + + // Ensure we have a connection with the full node host so that the index provider gossip sub announcements make their + // way to the filecoin bootstrapper network + if err := w.meshCreator.Connect(ctx); err != nil { + log.Errorw("failed to connect node to full daemon node", "err", err) + } + + contextID, err := dealUUID.MarshalBinary() + if err != nil { + return cid.Undef, fmt.Errorf("marshalling the deal UUID: %w", err) + } + + // Announce deal removal to network Indexer + annCid, err := w.prov.NotifyRemove(ctx, "", contextID) + if err != nil { + return cid.Undef, fmt.Errorf("failed to announce deal removal to index provider: %w", err) + } + return annCid, err +} diff --git a/indexprovider/index_provider_mgr.go b/indexprovider/index_provider_mgr.go new file mode 100644 index 00000000..fae75c87 --- /dev/null +++ b/indexprovider/index_provider_mgr.go @@ -0,0 +1,274 @@ +package indexprovider + +import ( + "context" + "fmt" + "sync" + + "github.com/filecoin-project/go-address" + v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/filecoin-project/venus/venus-shared/types" + markettypes "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/google/uuid" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/dagstore" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/utils" + "github.com/ipfs/go-cid" + "github.com/ipfs/go-datastore" + "github.com/ipfs/go-datastore/namespace" + provider "github.com/ipni/index-provider" + "github.com/ipni/index-provider/engine" + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/core/host" + "go.uber.org/fx" +) + +type IndexProviderMgr struct { + cfg *config.ProviderConfig + h host.Host + r repo.Repo + full v1.FullNode + dagWrapper *dagstore.Wrapper + ps *pubsub.PubSub + nn string + ds badger.MetadataDS + + indexProviders map[address.Address]*Wrapper + lk sync.Mutex +} + +func NewIndexProviderMgr(lc fx.Lifecycle, + cfg *config.MarketConfig, + h host.Host, + r repo.Repo, + full v1.FullNode, + dagWrapper *dagstore.Wrapper, + ps *pubsub.PubSub, + ds badger.MetadataDS, + nn NetworkName, +) (*IndexProviderMgr, error) { + mgr := &IndexProviderMgr{ + cfg: cfg.CommonProvider, + h: h, + r: r, + full: full, + dagWrapper: dagWrapper, + ps: ps, + nn: string(nn), + ds: ds, + + indexProviders: make(map[address.Address]*Wrapper), + } + + lc.Append(fx.Hook{ + OnStart: func(ctx context.Context) error { + var minerAddrs []address.Address + for _, miner := range cfg.Miners { + addr := miner.Addr.Unwrap() + if addr.Empty() { + continue + } + minerAddrs = append(minerAddrs, addr) + } + if err := mgr.initAllIndexProviders(ctx, minerAddrs); err != nil { + return err + } + return nil + }, + OnStop: func(ctx context.Context) error { + if err := mgr.Stop(ctx); err != nil { + return fmt.Errorf("shutting down indexer provider engine: %w", err) + } + return nil + }, + }) + + return mgr, nil +} + +func (m *IndexProviderMgr) initAllIndexProviders(ctx context.Context, minerAddrs []address.Address) error { + for _, minerAddr := range minerAddrs { + idxProv, err := m.initIndexProvider(ctx, minerAddr) + if err != nil { + return fmt.Errorf("init index provider failed, miner addr: %s, err: %w", minerAddr, err) + } + wrapper, err := NewWrapper(m.h, m.cfg, m.full, m.r, m.dagWrapper, idxProv) + if err != nil { + return fmt.Errorf("new index provider wrapper failed, miner addr: %s, err: %w", minerAddr, err) + } + wrapper.Start(ctx) + m.indexProviders[minerAddr] = wrapper + } + return nil +} + +func (m *IndexProviderMgr) initIndexProvider(ctx context.Context, minerAddr address.Address) (provider.Interface, error) { + cfg := m.cfg.IndexProvider + if !cfg.Enable { + log.Warnf("Starting with index provider disabled - no announcements will be made to the index provider") + return NewDisabledIndexProvider(), nil + } + + topicName := cfg.TopicName + // If indexer topic name is left empty, infer it from the network name. + if topicName == "" { + // Use the same mechanism as the Dependency Injection (DI) to construct the topic name, + // so that we are certain it is consistent with the name allowed by the subscription + // filter. + // + // See: lp2p.GossipSub. + topicName = types.IndexerIngestTopic(m.nn) + log.Debugw("Inferred indexer topic from network name", "topic", topicName) + } + + marketHostAddrs := m.h.Addrs() + marketHostAddrsStr := make([]string, 0, len(marketHostAddrs)) + for _, a := range marketHostAddrs { + marketHostAddrsStr = append(marketHostAddrsStr, a.String()) + } + + ipds := namespace.Wrap(m.ds, datastore.NewKey("/index-provider")) + var opts = []engine.Option{ + engine.WithDatastore(ipds), + engine.WithHost(m.h), + engine.WithRetrievalAddrs(marketHostAddrsStr...), + engine.WithEntriesCacheCapacity(cfg.EntriesCacheCapacity), + engine.WithChainedEntries(cfg.EntriesChunkSize), + engine.WithTopicName(topicName), + engine.WithPurgeCacheOnStart(cfg.PurgeCacheOnStart), + } + + llog := log.With( + "idxProvEnabled", cfg.Enable, + "pid", m.h.ID(), + "topic", topicName, + "retAddrs", m.h.Addrs()) + + // If announcements to the network are enabled, then set options for the publisher. + var e *engine.Engine + if cfg.Enable { + // Join the indexer topic using the market's pubsub instance. Otherwise, the provider + // engine would create its own instance of pubsub down the line in dagsync, which has + // no validators by default. + t, err := m.ps.Join(topicName) + if err != nil { + llog.Errorw("Failed to join indexer topic", "err", err) + return nil, fmt.Errorf("joining indexer topic %s: %w", topicName, err) + } + + // Get the miner ID and set as extra gossip data. + // The extra data is required by the lotus-specific index-provider gossip message validators. + opts = append(opts, + engine.WithTopic(t), + engine.WithExtraGossipData(minerAddr.Bytes()), + ) + if cfg.Announce.AnnounceOverHttp { + opts = append(opts, engine.WithDirectAnnounce(cfg.Announce.DirectAnnounceURLs...)) + } + + // Advertisements can be served over HTTP or HTTP over libp2p. + if cfg.HttpPublisher.Enabled { + announceAddr, err := utils.ToHttpMultiaddr(cfg.HttpPublisher.PublicHostname, cfg.HttpPublisher.Port) + if err != nil { + return nil, fmt.Errorf("parsing HTTP Publisher hostname '%s' / port %d: %w", + cfg.HttpPublisher.PublicHostname, cfg.HttpPublisher.Port, err) + } + opts = append(opts, + engine.WithHttpPublisherListenAddr(fmt.Sprintf("0.0.0.0:%d", cfg.HttpPublisher.Port)), + engine.WithHttpPublisherAnnounceAddr(announceAddr.String()), + ) + if cfg.HttpPublisher.WithLibp2p { + opts = append(opts, engine.WithPublisherKind(engine.Libp2pHttpPublisher)) + llog = llog.With("publisher", "http", "announceAddr", announceAddr) + } else { + opts = append(opts, engine.WithPublisherKind(engine.HttpPublisher)) + llog = llog.With("publisher", "http and libp2phttp", "announceAddr", announceAddr, "extraGossipData", minerAddr) + } + } else { + // HTTP publisher not enabled, so use only libp2p + opts = append(opts, engine.WithPublisherKind(engine.Libp2pPublisher)) + llog = llog.With("publisher", "libp2phttp", "extraGossipData", minerAddr) + } + } else { + opts = append(opts, engine.WithPublisherKind(engine.NoPublisher)) + llog = llog.With("publisher", "none") + } + + // Instantiate the index provider engine. + var err error + e, err = engine.New(opts...) + if err != nil { + return nil, fmt.Errorf("creating indexer provider engine: %w", err) + } + llog.Info("Instantiated index provider engine") + + return e, e.Start(ctx) +} + +func (m *IndexProviderMgr) Stop(ctx context.Context) error { + for _, p := range m.indexProviders { + p.Stop() + if err := p.prov.Shutdown(); err != nil { + return fmt.Errorf("closing index provider: %w", err) + } + } + return nil +} + +func (m *IndexProviderMgr) GetIndexProvider(minerAddr address.Address) (*Wrapper, error) { + m.lk.Lock() + defer m.lk.Unlock() + + wrapper, ok := m.indexProviders[minerAddr] + if !ok { + ctx := context.Background() + idxProv, err := m.initIndexProvider(ctx, minerAddr) + if err != nil { + return nil, err + } + wrapper, err = NewWrapper(m.h, m.cfg, m.full, m.r, m.dagWrapper, idxProv) + if err != nil { + return nil, fmt.Errorf("new index provider wrapper failed, miner addr: %s, err: %w", minerAddr, err) + } + wrapper.Start(ctx) + m.indexProviders[minerAddr] = wrapper + } + return wrapper, nil +} + +func (m *IndexProviderMgr) AnnounceDeal(ctx context.Context, deal *markettypes.MinerDeal) (cid.Cid, error) { + w, err := m.GetIndexProvider(deal.Proposal.Provider) + if err != nil { + return cid.Undef, err + } + return w.AnnounceDeal(ctx, deal) +} + +func (m *IndexProviderMgr) AnnounceDealRemoved(ctx context.Context, minerAddr address.Address, propCid cid.Cid) (cid.Cid, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return cid.Undef, err + } + + return w.AnnounceDealRemoved(ctx, propCid) +} + +func (m *IndexProviderMgr) AnnounceDirectDeal(ctx context.Context, minerAddr address.Address, entry *markettypes.DirectDeal) (cid.Cid, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return cid.Undef, err + } + + return w.AnnounceDirectDeal(ctx, entry) +} + +func (m *IndexProviderMgr) AnnounceDirectDealRemoved(ctx context.Context, minerAddr address.Address, dealUUID uuid.UUID) (cid.Cid, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return cid.Undef, err + } + + return w.AnnounceDirectDealRemoved(ctx, dealUUID) +} diff --git a/indexprovider/mesh.go b/indexprovider/mesh.go new file mode 100644 index 00000000..3e0b68cc --- /dev/null +++ b/indexprovider/mesh.go @@ -0,0 +1,54 @@ +package indexprovider + +import ( + "context" + "fmt" + + v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/peer" +) + +const protectTag = "index-provider-gossipsub" + +type MeshCreator interface { + Connect(ctx context.Context) error +} + +type Libp2pMeshCreator struct { + fullnodeApi v1.FullNode + marketsHost host.Host +} + +func (mc Libp2pMeshCreator) Connect(ctx context.Context) error { + // Add the markets host ID to list of daemon's protected peers first, before any attempt to + // connect to full node over libp2p. + marketsPeerID := mc.marketsHost.ID() + if err := mc.fullnodeApi.NetProtectAdd(ctx, []peer.ID{marketsPeerID}); err != nil { + return fmt.Errorf("failed to call NetProtectAdd on the full node, err: %w", err) + } + + faddrs, err := mc.fullnodeApi.NetAddrsListen(ctx) + if err != nil { + return fmt.Errorf("failed to fetch full node listen addrs, err: %w", err) + } + + // Connect from the full node, ask it to protect the connection and protect the connection on + // markets end too. Connection is initiated from full node to avoid the need to expose libp2p port on full node + if err := mc.fullnodeApi.NetConnect(ctx, peer.AddrInfo{ + ID: mc.marketsHost.ID(), + Addrs: mc.marketsHost.Addrs(), + }); err != nil { + return fmt.Errorf("failed to connect to index provider host from full node: %w", err) + } + mc.marketsHost.ConnManager().Protect(faddrs.ID, protectTag) + + log.Debugw("successfully connected to full node and asked it protect indexer provider peer conn", "fullNodeInfo", faddrs.String(), + "peerId", marketsPeerID) + + return nil +} + +func NewMeshCreator(fullnodeApi v1.FullNode, marketsHost host.Host) MeshCreator { + return Libp2pMeshCreator{fullnodeApi, marketsHost} +} diff --git a/indexprovider/modules.go b/indexprovider/modules.go new file mode 100644 index 00000000..deeea015 --- /dev/null +++ b/indexprovider/modules.go @@ -0,0 +1,30 @@ +package indexprovider + +import ( + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/venus/pkg/config" + "github.com/filecoin-project/venus/pkg/net" + v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/ipfs-force-community/metrics" + "github.com/ipfs-force-community/venus-common-utils/builder" + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/peer" +) + +type NetworkName string + +var IndexProviderOpts = builder.Options( + builder.Override(new(NetworkName), func(mCtx metrics.MetricsCtx, full v1.FullNode) (NetworkName, error) { + nn, err := full.StateNetworkName(mCtx) + return NetworkName(nn), err + }), + builder.Override(new(*pubsub.PubSub), NewPubSub), + builder.Override(new(*IndexProviderMgr), NewIndexProviderMgr), +) + +func NewPubSub(mCtx metrics.MetricsCtx, h host.Host, nn NetworkName) (*pubsub.PubSub, error) { + drandSchedule := make(map[abi.ChainEpoch]config.DrandEnum) + sk := net.NewScoreKeeper() + return net.NewGossipSub(mCtx, h, sk, string(nn), drandSchedule, []peer.AddrInfo{}, false, false) +} diff --git a/utils/addr.go b/utils/addr.go new file mode 100644 index 00000000..bb790ba9 --- /dev/null +++ b/utils/addr.go @@ -0,0 +1,27 @@ +package utils + +import ( + "fmt" + "net" + "strings" + + ma "github.com/multiformats/go-multiaddr" +) + +func ToHttpMultiaddr(hostname string, port int) (ma.Multiaddr, error) { + if hostname == "" { + return nil, fmt.Errorf("hostname is empty") + } + + var saddr string + if n := net.ParseIP(hostname); n != nil { + ipVersion := "ip4" + if strings.Contains(hostname, ":") { + ipVersion = "ip6" + } + saddr = fmt.Sprintf("/%s/%s/tcp/%d/http", ipVersion, hostname, port) + } else { + saddr = fmt.Sprintf("/dns/%s/tcp/%d/http", hostname, port) + } + return ma.NewMultiaddr(saddr) +} From 18dc5b10c4bce69b0683c8d482e57cf62883082e Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:03:23 +0800 Subject: [PATCH 2/6] feat: implement indexer provider api --- api/impl/venus_market.go | 114 +++++++++++ config/common.go | 2 +- go.mod | 2 +- go.sum | 4 +- indexprovider/index_provider.go | 56 +----- indexprovider/index_provider_mgr.go | 297 ++++++++++++++++++++++------ indexprovider/modules.go | 5 +- models/mysql/direct_deal.go | 5 +- storageprovider/stream.go | 2 +- 9 files changed, 373 insertions(+), 114 deletions(-) diff --git a/api/impl/venus_market.go b/api/impl/venus_market.go index 683fe0ad..a1f0e2f9 100644 --- a/api/impl/venus_market.go +++ b/api/impl/venus_market.go @@ -3,6 +3,7 @@ package impl import ( "context" "fmt" + "io" "os" "sort" "time" @@ -24,12 +25,14 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" + "github.com/multiformats/go-multihash" "github.com/pkg/errors" "github.com/ipfs-force-community/sophon-auth/jwtclient" clients2 "github.com/ipfs-force-community/droplet/v2/api/clients" "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/indexprovider" "github.com/ipfs-force-community/droplet/v2/minermgr" "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs-force-community/droplet/v2/network" @@ -66,6 +69,7 @@ type MarketNodeImpl struct { DataTransfer network.ProviderDataTransfer DealPublisher *storageprovider.DealPublisher DealAssigner storageprovider.DealAssiger + IndexProviderMgr *indexprovider.IndexProviderMgr DirectDealProvider *storageprovider.DirectDealProvider @@ -1392,3 +1396,113 @@ func (m *MarketNodeImpl) UpdateDirectDealState(ctx context.Context, id uuid.UUID return m.Repo.DirectDealRepo().SaveDeal(ctx, deal) } + +func (m *MarketNodeImpl) IndexerAnnounceAllDeals(ctx context.Context, minerAddr address.Address) error { + return m.IndexProviderMgr.IndexAnnounceAllDeals(ctx, minerAddr) +} + +func (m *MarketNodeImpl) getDeal(ctx context.Context, contextID []byte) (any, bool, error) { + propCID, err := cid.Cast(contextID) + if err == nil { + deal, err := m.Repo.StorageDealRepo().GetDeal(ctx, propCID) + if err != nil { + return address.Address{}, false, err + } + return deal, false, nil + } + dealUUID, err := uuid.FromBytes(contextID) + if err != nil { + return address.Address{}, false, err + } + + directDeal, err := m.Repo.DirectDealRepo().GetDeal(ctx, dealUUID) + if err == nil { + return directDeal, true, nil + } + + deal, err := m.Repo.StorageDealRepo().GetDealByUUID(ctx, dealUUID) + if err != nil { + return address.Address{}, false, err + } + + return deal, false, nil +} + +func (m *MarketNodeImpl) IndexerListMultihashes(ctx context.Context, contextID []byte) ([]multihash.Multihash, error) { + deal, isDDO, err := m.getDeal(ctx, contextID) + if err != nil { + return nil, err + } + var miner address.Address + if isDDO { + miner = deal.(*types.DirectDeal).Provider + } else { + miner = deal.(*types.MinerDeal).Proposal.Provider + } + + it, err := m.IndexProviderMgr.MultihashLister(ctx, miner, "", contextID) + if err != nil { + return nil, err + } + + var mhs []multihash.Multihash + mh, err := it.Next() + for { + if err != nil { + if errors.Is(err, io.EOF) { + return mhs, nil + } + return nil, err + } + mhs = append(mhs, mh) + + mh, err = it.Next() + } +} + +func (m *MarketNodeImpl) IndexerAnnounceLatest(ctx context.Context) (cid.Cid, error) { + var c cid.Cid + var err error + for _, miner := range m.Config.Miners { + c, err = m.IndexProviderMgr.IndexerAnnounceLatest(ctx, address.Address(miner.Addr)) + if err != nil { + return c, err + } + } + + return c, nil +} + +func (m *MarketNodeImpl) IndexerAnnounceLatestHttp(ctx context.Context, urls []string) (cid.Cid, error) { + var c cid.Cid + var err error + for _, miner := range m.Config.Miners { + c, err = m.IndexProviderMgr.IndexerAnnounceLatestHttp(ctx, address.Address(miner.Addr), urls) + if err != nil { + return c, err + } + } + + return c, nil +} + +func (m *MarketNodeImpl) IndexerAnnounceDealRemoved(ctx context.Context, propCid cid.Cid) (cid.Cid, error) { + deal, err := m.Repo.StorageDealRepo().GetDeal(ctx, propCid) + if err != nil { + return cid.Undef, err + } + + return m.IndexProviderMgr.AnnounceDealRemoved(ctx, deal.Proposal.Provider, propCid) +} + +func (m *MarketNodeImpl) IndexerAnnounceDeal(ctx context.Context, contextID []byte) (cid.Cid, error) { + deal, isDDO, err := m.getDeal(ctx, contextID) + if err != nil { + return cid.Undef, err + } + if isDDO { + return m.IndexProviderMgr.AnnounceDirectDeal(ctx, deal.(*types.DirectDeal)) + } + + return m.IndexProviderMgr.AnnounceDeal(ctx, deal.(*types.MinerDeal)) +} diff --git a/config/common.go b/config/common.go index 1a07e3ba..4c2dc9ae 100644 --- a/config/common.go +++ b/config/common.go @@ -232,7 +232,7 @@ func defaultProviderConfig() *ProviderConfig { HTTPRetrievalMultiaddr: "", IndexProvider: IndexProviderConfig{ - Enable: false, + Enable: true, EntriesCacheCapacity: 1024, EntriesChunkSize: 16384, TopicName: "", diff --git a/go.mod b/go.mod index 702a2a78..6a06fc31 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.16.0-rc1.0.20240711070424-0278ec1b0331 + github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 diff --git a/go.sum b/go.sum index abc97163..81297ae6 100644 --- a/go.sum +++ b/go.sum @@ -600,8 +600,8 @@ github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= github.com/filecoin-project/specs-storage v0.4.1/go.mod h1:Z2eK6uMwAOSLjek6+sy0jNV2DSsMEENziMUz0GHRFBw= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240711070424-0278ec1b0331 h1:lfCbamo9eRNlgwMclEu1PHTexr8AIg5V6Pm7+Qh551A= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240711070424-0278ec1b0331/go.mod h1:tKy8zCgGOVDPzjFfHOZ7YRkHsmKsub5ROC138pLBLAY= +github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e h1:T5TSW4Y7yyeYkyjergZcyPamJt7SbDsPftGiQxnjPEo= +github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e/go.mod h1:nxXNLwFoD9RogfvFc4Zz4n95aTENHo+/E0MmTEvxRB8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= diff --git a/indexprovider/index_provider.go b/indexprovider/index_provider.go index e60d4837..caa74f21 100644 --- a/indexprovider/index_provider.go +++ b/indexprovider/index_provider.go @@ -21,10 +21,10 @@ import ( "github.com/multiformats/go-multihash" "go.mongodb.org/mongo-driver/mongo" + "github.com/filecoin-project/go-fil-markets/stores" v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" types "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/ipfs-force-community/droplet/v2/config" - "github.com/ipfs-force-community/droplet/v2/dagstore" "github.com/ipfs-force-community/droplet/v2/models/repo" ) @@ -34,7 +34,7 @@ type Wrapper struct { enabled bool h host.Host - dagWrapper *dagstore.Wrapper + dagStore stores.DAGStoreWrapper full v1.FullNode cfg *config.ProviderConfig dealsDB repo.StorageDealRepo @@ -53,7 +53,7 @@ func NewWrapper(h host.Host, cfg *config.ProviderConfig, full v1.FullNode, r repo.Repo, - dagWrapper *dagstore.Wrapper, + dagStore stores.DAGStoreWrapper, prov provider.Interface, ) (*Wrapper, error) { _, isDisabled := prov.(*DisabledIndexProvider) @@ -76,7 +76,7 @@ func NewWrapper(h host.Host, bitswapEnabled: bitswapEnabled, httpEnabled: httpEnabled, full: full, - dagWrapper: dagWrapper, + dagStore: dagStore, } return w, nil @@ -317,7 +317,7 @@ func (w *Wrapper) MultihashLister(ctx context.Context, prov peer.ID, contextID [ idName = "UUID" } llog := log.With(idName, identifier, "piece", pieceCid) - ii, err := w.dagWrapper.GetIterableIndexForPiece(pieceCid) + ii, err := w.dagStore.GetIterableIndexForPiece(pieceCid) if err != nil { e := fmt.Errorf("failed to get iterable index: %w", err) if strings.Contains(err.Error(), "file does not exist") || @@ -421,13 +421,12 @@ func (w *Wrapper) AnnounceDeal(ctx context.Context, deal *types.MinerDeal) (cid. // return cid.Undef, nil // } - propCid := deal.ProposalCid md := metadata.GraphsyncFilecoinV1{ PieceCID: deal.ClientDealProposal.Proposal.PieceCID, FastRetrieval: deal.FastRetrieval, VerifiedDeal: deal.ClientDealProposal.Proposal.VerifiedDeal, } - return w.AnnounceDealMetadata(ctx, md, propCid.Bytes()) + return w.AnnounceDealMetadata(ctx, md, deal.ProposalCid.Bytes()) } func (w *Wrapper) AnnounceDealMetadata(ctx context.Context, md metadata.GraphsyncFilecoinV1, contextID []byte) (cid.Cid, error) { @@ -454,7 +453,7 @@ func (w *Wrapper) AnnounceDealMetadata(ctx context.Context, md metadata.Graphsyn return annCid, nil } -func (w *Wrapper) AnnounceDealRemoved(ctx context.Context, propCid cid.Cid) (cid.Cid, error) { +func (w *Wrapper) AnnounceDealRemoved(ctx context.Context, contextID []byte) (cid.Cid, error) { if !w.enabled { return cid.Undef, errors.New("cannot announce deal removal: index provider is disabled") } @@ -466,28 +465,13 @@ func (w *Wrapper) AnnounceDealRemoved(ctx context.Context, propCid cid.Cid) (cid } // Announce deal removal to network Indexer - annCid, err := w.prov.NotifyRemove(ctx, "", propCid.Bytes()) + annCid, err := w.prov.NotifyRemove(ctx, "", contextID) if err != nil { return cid.Undef, fmt.Errorf("failed to announce deal removal to index provider: %w", err) } return annCid, err } -func (w *Wrapper) AnnounceLegcayDealToIndexer(ctx context.Context, proposalCid cid.Cid) (cid.Cid, error) { - deal, err := w.dealsDB.GetDeal(ctx, proposalCid) - if err != nil { - return cid.Undef, fmt.Errorf("failed getting deal %s: %w", proposalCid, err) - } - - mt := metadata.GraphsyncFilecoinV1{ - PieceCID: deal.Proposal.PieceCID, - FastRetrieval: deal.FastRetrieval, - VerifiedDeal: deal.Proposal.VerifiedDeal, - } - - return w.AnnounceDealMetadata(ctx, mt, proposalCid.Bytes()) -} - func (w *Wrapper) AnnounceDirectDeal(ctx context.Context, entry *types.DirectDeal) (cid.Cid, error) { // Filter out deals that should not be announced // if !entry.AnnounceToIPNI { @@ -506,27 +490,3 @@ func (w *Wrapper) AnnounceDirectDeal(ctx context.Context, entry *types.DirectDea } return w.AnnounceDealMetadata(ctx, md, contextID) } - -func (w *Wrapper) AnnounceDirectDealRemoved(ctx context.Context, dealUUID uuid.UUID) (cid.Cid, error) { - if !w.enabled { - return cid.Undef, errors.New("cannot announce deal removal: index provider is disabled") - } - - // Ensure we have a connection with the full node host so that the index provider gossip sub announcements make their - // way to the filecoin bootstrapper network - if err := w.meshCreator.Connect(ctx); err != nil { - log.Errorw("failed to connect node to full daemon node", "err", err) - } - - contextID, err := dealUUID.MarshalBinary() - if err != nil { - return cid.Undef, fmt.Errorf("marshalling the deal UUID: %w", err) - } - - // Announce deal removal to network Indexer - annCid, err := w.prov.NotifyRemove(ctx, "", contextID) - if err != nil { - return cid.Undef, fmt.Errorf("failed to announce deal removal to index provider: %w", err) - } - return annCid, err -} diff --git a/indexprovider/index_provider_mgr.go b/indexprovider/index_provider_mgr.go index fae75c87..15478dac 100644 --- a/indexprovider/index_provider_mgr.go +++ b/indexprovider/index_provider_mgr.go @@ -2,38 +2,49 @@ package indexprovider import ( "context" + "errors" "fmt" "sync" + "time" "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-bitfield" + "github.com/filecoin-project/go-fil-markets/storagemarket" + "github.com/filecoin-project/go-fil-markets/stores" + "github.com/filecoin-project/venus/venus-shared/actors/adt" + "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/filecoin-project/venus/venus-shared/blockstore" "github.com/filecoin-project/venus/venus-shared/types" markettypes "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/google/uuid" - "github.com/ipfs-force-community/droplet/v2/config" - "github.com/ipfs-force-community/droplet/v2/dagstore" - "github.com/ipfs-force-community/droplet/v2/models/badger" - "github.com/ipfs-force-community/droplet/v2/models/repo" - "github.com/ipfs-force-community/droplet/v2/utils" + "github.com/hashicorp/go-multierror" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" + cbor "github.com/ipfs/go-ipld-cbor" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/fx" + + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/utils" ) type IndexProviderMgr struct { - cfg *config.ProviderConfig - h host.Host - r repo.Repo - full v1.FullNode - dagWrapper *dagstore.Wrapper - ps *pubsub.PubSub - nn string - ds badger.MetadataDS + cfg *config.ProviderConfig + h host.Host + r repo.Repo + full v1.FullNode + dagStore stores.DAGStoreWrapper + topic *pubsub.Topic + topicName string + ds badger.MetadataDS indexProviders map[address.Address]*Wrapper lk sync.Mutex @@ -44,37 +55,46 @@ func NewIndexProviderMgr(lc fx.Lifecycle, h host.Host, r repo.Repo, full v1.FullNode, - dagWrapper *dagstore.Wrapper, + dagStore stores.DAGStoreWrapper, ps *pubsub.PubSub, ds badger.MetadataDS, nn NetworkName, ) (*IndexProviderMgr, error) { mgr := &IndexProviderMgr{ - cfg: cfg.CommonProvider, - h: h, - r: r, - full: full, - dagWrapper: dagWrapper, - ps: ps, - nn: string(nn), - ds: ds, + cfg: cfg.CommonProvider, + h: h, + r: r, + full: full, + dagStore: dagStore, + ds: ds, indexProviders: make(map[address.Address]*Wrapper), } + err := mgr.setTopic(ps, string(nn)) + if err != nil { + return nil, err + } + lc.Append(fx.Hook{ OnStart: func(ctx context.Context) error { var minerAddrs []address.Address for _, miner := range cfg.Miners { - addr := miner.Addr.Unwrap() - if addr.Empty() { - continue - } - minerAddrs = append(minerAddrs, addr) + minerAddrs = append(minerAddrs, miner.Addr.Unwrap()) } if err := mgr.initAllIndexProviders(ctx, minerAddrs); err != nil { return err } + for _, miner := range cfg.Miners { + err := mgr.IndexAnnounceAllDeals(ctx, miner.Addr.Unwrap()) + fmt.Println("IndexAnnounceAllDeals", miner.Addr.Unwrap().String(), err) + if err != nil { + fmt.Printf("failed to announce all deals(%v): %v\n", miner.Addr, err) + } + if miner.Addr.Unwrap().String() == "f03071235" { + mgr.IndexerAnnounceLatest(ctx, miner.Addr.Unwrap()) + } + } return nil }, OnStop: func(ctx context.Context) error { @@ -88,13 +108,39 @@ func NewIndexProviderMgr(lc fx.Lifecycle, return mgr, nil } +func (m *IndexProviderMgr) setTopic(ps *pubsub.PubSub, nn string) error { + topicName := m.cfg.IndexProvider.TopicName + // If indexer topic name is left empty, infer it from the network name. + if topicName == "" { + // Use the same mechanism as the Dependency Injection (DI) to construct the topic name, + // so that we are certain it is consistent with the name allowed by the subscription + // filter. + // + // See: lp2p.GossipSub. + topicName = types.IndexerIngestTopic(nn) + log.Debugw("Inferred indexer topic from network name", "topic", topicName) + } + // Join the indexer topic using the market's pubsub instance. Otherwise, the provider + // engine would create its own instance of pubsub down the line in dagsync, which has + // no validators by default. + t, err := ps.Join(topicName) + if err != nil { + return fmt.Errorf("joining indexer topic %s: %w", topicName, err) + } + + m.topic = t + m.topicName = topicName + + return nil +} + func (m *IndexProviderMgr) initAllIndexProviders(ctx context.Context, minerAddrs []address.Address) error { for _, minerAddr := range minerAddrs { idxProv, err := m.initIndexProvider(ctx, minerAddr) if err != nil { return fmt.Errorf("init index provider failed, miner addr: %s, err: %w", minerAddr, err) } - wrapper, err := NewWrapper(m.h, m.cfg, m.full, m.r, m.dagWrapper, idxProv) + wrapper, err := NewWrapper(m.h, m.cfg, m.full, m.r, m.dagStore, idxProv) if err != nil { return fmt.Errorf("new index provider wrapper failed, miner addr: %s, err: %w", minerAddr, err) } @@ -111,18 +157,6 @@ func (m *IndexProviderMgr) initIndexProvider(ctx context.Context, minerAddr addr return NewDisabledIndexProvider(), nil } - topicName := cfg.TopicName - // If indexer topic name is left empty, infer it from the network name. - if topicName == "" { - // Use the same mechanism as the Dependency Injection (DI) to construct the topic name, - // so that we are certain it is consistent with the name allowed by the subscription - // filter. - // - // See: lp2p.GossipSub. - topicName = types.IndexerIngestTopic(m.nn) - log.Debugw("Inferred indexer topic from network name", "topic", topicName) - } - marketHostAddrs := m.h.Addrs() marketHostAddrsStr := make([]string, 0, len(marketHostAddrs)) for _, a := range marketHostAddrs { @@ -136,32 +170,23 @@ func (m *IndexProviderMgr) initIndexProvider(ctx context.Context, minerAddr addr engine.WithRetrievalAddrs(marketHostAddrsStr...), engine.WithEntriesCacheCapacity(cfg.EntriesCacheCapacity), engine.WithChainedEntries(cfg.EntriesChunkSize), - engine.WithTopicName(topicName), + engine.WithTopicName(m.topicName), engine.WithPurgeCacheOnStart(cfg.PurgeCacheOnStart), } llog := log.With( "idxProvEnabled", cfg.Enable, "pid", m.h.ID(), - "topic", topicName, + "topic", m.topicName, "retAddrs", m.h.Addrs()) // If announcements to the network are enabled, then set options for the publisher. var e *engine.Engine if cfg.Enable { - // Join the indexer topic using the market's pubsub instance. Otherwise, the provider - // engine would create its own instance of pubsub down the line in dagsync, which has - // no validators by default. - t, err := m.ps.Join(topicName) - if err != nil { - llog.Errorw("Failed to join indexer topic", "err", err) - return nil, fmt.Errorf("joining indexer topic %s: %w", topicName, err) - } - // Get the miner ID and set as extra gossip data. // The extra data is required by the lotus-specific index-provider gossip message validators. opts = append(opts, - engine.WithTopic(t), + engine.WithTopic(m.topic), engine.WithExtraGossipData(minerAddr.Bytes()), ) if cfg.Announce.AnnounceOverHttp { @@ -228,7 +253,7 @@ func (m *IndexProviderMgr) GetIndexProvider(minerAddr address.Address) (*Wrapper if err != nil { return nil, err } - wrapper, err = NewWrapper(m.h, m.cfg, m.full, m.r, m.dagWrapper, idxProv) + wrapper, err = NewWrapper(m.h, m.cfg, m.full, m.r, m.dagStore, idxProv) if err != nil { return nil, fmt.Errorf("new index provider wrapper failed, miner addr: %s, err: %w", minerAddr, err) } @@ -243,6 +268,7 @@ func (m *IndexProviderMgr) AnnounceDeal(ctx context.Context, deal *markettypes.M if err != nil { return cid.Undef, err } + return w.AnnounceDeal(ctx, deal) } @@ -252,16 +278,16 @@ func (m *IndexProviderMgr) AnnounceDealRemoved(ctx context.Context, minerAddr ad return cid.Undef, err } - return w.AnnounceDealRemoved(ctx, propCid) + return w.AnnounceDealRemoved(ctx, propCid.Bytes()) } -func (m *IndexProviderMgr) AnnounceDirectDeal(ctx context.Context, minerAddr address.Address, entry *markettypes.DirectDeal) (cid.Cid, error) { - w, err := m.GetIndexProvider(minerAddr) +func (m *IndexProviderMgr) AnnounceDirectDeal(ctx context.Context, deal *markettypes.DirectDeal) (cid.Cid, error) { + w, err := m.GetIndexProvider(deal.Provider) if err != nil { return cid.Undef, err } - return w.AnnounceDirectDeal(ctx, entry) + return w.AnnounceDirectDeal(ctx, deal) } func (m *IndexProviderMgr) AnnounceDirectDealRemoved(ctx context.Context, minerAddr address.Address, dealUUID uuid.UUID) (cid.Cid, error) { @@ -270,5 +296,160 @@ func (m *IndexProviderMgr) AnnounceDirectDealRemoved(ctx context.Context, minerA return cid.Undef, err } - return w.AnnounceDirectDealRemoved(ctx, dealUUID) + contextID, err := dealUUID.MarshalBinary() + if err != nil { + return cid.Undef, fmt.Errorf("marshalling the deal UUID: %w", err) + } + + return w.AnnounceDealRemoved(ctx, contextID) +} + +func (m *IndexProviderMgr) MultihashLister(ctx context.Context, minerAddr address.Address, prov peer.ID, root []byte) (provider.MultihashIterator, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return nil, err + } + return w.MultihashLister(ctx, prov, root) +} + +func (m *IndexProviderMgr) IndexerAnnounceLatest(ctx context.Context, minerAddr address.Address) (cid.Cid, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return cid.Undef, err + } + return w.IndexerAnnounceLatest(ctx) +} + +func (m *IndexProviderMgr) IndexerAnnounceLatestHttp(ctx context.Context, minerAddr address.Address, urls []string) (cid.Cid, error) { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return cid.Undef, err + } + + return w.IndexerAnnounceLatestHttp(ctx, urls) +} + +var filterDealTimestamp = func() uint64 { + d := time.Date(2024, 2, 1, 0, 0, 0, 0, time.UTC) + + return uint64(d.Unix()) +}() + +func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr address.Address) error { + w, err := m.GetIndexProvider(minerAddr) + if err != nil { + return err + } + if !w.enabled { + return errors.New("cannot announce all deals: index provider is disabled") + } + + // activeSectors, err := m.getActiveSectors(ctx, minerAddr) + // if err != nil { + // return err + // } + + deals, err := m.r.StorageDealRepo().ListDealByAddr(ctx, minerAddr) + if err != nil { + return err + } + + merr := &multierror.Error{} + success := 0 + for _, deal := range deals { + if deal.State != storagemarket.StorageDealActive { + continue + } + if deal.CreatedAt < uint64(filterDealTimestamp) { + continue + } + + // present, err := activeSectors.IsSet(uint64(deal.SectorNumber)) + // if err != nil { + // return fmt.Errorf("checking if bitfield is set: %w", err) + // } + + // if !present { + // continue + // } + + _, err = w.AnnounceDeal(ctx, deal) + if err != nil { + // don't log already advertised errors as errors - just skip them + if !errors.Is(err, provider.ErrAlreadyAdvertised) { + merr = multierror.Append(merr, err) + log.Errorw("failed to announce deal to Indexer", "dealId", deal.ProposalCid, "err", err) + } + continue + } + success++ + } + + log.Infow("finished announcing deals to Indexer", "number of deals", success) + dealActive := markettypes.DealActive + directDeals, err := m.r.DirectDealRepo().ListDeal(ctx, markettypes.DirectDealQueryParams{ + Provider: minerAddr, + State: &dealActive, + }) + if err != nil { + return err + } + success = 0 + for _, deal := range directDeals { + if deal.CreatedAt < uint64(filterDealTimestamp) { + continue + } + + _, err = m.AnnounceDirectDealRemoved(ctx, deal.Provider, deal.ID) + if err != nil { + panic(err) + } + + // present, err := activeSectors.IsSet(uint64(deal.SectorID)) + // if err != nil { + // return fmt.Errorf("checking if bitfield is set: %w", err) + // } + + // if !present { + // continue + // } + + _, err = w.AnnounceDirectDeal(ctx, deal) + if err != nil { + // don't log already advertised errors as errors - just skip them + if !errors.Is(err, provider.ErrAlreadyAdvertised) { + merr = multierror.Append(merr, err) + log.Errorw("failed to announce deal to Indexer", "dealAllocation", deal.AllocationID, "err", err) + } + continue + } + success++ + } + + log.Infow("finished announcing all direct deals to Indexer", "number of deals", success) + + return merr.ErrorOrNil() +} + +func (m *IndexProviderMgr) getActiveSectors(ctx context.Context, minerAddr address.Address) (bitfield.BitField, error) { + mActor, err := m.full.StateGetActor(ctx, minerAddr, types.EmptyTSK) + if err != nil { + return bitfield.BitField{}, fmt.Errorf("getting actor for the miner %s: %w", minerAddr, err) + } + + store := adt.WrapStore(ctx, cbor.NewCborStore(blockstore.NewAPIBlockstore(m.full))) + mas, err := miner.Load(store, mActor) + if err != nil { + return bitfield.BitField{}, fmt.Errorf("loading miner actor state %s: %w", minerAddr, err) + } + liveSectors, err := miner.AllPartSectors(mas, miner.Partition.LiveSectors) + if err != nil { + return bitfield.BitField{}, fmt.Errorf("getting live sector sets for miner %s: %w", minerAddr, err) + } + unProvenSectors, err := miner.AllPartSectors(mas, miner.Partition.UnprovenSectors) + if err != nil { + return bitfield.BitField{}, fmt.Errorf("getting unproven sector sets for miner %s: %w", minerAddr, err) + } + + return bitfield.MergeBitFields(liveSectors, unProvenSectors) } diff --git a/indexprovider/modules.go b/indexprovider/modules.go index deeea015..f487d741 100644 --- a/indexprovider/modules.go +++ b/indexprovider/modules.go @@ -16,8 +16,9 @@ type NetworkName string var IndexProviderOpts = builder.Options( builder.Override(new(NetworkName), func(mCtx metrics.MetricsCtx, full v1.FullNode) (NetworkName, error) { - nn, err := full.StateNetworkName(mCtx) - return NetworkName(nn), err + // nn, err := full.StateNetworkName(mCtx) + // return NetworkName(nn), err + return NetworkName("mainnet"), nil }), builder.Override(new(*pubsub.PubSub), NewPubSub), builder.Override(new(*IndexProviderMgr), NewIndexProviderMgr), diff --git a/models/mysql/direct_deal.go b/models/mysql/direct_deal.go index 27f23a07..46f9c3da 100644 --- a/models/mysql/direct_deal.go +++ b/models/mysql/direct_deal.go @@ -184,10 +184,13 @@ func (ddr *directDealRepo) GetPieceSize(ctx context.Context, pieceCID cid.Cid) ( func (ddr *directDealRepo) ListDeal(ctx context.Context, params types.DirectDealQueryParams) ([]*types.DirectDeal, error) { var deals []*directDeal - query := ddr.DB.WithContext(ctx).Offset(params.Offset).Limit(params.Limit) + query := ddr.DB.WithContext(ctx).Offset(params.Offset) if params.State != nil { query = query.Where("state = ?", *params.State) } + if params.Limit > 0 { + query = query.Limit(params.Limit) + } if params.Provider != address.Undef { query = query.Where("provider = ?", DBAddress(params.Provider)) } diff --git a/storageprovider/stream.go b/storageprovider/stream.go index 53a5eda8..abd6c89c 100644 --- a/storageprovider/stream.go +++ b/storageprovider/stream.go @@ -222,7 +222,7 @@ func (storageDealStream *StorageDealStream) HandleDealStatusStream(s network.Dea // 1. Lots the deal state from the StorageDealStore request, err := s.ReadDealStatusRequest() if err != nil { - log.Errorf("failed to read DealStatusRequest from incoming stream: %s", err) + log.Debugf("failed to read DealStatusRequest from incoming stream: %s", err) return } From e6ae57301f8d82a41ea9a4bee1fc413cbf0b7b75 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:33:41 +0800 Subject: [PATCH 3/6] feat: add indexer provider commands --- api/impl/venus_market.go | 12 +- cli/index.go | 257 ++++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- indexprovider/index_provider.go | 2 +- indexprovider/index_provider_mgr.go | 47 ++--- 6 files changed, 284 insertions(+), 40 deletions(-) create mode 100644 cli/index.go diff --git a/api/impl/venus_market.go b/api/impl/venus_market.go index a1f0e2f9..0c22e66e 100644 --- a/api/impl/venus_market.go +++ b/api/impl/venus_market.go @@ -1486,13 +1486,19 @@ func (m *MarketNodeImpl) IndexerAnnounceLatestHttp(ctx context.Context, urls []s return c, nil } -func (m *MarketNodeImpl) IndexerAnnounceDealRemoved(ctx context.Context, propCid cid.Cid) (cid.Cid, error) { - deal, err := m.Repo.StorageDealRepo().GetDeal(ctx, propCid) +func (m *MarketNodeImpl) IndexerAnnounceDealRemoved(ctx context.Context, contextID []byte) (cid.Cid, error) { + deal, isDDO, err := m.getDeal(ctx, contextID) if err != nil { return cid.Undef, err } + var miner address.Address + if isDDO { + miner = deal.(*types.DirectDeal).Provider + } else { + miner = deal.(*types.MinerDeal).Proposal.Provider + } - return m.IndexProviderMgr.AnnounceDealRemoved(ctx, deal.Proposal.Provider, propCid) + return m.IndexProviderMgr.AnnounceDealRemoved(ctx, miner, contextID) } func (m *MarketNodeImpl) IndexerAnnounceDeal(ctx context.Context, contextID []byte) (cid.Cid, error) { diff --git a/cli/index.go b/cli/index.go new file mode 100644 index 00000000..aded9f29 --- /dev/null +++ b/cli/index.go @@ -0,0 +1,257 @@ +package cli + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/google/uuid" + "github.com/ipfs/go-cid" + "github.com/multiformats/go-multihash" + "github.com/urfave/cli/v2" +) + +var indexProvCmd = &cli.Command{ + Name: "index", + Usage: "Manage the index provider on Boost", + Subcommands: []*cli.Command{ + indexProvAnnounceAllCmd, + indexProvListMultihashesCmd, + indexProvAnnounceLatest, + indexProvAnnounceLatestHttp, + indexProvAnnounceDealRemovalAd, + indexProvAnnounceDeal, + }, +} + +var indexProvAnnounceAllCmd = &cli.Command{ + Name: "announce-all", + Usage: "Announce all active deals to indexers so they can download the indices", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "miner", + Usage: `specify miner address`, + Required: true, + }, + }, + Action: func(cctx *cli.Context) error { + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + ctx := ReqContext(cctx) + + minerAddr, err := address.NewFromString(cctx.String("miner")) + if err != nil { + return err + } + + return nodeAPI.IndexerAnnounceAllDeals(ctx, minerAddr) + }, +} + +var indexProvListMultihashesCmd = &cli.Command{ + Name: "list-multihashes", + Usage: "list-multihashes ", + UsageText: "List multihashes for a deal by proposal cid or deal UUID", + Action: func(cctx *cli.Context) error { + if cctx.NArg() != 1 { + return fmt.Errorf("must supply a proposal cid or deal UUID") + } + + ctx := ReqContext(cctx) + + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + if cctx.Args().Len() != 1 { + return fmt.Errorf("must specify only one proposal CID / deal UUID") + } + + id := cctx.Args().Get(0) + + var proposalCid cid.Cid + var mhs []multihash.Multihash + dealUuid, err := uuid.Parse(id) + if err != nil { + propCid, err := cid.Decode(id) + if err != nil { + return fmt.Errorf("could not parse '%s' as deal uuid or proposal cid", id) + } + proposalCid = propCid + } + + if !proposalCid.Defined() { + contextID, err := dealUuid.MarshalBinary() + if err != nil { + return fmt.Errorf("parsing UUID to bytes: %w", err) + } + mhs, err = nodeAPI.IndexerListMultihashes(ctx, contextID) + if err != nil { + return err + } + fmt.Printf("Found %d multihashes for deal with ID %s:\n", len(mhs), id) + for _, mh := range mhs { + fmt.Println(" " + mh.String()) + } + + return nil + } + + mhs, err = nodeAPI.IndexerListMultihashes(ctx, proposalCid.Bytes()) + if err != nil { + return err + } + + fmt.Printf("Found %d multihashes for deal with ID %s:\n", len(mhs), id) + for _, mh := range mhs { + fmt.Println(" " + mh.String()) + } + + return nil + }, +} + +var indexProvAnnounceLatest = &cli.Command{ + Name: "announce-latest", + Usage: "Re-publish the latest existing advertisement to pubsub", + Action: func(cctx *cli.Context) error { + ctx := ReqContext(cctx) + + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + c, err := nodeAPI.IndexerAnnounceLatest(ctx) + if err != nil { + return err + } + + fmt.Printf("Announced advertisement with cid %s\n", c) + return nil + }, +} + +var indexProvAnnounceLatestHttp = &cli.Command{ + Name: "announce-latest-http", + Usage: "Re-publish the latest existing advertisement to specific indexers over http", + Flags: []cli.Flag{ + &cli.StringSliceFlag{ + Name: "announce-url", + Usage: "The url(s) to announce to. If not specified, announces to the http urls in config", + Required: false, + }, + }, + Action: func(cctx *cli.Context) error { + ctx := ReqContext(cctx) + + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + c, err := nodeAPI.IndexerAnnounceLatestHttp(ctx, cctx.StringSlice("announce-url")) + if err != nil { + return err + } + + fmt.Printf("Announced advertisement to indexers over http with cid %s\n", c) + return nil + }, +} + +var indexProvAnnounceDealRemovalAd = &cli.Command{ + Name: "announce-remove-deal", + Usage: "Published a removal ad for given deal UUID or Signed Proposal CID (legacy deals)", + Action: func(cctx *cli.Context) error { + ctx := ReqContext(cctx) + + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + if cctx.Args().Len() != 1 { + return fmt.Errorf("must specify only one proposal CID / deal UUID") + } + + id := cctx.Args().Get(0) + + var contextID []byte + dealUuid, err := uuid.Parse(id) + if err != nil { + propCid, err := cid.Decode(id) + if err != nil { + return fmt.Errorf("could not parse '%s' as deal uuid or proposal cid", id) + } + contextID = propCid.Bytes() + } else { + contextID, err = dealUuid.MarshalBinary() + if err != nil { + return fmt.Errorf("parsing UUID to bytes: %w", err) + } + } + + cid, err := nodeAPI.IndexerAnnounceDealRemoved(ctx, contextID) + if err != nil { + return fmt.Errorf("failed to send removal ad: %w", err) + } + fmt.Printf("Announced the removal Ad with cid %s\n", cid) + + return nil + }, +} + +var indexProvAnnounceDeal = &cli.Command{ + Name: "announce-deal", + Usage: "Publish an ad for for given deal UUID or Signed Proposal CID (legacy deals)", + Action: func(cctx *cli.Context) error { + ctx := ReqContext(cctx) + + nodeAPI, closer, err := NewMarketNode(cctx) + if err != nil { + return err + } + defer closer() + + if cctx.Args().Len() != 1 { + return fmt.Errorf("must specify only one deal UUID") + } + + id := cctx.Args().Get(0) + + var contextID []byte + dealUuid, err := uuid.Parse(id) + if err != nil { + propCid, err := cid.Decode(id) + if err != nil { + return fmt.Errorf("could not parse '%s' as deal uuid or proposal cid", id) + } + contextID = propCid.Bytes() + } else { + contextID, err = dealUuid.MarshalBinary() + if err != nil { + return fmt.Errorf("parsing UUID to bytes: %w", err) + } + } + + ad, err := nodeAPI.IndexerAnnounceDeal(ctx, contextID) + if err != nil { + return fmt.Errorf("announcing deal failed: %v", err) + } + if ad.Defined() { + fmt.Printf("Announced the deal with Ad cid %s\n", ad) + return nil + } + fmt.Printf("deal already announced\n") + return nil + }, +} diff --git a/go.mod b/go.mod index 6a06fc31..47fbefe8 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e + github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 diff --git a/go.sum b/go.sum index 81297ae6..4504ff09 100644 --- a/go.sum +++ b/go.sum @@ -600,8 +600,8 @@ github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= github.com/filecoin-project/specs-storage v0.4.1/go.mod h1:Z2eK6uMwAOSLjek6+sy0jNV2DSsMEENziMUz0GHRFBw= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e h1:T5TSW4Y7yyeYkyjergZcyPamJt7SbDsPftGiQxnjPEo= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240719060644-524bcbcc285e/go.mod h1:nxXNLwFoD9RogfvFc4Zz4n95aTENHo+/E0MmTEvxRB8= +github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b h1:SxqKCx6QMBPj0gxdZRt+S0qn6iyRUAS+qr61+lL+qaU= +github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b/go.mod h1:nxXNLwFoD9RogfvFc4Zz4n95aTENHo+/E0MmTEvxRB8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= diff --git a/indexprovider/index_provider.go b/indexprovider/index_provider.go index caa74f21..b4de15bf 100644 --- a/indexprovider/index_provider.go +++ b/indexprovider/index_provider.go @@ -171,7 +171,7 @@ func (w *Wrapper) AnnounceExtendedProviders(ctx context.Context) error { // pubsub and reach the indexer err = w.meshCreator.Connect(ctx) if err != nil { - log.Warnf("could not connect to pubsub mesh before announcing extended provider: %w", err) + log.Warnf("could not connect to pubsub mesh before announcing extended provider: %v", err) } // publish the extended providers announcement diff --git a/indexprovider/index_provider_mgr.go b/indexprovider/index_provider_mgr.go index 15478dac..9beeaab0 100644 --- a/indexprovider/index_provider_mgr.go +++ b/indexprovider/index_provider_mgr.go @@ -17,7 +17,6 @@ import ( "github.com/filecoin-project/venus/venus-shared/blockstore" "github.com/filecoin-project/venus/venus-shared/types" markettypes "github.com/filecoin-project/venus/venus-shared/types/market" - "github.com/google/uuid" "github.com/hashicorp/go-multierror" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" @@ -85,16 +84,6 @@ func NewIndexProviderMgr(lc fx.Lifecycle, if err := mgr.initAllIndexProviders(ctx, minerAddrs); err != nil { return err } - for _, miner := range cfg.Miners { - err := mgr.IndexAnnounceAllDeals(ctx, miner.Addr.Unwrap()) - fmt.Println("IndexAnnounceAllDeals", miner.Addr.Unwrap().String(), err) - if err != nil { - fmt.Printf("failed to announce all deals(%v): %v\n", miner.Addr, err) - } - if miner.Addr.Unwrap().String() == "f03071235" { - mgr.IndexerAnnounceLatest(ctx, miner.Addr.Unwrap()) - } - } return nil }, OnStop: func(ctx context.Context) error { @@ -272,13 +261,13 @@ func (m *IndexProviderMgr) AnnounceDeal(ctx context.Context, deal *markettypes.M return w.AnnounceDeal(ctx, deal) } -func (m *IndexProviderMgr) AnnounceDealRemoved(ctx context.Context, minerAddr address.Address, propCid cid.Cid) (cid.Cid, error) { +func (m *IndexProviderMgr) AnnounceDealRemoved(ctx context.Context, minerAddr address.Address, contextID []byte) (cid.Cid, error) { w, err := m.GetIndexProvider(minerAddr) if err != nil { return cid.Undef, err } - return w.AnnounceDealRemoved(ctx, propCid.Bytes()) + return w.AnnounceDealRemoved(ctx, contextID) } func (m *IndexProviderMgr) AnnounceDirectDeal(ctx context.Context, deal *markettypes.DirectDeal) (cid.Cid, error) { @@ -290,20 +279,6 @@ func (m *IndexProviderMgr) AnnounceDirectDeal(ctx context.Context, deal *markett return w.AnnounceDirectDeal(ctx, deal) } -func (m *IndexProviderMgr) AnnounceDirectDealRemoved(ctx context.Context, minerAddr address.Address, dealUUID uuid.UUID) (cid.Cid, error) { - w, err := m.GetIndexProvider(minerAddr) - if err != nil { - return cid.Undef, err - } - - contextID, err := dealUUID.MarshalBinary() - if err != nil { - return cid.Undef, fmt.Errorf("marshalling the deal UUID: %w", err) - } - - return w.AnnounceDealRemoved(ctx, contextID) -} - func (m *IndexProviderMgr) MultihashLister(ctx context.Context, minerAddr address.Address, prov peer.ID, root []byte) (provider.MultihashIterator, error) { w, err := m.GetIndexProvider(minerAddr) if err != nil { @@ -344,6 +319,11 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr return errors.New("cannot announce all deals: index provider is disabled") } + head, err := m.full.ChainHead(ctx) + if err != nil { + return fmt.Errorf("failed to get chain head: %w", err) + } + // activeSectors, err := m.getActiveSectors(ctx, minerAddr) // if err != nil { // return err @@ -360,7 +340,10 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr if deal.State != storagemarket.StorageDealActive { continue } - if deal.CreatedAt < uint64(filterDealTimestamp) { + if deal.CreatedAt < filterDealTimestamp { + continue + } + if deal.Proposal.EndEpoch <= head.Height() { continue } @@ -396,13 +379,11 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr } success = 0 for _, deal := range directDeals { - if deal.CreatedAt < uint64(filterDealTimestamp) { + if deal.CreatedAt < filterDealTimestamp { continue } - - _, err = m.AnnounceDirectDealRemoved(ctx, deal.Provider, deal.ID) - if err != nil { - panic(err) + if deal.EndEpoch <= head.Height() { + continue } // present, err := activeSectors.IsSet(uint64(deal.SectorID)) From 1acb14087afbd9e2daf49dd82b2e35f19a2d5460 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:44:57 +0800 Subject: [PATCH 4/6] fix: update default config --- cli/index.go | 2 +- cmd/droplet/main.go | 1 + config/common.go | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cli/index.go b/cli/index.go index aded9f29..1474d1ea 100644 --- a/cli/index.go +++ b/cli/index.go @@ -10,7 +10,7 @@ import ( "github.com/urfave/cli/v2" ) -var indexProvCmd = &cli.Command{ +var IndexProvCmd = &cli.Command{ Name: "index", Usage: "Manage the index provider on Boost", Subcommands: []*cli.Command{ diff --git a/cmd/droplet/main.go b/cmd/droplet/main.go index 6a657dda..da789373 100644 --- a/cmd/droplet/main.go +++ b/cmd/droplet/main.go @@ -107,6 +107,7 @@ func main() { cli2.PieceStorageCmd, cli2.MarketCmds, cli2.StatsCmds, + cli2.IndexProvCmd, }, } diff --git a/config/common.go b/config/common.go index 4c2dc9ae..4604986e 100644 --- a/config/common.go +++ b/config/common.go @@ -232,23 +232,23 @@ func defaultProviderConfig() *ProviderConfig { HTTPRetrievalMultiaddr: "", IndexProvider: IndexProviderConfig{ - Enable: true, + Enable: false, EntriesCacheCapacity: 1024, EntriesChunkSize: 16384, TopicName: "", PurgeCacheOnStart: false, WebHost: "cid.contact", Announce: IndexProviderAnnounceConfig{ - AnnounceOverHttp: true, + AnnounceOverHttp: false, DirectAnnounceURLs: []string{"https://cid.contact/ingest/announce"}, }, HttpPublisher: IndexProviderHttpPublisherConfig{ - Enabled: true, + Enabled: false, PublicHostname: "", Port: 0, - WithLibp2p: true, + WithLibp2p: false, }, - DataTransferPublisher: true, + DataTransferPublisher: false, }, } } From d2f916543b095cea54ac09fb621b8ac91351d589 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:34:23 +0800 Subject: [PATCH 5/6] feat: update http retrieval --- cmd/droplet/run.go | 3 +- retrievalprovider/httpretrieval/server.go | 51 ++++++++++++++++--- .../httpretrieval/server_test.go | 7 +-- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/cmd/droplet/run.go b/cmd/droplet/run.go index bcc41dbe..618f1ec6 100644 --- a/cmd/droplet/run.go +++ b/cmd/droplet/run.go @@ -1,6 +1,7 @@ package main import ( + "compress/gzip" "fmt" "os" @@ -274,7 +275,7 @@ func runDaemon(cctx *cli.Context) error { if err = router.Handle("/resource", rpc.NewPieceStorageServer(resAPI.PieceStorageMgr)).GetError(); err != nil { return fmt.Errorf("handle 'resource' failed: %w", err) } - httpRetrievalServer, err := httpretrieval.NewServer(ctx, resAPI.PieceStorageMgr, resAPI, resAPI.DAGStoreWrapper) + httpRetrievalServer, err := httpretrieval.NewServer(ctx, resAPI.PieceStorageMgr, resAPI, resAPI.DAGStoreWrapper, gzip.BestSpeed) if err != nil { return err } diff --git a/retrievalprovider/httpretrieval/server.go b/retrievalprovider/httpretrieval/server.go index e23df4a6..0e92cf30 100644 --- a/retrievalprovider/httpretrieval/server.go +++ b/retrievalprovider/httpretrieval/server.go @@ -41,11 +41,17 @@ type Server struct { pieceMgr *piecestorage.PieceStorageManager api marketAPI.IMarket trustlessHandler *trustlessHandler + compressionLevel int } -func NewServer(ctx context.Context, pieceMgr *piecestorage.PieceStorageManager, api marketAPI.IMarket, dagStoreWrapper stores.DAGStoreWrapper) (*Server, error) { +func NewServer(ctx context.Context, + pieceMgr *piecestorage.PieceStorageManager, + api marketAPI.IMarket, + dagStoreWrapper stores.DAGStoreWrapper, + compressionLevel int, +) (*Server, error) { tlHandler := newTrustlessHandler(ctx, newBSWrap(ctx, dagStoreWrapper), gzip.BestSpeed) - return &Server{pieceMgr: pieceMgr, api: api, trustlessHandler: tlHandler}, nil + return &Server{pieceMgr: pieceMgr, api: api, trustlessHandler: tlHandler, compressionLevel: compressionLevel}, nil } func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { @@ -53,7 +59,18 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { s.retrievalByIPFS(w, r) return } - s.retrievalByPieceCID(w, r) + + s.pieceHandler()(w, r) +} + +func (s *Server) pieceHandler() http.HandlerFunc { + var pieceHandler http.Handler = http.HandlerFunc(s.retrievalByPieceCID) + if s.compressionLevel != gzip.NoCompression { + gzipWrapper := gziphandler.MustNewGzipLevelHandler(s.compressionLevel) + pieceHandler = gzipWrapper(pieceHandler) + log.Debugf("enabling compression with a level of %d", s.compressionLevel) + } + return pieceHandler.ServeHTTP } func (s *Server) retrievalByIPFS(w http.ResponseWriter, r *http.Request) { @@ -106,17 +123,13 @@ func (s *Server) retrievalByPieceCID(w http.ResponseWriter, r *http.Request) { } defer mountReader.Close() // nolint - var buf [32]byte - _, _ = mountReader.Read(buf[:]) - fmt.Println("xxxx", string(buf[:])) - contentReader, err := handleRangeHeader(r.Header.Get("Range"), mountReader, len) if err != nil { log.Warnf("handleRangeHeader failed, Range: %s, error: %v", r.Header.Get("Range"), err) badResponse(w, http.StatusInternalServerError, err) return } - + setHeaders(w, pieceCID) serveContent(w, r, contentReader, log) log.Info("end retrieval deal") } @@ -139,6 +152,28 @@ func (s *Server) listDealsByPiece(ctx context.Context, piece string) ([]marketTy return deals, nil } +func isGzipped(res http.ResponseWriter) bool { + switch res.(type) { + case *gziphandler.GzipResponseWriter, gziphandler.GzipResponseWriterWithCloseNotify: + // there are conditions where we may have a GzipResponseWriter but the + // response will not be compressed, but they are related to very small + // response sizes so this shouldn't matter (much) + return true + } + return false +} + +func setHeaders(w http.ResponseWriter, pieceCid cid.Cid) { + w.Header().Set("Vary", "Accept-Encoding") + etag := `"` + pieceCid.String() + `"` // must be quoted + if isGzipped(w) { + etag = etag[:len(etag)-1] + ".gz\"" + } + w.Header().Set("Etag", etag) + w.Header().Set("Content-Type", "application/piece") + w.Header().Set("Cache-Control", "public, max-age=29030400, immutable") +} + func serveContent(w http.ResponseWriter, r *http.Request, content io.ReadSeeker, log *zap.SugaredLogger) { // Set the Content-Type header explicitly so that http.ServeContent doesn't // try to do it implicitly diff --git a/retrievalprovider/httpretrieval/server_test.go b/retrievalprovider/httpretrieval/server_test.go index d02eca63..e9fc8e7f 100644 --- a/retrievalprovider/httpretrieval/server_test.go +++ b/retrievalprovider/httpretrieval/server_test.go @@ -2,6 +2,7 @@ package httpretrieval import ( "bytes" + "compress/gzip" "context" "errors" "fmt" @@ -102,7 +103,7 @@ func TestRetrievalByPiece(t *testing.T) { return append([]market.MinerDeal{}, market.MinerDeal{ClientDealProposal: types.ClientDealProposal{Proposal: types.DealProposal{PieceCID: piece}}}), nil }).AnyTimes() - s, err := NewServer(ctx, pieceStorage, m, nil) + s, err := NewServer(ctx, pieceStorage, m, nil, gzip.BestSpeed) assert.NoError(t, err) port := "34897" startHTTPServer(ctx, t, port, s) @@ -196,7 +197,7 @@ func TestTrustless(t *testing.T) { assert.NoError(t, err) close(resch) - s, err := NewServer(ctx, nil, m, dagStoreWrapper) + s, err := NewServer(ctx, nil, m, dagStoreWrapper, gzip.BestSpeed) assert.NoError(t, err) port := "34898" startHTTPServer(ctx, t, port, s) @@ -258,7 +259,7 @@ func TestRetrievalPaddingPiece(t *testing.T) { return append([]market.MinerDeal{}, market.MinerDeal{ClientDealProposal: types.ClientDealProposal{Proposal: types.DealProposal{PieceCID: piece}}}), nil }).AnyTimes() - s, err := NewServer(ctx, pieceStorage, m, nil) + s, err := NewServer(ctx, pieceStorage, m, nil, gzip.BestSpeed) assert.NoError(t, err) port := "34897" startHTTPServer(ctx, t, port, s) From d459f628ed6e455357d4b0cc7176f5c3a22a7525 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:47:15 +0800 Subject: [PATCH 6/6] chore: update venus --- go.mod | 15 ++++---- go.sum | 59 ++++++++--------------------- indexprovider/index_provider_mgr.go | 36 +++++++++--------- 3 files changed, 42 insertions(+), 68 deletions(-) diff --git a/go.mod b/go.mod index 47fbefe8..9f6f1a4a 100644 --- a/go.mod +++ b/go.mod @@ -25,20 +25,20 @@ require ( github.com/filecoin-project/go-fil-markets v1.28.4-0.20230816163331-bd08f1651b1d github.com/filecoin-project/go-jsonrpc v0.1.8 github.com/filecoin-project/go-padreader v0.0.1 - github.com/filecoin-project/go-state-types v0.14.0-rc5 + github.com/filecoin-project/go-state-types v0.14.0 github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b + github.com/filecoin-project/venus v1.16.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e github.com/hashicorp/go-multierror v1.1.1 github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef - github.com/ipfs-force-community/metrics v1.0.1-0.20231207081445-30178e706d09 - github.com/ipfs-force-community/sophon-auth v1.16.0-rc1 + github.com/ipfs-force-community/metrics v1.0.1-0.20240725062356-39b286636574 + github.com/ipfs-force-community/sophon-auth v1.16.0 github.com/ipfs-force-community/sophon-gateway v1.16.0-rc1 github.com/ipfs-force-community/sophon-messager v1.16.0-rc1 github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 @@ -67,7 +67,7 @@ require ( github.com/ipld/go-codec-dagpb v1.6.0 github.com/ipld/go-ipld-prime v0.21.0 github.com/ipld/go-ipld-selector-text-lite v0.0.1 - github.com/libp2p/go-libp2p v0.35.2 + github.com/libp2p/go-libp2p v0.35.4 github.com/libp2p/go-maddr-filter v0.1.0 github.com/mitchellh/go-homedir v1.1.0 github.com/multiformats/go-multiaddr v0.13.0 @@ -93,7 +93,8 @@ require ( ) require ( - github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4 // indirect + github.com/filecoin-project/go-clock v0.1.0 // indirect + github.com/filecoin-project/go-f3 v0.0.7 // indirect github.com/gammazero/channelqueue v0.2.1 // indirect github.com/gammazero/deque v0.2.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect @@ -314,7 +315,7 @@ require ( github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.39.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect diff --git a/go.sum b/go.sum index 4504ff09..ea86a398 100644 --- a/go.sum +++ b/go.sum @@ -533,6 +533,8 @@ github.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQj github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-cbor-util v0.0.1 h1:E1LYZYTtjfAQwCReho0VXvbu8t3CYAVPiMx8EiV/VAs= github.com/filecoin-project/go-cbor-util v0.0.1/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= +github.com/filecoin-project/go-clock v0.1.0 h1:SFbYIM75M8NnFm1yMHhN9Ahy3W5bEZV9gd6MPfXbKVU= +github.com/filecoin-project/go-clock v0.1.0/go.mod h1:4uB/O4PvOjlx1VCMdZ9MyDZXRm//gkj1ELEbxfI1AZs= github.com/filecoin-project/go-commp-utils v0.1.3 h1:rTxbkNXZU7FLgdkBk8RsQIEOuPONHykEoX3xGk41Fkw= github.com/filecoin-project/go-commp-utils v0.1.3/go.mod h1:3ENlD1pZySaUout0p9ANQrY3fDFoXdqyX04J+dWpK30= github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837 h1:4cITW0pwgvqLs86Q9bWQa34+jBfR1V687bDkmv2DgnA= @@ -544,8 +546,8 @@ github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 h1:v+zJS5B6pA3ptWZS4t github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7/go.mod h1:V3Y4KbttaCwyg1gwkP7iai8CbQx4mZUGjd3h9GZWLKE= github.com/filecoin-project/go-ds-versioning v0.1.2 h1:to4pTadv3IeV1wvgbCbN6Vqd+fu+7tveXgv/rCEZy6w= github.com/filecoin-project/go-ds-versioning v0.1.2/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= -github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4 h1:eQW2fyKyMuiweuySEb/zMIc3WLSAnIOY8lpqCVQM7pU= -github.com/filecoin-project/go-f3 v0.0.3-0.20240702063402-d48771055cf4/go.mod h1:Wry0mNa8z767TBHb7N0cVb+9j00KsHbD2pzsC3li4R8= +github.com/filecoin-project/go-f3 v0.0.7 h1:dqmxtQXfX1r3hhFZvCszqryg80MZJmfcPFL3nhyHCVA= +github.com/filecoin-project/go-f3 v0.0.7/go.mod h1:ihW5IGLBEuW8pVc9t5MQiAhdzv95EBBfnnrGfMfEbTY= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -570,8 +572,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.14.0-rc1/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= -github.com/filecoin-project/go-state-types v0.14.0-rc5 h1:c8jo2mRx02u8smiCZsSDt1dsOGSu4gwfvHRqSKAl8Lc= -github.com/filecoin-project/go-state-types v0.14.0-rc5/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= +github.com/filecoin-project/go-state-types v0.14.0 h1:JFw8r/LA0/Hvu865Yn2Gz3R5e2woItKeHTgbT4VsXoU= +github.com/filecoin-project/go-state-types v0.14.0/go.mod h1:cDbxwjbmVtV+uNi5D/cFtxKlsRqibnQNlz7xQA1EqYg= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -600,8 +602,8 @@ github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= github.com/filecoin-project/specs-storage v0.4.1/go.mod h1:Z2eK6uMwAOSLjek6+sy0jNV2DSsMEENziMUz0GHRFBw= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b h1:SxqKCx6QMBPj0gxdZRt+S0qn6iyRUAS+qr61+lL+qaU= -github.com/filecoin-project/venus v1.16.0-rc1.0.20240722051309-09b07610715b/go.mod h1:nxXNLwFoD9RogfvFc4Zz4n95aTENHo+/E0MmTEvxRB8= +github.com/filecoin-project/venus v1.16.0 h1:JUPIvzwyV6B/KIG8aJ6UXSbVWZyRj2f/5TbHISOHbCc= +github.com/filecoin-project/venus v1.16.0/go.mod h1:0hSisKfLZLefs+yw1Xtqb6t+fgA1jVLcRrmNUkMefNY= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= @@ -683,7 +685,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis/v7 v7.0.0-beta h1:sm826nuE9AVZl06YSag54VTSpbGdIUMXCXXOHh48nFU= github.com/go-redis/redis/v7 v7.0.0-beta/go.mod h1:dohSoK1cSNPaisjbZhSk7RYyPhVx2k+4sAbJdPK5KPs= github.com/go-redis/redis_rate/v7 v7.0.1 h1:qpJUfKFkEF2zQSD1GnlC3oeZMd+E7ym55HU49BZKqbY= @@ -838,7 +839,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -979,10 +979,10 @@ github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5 github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01/go.mod h1:eryxo/oVgIxaR5g5CNr9PlvZOi+u/bak0IsPL/PT1hk= github.com/ipfs-force-community/go-jsonrpc v0.1.9 h1:5QavBltfvV6fz/+EbYsCkVxJ1MSJncZm6YuPs1SLdZU= github.com/ipfs-force-community/go-jsonrpc v0.1.9/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= -github.com/ipfs-force-community/metrics v1.0.1-0.20231207081445-30178e706d09 h1:qEI6ItxKtgOupMMuGJwqK5zEzztKKPUP1QKq9g+X5bM= -github.com/ipfs-force-community/metrics v1.0.1-0.20231207081445-30178e706d09/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA= -github.com/ipfs-force-community/sophon-auth v1.16.0-rc1 h1:SIyk3vAso5znLfCRiO7N1/OmkynLnNE7h41C94jW4tk= -github.com/ipfs-force-community/sophon-auth v1.16.0-rc1/go.mod h1:AUwcEZTIRR9m2hQEjygBFdnQ0+qW7LC9OpvJqJ+kS38= +github.com/ipfs-force-community/metrics v1.0.1-0.20240725062356-39b286636574 h1:XOkJFbRIlCkEwjkPnVLL/gDt5sfqrii5An4SzBtBtLM= +github.com/ipfs-force-community/metrics v1.0.1-0.20240725062356-39b286636574/go.mod h1:VJhKwTZEUTTgJI/uPmfJrslV4xdANy/FjkWLLx89J8k= +github.com/ipfs-force-community/sophon-auth v1.16.0 h1:H0k77sXoUIQz/HvE7go7JYY516leUK5Mj8oU1CBRM1s= +github.com/ipfs-force-community/sophon-auth v1.16.0/go.mod h1:EULqhA9AwHU7QP20AmjfGEergph2J6NuBivVnphb7/4= github.com/ipfs-force-community/sophon-gateway v1.16.0-rc1 h1:n5db5Uo7Nw1UKlH9d/FlFwusVKfPBtWzkd2fQM9h/5I= github.com/ipfs-force-community/sophon-gateway v1.16.0-rc1/go.mod h1:9y42GEj4iRE/9+1EMQGZc66GyaJAy4dv3uXWYJWMlBw= github.com/ipfs-force-community/sophon-messager v1.16.0-rc1 h1:Db7qmbK4LGvNLL9zm7Q0ppTw9OOCw9KFv9v/DgbaO14= @@ -1296,7 +1296,6 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -1350,8 +1349,8 @@ github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniV github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= -github.com/libp2p/go-libp2p v0.35.2 h1:287oHbuplkrLdAF+syB0n/qDgd50AUBtEODqS0e0HDs= -github.com/libp2p/go-libp2p v0.35.2/go.mod h1:RKCDNt30IkFipGL0tl8wQW/3zVWEGFUZo8g2gAKxwjU= +github.com/libp2p/go-libp2p v0.35.4 h1:FDiBUYLkueFwsuNJUZaxKRdpKvBOWU64qQPL768bSeg= +github.com/libp2p/go-libp2p v0.35.4/go.mod h1:RKCDNt30IkFipGL0tl8wQW/3zVWEGFUZo8g2gAKxwjU= github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= 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= @@ -1594,7 +1593,6 @@ github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -1669,7 +1667,6 @@ github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9x github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= -github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ= github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= @@ -1758,7 +1755,6 @@ github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvw github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -1768,8 +1764,6 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -1883,7 +1877,6 @@ 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.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1906,7 +1899,6 @@ 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.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1918,7 +1910,6 @@ 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.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= 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/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= @@ -2183,36 +2174,29 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v0.39.0 h1:YHivttTaDhbZIHuPlg1sWsy2P5gj57vzqPfkHItgbwQ= -go.opentelemetry.io/otel/bridge/opencensus v0.39.0/go.mod h1:vZ4537pNjFDXEx//WldAR6Ro2LC8wwmFC76njAXwNPE= -go.opentelemetry.io/otel/exporters/jaeger v1.7.0/go.mod h1:PwQAOqBgqbLQRKlj466DuD2qyMjbtcPpfPfj+AqbSBs= +go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= +go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= @@ -2229,12 +2213,9 @@ go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/dig v1.12.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/dig v1.14.0/go.mod h1:jHAn/z1Ld1luVVyGKOAIFYz/uBFqKjjEEdIqVAqfQ2o= -go.uber.org/dig v1.14.1/go.mod h1:52EKx/Vjdpz9EzeNcweC4YMsTrDdFn9mS/+Uw5ZnVTI= go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.15.0/go.mod h1:jI3RazQUhGv5KkpZIRv+kuP4CcgX3fnc0qX8bLnzbx8= -go.uber.org/fx v1.17.1/go.mod h1:yO7KN5rhlARljyo4LR047AjaV6J+KFzd/Z7rnTbEn0A= go.uber.org/fx v1.22.1 h1:nvvln7mwyT5s1q201YE29V/BFrGor6vMiDNpU/78Mys= go.uber.org/fx v1.22.1/go.mod h1:HT2M7d7RHo+ebKGh9NRcrsrHHfpZ60nW3QRubMRfv48= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -2263,7 +2244,6 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= 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.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= @@ -2315,7 +2295,6 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= @@ -2468,7 +2447,6 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -2479,7 +2457,6 @@ golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -2527,7 +2504,6 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= @@ -2550,7 +2526,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2759,7 +2734,6 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= @@ -2912,7 +2886,6 @@ google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRR google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= diff --git a/indexprovider/index_provider_mgr.go b/indexprovider/index_provider_mgr.go index 9beeaab0..60b13ebd 100644 --- a/indexprovider/index_provider_mgr.go +++ b/indexprovider/index_provider_mgr.go @@ -324,10 +324,10 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr return fmt.Errorf("failed to get chain head: %w", err) } - // activeSectors, err := m.getActiveSectors(ctx, minerAddr) - // if err != nil { - // return err - // } + activeSectors, err := m.getActiveSectors(ctx, minerAddr) + if err != nil { + return err + } deals, err := m.r.StorageDealRepo().ListDealByAddr(ctx, minerAddr) if err != nil { @@ -347,14 +347,14 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr continue } - // present, err := activeSectors.IsSet(uint64(deal.SectorNumber)) - // if err != nil { - // return fmt.Errorf("checking if bitfield is set: %w", err) - // } + present, err := activeSectors.IsSet(uint64(deal.SectorNumber)) + if err != nil { + return fmt.Errorf("checking if bitfield is set: %w", err) + } - // if !present { - // continue - // } + if !present { + continue + } _, err = w.AnnounceDeal(ctx, deal) if err != nil { @@ -386,14 +386,14 @@ func (m *IndexProviderMgr) IndexAnnounceAllDeals(ctx context.Context, minerAddr continue } - // present, err := activeSectors.IsSet(uint64(deal.SectorID)) - // if err != nil { - // return fmt.Errorf("checking if bitfield is set: %w", err) - // } + present, err := activeSectors.IsSet(uint64(deal.SectorID)) + if err != nil { + return fmt.Errorf("checking if bitfield is set: %w", err) + } - // if !present { - // continue - // } + if !present { + continue + } _, err = w.AnnounceDirectDeal(ctx, deal) if err != nil {