diff --git a/.golangci.yml b/.golangci.yml index 544bf7e0..ca1ae0af 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,12 @@ run: timeout: 10m + concurrency: 4 + tests: false + linters: enable: - misspell - gofmt - unconvert +issues: + exclude-dirs: ["wasm"] \ No newline at end of file diff --git a/Makefile b/Makefile index 51e30170..eeb254ea 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO ?= go GOLANGCI_LINT ?= $$($(GO) env GOPATH)/bin/golangci-lint -GOLANGCI_LINT_VERSION ?= v1.55.2 +GOLANGCI_LINT_VERSION ?= v1.57.1 GOGOPROTOBUF ?= protoc-gen-gogofaster GOGOPROTOBUF_VERSION ?= v1.3.1 @@ -24,7 +24,7 @@ dist: .PHONY: lint lint: linter - $(GOLANGCI_LINT) run --skip-dirs wasm + $(GOLANGCI_LINT) run .PHONY: linter linter: diff --git a/README.md b/README.md index ced12eef..ff764348 100644 --- a/README.md +++ b/README.md @@ -200,4 +200,91 @@ network: "testnet" bee: bee-api-endpoint: http://localhost:1633 # bee running on mainnet postage-batch-id: -``` \ No newline at end of file +``` + +### Integrating git with dfs + +To integrate git with dfs, we need to set the `git` configuration in the config file. We only need to set the credential helper for local git repositories. + +We create a file `.dfs-credentials` with the following content at any given location +``` +#!/bin/bash +token_file="" # this needs to be absolute path + +username="" +password="" + +dfs="" # http://localhost:9090 for local running fairOS-dfs server + +# Function to get the access token using the username and password +get_access_token() { + local response=$(curl -s -X POST "$dfs/v2/user/login" -H "Content-Type: application/json" -d "{\"userName\": \"$username\", \"password\": \"$password\"}") + access_token=$(echo "$response" | jq -r '.accessToken') + # check if response has access token + if [ "$access_token" == "null" ]; then + exit 1 + fi + echo "$access_token" > "$token_file" + echo "$access_token" +} + +get_saved_access_token() { + if [[ -f "$token_file" ]]; then + local saved_token=$(sed -n '1p' "$token_file") + if [ "$saved_token" == "null" ] || [ "$saved_token" == "" ]; then + return 1 + fi + local response=$(curl --write-out '%{http_code}' --silent --output /dev/null -s -X POST "$dfs/v1/user/stat" -H "Content-Type: application/json" -H "Authorisation: Bearer $saved_token" ) + # check if response had success http code + if [[ response -eq 200 ]]; then + echo "$saved_token" + return 0 + else + rm "$token_file" + return 1 + fi + fi + return 1 +} + +access_token=$(get_saved_access_token) +if [[ $? -ne 0 ]]; then + access_token=$(get_access_token) +fi +echo "username=$username" +echo "password=$access_token" + +exit 0 +``` + +After creating this file, we need to set the `credential.helper` in the git configuration + +``` +git config --local credential.helper "" +``` + +#### How to push to dfs + +Currently, we only support pushing once, so its sort of archive. We can push the git repository to dfs using the following command + +``` +git init # initialize the git repository, run this inside the directory that you want to push to dfs +git add . # add all the files to the git repository +git commit -m "Initial commit" # commit the changes +git remote add origin /v1/git//.git # add the remote origin +git config --local credential.helper "" # set the credential helper +git push -u origin master # push the changes to the remote origin +``` + +### How to clone from dfs + +``` +git config --local credential.helper "" +git clone /v1/git//.git +``` + +NOTE: Before pushing into a pod, we have to first create a pod if it does not exist. A pod can not be used as two different repos. +Dfs stores the files of the repo as a git pack file. So, we cannot access each file of the repo individually. although we can access other files from dfs api as expected. + + + diff --git a/cmd/dfs/cmd/config.go b/cmd/dfs/cmd/config.go index 9f8c85f1..4ce46149 100644 --- a/cmd/dfs/cmd/config.go +++ b/cmd/dfs/cmd/config.go @@ -12,6 +12,7 @@ var ( optionVerbosity = "verbosity" optionBeeApi = "bee.bee-api-endpoint" optionBeePostageBatchId = "bee.postage-batch-id" + optionBeeRedundancyLevel = "bee.redundancy-level" optionFeedCacheSize = "feed.cache-size" optionFeedCacheTTL = "feed.cache-ttl" optionCookieDomain = "cookie-domain" diff --git a/cmd/dfs/cmd/dev.go b/cmd/dfs/cmd/dev.go index c9221a8b..48e56d98 100644 --- a/cmd/dfs/cmd/dev.go +++ b/cmd/dfs/cmd/dev.go @@ -8,8 +8,8 @@ import ( "syscall" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/api" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -53,14 +53,14 @@ func startDevServer() { }) fmt.Println("Bee running at: ", beeUrl) logger := logging.New(os.Stdout, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) ens := mock2.NewMockNamespaceManager() users := user.NewUsers(mockClient, ens, -1, 0, logger) dfsApi := dfs.NewMockDfsAPI(mockClient, users, logger) handler = api.NewMockHandler(dfsApi, logger, []string{"http://localhost:3000"}) defer handler.Close() - httpPort = ":9090" + httpPort = ":9093" pprofPort = ":9091" srv := startHttpService(logger) fmt.Printf("Server running at:http://127.0.0.1%s\n", httpPort) diff --git a/cmd/dfs/cmd/root.go b/cmd/dfs/cmd/root.go index e7bfe5d3..75b6f334 100644 --- a/cmd/dfs/cmd/root.go +++ b/cmd/dfs/cmd/root.go @@ -162,6 +162,7 @@ func writeConfig() { c.Set(optionVerbosity, defaultVerbosity) c.Set(optionBeeApi, defaultBeeApi) c.Set(optionBeePostageBatchId, "") + c.Set(optionBeeRedundancyLevel, 0) c.Set(optionCookieDomain, defaultCookieDomain) if err := c.WriteConfigAs(cfgFile); err != nil { diff --git a/cmd/dfs/cmd/server.go b/cmd/dfs/cmd/server.go index 7d32ee07..c0404667 100644 --- a/cmd/dfs/cmd/server.go +++ b/cmd/dfs/cmd/server.go @@ -44,14 +44,15 @@ import ( ) var ( - pprof bool - swag bool - httpPort string - pprofPort string - cookieDomain string - postageBlockId string - corsOrigins []string - handler *api.Handler + pprof bool + swag bool + httpPort string + pprofPort string + cookieDomain string + postageBlockId string + redundancyLevel uint8 + corsOrigins []string + handler *api.Handler //go:embed .well-known staticFiles embed.FS @@ -101,6 +102,9 @@ can consume it.`, if err := config.BindPFlag(optionRPC, cmd.Flags().Lookup("rpc")); err != nil { return err } + if err := config.BindPFlag(optionBeeRedundancyLevel, cmd.Flags().Lookup("redundancyLevel")); err != nil { + fmt.Println("setting redundancy level to 0") + } return config.BindPFlag(optionBeePostageBatchId, cmd.Flags().Lookup("postageBlockId")) }, RunE: func(cmd *cobra.Command, args []string) error { @@ -113,9 +117,15 @@ can consume it.`, pprofPort = config.GetString(optionDFSPprofPort) cookieDomain = config.GetString(optionCookieDomain) postageBlockId = config.GetString(optionBeePostageBatchId) + redundancyLevel = uint8(config.GetUint(optionBeeRedundancyLevel)) corsOrigins = config.GetStringSlice(optionCORSAllowedOrigins) verbosity = config.GetString(optionVerbosity) + if redundancyLevel > 4 { + fmt.Println("\nredundancyLevel should be between 0 and 4") + return fmt.Errorf("redundancyLevel should be between 0 and 4") + } + if postageBlockId == "" { _ = cmd.Help() fmt.Println("\npostageBlockId is required to run server") @@ -184,8 +194,7 @@ can consume it.`, logger.Info("verbosity : ", verbosity) logger.Info("httpPort : ", httpPort) logger.Info("pprofPort : ", pprofPort) - logger.Info("pprofPort : ", pprofPort) - logger.Info("pprofPort : ", pprofPort) + logger.Info("redundancyLevel: ", redundancyLevel) logger.Info("cookieDomain : ", cookieDomain) logger.Info("feedCacheSize : ", config.GetInt(optionFeedCacheSize)) logger.Info("feedCacheTTL : ", config.GetString(optionFeedCacheTTL)) @@ -203,6 +212,7 @@ can consume it.`, Logger: logger, FeedCacheSize: config.GetInt(optionFeedCacheSize), FeedCacheTTL: config.GetString(optionFeedCacheTTL), + RedundancyLevel: redundancyLevel, } hdlr, err := api.New(ctx, opts) @@ -246,6 +256,7 @@ func init() { serverCmd.Flags().String("feedCacheTTL", "0s", "How long to keep feed updates in lru cache. 0s to disable") serverCmd.Flags().String("cookieDomain", defaultCookieDomain, "the domain to use in the cookie") serverCmd.Flags().String("postageBlockId", "", "the postage block used to store the data in bee") + serverCmd.Flags().Uint8("redundancyLevel", 0, "redundancy level for swarm erasure coding") serverCmd.Flags().StringSlice("cors-origins", defaultCORSAllowedOrigins, "allow CORS headers for the given origins") serverCmd.Flags().String("ens-network", "testnet", "network to use for authentication [not related to swarm network] (mainnet/testnet/play)") serverCmd.Flags().String("rpc", "", "rpc endpoint for ens network. xDai for mainnet | Sepolia for testnet | local fdp-play rpc endpoint for play") @@ -436,6 +447,13 @@ func startHttpService(logger logging.Logger) *http.Server { docRouter.HandleFunc("/entry/get", handler.DocEntryGetHandler).Methods("GET") docRouter.HandleFunc("/entry/del", handler.DocEntryDelHandler).Methods("DELETE") + gitRouter := baseRouter.PathPrefix("/git/").Subrouter() + gitRouter.Use(handler.GitAuthMiddleware) + gitRouter.HandleFunc("/{user}/{repo}.git/HEAD", handler.GitInfoRef).Methods("GET") + gitRouter.HandleFunc("/{user}/{repo}.git/info/refs", handler.GitInfoRef).Methods("GET") + gitRouter.HandleFunc("/{user}/{repo}.git/git-upload-pack", handler.GitUploadPack).Methods("POST") + gitRouter.HandleFunc("/{user}/{repo}.git/git-receive-pack", handler.GitReceivePack).Methods("POST") + var origins []string for _, c := range corsOrigins { c = strings.TrimSpace(c) diff --git a/cmd/dfs/cmd/server_test.go b/cmd/dfs/cmd/server_test.go index 00547bf4..8757683c 100644 --- a/cmd/dfs/cmd/server_test.go +++ b/cmd/dfs/cmd/server_test.go @@ -20,8 +20,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/acl/acl" "github.com/stretchr/testify/assert" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/cmd/common" "github.com/fairdatasociety/fairOS-dfs/pkg/api" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" @@ -57,7 +57,7 @@ func TestApis(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) ens := mock2.NewMockNamespaceManager() users := user.NewUsers(mockClient, ens, 500, 0, logger) diff --git a/go.mod b/go.mod index 2c8b4f65..c4031737 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/fairdatasociety/fairOS-dfs go 1.21 require ( - github.com/btcsuite/btcd v0.22.3 + github.com/btcsuite/btcd/btcec/v2 v2.3.3 github.com/c-bata/go-prompt v0.2.6 github.com/dustin/go-humanize v1.0.1 - github.com/ethereum/go-ethereum v1.13.12 - github.com/ethersphere/bee v1.18.2 + github.com/ethereum/go-ethereum v1.14.0 + github.com/ethersphere/bee/v2 v2.0.0 github.com/ethersphere/bmt v0.1.4 github.com/fairdatasociety/fairOS-dfs-utils v0.0.0-20221230123929-aec4ed8b854d - github.com/golang-jwt/jwt/v5 v5.2.0 + github.com/golang-jwt/jwt/v5 v5.2.1 github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/gorilla/mux v1.8.1 @@ -25,15 +25,15 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/swaggo/http-swagger v1.3.4 github.com/swaggo/swag v1.16.3 github.com/tinygrasshopper/bettercsv v0.0.1 github.com/tyler-smith/go-bip39 v1.1.0 github.com/wealdtech/go-ens/v3 v3.6.0 go.uber.org/goleak v1.3.0 - golang.org/x/crypto v0.19.0 - golang.org/x/term v0.17.0 + golang.org/x/crypto v0.22.0 + golang.org/x/term v0.19.0 gopkg.in/yaml.v2 v2.4.0 resenje.org/jsonhttp v0.2.3 ) @@ -45,21 +45,22 @@ require ( github.com/armon/go-radix v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/btcsuite/btcd v0.22.3 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect github.com/casbin/casbin/v2 v2.35.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/ethersphere/go-price-oracle-abi v0.1.0 // indirect - github.com/ethersphere/go-storage-incentives-abi v0.6.0 // indirect - github.com/ethersphere/go-sw3-abi v0.4.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethersphere/bee v1.10.0 // indirect + github.com/ethersphere/go-price-oracle-abi v0.2.0 // indirect + github.com/ethersphere/go-storage-incentives-abi v0.6.2 // indirect + github.com/ethersphere/go-sw3-abi v0.6.5 // indirect github.com/ethersphere/langos v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -72,7 +73,8 @@ require ( github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-playground/validator/v10 v10.11.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.4.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect @@ -83,7 +85,8 @@ require ( github.com/ipfs/go-cid v0.4.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/compress v1.17.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect + github.com/klauspost/reedsolomon v1.11.8 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-libp2p v0.30.0 // indirect @@ -108,6 +111,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.4.1 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/onsi/gomega v1.27.10 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -118,6 +122,7 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect @@ -141,13 +146,13 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.20.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 73bf230b..b40b03e4 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/HdrHistogram/hdrhistogram-go v0.0.0-20200919145931-8dac23c8dac1 h1:nEjGZtKHMK92888VT6XkzKwyiW14v5FFRGeWq2uV7N0= @@ -13,6 +15,8 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= @@ -20,8 +24,8 @@ github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6 github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.3 h1:kYNaWFvOw6xvqP0vR20RP1Zq1DVMBxEO8QN5d1/EfNg= github.com/btcsuite/btcd v0.22.3/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= +github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0= +github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -41,56 +45,68 @@ github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= -github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y= -github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY= -github.com/ethersphere/bee v1.18.2 h1:bSngtJGDBYkB8HcPHMjKcoBiYNllqChuykpy1IVaGfA= -github.com/ethersphere/bee v1.18.2/go.mod h1:k5jZVd/o6WCz9JLACiJKccyR0efhftZ98Qbx5GYMb+k= +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/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.14.0 h1:xRWC5NlB6g1x7vNy4HDBLuqVNbtLrc7v8S6+Uxim1LU= +github.com/ethereum/go-ethereum v1.14.0/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8= +github.com/ethersphere/bee v1.10.0 h1:GVMO/aTgxNFX6IZyBYJKoR8OFnEjJjQnuQPuY/M75zs= +github.com/ethersphere/bee v1.10.0/go.mod h1:zy0U2o4EvOKiRKb67TdZnSOP8tTnrc62+bsJCgqeEPs= +github.com/ethersphere/bee/v2 v2.0.0 h1:hGSSIKpXRa/uP9lYW7tecAoEWFEDzGO/dJo5UhkRllc= +github.com/ethersphere/bee/v2 v2.0.0/go.mod h1:5pP4lvNuEdvar6NlKjqVWM8y9ArNGblleTF+2lhx8EA= github.com/ethersphere/bmt v0.1.4 h1:+rkWYNtMgDx6bkNqGdWu+U9DgGI1rRZplpSW3YhBr1Q= github.com/ethersphere/bmt v0.1.4/go.mod h1:Yd8ft1U69WDuHevZc/rwPxUv1rzPSMpMnS6xbU53aY8= -github.com/ethersphere/go-price-oracle-abi v0.1.0 h1:yg/hK8nETNvk+GEBASlbakMFv/CVp7HXiycrHw1pRV8= -github.com/ethersphere/go-price-oracle-abi v0.1.0/go.mod h1:sI/Qj4/zJ23/b1enzwMMv0/hLTpPNVNacEwCWjo6yBk= -github.com/ethersphere/go-storage-incentives-abi v0.6.0 h1:lfGViU/wJg/CyXlntNvTQpqQ2A4QYGLJ7jo+Pw+H+a4= -github.com/ethersphere/go-storage-incentives-abi v0.6.0/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc= -github.com/ethersphere/go-sw3-abi v0.4.0 h1:T3ANY+ktWrPAwe2U0tZi+DILpkHzto5ym/XwV/Bbz8g= -github.com/ethersphere/go-sw3-abi v0.4.0/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU= +github.com/ethersphere/go-price-oracle-abi v0.2.0 h1:wtIcYLgNZHY4BjYwJCnu93SvJdVAZVvBaKinspyyHvQ= +github.com/ethersphere/go-price-oracle-abi v0.2.0/go.mod h1:sI/Qj4/zJ23/b1enzwMMv0/hLTpPNVNacEwCWjo6yBk= +github.com/ethersphere/go-storage-incentives-abi v0.6.2 h1:lcVylu+KRUEOUvytP6ofcyTwTE7UmfE2oJPC4jpVjSo= +github.com/ethersphere/go-storage-incentives-abi v0.6.2/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc= +github.com/ethersphere/go-sw3-abi v0.6.5 h1:M5dcIe1zQYvGpY2K07UNkNU9Obc4U+A1fz68Ho/Q+XE= +github.com/ethersphere/go-sw3-abi v0.6.5/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU= github.com/ethersphere/langos v1.0.0 h1:NBtNKzXTTRSue95uOlzPN4py7Aofs0xWPzyj4AI1Vcc= github.com/ethersphere/langos v1.0.0/go.mod h1:dlcN2j4O8sQ+BlCaxeBu43bgr4RQ+inJ+pHwLeZg5Tw= github.com/fairdatasociety/fairOS-dfs-utils v0.0.0-20221230123929-aec4ed8b854d h1:4QgyFcv+J02YdPZ92oiCjjQ8QtGl/UbLTAypKb+WfZc= @@ -100,6 +116,10 @@ github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBd github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= +github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= +github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= +github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -110,6 +130,12 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= +github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= +github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -132,14 +158,20 @@ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/j github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= -github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= @@ -150,20 +182,22 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= +github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b h1:h9U78+dx9a4BKdQkBBos92HalKpaGKHrp+3Uo6yTodo= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -187,8 +221,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= @@ -200,8 +234,13 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= +github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= +github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= +github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -211,10 +250,14 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/reedsolomon v1.11.8 h1:s8RpUW5TK4hjr+djiOpbZJB4ksx+TdYbRH7vHQpwPOY= +github.com/klauspost/reedsolomon v1.11.8/go.mod h1:4bXRN+cVzMdml6ti7qLouuYi32KHJ5MGv0Qd8a47h6A= +github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= +github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -232,8 +275,24 @@ github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= +github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= +github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= github.com/libp2p/go-libp2p v0.30.0 h1:9EZwFtJPFBcs/yJTnP90TpN1hgrT/EsFfM+OZuwV87U= github.com/libp2p/go-libp2p v0.30.0/go.mod h1:nr2g5V7lfftwgiJ78/HrID+pwvayLyqKCEirT2Y3Byg= +github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= +github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= +github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= +github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= +github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk= +github.com/libp2p/go-nat v0.2.0/go.mod h1:3MJr+GRpRkyT65EpVPBstXLvOlAPzUVlG6Pwg9ohLJk= +github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= +github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= +github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= +github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= +github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCypkQ= +github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -241,6 +300,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -264,6 +325,10 @@ github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/miguelmota/go-ethereum-hdwallet v0.1.2 h1:mz9LO6V7QCRkLYb0AH17t5R8KeqCe3E+hx9YXpmZeXA= github.com/miguelmota/go-ethereum-hdwallet v0.1.2/go.mod h1:fdNwFSoBFVBPnU0xpOd6l2ueqsPSH/Gch5kIvSvTGk8= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= @@ -289,6 +354,8 @@ github.com/multiformats/go-multiaddr v0.11.0 h1:XqGyJ8ufbCE0HmTDwx2kPdsrQ36AGPZN github.com/multiformats/go-multiaddr v0.11.0/go.mod h1:gWUm0QLR4thQ6+ZF6SXUw8YjtwQSPapICM+NmCkxHSM= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= @@ -313,12 +380,19 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 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.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -339,12 +413,24 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +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/qtls-go1-20 v0.3.3 h1:17/glZSLI9P9fDAeyCHBFSWSqJcwx1byhLwP5eUIDCM= +github.com/quic-go/qtls-go1-20 v0.3.3/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.38.2 h1:VWv/6gxIoB8hROQJhx1JEyiegsUQ+zMN3em3kynTGdg= +github.com/quic-go/quic-go v0.38.2/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdyhGmg+SN4= +github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU= +github.com/quic-go/webtransport-go v0.5.3/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU= +github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= +github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -382,8 +468,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= @@ -428,13 +515,21 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= gitlab.com/nolash/go-mockbytes v0.0.7 h1:9XVFpEfY67kGBVJve3uV19kzqORdlo7V+q09OE6Yo54= gitlab.com/nolash/go-mockbytes v0.0.7/go.mod h1:KKOpNTT39j2Eo+P6uUTOncntfeKY6AFh/2CxuD5MpgE= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 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.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= +go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -443,14 +538,14 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +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/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -462,16 +557,16 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -501,11 +596,11 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -520,24 +615,20 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/pkg/account/account.go b/pkg/account/account.go index f307a940..6aa457f7 100644 --- a/pkg/account/account.go +++ b/pkg/account/account.go @@ -24,7 +24,7 @@ import ( "fmt" "strconv" - "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/btcec/v2" "github.com/ethereum/go-ethereum/accounts" "github.com/fairdatasociety/fairOS-dfs-utils/crypto" "github.com/fairdatasociety/fairOS-dfs/pkg/logging" diff --git a/pkg/api/file_status.go b/pkg/api/file_status.go index 56d5c6ee..c59e776c 100644 --- a/pkg/api/file_status.go +++ b/pkg/api/file_status.go @@ -1,6 +1,7 @@ package api import ( + "errors" "net/http" "github.com/fairdatasociety/fairOS-dfs/pkg/auth" @@ -83,12 +84,12 @@ func (h *Handler) FileStatusHandler(w http.ResponseWriter, r *http.Request) { // status of file t, p, s, err := h.dfsAPI.StatusFile(driveName, podFileWithPath, sessionId, isGroup) if err != nil { - if err == dfs.ErrPodNotOpen { + if errors.Is(err, dfs.ErrPodNotOpen) { h.logger.Errorf("status: %v", err) jsonhttp.BadRequest(w, "status: "+err.Error()) return } - if err == file.ErrFileNotFound { + if errors.Is(err, file.ErrFileNotFound) { h.logger.Errorf("status: %v", err) jsonhttp.NotFound(w, "status: "+err.Error()) return diff --git a/pkg/api/git.go b/pkg/api/git.go new file mode 100644 index 00000000..bcf06afa --- /dev/null +++ b/pkg/api/git.go @@ -0,0 +1,207 @@ +package api + +import ( + "bytes" + "errors" + "fmt" + "io" + "net/http" + "strings" + + "github.com/fairdatasociety/fairOS-dfs/pkg/auth" + "github.com/fairdatasociety/fairOS-dfs/pkg/auth/jwt" + "github.com/fairdatasociety/fairOS-dfs/pkg/file" + "github.com/gorilla/mux" + "resenje.org/jsonhttp" +) + +var ( + refFile = "refFile" +) + +// GitAuthMiddleware checks the Authorization header for git auth credentials +func (h *Handler) GitAuthMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + authHeader := r.Header.Get("Authorization") + if authHeader == "" { + w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`) + http.Error(w, "Authorization required", http.StatusUnauthorized) + return + } + + _, err := jwt.GetSessionIdFromGitRequest(r) + if err != nil { + http.Error(w, "Invalid username or password", http.StatusUnauthorized) + return + } + + next.ServeHTTP(w, r) + }) +} + +func (h *Handler) GitInfoRef(w http.ResponseWriter, r *http.Request) { + sessionId, err := auth.GetSessionIdFromGitRequest(r) + if err != nil { + h.logger.Errorf("sessionId parse failed: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + if sessionId == "" { + h.logger.Error("sessionId not set: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + + vars := mux.Vars(r) + pod := vars["repo"] + serviceType := r.FormValue("service") + + // check if pod exists + if _, err = h.dfsAPI.OpenPod(pod, sessionId); err != nil { + h.logger.Errorf("IsPodExist failed: ", err) + jsonhttp.BadRequest(w, &response{Message: "Repo does not exist"}) + return + } + refLine := "" + // check if ref file exists + reader, _, err := h.dfsAPI.DownloadFile(pod, fmt.Sprintf("/%s", refFile), sessionId, false) + if err == nil { + defer reader.Close() + refData, _ := io.ReadAll(reader) + if len(refData) != 0 { + refLine = fmt.Sprintf("%s\n", refData) + } + } + + w.Header().Set("Expires", "Fri, 01 Jan 2080 00:00:00 GMT") + w.Header().Set("Pragma", "no-cache") + w.Header().Set("Cache-Control", "no-cache, max-age=0, must-revalidate") + w.Header().Set("Content-Type", fmt.Sprintf("application/x-%s-advertisement", serviceType)) + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(packetWrite("# service=" + serviceType + "\n"))) + _, _ = w.Write([]byte("0000")) + if refLine != "" { + _, _ = w.Write([]byte(packetWrite(refLine))) + } else { + capabilities := "report-status object-format=sha1" + emptyList := fmt.Sprintf("0000000000000000000000000000000000000000 capabilities^{}\000%s\n", capabilities) + _, _ = w.Write([]byte(packetWrite(emptyList))) + } + _, _ = w.Write([]byte("0000")) +} + +func (h *Handler) GitUploadPack(w http.ResponseWriter, r *http.Request) { + sessionId, err := auth.GetSessionIdFromGitRequest(r) + if err != nil { + h.logger.Errorf("sessionId parse failed: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + if sessionId == "" { + h.logger.Error("sessionId not set: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + vars := mux.Vars(r) + pod := vars["repo"] + w.Header().Set("Content-Type", "application/x-git-upload-pack-result") + + reader, _, err := h.dfsAPI.DownloadFile(pod, fmt.Sprintf("/%s", refFile), sessionId, false) + if err != nil { + h.logger.Error("ref not found: ", err) + jsonhttp.BadRequest(w, &response{Message: "ref not found"}) + return + } + commitDetailsBytes, err := io.ReadAll(reader) + if err != nil { + h.logger.Error("ref not found: ", err) + jsonhttp.BadRequest(w, &response{Message: "ref not found"}) + return + } + commitDetailsArr := strings.Split(string(commitDetailsBytes), " ") + + packReader, _, err := h.dfsAPI.DownloadFile(pod, fmt.Sprintf("/%s", commitDetailsArr[0]), sessionId, false) + if err != nil { + h.logger.Error("ref not found: ", err) + jsonhttp.BadRequest(w, &response{Message: "ref not found"}) + return + } + _, _ = w.Write([]byte(packetWrite(fmt.Sprintf("ACK %s\n", commitDetailsArr[0])))) + _, err = io.Copy(w, packReader) + if err != nil { + h.logger.Errorf("download: %v", err) + w.Header().Set("Content-Type", " application/json") + jsonhttp.InternalServerError(w, "download: "+err.Error()) + } +} + +func (h *Handler) GitReceivePack(w http.ResponseWriter, r *http.Request) { + sessionId, err := auth.GetSessionIdFromGitRequest(r) + if err != nil { + h.logger.Errorf("sessionId parse failed: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + if sessionId == "" { + h.logger.Error("sessionId not set: ", err) + jsonhttp.BadRequest(w, &response{Message: ErrUnauthorized.Error()}) + return + } + + defer r.Body.Close() + buf := new(bytes.Buffer) + if _, err := io.Copy(buf, r.Body); err != nil { + h.logger.Errorf("Error reading request body: %v", err) + http.Error(w, fmt.Sprintf("Error reading request body: %v", err), http.StatusInternalServerError) + return + } + + packIndex := bytes.Index(buf.Bytes(), []byte("PACK")) + if packIndex == -1 { + h.logger.Errorf("PACK signature not found in request body") + http.Error(w, "PACK signature not found in request body", http.StatusBadRequest) + return + } + commitDetails := strings.TrimSpace(buf.String()[:packIndex]) + commitDetailsArr := strings.Split(commitDetails, " ") + + vars := mux.Vars(r) + pod := vars["repo"] + newHash, ref := commitDetailsArr[1], commitDetailsArr[2] + + _, _, _, err = h.dfsAPI.StatusFile(pod, fmt.Sprintf("/%s", refFile), sessionId, false) + if err != nil && !errors.Is(err, file.ErrFileNotFound) { + h.logger.Errorf("Error checking commit status: %v", err) + http.Error(w, fmt.Sprintf("Error checking file status: %v", err), http.StatusInternalServerError) + return + } + if err == nil { + h.logger.Errorf("Cannot push. ref file already exists") + http.Error(w, "Cannot push", http.StatusInternalServerError) + return + } + err = h.dfsAPI.UploadFile(pod, refFile, sessionId, int64(len(newHash+" "+ref)), strings.NewReader(newHash+" "+ref), "/", "", file.MinBlockSize, 0, false, false) + if err != nil { + h.logger.Errorf("Error uploading commit: %v", err) + http.Error(w, fmt.Sprintf("Error uploading file: %v", err), http.StatusInternalServerError) + return + } + + packData := bytes.NewReader(buf.Bytes()[packIndex:]) + err = h.dfsAPI.UploadFile(pod, newHash, sessionId, int64(packData.Len()), packData, "/", "", file.MinBlockSize, 0, false, false) + if err != nil { + h.logger.Errorf("Error uploading packfile: %v", err) + http.Error(w, fmt.Sprintf("Error uploading file: %v", err), http.StatusInternalServerError) + return + } + w.Header().Set("Content-Type", "application/x-git-receive-pack-result") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(packetWrite("unpack ok\n"))) + _, _ = w.Write([]byte(packetWrite("ok " + ref + "\n"))) + _, _ = w.Write([]byte("0000")) +} + +func packetWrite(data string) string { + length := len(data) + 4 // 4 bytes for the length itself + return fmt.Sprintf("%04x%s", length, data) +} diff --git a/pkg/api/handler.go b/pkg/api/handler.go index 9186da06..90a15a3f 100644 --- a/pkg/api/handler.go +++ b/pkg/api/handler.go @@ -52,6 +52,7 @@ type Options struct { Logger logging.Logger FeedCacheSize int FeedCacheTTL string + RedundancyLevel uint8 } // New returns a new handler @@ -62,6 +63,7 @@ func New(ctx context.Context, opts *Options) (*Handler, error) { EnsConfig: opts.EnsConfig, SubscriptionConfig: opts.SubscriptionConfig, Logger: opts.Logger, + RedundancyLevel: opts.RedundancyLevel, } if opts.FeedCacheSize == 0 { opts.FeedCacheSize = defaultFeedCacheSize diff --git a/pkg/api/login_middleware.go b/pkg/api/login_middleware.go index 4a10fbfd..469bc029 100644 --- a/pkg/api/login_middleware.go +++ b/pkg/api/login_middleware.go @@ -17,6 +17,7 @@ limitations under the License. package api import ( + "errors" "net/http" "time" @@ -31,10 +32,11 @@ import ( // proceed for execution. func (h *Handler) LoginMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - sessionId, err := jwt.GetSessionIdFromToken(r) - if err != nil && err != jwt.ErrNoTokenInRequest { + + sessionId, err := jwt.GetSessionIdFromRequest(r) + if err != nil && !errors.Is(err, jwt.ErrNoTokenInRequest) { h.logger.Errorf("jwt: invalid token: %v", err) - jsonhttp.BadRequest(w, &response{Message: "jwt: invalid token"}) + jsonhttp.Unauthorized(w, &response{Message: "jwt: invalid token"}) return } @@ -46,7 +48,7 @@ func (h *Handler) LoginMiddleware(next http.Handler) http.Handler { sessionId, loginTimeout, err := cookie.GetSessionIdAndLoginTimeFromCookie(r) if err != nil { h.logger.Errorf("cookie: invalid cookie: %v", err) - jsonhttp.BadRequest(w, &response{Message: "cookie: invalid cookie: " + err.Error()}) + jsonhttp.Unauthorized(w, &response{Message: "cookie: invalid cookie: " + err.Error()}) return } @@ -54,14 +56,14 @@ func (h *Handler) LoginMiddleware(next http.Handler) http.Handler { loginTime, err := time.Parse(time.RFC3339, loginTimeout) if err != nil { h.logger.Errorf("cookie: invalid login timeout") - jsonhttp.BadRequest(w, &response{Message: "cookie: invalid login timeout"}) + jsonhttp.Unauthorized(w, &response{Message: "cookie: invalid login timeout"}) return } if loginTime.Before(time.Now()) { err = h.dfsAPI.LogoutUser(sessionId) if err == nil { h.logger.Errorf("Logging out as cookie login timeout expired") - jsonhttp.BadRequest(w, &response{Message: "logging out as cookie login timeout expired"}) + jsonhttp.Unauthorized(w, &response{Message: "logging out as cookie login timeout expired"}) return } } diff --git a/pkg/auth/jwt/jwt.go b/pkg/auth/jwt/jwt.go index 0cbe3c9d..8d95bf8e 100644 --- a/pkg/auth/jwt/jwt.go +++ b/pkg/auth/jwt/jwt.go @@ -1,6 +1,7 @@ package jwt import ( + "encoding/base64" "errors" "fmt" "net/http" @@ -34,7 +35,7 @@ func GenerateToken(sessionId string) (string, error) { claims := Claims{ jwt.RegisteredClaims{ ExpiresAt: jwt.NewNumericDate(time.Now().Add(24 * time.Hour)), - Issuer: "test", + Issuer: "dfs", }, sessionId, } @@ -62,8 +63,8 @@ func parse(tokenStr string) (string, error) { } } -// GetSessionIdFromToken extracts sessionId from http.Request Auth header -func GetSessionIdFromToken(request *http.Request) (sessionId string, err error) { +// GetSessionIdFromRequest extracts sessionId from http.Request Auth header +func GetSessionIdFromRequest(request *http.Request) (sessionId string, err error) { authHeader := request.Header.Get("Authorization") parts := strings.Split(authHeader, "Bearer") if len(parts) != 2 { @@ -79,3 +80,45 @@ func GetSessionIdFromToken(request *http.Request) (sessionId string, err error) } return parse(tokenStr) } + +// GetSessionIdFromGitRequest extracts sessionId from http.Request Auth header for git apis +func GetSessionIdFromGitRequest(request *http.Request) (sessionId string, err error) { + authHeader := request.Header.Get("Authorization") + if authHeader == "" { + return "", ErrNoTokenInRequest + } + parts := strings.Split(authHeader, "Basic") + if len(parts) != 2 { + return "", ErrNoTokenInRequest + } + + payload, err := base64.StdEncoding.DecodeString(strings.TrimSpace(parts[1])) + if err != nil { + return "", err + } + pair := strings.SplitN(string(payload), ":", 2) + tokenStr := strings.TrimSpace(pair[1]) + if len(tokenStr) < 1 { + return "", ErrNoTokenInRequest + } + if tokenStr == "" { + return "", ErrNoTokenInRequest + } + return parse(tokenStr) +} + +// GetSessionIdFromToken extracts sessionId from an actual token +func GetSessionIdFromToken(token string) (sessionId string, err error) { + if len(token) == 0 { + return "", ErrNoTokenInRequest + } + + tokenStr := strings.TrimSpace(token) + if len(tokenStr) < 1 { + return "", ErrNoTokenInRequest + } + if tokenStr == "" { + return "", ErrNoTokenInRequest + } + return parse(tokenStr) +} diff --git a/pkg/auth/utils.go b/pkg/auth/utils.go index d9b748e7..c5deaf87 100644 --- a/pkg/auth/utils.go +++ b/pkg/auth/utils.go @@ -22,7 +22,7 @@ func GetUniqueSessionId() string { func GetSessionIdFromRequest(r *http.Request) (string, error) { sessionId, err := cookie.GetSessionIdFromCookie(r) if err != nil { - sessionId, err = jwt.GetSessionIdFromToken(r) + sessionId, err = jwt.GetSessionIdFromRequest(r) if err != nil { return "", err } @@ -30,3 +30,12 @@ func GetSessionIdFromRequest(r *http.Request) (string, error) { return sessionId, err } + +func GetSessionIdFromGitRequest(r *http.Request) (string, error) { + sessionId, err := jwt.GetSessionIdFromGitRequest(r) + if err != nil { + return "", err + } + + return sessionId, err +} diff --git a/pkg/blockstore/bee/client.go b/pkg/blockstore/bee/client.go index 30ef8371..b32b247c 100644 --- a/pkg/blockstore/bee/client.go +++ b/pkg/blockstore/bee/client.go @@ -25,9 +25,10 @@ import ( "hash" "io" "net/http" + "strconv" "time" - "github.com/ethersphere/bee/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/swarm" bmtlegacy "github.com/ethersphere/bmt/legacy" "github.com/fairdatasociety/fairOS-dfs/pkg/logging" lru "github.com/hashicorp/golang-lru/v2/expirable" @@ -48,11 +49,11 @@ const ( bzzUrl = "/bzz" tagsUrl = "/tags" pinsUrl = "/pins/" - _ = pinsUrl swarmPinHeader = "Swarm-Pin" swarmEncryptHeader = "Swarm-Encrypt" swarmPostageBatchId = "Swarm-Postage-Batch-Id" swarmDeferredUploadHeader = "Swarm-Deferred-Upload" + SwarmErasureCodingHeader = "Swarm-Redundancy-Level" swarmTagHeader = "Swarm-Tag" contentTypeHeader = "Content-Type" ) @@ -69,6 +70,7 @@ type Client struct { logger logging.Logger isProxy bool shouldPin bool + redundancyLevel uint8 } func hashFunc() hash.Hash { @@ -97,7 +99,7 @@ type beeError struct { } // NewBeeClient creates a new client which connects to the Swarm bee node to access the Swarm network. -func NewBeeClient(apiUrl, postageBlockId string, shouldPin bool, logger logging.Logger) *Client { +func NewBeeClient(apiUrl, postageBlockId string, shouldPin bool, redundancyLevel uint8, logger logging.Logger) *Client { p := bmtlegacy.NewTreePool(hashFunc, swarm.Branches, bmtlegacy.PoolSize) cache := lru.NewLRU(chunkCacheSize, func(key string, value []byte) {}, 0) uploadBlockCache := lru.NewLRU(uploadBlockCacheSize, func(key string, value []byte) {}, 0) @@ -343,6 +345,7 @@ func (s *Client) UploadBlob(data []byte, tag uint32, encrypt bool) (address []by req.Close = true req.Header.Set(contentTypeHeader, "application/octet-stream") + req.Header.Set(SwarmErasureCodingHeader, strconv.Itoa(int(s.redundancyLevel))) if s.shouldPin { req.Header.Set(swarmPinHeader, "true") @@ -465,6 +468,7 @@ func (s *Client) UploadBzz(data []byte, fileName string) (address []byte, err er req.Header.Set(swarmPostageBatchId, s.postageBlockId) req.Header.Set(contentTypeHeader, "application/json") + req.Header.Set(SwarmErasureCodingHeader, strconv.Itoa(int(s.redundancyLevel))) response, err := s.Do(req) if err != nil { diff --git a/pkg/blockstore/bee/mock/client.go b/pkg/blockstore/bee/mock/client.go index 3eb86b41..bcc4b8f3 100644 --- a/pkg/blockstore/bee/mock/client.go +++ b/pkg/blockstore/bee/mock/client.go @@ -12,48 +12,48 @@ import ( "testing" "time" - "github.com/ethersphere/bee/pkg/storageincentives/redistribution" + "github.com/ethersphere/bee/v2/pkg/storageincentives/redistribution" "github.com/ethereum/go-ethereum/common" - accountingmock "github.com/ethersphere/bee/pkg/accounting/mock" - "github.com/ethersphere/bee/pkg/api" - "github.com/ethersphere/bee/pkg/auth" - mockauth "github.com/ethersphere/bee/pkg/auth/mock" - "github.com/ethersphere/bee/pkg/crypto" - "github.com/ethersphere/bee/pkg/feeds" - "github.com/ethersphere/bee/pkg/log" - p2pmock "github.com/ethersphere/bee/pkg/p2p/mock" - "github.com/ethersphere/bee/pkg/pingpong" - "github.com/ethersphere/bee/pkg/postage" - mockbatchstore "github.com/ethersphere/bee/pkg/postage/batchstore/mock" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - "github.com/ethersphere/bee/pkg/postage/postagecontract" - contractMock "github.com/ethersphere/bee/pkg/postage/postagecontract/mock" - "github.com/ethersphere/bee/pkg/pss" - "github.com/ethersphere/bee/pkg/resolver" - resolverMock "github.com/ethersphere/bee/pkg/resolver/mock" - "github.com/ethersphere/bee/pkg/settlement/pseudosettle" - chequebookmock "github.com/ethersphere/bee/pkg/settlement/swap/chequebook/mock" - "github.com/ethersphere/bee/pkg/settlement/swap/erc20" - erc20mock "github.com/ethersphere/bee/pkg/settlement/swap/erc20/mock" - swapmock "github.com/ethersphere/bee/pkg/settlement/swap/mock" - statestore "github.com/ethersphere/bee/pkg/statestore/mock" - "github.com/ethersphere/bee/pkg/status" - "github.com/ethersphere/bee/pkg/steward" - "github.com/ethersphere/bee/pkg/storage" - "github.com/ethersphere/bee/pkg/storage/inmemstore" - "github.com/ethersphere/bee/pkg/storageincentives" - "github.com/ethersphere/bee/pkg/storageincentives/staking" - mock2 "github.com/ethersphere/bee/pkg/storageincentives/staking/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" - "github.com/ethersphere/bee/pkg/swarm" - "github.com/ethersphere/bee/pkg/topology/lightnode" - topologymock "github.com/ethersphere/bee/pkg/topology/mock" - "github.com/ethersphere/bee/pkg/tracing" - "github.com/ethersphere/bee/pkg/transaction" - "github.com/ethersphere/bee/pkg/transaction/backendmock" - transactionmock "github.com/ethersphere/bee/pkg/transaction/mock" - "github.com/ethersphere/bee/pkg/util/testutil" + accountingmock "github.com/ethersphere/bee/v2/pkg/accounting/mock" + "github.com/ethersphere/bee/v2/pkg/api" + "github.com/ethersphere/bee/v2/pkg/auth" + mockauth "github.com/ethersphere/bee/v2/pkg/auth/mock" + "github.com/ethersphere/bee/v2/pkg/crypto" + "github.com/ethersphere/bee/v2/pkg/feeds" + "github.com/ethersphere/bee/v2/pkg/log" + p2pmock "github.com/ethersphere/bee/v2/pkg/p2p/mock" + "github.com/ethersphere/bee/v2/pkg/pingpong" + "github.com/ethersphere/bee/v2/pkg/postage" + mockbatchstore "github.com/ethersphere/bee/v2/pkg/postage/batchstore/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + "github.com/ethersphere/bee/v2/pkg/postage/postagecontract" + contractMock "github.com/ethersphere/bee/v2/pkg/postage/postagecontract/mock" + "github.com/ethersphere/bee/v2/pkg/pss" + "github.com/ethersphere/bee/v2/pkg/resolver" + resolverMock "github.com/ethersphere/bee/v2/pkg/resolver/mock" + "github.com/ethersphere/bee/v2/pkg/settlement/pseudosettle" + chequebookmock "github.com/ethersphere/bee/v2/pkg/settlement/swap/chequebook/mock" + "github.com/ethersphere/bee/v2/pkg/settlement/swap/erc20" + erc20mock "github.com/ethersphere/bee/v2/pkg/settlement/swap/erc20/mock" + swapmock "github.com/ethersphere/bee/v2/pkg/settlement/swap/mock" + statestore "github.com/ethersphere/bee/v2/pkg/statestore/mock" + "github.com/ethersphere/bee/v2/pkg/status" + "github.com/ethersphere/bee/v2/pkg/steward" + "github.com/ethersphere/bee/v2/pkg/storage" + "github.com/ethersphere/bee/v2/pkg/storage/inmemstore" + "github.com/ethersphere/bee/v2/pkg/storageincentives" + "github.com/ethersphere/bee/v2/pkg/storageincentives/staking" + mock2 "github.com/ethersphere/bee/v2/pkg/storageincentives/staking/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" + "github.com/ethersphere/bee/v2/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/topology/lightnode" + topologymock "github.com/ethersphere/bee/v2/pkg/topology/mock" + "github.com/ethersphere/bee/v2/pkg/tracing" + "github.com/ethersphere/bee/v2/pkg/transaction" + "github.com/ethersphere/bee/v2/pkg/transaction/backendmock" + transactionmock "github.com/ethersphere/bee/v2/pkg/transaction/mock" + "github.com/ethersphere/bee/v2/pkg/util/testutil" ) var ( @@ -187,7 +187,7 @@ func NewTestBeeServer(t *testing.T, o TestServerOptions) string { o.BeeMode = api.FullMode } o.CORSAllowedOrigins = append(o.CORSAllowedOrigins, "*") - s := api.New(o.PublicKey, o.PSSPublicKey, o.EthereumAddress, o.Logger, transaction, o.BatchStore, o.BeeMode, true, true, backend, o.CORSAllowedOrigins, inmemstore.New()) + s := api.New(o.PublicKey, o.PSSPublicKey, o.EthereumAddress, []string{}, o.Logger, transaction, o.BatchStore, o.BeeMode, true, true, backend, o.CORSAllowedOrigins, inmemstore.New()) testutil.CleanupCloser(t, s) s.SetP2P(o.P2P) diff --git a/pkg/blockstore/client.go b/pkg/blockstore/client.go index 97fcc943..db0bd1b9 100644 --- a/pkg/blockstore/client.go +++ b/pkg/blockstore/client.go @@ -19,7 +19,7 @@ package blockstore import ( "context" - "github.com/ethersphere/bee/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/swarm" ) // Client is the interface for block store diff --git a/pkg/collection/batch_test.go b/pkg/collection/batch_test.go index 981eb98e..54abca69 100644 --- a/pkg/collection/batch_test.go +++ b/pkg/collection/batch_test.go @@ -21,8 +21,8 @@ import ( "io" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -45,7 +45,7 @@ func TestBatchIndex(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) ai := acc.GetUserAccountInfo() _, _, err := acc.CreateUserAccount("") diff --git a/pkg/collection/document_test.go b/pkg/collection/document_test.go index b224be23..7ae768c9 100644 --- a/pkg/collection/document_test.go +++ b/pkg/collection/document_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -61,7 +61,7 @@ func TestDocumentStore(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) ai := acc.GetUserAccountInfo() _, _, err := acc.CreateUserAccount("") diff --git a/pkg/collection/index_api_test.go b/pkg/collection/index_api_test.go index 4af8bfa3..c0671851 100644 --- a/pkg/collection/index_api_test.go +++ b/pkg/collection/index_api_test.go @@ -23,8 +23,8 @@ import ( "net/http" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -47,7 +47,7 @@ func TestIndexAPI(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) ai := acc.GetUserAccountInfo() _, _, err := acc.CreateUserAccount("") diff --git a/pkg/collection/index_test.go b/pkg/collection/index_test.go index b7ced4bd..74949334 100644 --- a/pkg/collection/index_test.go +++ b/pkg/collection/index_test.go @@ -24,8 +24,8 @@ import ( "strconv" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -49,7 +49,7 @@ func TestIndex(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) ai := acc.GetUserAccountInfo() _, _, err := acc.CreateUserAccount("") diff --git a/pkg/collection/iterator_test.go b/pkg/collection/iterator_test.go index 41c42b0c..31791ebe 100644 --- a/pkg/collection/iterator_test.go +++ b/pkg/collection/iterator_test.go @@ -25,8 +25,8 @@ import ( "strconv" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -50,7 +50,7 @@ func TestIndexIterator(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) ai := acc.GetUserAccountInfo() _, _, err := acc.CreateUserAccount("") diff --git a/pkg/collection/kv_test.go b/pkg/collection/kv_test.go index f5b773cf..2ca823dc 100644 --- a/pkg/collection/kv_test.go +++ b/pkg/collection/kv_test.go @@ -29,8 +29,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -65,7 +65,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -103,7 +103,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -137,7 +137,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -176,7 +176,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -215,7 +215,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -249,7 +249,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -341,7 +341,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -373,7 +373,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -393,7 +393,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -422,7 +422,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -441,7 +441,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -488,7 +488,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -539,7 +539,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -578,7 +578,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -605,7 +605,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -670,7 +670,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -693,7 +693,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -726,7 +726,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -750,7 +750,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -816,7 +816,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) defer fd.CommitFeeds() user := acc.GetAddress(account.UserAccountIndex) @@ -878,7 +878,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -911,7 +911,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, 500, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -964,7 +964,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1028,7 +1028,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1109,7 +1109,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1206,7 +1206,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1250,7 +1250,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1295,7 +1295,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1359,7 +1359,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1417,7 +1417,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1458,7 +1458,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1489,7 +1489,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1516,7 +1516,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1543,7 +1543,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) @@ -1570,7 +1570,7 @@ func TestKeyValueStore(t *testing.T) { PreventRedirect: true, Post: mockpost.New(mockpost.WithAcceptAll()), }) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) fd := feed.New(acc.GetUserAccountInfo(), mockClient, -1, 0, logger) user := acc.GetAddress(account.UserAccountIndex) kvStore := collection.NewKeyValueStore("pod1", fd, ai, user, mockClient, logger) diff --git a/pkg/dfs/api.go b/pkg/dfs/api.go index 4be87798..b84fae3d 100644 --- a/pkg/dfs/api.go +++ b/pkg/dfs/api.go @@ -59,6 +59,7 @@ type Options struct { Logger logging.Logger FeedCacheSize int FeedCacheTTL time.Duration + RedundancyLevel uint8 } // NewDfsAPI is the main entry point for the df controller. @@ -72,7 +73,7 @@ func NewDfsAPI(ctx context.Context, opts *Options) (*API, error) { } return nil, errEthClient } - c := bee.NewBeeClient(opts.BeeApiEndpoint, opts.Stamp, true, logger) + c := bee.NewBeeClient(opts.BeeApiEndpoint, opts.Stamp, true, opts.RedundancyLevel, logger) if !c.CheckConnection() { logger.Errorf("dfs: bee client initialisation failed") return nil, errBeeClient diff --git a/pkg/dir/chmod_test.go b/pkg/dir/chmod_test.go index 5bfc2bae..619ab507 100644 --- a/pkg/dir/chmod_test.go +++ b/pkg/dir/chmod_test.go @@ -11,8 +11,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/dir" @@ -33,7 +33,7 @@ func TestChmod(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/dir_present_test.go b/pkg/dir/dir_present_test.go index 7ed1e552..4b17b68e 100644 --- a/pkg/dir/dir_present_test.go +++ b/pkg/dir/dir_present_test.go @@ -26,8 +26,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/dir" @@ -48,7 +48,7 @@ func TestDirPresent(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/dir_test.go b/pkg/dir/dir_test.go index 32c8576f..5f6c0bae 100644 --- a/pkg/dir/dir_test.go +++ b/pkg/dir/dir_test.go @@ -8,8 +8,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -31,7 +31,7 @@ func TestDirRmAllFromMap(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/ls_test.go b/pkg/dir/ls_test.go index 02e2ed0c..398f94ef 100644 --- a/pkg/dir/ls_test.go +++ b/pkg/dir/ls_test.go @@ -26,8 +26,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/pod" @@ -52,7 +52,7 @@ func TestListDirectory(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/mkdir_test.go b/pkg/dir/mkdir_test.go index 15a49f6d..60fb8159 100644 --- a/pkg/dir/mkdir_test.go +++ b/pkg/dir/mkdir_test.go @@ -24,8 +24,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/pod" @@ -49,7 +49,7 @@ func TestMkdir(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/modify_dir_entry.go b/pkg/dir/modify_dir_entry.go index ebceb3b5..4f47e38b 100644 --- a/pkg/dir/modify_dir_entry.go +++ b/pkg/dir/modify_dir_entry.go @@ -43,7 +43,6 @@ func (d *Directory) AddEntryToDir(parentDir, podPassword, itemToAdd string, isFi if err != nil { return ErrDirectoryNotPresent } - // add file or directory entry if isFile { itemToAdd = "_F_" + itemToAdd diff --git a/pkg/dir/rename_test.go b/pkg/dir/rename_test.go index 0c732f86..81015f96 100644 --- a/pkg/dir/rename_test.go +++ b/pkg/dir/rename_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -33,7 +33,7 @@ func TestRenameDirectory(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/rmdir_test.go b/pkg/dir/rmdir_test.go index 5390ec34..a110cbe0 100644 --- a/pkg/dir/rmdir_test.go +++ b/pkg/dir/rmdir_test.go @@ -25,8 +25,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/pod" @@ -50,7 +50,7 @@ func TestRmdir(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { @@ -187,7 +187,7 @@ func TestRmRootDirByPath(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { @@ -280,7 +280,7 @@ func TestRmRootDir(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/stat_test.go b/pkg/dir/stat_test.go index 99a7d494..20e0619e 100644 --- a/pkg/dir/stat_test.go +++ b/pkg/dir/stat_test.go @@ -26,8 +26,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/pod" @@ -51,7 +51,7 @@ func TestStat(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/dir/sync_test.go b/pkg/dir/sync_test.go index 07561b51..17f7d052 100644 --- a/pkg/dir/sync_test.go +++ b/pkg/dir/sync_test.go @@ -25,8 +25,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -53,7 +53,7 @@ func TestSync(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/ensm/eth/eth.go b/pkg/ensm/eth/eth.go index d1ab0535..9d5306c9 100644 --- a/pkg/ensm/eth/eth.go +++ b/pkg/ensm/eth/eth.go @@ -8,7 +8,7 @@ import ( "math/big" "time" - "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/btcec/v2" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/pkg/ensm/eth/mock/eth.go b/pkg/ensm/eth/mock/eth.go index 69795ace..a4a2f1ee 100644 --- a/pkg/ensm/eth/mock/eth.go +++ b/pkg/ensm/eth/mock/eth.go @@ -9,7 +9,7 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/utils" goens "github.com/wealdtech/go-ens/v3" - "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/btcec/v2" "github.com/ethereum/go-ethereum/common" ) diff --git a/pkg/feed/api.go b/pkg/feed/api.go index 3584106b..0f033aa0 100644 --- a/pkg/feed/api.go +++ b/pkg/feed/api.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/ethersphere/bee/pkg/crypto" - "github.com/ethersphere/bee/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/crypto" + "github.com/ethersphere/bee/v2/pkg/swarm" bmtlegacy "github.com/ethersphere/bmt/legacy" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore" diff --git a/pkg/feed/feed_test.go b/pkg/feed/feed_test.go index e64db33b..5287b5b6 100644 --- a/pkg/feed/feed_test.go +++ b/pkg/feed/feed_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -49,7 +49,7 @@ func TestFeed(t *testing.T) { Storer: storer, Post: mockpost.New(mockpost.WithAcceptAll()), }) - client := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + client := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) t.Run("create-feed", func(t *testing.T) { acc := account.New(logger) diff --git a/pkg/feed/handler.go b/pkg/feed/handler.go index 006ad272..d42ed07d 100644 --- a/pkg/feed/handler.go +++ b/pkg/feed/handler.go @@ -31,9 +31,9 @@ import ( "sync/atomic" "time" - bCrypto "github.com/ethersphere/bee/pkg/crypto" - "github.com/ethersphere/bee/pkg/soc" - "github.com/ethersphere/bee/pkg/swarm" + bCrypto "github.com/ethersphere/bee/v2/pkg/crypto" + "github.com/ethersphere/bee/v2/pkg/soc" + "github.com/ethersphere/bee/v2/pkg/swarm" bmtlegacy "github.com/ethersphere/bmt/legacy" utilsSigner "github.com/fairdatasociety/fairOS-dfs-utils/signer" "github.com/fairdatasociety/fairOS-dfs/pkg/account" diff --git a/pkg/feed/handler_test.go b/pkg/feed/handler_test.go index a22c2b98..73847a63 100644 --- a/pkg/feed/handler_test.go +++ b/pkg/feed/handler_test.go @@ -4,9 +4,9 @@ import ( "io" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" - "github.com/ethersphere/bee/pkg/swarm" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" + "github.com/ethersphere/bee/v2/pkg/swarm" bmtlegacy "github.com/ethersphere/bmt/legacy" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" @@ -22,7 +22,7 @@ func TestHandler(t *testing.T) { Storer: storer, Post: mockpost.New(mockpost.WithAcceptAll()), }) - client := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + client := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) t.Run("new-handler", func(t *testing.T) { acc := account.New(logger) diff --git a/pkg/file/chmod_test.go b/pkg/file/chmod_test.go index 0b9458c8..8e92b0cf 100644 --- a/pkg/file/chmod_test.go +++ b/pkg/file/chmod_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -32,7 +32,7 @@ func TestChmod(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/download_test.go b/pkg/file/download_test.go index f1bf2359..9c193efc 100644 --- a/pkg/file/download_test.go +++ b/pkg/file/download_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -49,7 +49,7 @@ func TestDownload(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") require.NoError(t, err) diff --git a/pkg/file/ls_test.go b/pkg/file/ls_test.go index 40a3c132..659437ba 100644 --- a/pkg/file/ls_test.go +++ b/pkg/file/ls_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -47,7 +47,7 @@ func TestListFiles(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/reader_test.go b/pkg/file/reader_test.go index 0140f212..250d385a 100644 --- a/pkg/file/reader_test.go +++ b/pkg/file/reader_test.go @@ -23,8 +23,8 @@ import ( "math/big" "testing" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/logging" "github.com/sirupsen/logrus" @@ -45,7 +45,7 @@ func TestFileReader(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) t.Run("read-entire-file-shorter-than-block", func(t *testing.T) { fileSize := uint64(15) diff --git a/pkg/file/rename_test.go b/pkg/file/rename_test.go index edd2d330..61491c4c 100644 --- a/pkg/file/rename_test.go +++ b/pkg/file/rename_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -31,7 +31,7 @@ func TestRename(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/rm.go b/pkg/file/rm.go index 3e83a9ed..aa530433 100644 --- a/pkg/file/rm.go +++ b/pkg/file/rm.go @@ -21,7 +21,7 @@ import ( "fmt" "net/http" - "github.com/ethersphere/bee/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/swarm" "github.com/fairdatasociety/fairOS-dfs/pkg/utils" ) diff --git a/pkg/file/rm_test.go b/pkg/file/rm_test.go index 26f28334..e43f6348 100644 --- a/pkg/file/rm_test.go +++ b/pkg/file/rm_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -46,7 +46,7 @@ func TestRemoveFile(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") require.NoError(t, err) diff --git a/pkg/file/stat_test.go b/pkg/file/stat_test.go index dee6f886..1a83df20 100644 --- a/pkg/file/stat_test.go +++ b/pkg/file/stat_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -47,7 +47,7 @@ func TestStat(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/status_test.go b/pkg/file/status_test.go index bae2680c..9ec5fd16 100644 --- a/pkg/file/status_test.go +++ b/pkg/file/status_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -31,7 +31,7 @@ func TestStatus(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/upload_test.go b/pkg/file/upload_test.go index ed3cdea6..fd02dfd0 100644 --- a/pkg/file/upload_test.go +++ b/pkg/file/upload_test.go @@ -27,8 +27,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -50,7 +50,7 @@ func TestUpload(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/file/writeAt_test.go b/pkg/file/writeAt_test.go index 64a0baa8..787073de 100644 --- a/pkg/file/writeAt_test.go +++ b/pkg/file/writeAt_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -40,7 +40,7 @@ func TestWriteAt(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/pod/new.go b/pkg/pod/new.go index bd9995a3..26bd0aec 100644 --- a/pkg/pod/new.go +++ b/pkg/pod/new.go @@ -211,7 +211,6 @@ func (p *Pod) loadUserPodsV2() (*List, error) { } func (p *Pod) storeUserPodsV2(podList *List) error { - data, err := json.Marshal(podList) if err != nil { return err diff --git a/pkg/test/close_test.go b/pkg/test/close_test.go index 568f7558..eb060bab 100644 --- a/pkg/test/close_test.go +++ b/pkg/test/close_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -45,7 +45,7 @@ func TestClose(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/del_test.go b/pkg/test/del_test.go index 6972c89f..96e8d3b3 100644 --- a/pkg/test/del_test.go +++ b/pkg/test/del_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -48,7 +48,7 @@ func TestPodDelete(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") diff --git a/pkg/test/delete_test.go b/pkg/test/delete_test.go index f4b3b20a..7fa43356 100644 --- a/pkg/test/delete_test.go +++ b/pkg/test/delete_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" mock2 "github.com/fairdatasociety/fairOS-dfs/pkg/ensm/eth/mock" @@ -44,7 +44,7 @@ func TestDelete(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/fork_test.go b/pkg/test/fork_test.go index 3a35f20a..dc710a23 100644 --- a/pkg/test/fork_test.go +++ b/pkg/test/fork_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" @@ -46,7 +46,7 @@ func TestFork(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/group_new_test.go b/pkg/test/group_new_test.go index 70230234..b28f4fc8 100644 --- a/pkg/test/group_new_test.go +++ b/pkg/test/group_new_test.go @@ -18,13 +18,12 @@ package test_test import ( "errors" - "fmt" "io" "testing" "github.com/ethereum/go-ethereum/common" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/account" "github.com/fairdatasociety/fairOS-dfs/pkg/acl/acl" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" @@ -46,7 +45,7 @@ func TestGroupNew(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { @@ -155,7 +154,6 @@ func TestGroupNew(t *testing.T) { mockAcl := acl.NewACL(mockClient, fd, logger) group := pod.NewGroup(mockClient, fd, acc, mockAcl, logger) groupName1, _ := utils.GetRandString(10) - fmt.Println("group name", groupName1) _, err = group.CreateGroup(groupName1) if err != nil { t.Fatalf("error creating group %s: %s", groupName1, err.Error()) @@ -263,7 +261,6 @@ func TestGroupNew(t *testing.T) { if err != nil { t.Fatal(err) } - fmt.Println("permission", perm) if perm != acl.PermissionWrite { t.Fatal("permission does not match") } diff --git a/pkg/test/integration_test.go b/pkg/test/integration_test.go index 22d23b27..10b8d98a 100644 --- a/pkg/test/integration_test.go +++ b/pkg/test/integration_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/file" @@ -47,7 +47,7 @@ func TestLiteUser(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) users := user.NewUsers(mockClient, ens, -1, 0, logger) dfsApi := dfs.NewMockDfsAPI(mockClient, users, logger) diff --git a/pkg/test/lite_test.go b/pkg/test/lite_test.go index f52b396e..17fe2958 100644 --- a/pkg/test/lite_test.go +++ b/pkg/test/lite_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee/mock" mock2 "github.com/fairdatasociety/fairOS-dfs/pkg/ensm/eth/mock" @@ -28,7 +28,7 @@ func TestLite(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/login_test.go b/pkg/test/login_test.go index fd09d672..84a7476b 100644 --- a/pkg/test/login_test.go +++ b/pkg/test/login_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -49,7 +49,7 @@ func TestLogin(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/logout_test.go b/pkg/test/logout_test.go index 582f04d0..7964b49c 100644 --- a/pkg/test/logout_test.go +++ b/pkg/test/logout_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -47,7 +47,7 @@ func TestLogout(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/ls_test.go b/pkg/test/ls_test.go index 3baf02b8..92788aae 100644 --- a/pkg/test/ls_test.go +++ b/pkg/test/ls_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -50,7 +50,7 @@ func TestPod_ListPods(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) accountInfo := acc.GetUserAccountInfo() fd := feed.New(accountInfo, mockClient, -1, 0, logger) diff --git a/pkg/test/max_file_test.go b/pkg/test/max_file_test.go index fadf883b..8431dbc5 100644 --- a/pkg/test/max_file_test.go +++ b/pkg/test/max_file_test.go @@ -8,8 +8,8 @@ import ( "github.com/fairdatasociety/fairOS-dfs/pkg/file" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -34,7 +34,7 @@ func TestMaxFiles(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/max_pod_test.go b/pkg/test/max_pod_test.go index f2a1379a..8c6387cd 100644 --- a/pkg/test/max_pod_test.go +++ b/pkg/test/max_pod_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -34,7 +34,7 @@ func TestMaxPods(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/new_test.go b/pkg/test/new_test.go index d779e84b..936e2469 100644 --- a/pkg/test/new_test.go +++ b/pkg/test/new_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -47,7 +47,7 @@ func TestNew(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/open_test.go b/pkg/test/open_test.go index 8e1ab00c..2943198c 100644 --- a/pkg/test/open_test.go +++ b/pkg/test/open_test.go @@ -25,8 +25,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -53,7 +53,7 @@ func TestOpen(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/pod_new_test.go b/pkg/test/pod_new_test.go index 1f8a417d..52e0543f 100644 --- a/pkg/test/pod_new_test.go +++ b/pkg/test/pod_new_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -51,7 +51,7 @@ func TestPodNew(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/pod_sharing_test.go b/pkg/test/pod_sharing_test.go index 373d841b..3db7e1c8 100644 --- a/pkg/test/pod_sharing_test.go +++ b/pkg/test/pod_sharing_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/file" "github.com/sirupsen/logrus" @@ -51,7 +51,7 @@ func TestShare(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/pod_stat_test.go b/pkg/test/pod_stat_test.go index 2a361f73..a87e60fa 100644 --- a/pkg/test/pod_stat_test.go +++ b/pkg/test/pod_stat_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -50,7 +50,7 @@ func TestStat(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/stat_test.go b/pkg/test/stat_test.go index e868ed7f..60a0b691 100644 --- a/pkg/test/stat_test.go +++ b/pkg/test/stat_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" mock3 "github.com/fairdatasociety/fairOS-dfs/pkg/subscriptionManager/rpc/mock" "github.com/sirupsen/logrus" @@ -48,7 +48,7 @@ func TestUserStat(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) tm := taskmanager.New(1, 10, time.Second*15, logger) defer func() { _ = tm.Stop(context.Background()) diff --git a/pkg/test/subscription_test.go b/pkg/test/subscription_test.go index 3f1e5747..c150f9c1 100644 --- a/pkg/test/subscription_test.go +++ b/pkg/test/subscription_test.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -40,7 +40,7 @@ func TestSubscription(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc1 := account.New(logger) _, _, err := acc1.CreateUserAccount("") if err != nil { diff --git a/pkg/test/sync_test.go b/pkg/test/sync_test.go index 9802d25c..f7f74ffd 100644 --- a/pkg/test/sync_test.go +++ b/pkg/test/sync_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/file" "github.com/sirupsen/logrus" @@ -49,7 +49,7 @@ func TestSync(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc := account.New(logger) _, _, err := acc.CreateUserAccount("") if err != nil { diff --git a/pkg/test/user_sharing_test.go b/pkg/test/user_sharing_test.go index 09e7455d..d6729dca 100644 --- a/pkg/test/user_sharing_test.go +++ b/pkg/test/user_sharing_test.go @@ -25,8 +25,8 @@ import ( "testing" "time" - mockpost "github.com/ethersphere/bee/pkg/postage/mock" - mockstorer "github.com/ethersphere/bee/pkg/storer/mock" + mockpost "github.com/ethersphere/bee/v2/pkg/postage/mock" + mockstorer "github.com/ethersphere/bee/v2/pkg/storer/mock" "github.com/fairdatasociety/fairOS-dfs/pkg/blockstore/bee" "github.com/sirupsen/logrus" @@ -53,7 +53,7 @@ func TestSharing(t *testing.T) { }) logger := logging.New(io.Discard, logrus.DebugLevel) - mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, logger) + mockClient := bee.NewBeeClient(beeUrl, mock.BatchOkStr, true, 0, logger) acc1 := account.New(logger) _, _, err := acc1.CreateUserAccount("") diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index ad59c7cb..c0453570 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -27,8 +27,8 @@ import ( "strconv" "strings" - "github.com/ethersphere/bee/pkg/bmtpool" - "github.com/ethersphere/bee/pkg/swarm" + "github.com/ethersphere/bee/v2/pkg/bmtpool" + "github.com/ethersphere/bee/v2/pkg/swarm" bmtlegacy "github.com/ethersphere/bmt/legacy" "golang.org/x/crypto/sha3" )