diff --git a/.circleci/config.yml b/.circleci/config.yml index 04eb6b12..9029c602 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: executors: golang: docker: - - image: cimg/go:1.17.9 + - image: cimg/go:1.18.7-node resource_class: large commands: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 310ebeaf..8fcb2c13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,7 +81,7 @@ import ( ipld "github.com/ipfs/go-ipld-format" "github.com/stretchr/testify/assert" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-fil-markets/filestore/file" ) diff --git a/discovery/impl/local_test.go b/discovery/impl/local_test.go index 0ba49830..e34daf1e 100644 --- a/discovery/impl/local_test.go +++ b/discovery/impl/local_test.go @@ -1,23 +1,17 @@ package discoveryimpl_test import ( - "bytes" "context" "testing" "time" "github.com/ipfs/go-datastore" - dshelp "github.com/ipfs/go-ipfs-ds-help" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/filecoin-project/go-address" - discoveryimpl "github.com/filecoin-project/go-fil-markets/discovery/impl" - "github.com/filecoin-project/go-fil-markets/discovery/migrations" "github.com/filecoin-project/go-fil-markets/retrievalmarket" - retrievalmigrations "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" "github.com/filecoin-project/go-fil-markets/shared_testutil" ) @@ -70,57 +64,3 @@ func TestLocal_AddPeer(t *testing.T) { }) } } - -func TestLocalMigrations(t *testing.T) { - ctx := context.Background() - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - ds := datastore.NewMapDatastore() - - peers := shared_testutil.GeneratePeers(4) - pieceCIDs := shared_testutil.GenerateCids(4) - payloadCids := shared_testutil.GenerateCids(2) - for i, c := range payloadCids { - rps := migrations.RetrievalPeers0{ - Peers: []retrievalmigrations.RetrievalPeer0{ - { - Address: address.TestAddress, - ID: peers[i*2], - PieceCID: &pieceCIDs[i*2], - }, - { - Address: address.TestAddress2, - ID: peers[i*2+1], - PieceCID: &pieceCIDs[i*2+1], - }, - }, - } - buf := new(bytes.Buffer) - err := rps.MarshalCBOR(buf) - require.NoError(t, err) - err = ds.Put(ctx, dshelp.MultihashToDsKey(c.Hash()), buf.Bytes()) - require.NoError(t, err) - } - - l, err := discoveryimpl.NewLocal(ds) - require.NoError(t, err) - shared_testutil.StartAndWaitForReady(ctx, t, l) - - for i, c := range payloadCids { - expectedPeers := []retrievalmarket.RetrievalPeer{ - { - Address: address.TestAddress, - ID: peers[i*2], - PieceCID: &pieceCIDs[i*2], - }, - { - Address: address.TestAddress2, - ID: peers[i*2+1], - PieceCID: &pieceCIDs[i*2+1], - }, - } - peers, err := l.GetPeers(c) - require.NoError(t, err) - require.Equal(t, expectedPeers, peers) - } -} diff --git a/discovery/migrations/migrations.go b/discovery/migrations/migrations.go index bd65cc51..2ed1bf80 100644 --- a/discovery/migrations/migrations.go +++ b/discovery/migrations/migrations.go @@ -1,37 +1,8 @@ package migrations import ( - versioning "github.com/filecoin-project/go-ds-versioning/pkg" "github.com/filecoin-project/go-ds-versioning/pkg/versioned" - - "github.com/filecoin-project/go-fil-markets/discovery" - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" ) -//go:generate cbor-gen-for RetrievalPeers0 - -// RetrievalPeers0 is version 0 of RetrievalPeers -type RetrievalPeers0 struct { - Peers []migrations.RetrievalPeer0 -} - -// MigrateRetrievalPeers0To1 migrates a tuple encoded list of retrieval peers to a map encoded list -func MigrateRetrievalPeers0To1(oldRps *RetrievalPeers0) (*discovery.RetrievalPeers, error) { - peers := make([]retrievalmarket.RetrievalPeer, 0, len(oldRps.Peers)) - for _, oldRp := range oldRps.Peers { - peers = append(peers, retrievalmarket.RetrievalPeer{ - Address: oldRp.Address, - ID: oldRp.ID, - PieceCID: oldRp.PieceCID, - }) - } - return &discovery.RetrievalPeers{ - Peers: peers, - }, nil -} - // RetrievalPeersMigrations are migrations for the store local discovery list of peers we can retrieve from -var RetrievalPeersMigrations = versioned.BuilderList{ - versioned.NewVersionedBuilder(MigrateRetrievalPeers0To1, versioning.VersionKey("1")), -} +var RetrievalPeersMigrations = versioned.BuilderList{} diff --git a/discovery/migrations/migrations_cbor_gen.go b/discovery/migrations/migrations_cbor_gen.go deleted file mode 100644 index 6dc5e2b5..00000000 --- a/discovery/migrations/migrations_cbor_gen.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. - -package migrations - -import ( - "fmt" - "io" - "math" - "sort" - - migrations "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" - cid "github.com/ipfs/go-cid" - cbg "github.com/whyrusleeping/cbor-gen" - xerrors "golang.org/x/xerrors" -) - -var _ = xerrors.Errorf -var _ = cid.Undef -var _ = math.E -var _ = sort.Sort - -var lengthBufRetrievalPeers0 = []byte{129} - -func (t *RetrievalPeers0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufRetrievalPeers0); err != nil { - return err - } - - // t.Peers ([]migrations.RetrievalPeer0) (slice) - if len(t.Peers) > cbg.MaxLength { - return xerrors.Errorf("Slice value in field t.Peers was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Peers))); err != nil { - return err - } - for _, v := range t.Peers { - if err := v.MarshalCBOR(cw); err != nil { - return err - } - } - return nil -} - -func (t *RetrievalPeers0) UnmarshalCBOR(r io.Reader) (err error) { - *t = RetrievalPeers0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 1 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.Peers ([]migrations.RetrievalPeer0) (slice) - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - - if extra > cbg.MaxLength { - return fmt.Errorf("t.Peers: array too large (%d)", extra) - } - - if maj != cbg.MajArray { - return fmt.Errorf("expected cbor array") - } - - if extra > 0 { - t.Peers = make([]migrations.RetrievalPeer0, extra) - } - - for i := 0; i < int(extra); i++ { - - var v migrations.RetrievalPeer0 - if err := v.UnmarshalCBOR(cr); err != nil { - return err - } - - t.Peers[i] = v - } - - return nil -} diff --git a/docs/retrievalprovider.mmd b/docs/retrievalprovider.mmd index 6caac383..b5b6b721 100644 --- a/docs/retrievalprovider.mmd +++ b/docs/retrievalprovider.mmd @@ -16,14 +16,18 @@ stateDiagram-v2 state "DealStatusCancelled" as DealStatusCancelled DealStatusUnsealing : On entry runs UnsealData DealStatusUnsealed : On entry runs UnpauseDeal - DealStatusFundsNeededUnseal : On entry runs TrackTransfer + DealStatusFundsNeededUnseal : On entry runs UpdateFunding DealStatusFailing : On entry runs CancelDeal + DealStatusFundsNeeded : On entry runs UpdateFunding + DealStatusFundsNeededLastPayment : On entry runs UpdateFunding DealStatusCompleting : On entry runs CleanupDeal DealStatusCancelling : On entry runs CancelDeal [*] --> DealStatusNew note right of DealStatusNew The following events are not shown cause they can trigger from any state. + ProviderEventProcessPayment - does not transition state + ProviderEventComplete - transitions state to DealStatusCompleting ProviderEventDataTransferError - transitions state to DealStatusErrored ProviderEventMultiStoreError - transitions state to DealStatusErrored ProviderEventClientCancelled - transitions state to DealStatusCancelling @@ -35,20 +39,20 @@ stateDiagram-v2 DealStatusUnsealing --> DealStatusUnsealed : ProviderEventUnsealComplete DealStatusUnsealed --> DealStatusOngoing : ProviderEventBlockSent DealStatusOngoing --> DealStatusOngoing : ProviderEventBlockSent - DealStatusOngoing --> DealStatusBlocksComplete : ProviderEventBlocksCompleted DealStatusNew --> DealStatusFundsNeededUnseal : ProviderEventPaymentRequested DealStatusUnsealed --> DealStatusFundsNeeded : ProviderEventPaymentRequested DealStatusOngoing --> DealStatusFundsNeeded : ProviderEventPaymentRequested - DealStatusBlocksComplete --> DealStatusFundsNeededLastPayment : ProviderEventPaymentRequested + DealStatusUnsealed --> DealStatusFundsNeededLastPayment : ProviderEventLastPaymentRequested + DealStatusOngoing --> DealStatusFundsNeededLastPayment : ProviderEventLastPaymentRequested + DealStatusFundsNeededUnseal --> DealStatusFailing : ProviderEventSaveVoucherFailed DealStatusFundsNeeded --> DealStatusFailing : ProviderEventSaveVoucherFailed DealStatusFundsNeededLastPayment --> DealStatusFailing : ProviderEventSaveVoucherFailed + DealStatusFundsNeededUnseal --> DealStatusFundsNeededUnseal : ProviderEventPartialPaymentReceived DealStatusFundsNeeded --> DealStatusFundsNeeded : ProviderEventPartialPaymentReceived DealStatusFundsNeededLastPayment --> DealStatusFundsNeededLastPayment : ProviderEventPartialPaymentReceived DealStatusFundsNeededUnseal --> DealStatusUnsealing : ProviderEventPaymentReceived DealStatusFundsNeeded --> DealStatusOngoing : ProviderEventPaymentReceived DealStatusFundsNeededLastPayment --> DealStatusFinalizing : ProviderEventPaymentReceived - DealStatusBlocksComplete --> DealStatusCompleting : ProviderEventComplete - DealStatusFinalizing --> DealStatusCompleting : ProviderEventComplete DealStatusCompleting --> DealStatusCompleted : ProviderEventCleanupComplete DealStatusFailing --> DealStatusErrored : ProviderEventCancelComplete DealStatusCancelling --> DealStatusCancelled : ProviderEventCancelComplete diff --git a/docs/retrievalprovider.mmd.png b/docs/retrievalprovider.mmd.png index 0d97b8e1..d3b1a085 100644 Binary files a/docs/retrievalprovider.mmd.png and b/docs/retrievalprovider.mmd.png differ diff --git a/docs/retrievalprovider.mmd.svg b/docs/retrievalprovider.mmd.svg index da711eae..0c0ff7bc 100644 --- a/docs/retrievalprovider.mmd.svg +++ b/docs/retrievalprovider.mmd.svg @@ -1,6 +1,6 @@ -ProviderEventOpenProviderEventDealAcceptedProviderEventDealAcceptedProviderEventUnsealErrorProviderEventUnsealCompleteProviderEventBlockSentProviderEventBlockSentProviderEventPaymentRequestedProviderEventPaymentRequestedProviderEventPaymentRequestedProviderEventLastPaymentRequestedProviderEventLastPaymentRequestedProviderEventSaveVoucherFailedProviderEventSaveVoucherFailedProviderEventSaveVoucherFailedProviderEventPartialPaymentReceivedProviderEventPartialPaymentReceivedProviderEventPartialPaymentReceivedProviderEventPaymentReceivedProviderEventPaymentReceivedProviderEventPaymentReceivedProviderEventCleanupCompleteProviderEventCancelCompleteProviderEventCancelCompleteDealStatusNewDealStatusUnsealingOn entry runs UnsealDataDealStatusUnsealedOn entry runs UnpauseDealDealStatusFundsNeededUnsealOn entry runs UpdateFundingDealStatusFailingOn entry runs CancelDealDealStatusFundsNeededOn entry runs UpdateFundingDealStatusOngoingDealStatusFundsNeededLastPaymentOn entry runs UpdateFundingDealStatusCompletedDealStatusErroredDealStatusFinalizingDealStatusCompletingOn entry runs CleanupDealDealStatusCancellingOn entry runs CancelDealDealStatusCancelledThe following events are not shown cause they can trigger from any state.ProviderEventProcessPayment - does not transition stateProviderEventComplete - transitions state to DealStatusCompletingProviderEventDataTransferError - transitions state to DealStatusErroredProviderEventMultiStoreError - transitions state to DealStatusErroredProviderEventClientCancelled - transitions state to DealStatusCancellingThe following events only record in this state.ProviderEventClientCancelledThe following events only record in this state.ProviderEventPaymentRequestedThe following events only record in this state.ProviderEventPaymentReceivedDealStatusBlocksCompleteThe following events only record in this state.ProviderEventPaymentReceivedThe following events only record in this state.ProviderEventPaymentReceivedThe following events only record in this state.ProviderEventClientCancelled \ No newline at end of file diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index dc4e4e8d..f0a7de69 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit dc4e4e8dc9554dedb6f48304f7f0c6328331f9ec +Subproject commit f0a7de6991e037a7c355fdb62a0f1ae7fb7324e7 diff --git a/go.mod b/go.mod index dcc33ea2..40d5c905 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,19 @@ module github.com/filecoin-project/go-fil-markets -go 1.17 +go 1.18 require ( github.com/filecoin-project/dagstore v0.5.2 github.com/filecoin-project/go-address v0.0.6 github.com/filecoin-project/go-cbor-util v0.0.1 github.com/filecoin-project/go-commp-utils v0.1.3 - github.com/filecoin-project/go-data-transfer v1.15.2 + github.com/filecoin-project/go-data-transfer/v2 v2.0.0-20221008000603-c9889dcce66b github.com/filecoin-project/go-ds-versioning v0.1.1 github.com/filecoin-project/go-fil-commcid v0.1.0 github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-state-types v0.1.10 - github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd + github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/index-provider v0.8.1 github.com/filecoin-project/specs-actors v0.9.13 @@ -21,44 +21,43 @@ require ( github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e github.com/hashicorp/go-multierror v1.1.1 github.com/ipfs/go-block-format v0.0.3 - github.com/ipfs/go-blockservice v0.3.0 - github.com/ipfs/go-cid v0.2.0 + github.com/ipfs/go-blockservice v0.4.0 + github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-cidutil v0.1.0 - github.com/ipfs/go-datastore v0.5.1 + github.com/ipfs/go-datastore v0.6.0 github.com/ipfs/go-filestore v1.2.0 - github.com/ipfs/go-graphsync v0.13.1 + github.com/ipfs/go-graphsync v0.14.0 github.com/ipfs/go-ipfs-blockstore v1.2.0 github.com/ipfs/go-ipfs-blocksutil v0.0.1 github.com/ipfs/go-ipfs-chunker v0.0.5 github.com/ipfs/go-ipfs-ds-help v1.1.0 - github.com/ipfs/go-ipfs-exchange-offline v0.2.0 + github.com/ipfs/go-ipfs-exchange-offline v0.3.0 github.com/ipfs/go-ipfs-files v0.0.9 github.com/ipfs/go-ipld-cbor v0.0.6-0.20211211231443-5d9b9e1f6fa8 github.com/ipfs/go-ipld-format v0.4.0 github.com/ipfs/go-log/v2 v2.5.1 github.com/ipfs/go-merkledag v0.6.0 github.com/ipfs/go-unixfs v0.3.1 - github.com/ipld/go-car v0.4.0 + github.com/ipld/go-car v0.3.3 github.com/ipld/go-car/v2 v2.4.1 github.com/ipld/go-codec-dagpb v1.3.1 - github.com/ipld/go-ipld-prime v0.17.0 + github.com/ipld/go-ipld-prime v0.18.0 github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c github.com/jpillora/backoff v1.0.0 - github.com/libp2p/go-libp2p v0.21.0 - github.com/libp2p/go-libp2p-core v0.19.1 - github.com/multiformats/go-multiaddr v0.6.0 + github.com/libp2p/go-libp2p v0.22.0 + github.com/multiformats/go-multiaddr v0.7.0 github.com/multiformats/go-multibase v0.1.1 github.com/multiformats/go-multicodec v0.5.0 - github.com/multiformats/go-multihash v0.2.0 + github.com/multiformats/go-multihash v0.2.1 github.com/multiformats/go-varint v0.0.6 github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e github.com/stretchr/testify v1.8.0 github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799 - golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 - golang.org/x/net v0.0.0-20220630215102-69896b714898 - golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f + golang.org/x/exp v0.0.0-20210715201039-d37aa40e8013 + golang.org/x/net v0.0.0-20220812174116-3211cb980234 + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f ) require ( @@ -66,16 +65,14 @@ require ( github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/bep/debounce v1.2.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect github.com/filecoin-project/go-bitfield v0.2.4 // indirect - github.com/filecoin-project/go-crypto v0.0.1 // indirect github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect github.com/filecoin-project/storetheindex v0.4.17 // indirect @@ -84,35 +81,35 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.0.0 // indirect - github.com/ipfs/go-ipfs-exchange-interface v0.1.0 // indirect + github.com/ipfs/go-ipfs-exchange-interface v0.2.0 // indirect github.com/ipfs/go-ipfs-posinfo v0.0.1 // indirect github.com/ipfs/go-ipfs-pq v0.0.2 // indirect github.com/ipfs/go-ipfs-util v0.0.2 // indirect github.com/ipfs/go-ipld-legacy v0.1.0 // indirect github.com/ipfs/go-log v1.0.5 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect - github.com/ipfs/go-peertaskqueue v0.7.1 // indirect + github.com/ipfs/go-peertaskqueue v0.8.0 // indirect github.com/ipfs/go-unixfsnode v1.4.0 // indirect github.com/ipfs/go-verifcid v0.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/goprocess v0.1.4 // indirect - github.com/klauspost/cpuid/v2 v2.0.14 // indirect + github.com/klauspost/cpuid/v2 v2.1.0 // indirect github.com/koron/go-ssdp v0.0.3 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect - github.com/libp2p/go-eventbus v0.2.1 // indirect github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect - github.com/libp2p/go-libp2p-peerstore v0.7.1 // indirect + github.com/libp2p/go-libp2p-core v0.20.1 // indirect github.com/libp2p/go-msgio v0.2.0 // indirect github.com/libp2p/go-nat v0.1.0 // indirect github.com/libp2p/go-netroute v0.2.0 // indirect - github.com/libp2p/go-openssl v0.0.7 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/libp2p/go-openssl v0.1.0 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-pointer v0.0.1 // indirect github.com/miekg/dns v1.1.50 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/minio/sha256-simd v1.0.0 // indirect @@ -125,38 +122,27 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/stretchr/objx v0.4.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tj/go-spin v1.1.0 // indirect github.com/urfave/cli/v2 v2.8.1 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect - github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb // indirect - github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 // indirect + github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.opentelemetry.io/otel v1.7.0 // indirect - go.opentelemetry.io/otel/sdk v1.2.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect - go.uber.org/atomic v1.9.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.21.0 // indirect + go.uber.org/zap v1.22.0 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/tools v0.1.11 // indirect - google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/tools v0.1.12 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.1.7 // indirect - modernc.org/cc v1.0.0 // indirect - modernc.org/golex v1.0.1 // indirect - modernc.org/mathutil v1.1.1 // indirect - modernc.org/strutil v1.1.0 // indirect - modernc.org/xc v1.0.0 // indirect ) replace github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi diff --git a/go.sum b/go.sum index 477498a0..b3fd5aab 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -9,31 +8,14 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -43,9 +25,7 @@ dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= @@ -57,7 +37,6 @@ github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/akrylysov/pogreb v0.10.1/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YTWyqJZ7+lI= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -65,9 +44,7 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a h1:E/8AP5dFtMhl5KPJz66Kt9G0n+7Sn41Fy1wv9/jHOrc= github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5/go.mod h1:Y2QMoi1vgtOIfc+6DhrMOGkLoGzqSV2rKp4Sm+opsyA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -78,8 +55,6 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -90,28 +65,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo= github.com/bep/debounce v1.2.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= -github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -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/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -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= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -123,54 +86,33 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/ceramicnetwork/go-dag-jose v0.1.0/go.mod h1:qYA1nYt0X8u4XoMAVoOV3upUVKtrxy/I670Dg5F0wjI= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= -github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -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 v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= @@ -187,43 +129,31 @@ github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQY 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/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= -github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrVH//y2UQE= github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= -github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= -github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302/go.mod h1:qBlWZqWeVx9BjvqBsnC/8RUlAYpIFmPvgROcw0n1scE= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/filecoin-project/dagstore v0.5.2 h1:Nd6oXdnolbbVhpMpkYT5PJHOjQp4OBSntHpMV5pxj3c= github.com/filecoin-project/dagstore v0.5.2/go.mod h1:mdqKzYrRBHf1pRMthYfMv3n37oOw0Tkx7+TxPt240M0= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= @@ -245,14 +175,11 @@ github.com/filecoin-project/go-commp-utils v0.1.3/go.mod h1:3ENlD1pZySaUout0p9AN github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2JJGLl6gCq6o= github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-dagaggregator-unixfs v0.2.0/go.mod h1:WTuJWgBQY0omnQqa8kRPT9O0Uj5wQOgslVMUuTeHdJ8= -github.com/filecoin-project/go-data-transfer v1.15.1/go.mod h1:dXsUoDjR9tKN7aV6R0BBDNNBPzbNvrrNuWt9MUn3yYc= github.com/filecoin-project/go-data-transfer v1.15.2 h1:PzqsFr2Q/onMGKrGh7TtRT0dKsJcVJrioJJnjnKmxlk= -github.com/filecoin-project/go-data-transfer v1.15.2/go.mod h1:qXOJ3IF5dEJQHykXXTwcaRxu17bXAxr+LglXzkL6bZQ= -github.com/filecoin-project/go-ds-versioning v0.0.0-20211206185234-508abd7c2aff/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= +github.com/filecoin-project/go-data-transfer/v2 v2.0.0-20221008000603-c9889dcce66b h1:r11hBiZShNch00bAGe04xsuQGmckiUR0EA1KWtdsikk= +github.com/filecoin-project/go-data-transfer/v2 v2.0.0-20221008000603-c9889dcce66b/go.mod h1:R+IlFJkqjUOWS/3eqDaKGdPkD4JULosN7YdIN22+BuI= github.com/filecoin-project/go-ds-versioning v0.1.1 h1:JiyBqaQlwC+UM0WhcBtVEeT3XrX59mQhT8U3p7nu86o= github.com/filecoin-project/go-ds-versioning v0.1.1/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -262,34 +189,29 @@ github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3 github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= -github.com/filecoin-project/go-indexer-core v0.2.16/go.mod h1:5kCKyhtT9k1vephr9l9SFGX8B/HowXIvOhGCkmbxwbY= github.com/filecoin-project/go-legs v0.4.4 h1:mpMmAOOnamaz0CV9rgeKhEWA8j9kMC+f+UGCGrxKaZo= -github.com/filecoin-project/go-legs v0.4.4/go.mod h1:JQ3hA6xpJdbR8euZ2rO0jkxaMxeidXf0LDnVuqPAe9s= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= github.com/filecoin-project/go-padreader v0.0.1 h1:8h2tVy5HpoNbr2gBRr+WD6zV6VD6XHig+ynSGJg8ZOs= github.com/filecoin-project/go-padreader v0.0.1/go.mod h1:VYVPJqwpsfmtoHnAmPx6MUwmrK6HIcDqZJiuZhtmfLQ= github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= -github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10 h1:YrrJWWh2fU4VPhwHyPlDK5I4mB7bqgnRd3HCm9IOwIU= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd h1:Ykxbz+LvSCUIl2zFaaPGmF8KHXTJu9T/PymgHr7IHjs= -github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= +github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= +github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNdofHZoGPjfNaAo5Q= github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo= github.com/filecoin-project/index-provider v0.8.1 h1:ggoBWvMSWR91HZQCWfv8SZjoTGNyJBwNMLuN9bJZrbU= github.com/filecoin-project/index-provider v0.8.1/go.mod h1:c/Ym5HtWPp9NQgNc9dgSBMpSNsZ/DE9FEi9qVubl5RM= -github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/storetheindex v0.4.17 h1:w0dVc954TGPukoVbidlYvn9Xt+wVhk5vBvrqeJiRo8I= github.com/filecoin-project/storetheindex v0.4.17/go.mod h1:y2dL8C5D3PXi183hdxgGtM8vVYOZ1lg515tpl/D3tN8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= 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= @@ -300,18 +222,11 @@ github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= -github.com/gammazero/keymutex v0.0.2/go.mod h1:qtzWCCLMisQUmVa4dvqHVgwfh4BP2YB7JxNDGXnsKrs= -github.com/gammazero/radixtree v0.2.5/go.mod h1:VPqqCDZ3YZZxAzUUsIF/ytFBigVWV7JIV1Stld8hri0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -320,29 +235,19 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 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/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -358,24 +263,18 @@ github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 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= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -386,27 +285,21 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -414,14 +307,9 @@ github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8v 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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -434,26 +322,20 @@ github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE0 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 h1:F9k+7wv5OIk1zcq23QpdiL0hfDuXPjuOmMNaC6fgQ0Q= @@ -462,18 +344,14 @@ github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4n github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= @@ -493,37 +371,26 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitfield v1.0.0 h1:y/XHm2GEmD9wKngheWNNCNL0pzrWXZwCdQGv1ikXknQ= github.com/ipfs/go-bitfield v1.0.0/go.mod h1:N/UiujQy+K+ceU1EF5EkVd1TNqevLrCQMIcAEPrdtus= -github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= -github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= -github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= -github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.3.4/go.mod h1:4T7fvNv/LmOys+21tnLzGKncMeeXUYUd1nUiJ2teMvI= github.com/ipfs/go-bitswap v0.5.1/go.mod h1:P+ckC87ri1xFLvk74NlXdP0Kj9RmWAh4+H78sC6Qopo= -github.com/ipfs/go-bitswap v0.6.0 h1:f2rc6GZtoSFhEIzQmddgGiel9xntj02Dg0ZNf2hSC+w= github.com/ipfs/go-bitswap v0.6.0/go.mod h1:Hj3ZXdOC5wBJvENtdqsixmzzRukqd8EHLxZLZc3mzRA= -github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= +github.com/ipfs/go-bitswap v0.8.0 h1:UEV7kogQu2iGggkE9GhLykDrRCUpsNnpu2NODww/srw= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= -github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= -github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= -github.com/ipfs/go-blockservice v0.1.4/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-blockservice v0.1.7/go.mod h1:GmS+BAt4hrwBKkzE11AFDQUrnvqjwFatGS2MY7wOjEM= github.com/ipfs/go-blockservice v0.2.1/go.mod h1:k6SiwmgyYgs4M/qt+ww6amPeUH9EISLRBnvUurKJhi8= -github.com/ipfs/go-blockservice v0.3.0 h1:cDgcZ+0P0Ih3sl8+qjFr2sVaMdysg/YZpLj5WJ8kiiw= github.com/ipfs/go-blockservice v0.3.0/go.mod h1:P5ppi8IHDC7O+pA0AlGTF09jruB2h+oP3wVVaZl8sfk= +github.com/ipfs/go-blockservice v0.4.0 h1:7MUijAW5SqdsqEW/EhnNFRJXVF8mGU5aGhZ3CQaCWbY= +github.com/ipfs/go-blockservice v0.4.0/go.mod h1:kRjO3wlGW9mS1aKuiCeGhx9K1DagQ10ACpVO59qgAx4= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -534,61 +401,36 @@ github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnO github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.1.0/go.mod h1:rH5/Xv83Rfy8Rw6xG+id3DYAMUVmem1MowoKwdXmN2o= -github.com/ipfs/go-cid v0.2.0 h1:01JTiihFq9en9Vz0lc0VDWvZe/uBonGpzo4THP0vcQ0= -github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= -github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= +github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= +github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= github.com/ipfs/go-cidutil v0.1.0/go.mod h1:e7OEVBMIv9JaOxt9zaGEmAoSlXW9jdFZ5lP/0PwcfpA= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= -github.com/ipfs/go-datastore v0.5.1 h1:WkRhLuISI+XPD0uk3OskB0fYFSyqK8Ob5ZYew9Qa1nQ= github.com/ipfs/go-datastore v0.5.1/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= -github.com/ipfs/go-delegated-routing v0.2.2/go.mod h1:T8wrRhlXBHLPUR3bZQgArHPfdi7nBfOsZ1m5fr9tAp4= +github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= +github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= -github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= -github.com/ipfs/go-ds-badger v0.2.7/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= -github.com/ipfs/go-ds-badger v0.3.0/go.mod h1:1ke6mXNqeV8K3y5Ak2bAA0osoTfmxUdupVCGm4QUIek= -github.com/ipfs/go-ds-flatfs v0.5.1/go.mod h1:RWTV7oZD/yZYBKdbVIFXTX2fdY2Tbvl94NsWqmoyAX4= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= -github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8= github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.5.0 h1:s++MEBbD3ZKc9/8/njrn4flZLnCuY9I79v94gBUNumo= github.com/ipfs/go-ds-leveldb v0.5.0/go.mod h1:d3XG9RUDzQ6V4SHi8+Xgj9j1XuEk1z82lquxrVbml/Q= -github.com/ipfs/go-ds-measure v0.2.0/go.mod h1:SEUD/rE2PwRa4IQEC5FuNAmjJCyYObZr9UvVh8V3JxE= -github.com/ipfs/go-fetcher v1.5.0/go.mod h1:5pDZ0393oRF/fHiLmtFZtpMNBQfHOYNPtryWedVuSWE= -github.com/ipfs/go-fetcher v1.6.1/go.mod h1:27d/xMV8bodjVs9pugh/RCjjK2OZ68UgAMspMdingNo= -github.com/ipfs/go-filestore v1.1.0/go.mod h1:6e1/5Y6NvLuCRdmda/KA4GUhXJQ3Uat6vcWm2DJfxc8= github.com/ipfs/go-filestore v1.2.0 h1:O2wg7wdibwxkEDcl7xkuQsPvJFRBVgVSsOJ/GP6z3yU= github.com/ipfs/go-filestore v1.2.0/go.mod h1:HLJrCxRXquTeEEpde4lTLMaE/MYJZD7WHLkp9z6+FF8= -github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= -github.com/ipfs/go-graphsync v0.11.0/go.mod h1:wC+c8vGVjAHthsVIl8LKr37cUra2GOaMYcQNNmMxDqE= -github.com/ipfs/go-graphsync v0.13.1 h1:lWiP/WLycoPUYyj3IDEi1GJNP30kFuYOvimcfeuZyQs= -github.com/ipfs/go-graphsync v0.13.1/go.mod h1:y8e8G6CmZeL9Srvx1l15CtGiRdf3h5JdQuqPz/iYL0A= -github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= -github.com/ipfs/go-ipfs v0.12.1/go.mod h1:Sbei4ScHevs2v47nUgONQMtHlUfaJjjTNDbhUU1OzOM= -github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= -github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= -github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= -github.com/ipfs/go-ipfs-blockstore v0.1.6/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= +github.com/ipfs/go-graphsync v0.14.0 h1:f5KYkc8GpwwE1BrjBOWxIkRivXIw7fVqGZlnILpvbSc= +github.com/ipfs/go-graphsync v0.14.0/go.mod h1:1LDVVnNHjit8ddJOtw3Jq9epP792xWFXXL3dJWIBIkM= github.com/ipfs/go-ipfs-blockstore v0.2.1/go.mod h1:jGesd8EtCM3/zPgx+qr0/feTXGUeRai6adgwC+Q+JvE= -github.com/ipfs/go-ipfs-blockstore v1.0.4-0.20210205083733-fb07d7bc5aec/go.mod h1:feuklK+m9POeWJzYQO7l05yNEgUiX5oELBNA8/Be33E= -github.com/ipfs/go-ipfs-blockstore v1.0.4/go.mod h1:uL7/gTJ8QIZ3MtA3dWf+s1a0U3fJy2fcEZAsovpRp+w= -github.com/ipfs/go-ipfs-blockstore v1.1.1/go.mod h1:w51tNR9y5+QXB0wkNcHt4O2aSZjTdqaEWaQdSxEyUOY= github.com/ipfs/go-ipfs-blockstore v1.1.2/go.mod h1:w51tNR9y5+QXB0wkNcHt4O2aSZjTdqaEWaQdSxEyUOY= github.com/ipfs/go-ipfs-blockstore v1.2.0 h1:n3WTeJ4LdICWs/0VSfjHrlqpPpl6MZ+ySd3j8qz0ykw= github.com/ipfs/go-ipfs-blockstore v1.2.0/go.mod h1:eh8eTFLiINYNSNawfZOC7HOxNTxpB1PFuA5E1m/7exE= @@ -597,44 +439,31 @@ github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtL github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= -github.com/ipfs/go-ipfs-cmds v0.6.0/go.mod h1:ZgYiWVnCk43ChwoH8hAmI1IRbuVtq3GSTHwtRB/Kqhk= -github.com/ipfs/go-ipfs-config v0.18.0/go.mod h1:wz2lKzOjgJeYJa6zx8W9VT7mz+iSd0laBMqS/9wmX6A= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= -github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= -github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= -github.com/ipfs/go-ipfs-exchange-interface v0.1.0 h1:TiMekCrOGQuWYtZO3mf4YJXDIdNgnKWZ9IE3fGlnWfo= github.com/ipfs/go-ipfs-exchange-interface v0.1.0/go.mod h1:ych7WPlyHqFvCi/uQI48zLZuAWVP5iTQPXEfVaw5WEI= -github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= +github.com/ipfs/go-ipfs-exchange-interface v0.2.0 h1:8lMSJmKogZYNo2jjhUs0izT+dck05pqUw4mWNW9Pw6Y= +github.com/ipfs/go-ipfs-exchange-interface v0.2.0/go.mod h1:z6+RhJuDQbqKguVyslSOuVDhqF9JtTrO3eptSAiW2/Y= github.com/ipfs/go-ipfs-exchange-offline v0.1.1/go.mod h1:vTiBRIbzSwDD0OWm+i3xeT0mO7jG2cbJYatp3HPk5XY= -github.com/ipfs/go-ipfs-exchange-offline v0.2.0 h1:2PF4o4A7W656rC0RxuhUace997FTcDTcIQ6NoEtyjAI= github.com/ipfs/go-ipfs-exchange-offline v0.2.0/go.mod h1:HjwBeW0dvZvfOMwDP0TSKXIHf2s+ksdP4E3MLDRtLKY= +github.com/ipfs/go-ipfs-exchange-offline v0.3.0 h1:c/Dg8GDPzixGd0MC8Jh6mjOwU57uYokgWRFidfvEkuA= +github.com/ipfs/go-ipfs-exchange-offline v0.3.0/go.mod h1:MOdJ9DChbb5u37M1IcbrRB02e++Z7521fMxqCNRrz9s= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-files v0.0.9 h1:OFyOfmuVDu9c5YtjSDORmwXzE6fmZikzZpzsnNkgFEg= github.com/ipfs/go-ipfs-files v0.0.9/go.mod h1:aFv2uQ/qxWpL/6lidWvnSQmaVqCrf0TBGoUr+C1Fo84= -github.com/ipfs/go-ipfs-keystore v0.0.2/go.mod h1:H49tRmibOEs7gLMgbOsjC4dqh1u5e0R/SWuc2ScfgSo= -github.com/ipfs/go-ipfs-pinner v0.2.1/go.mod h1:l1AtLL5bovb7opnG77sh4Y10waINz3Y1ni6CvTzx7oo= github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= -github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-provider v0.7.1/go.mod h1:QwdDYRYnC5sYGLlOwVDY/0ZB6T3zcMtu+5+GdGeUuw8= -github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= -github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= -github.com/ipfs/go-ipfs-routing v0.2.1 h1:E+whHWhJkdN9YeoHZNj5itzc+OR292AJ2uE9FFiW0BY= github.com/ipfs/go-ipfs-routing v0.2.1/go.mod h1:xiNNiwgjmLqPS1cimvAw6EyB9rkVDbiocA4yY+wRNLM= +github.com/ipfs/go-ipfs-routing v0.3.0 h1:9W/W3N+g+y4ZDeffSgqhgo7BsBSJwPMcyssET9OWevc= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= -github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= @@ -646,10 +475,8 @@ github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg github.com/ipfs/go-ipld-format v0.3.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxnHpvVLnH7jSM= github.com/ipfs/go-ipld-format v0.4.0 h1:yqJSaJftjmjc9jEOFYlpkwOLVKv68OD27jFLlSghBlQ= github.com/ipfs/go-ipld-format v0.4.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxnHpvVLnH7jSM= -github.com/ipfs/go-ipld-git v0.1.1/go.mod h1:+VyMqF5lMcJh4rwEppV0e6g4nCCHXThLYYDpKUkJubI= github.com/ipfs/go-ipld-legacy v0.1.0 h1:wxkkc4k8cnvIGIjPO0waJCe7SHEyFgl+yQdafdjGrpA= github.com/ipfs/go-ipld-legacy v0.1.0/go.mod h1:86f5P/srAmh9GcIcWQR9lfFLZPrIyyXQeVlOWeeWEuI= -github.com/ipfs/go-ipns v0.1.2/go.mod h1:ioQ0j02o6jdIVW+bmi18f4k2gRf0AV3kZ9KeHYHICnQ= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= @@ -666,76 +493,39 @@ github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHn github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= -github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= -github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= -github.com/ipfs/go-merkledag v0.2.4/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= -github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= -github.com/ipfs/go-merkledag v0.4.0/go.mod h1:XshXBkhyeS63YNGisLL1uDSfuTyrQIxVUOg3ojR5MOE= github.com/ipfs/go-merkledag v0.5.1/go.mod h1:cLMZXx8J08idkp5+id62iVftUQV+HlYJ3PIhDfZsjA4= github.com/ipfs/go-merkledag v0.6.0 h1:oV5WT2321tS4YQVOPgIrWHvJ0lJobRTerU+i9nmUCuA= github.com/ipfs/go-merkledag v0.6.0/go.mod h1:9HSEwRd5sV+lbykiYP+2NC/3o6MZbKNaa4hfNcH5iH0= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks= -github.com/ipfs/go-mfs v0.2.1/go.mod h1:Woj80iuw4ajDnIP6+seRaoHpPsc9hmL0pk/nDNDWP88= -github.com/ipfs/go-namesys v0.4.0/go.mod h1:jpJwzodyP8DZdWN6DShRjVZw6gaqMr4nQLBSxU5cR6E= -github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= -github.com/ipfs/go-path v0.0.9/go.mod h1:VpDkSBKQ9EFQOUgi54Tq/O/tGi8n1RfYNks13M3DEs8= -github.com/ipfs/go-path v0.1.1/go.mod h1:vC8q4AKOtrjJz2NnllIrmr2ZbGlF5fW2OKKyhV9ggb0= -github.com/ipfs/go-path v0.2.1/go.mod h1:NOScsVgxfC/eIw4nz6OiGwK42PjaSJ4Y/ZFPn1Xe07I= -github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= -github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= github.com/ipfs/go-peertaskqueue v0.7.0/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= -github.com/ipfs/go-peertaskqueue v0.7.1 h1:7PLjon3RZwRQMgOTvYccZ+mjzkmds/7YzSWKFlBAypE= -github.com/ipfs/go-peertaskqueue v0.7.1/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= -github.com/ipfs/go-pinning-service-http-client v0.1.0/go.mod h1:tcCKmlkWWH9JUUkKs8CrOZBanacNc1dmKLfjlyXAMu4= -github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= -github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= -github.com/ipfs/go-unixfs v0.2.6/go.mod h1:GTTzQvaZsTZARdNkkdjDKFFnBhmO3e5mIM1PkH/x4p0= +github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJYsUjqaU= +github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= github.com/ipfs/go-unixfs v0.3.1 h1:LrfED0OGfG98ZEegO4/xiprx2O+yS+krCMQSp7zLVv8= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= -github.com/ipfs/go-unixfsnode v1.1.2/go.mod h1:5dcE2x03pyjHk4JjamXmunTMzz+VUtqvPwZjIEkfV6s= -github.com/ipfs/go-unixfsnode v1.1.3/go.mod h1:ZZxUM5wXBC+G0Co9FjrYTOm+UlhZTjxLfRYdWY9veZ4= github.com/ipfs/go-unixfsnode v1.4.0 h1:9BUxHBXrbNi8mWHc6j+5C580WJqtVw9uoeEKn4tMhwA= github.com/ipfs/go-unixfsnode v1.4.0/go.mod h1:qc7YFFZ8tABc58p62HnIYbUMwj9chhUuFWmxSokfePo= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= -github.com/ipfs/interface-go-ipfs-core v0.4.0/go.mod h1:UJBcU6iNennuI05amq3FQ7g0JHUkibHFAfhfUIy927o= -github.com/ipfs/interface-go-ipfs-core v0.5.2/go.mod h1:lNBJrdXHtWS46evMPBdWtDQMDsrKcGbxCOGoKLkztOE= -github.com/ipfs/tar-utils v0.0.2/go.mod h1:4qlnRWgTVljIMhSG2SqRYn66NT+3wrv/kZt9V+eqxDM= -github.com/ipld/edelweiss v0.1.2/go.mod h1:14NnBVHgrPO8cqDnKg7vc69LGI0aCAcax6mj21+99ec= -github.com/ipld/go-car v0.1.0/go.mod h1:RCWzaUh2i4mOEkB3W45Vc+9jnS/M6Qay5ooytiBHl3g= -github.com/ipld/go-car v0.3.2/go.mod h1:WEjynkVt04dr0GwJhry0KlaTeSDEiEYyMPOxDBQ17KE= -github.com/ipld/go-car v0.4.0 h1:U6W7F1aKF/OJMHovnOVdst2cpQE5GhmHibQkAixgNcQ= -github.com/ipld/go-car v0.4.0/go.mod h1:Uslcn4O9cBKK9wqHm/cLTFacg6RAPv6LZx2mxd2Ypl4= +github.com/ipld/go-car v0.3.3 h1:D6y+jvg9h2ZSv7GLUMWUwg5VTLy1E7Ak+uQw5orOg3I= +github.com/ipld/go-car v0.3.3/go.mod h1:/wkKF4908ULT4dFIFIUZYcfjAnj+KFnJvlh8Hsz1FbQ= github.com/ipld/go-car/v2 v2.1.1/go.mod h1:+2Yvf0Z3wzkv7NeI69i8tuZ+ft7jyjPYIWZzeVNeFcI= github.com/ipld/go-car/v2 v2.4.1 h1:9S+FYbQzQJ/XzsdiOV13W5Iu/i+gUnr6csbSD9laFEg= github.com/ipld/go-car/v2 v2.4.1/go.mod h1:zjpRf0Jew9gHqSvjsKVyoq9OY9SWoEKdYCQUKVaaPT0= -github.com/ipld/go-codec-dagpb v1.2.0/go.mod h1:6nBN7X7h8EOsEejZGqC7tej5drsdBAXbMHyBT+Fne5s= github.com/ipld/go-codec-dagpb v1.3.0/go.mod h1:ga4JTU3abYApDC3pZ00BC2RSvC3qfBb9MSJkMLSwnhA= github.com/ipld/go-codec-dagpb v1.3.1 h1:yVNlWRQexCa54ln3MSIiUN++ItH7pdhBFhh0hSgZu1w= github.com/ipld/go-codec-dagpb v1.3.1/go.mod h1:ErNNglIi5KMur/MfFE/svtgQthzVvf+43MrzLbpcIZY= -github.com/ipld/go-ipld-prime v0.0.2-0.20191108012745-28a82f04c785/go.mod h1:bDDSvVz7vaK12FNvMeRYnpRFkSUPNQOiCYQezMD/P3w= -github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHtEaLglS3ZeV8= -github.com/ipld/go-ipld-prime v0.12.3/go.mod h1:PaeLYq8k6dJLmDUSLrzkEpoGV4PEfe/1OtFN/eALOc8= github.com/ipld/go-ipld-prime v0.14.0/go.mod h1:9ASQLwUFLptCov6lIYc70GRB4V7UTyLD0IJtrDJe6ZM= -github.com/ipld/go-ipld-prime v0.14.1/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= -github.com/ipld/go-ipld-prime v0.14.2/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= -github.com/ipld/go-ipld-prime v0.14.4-0.20211217152141-008fd70fc96f/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= +github.com/ipld/go-ipld-prime v0.14.3-0.20211207234443-319145880958/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= github.com/ipld/go-ipld-prime v0.16.0/go.mod h1:axSCuOCBPqrH+gvXr2w9uAOulJqBPhHPT2PjoiiU1qA= -github.com/ipld/go-ipld-prime v0.17.0 h1:+U2peiA3aQsE7mrXjD2nYZaZrCcakoz2Wge8K42Ld8g= -github.com/ipld/go-ipld-prime v0.17.0/go.mod h1:aYcKm5TIvGfY8P3QBKz/2gKcLxzJ1zDaD+o0bOowhgs= -github.com/ipld/go-ipld-prime-proto v0.0.0-20191113031812-e32bd156a1e5/go.mod h1:gcvzoEDBjwycpXt3LBE061wT9f46szXGHAmj9uoP6fU= +github.com/ipld/go-ipld-prime v0.18.0 h1:xUk7NUBSWHEXdjiOu2sLXouFJOMs0yoYzeI5RAqhYQo= +github.com/ipld/go-ipld-prime v0.18.0/go.mod h1:735yXW548CKrLwVCYXzqx90p5deRJMVVxM9eJ4Qe+qE= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73 h1:TsyATB2ZRRQGTwafJdgEUQkmjOExRV0DNokcihZxbnQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73/go.mod h1:2PJ0JgxyB08t0b2WKrcuqI3di0V+5n6RS/LTUJhkoxY= -github.com/ipld/go-storethehash v0.1.7/go.mod h1:O2CgbSwJfXCrYsjA1g1M7zJmVzzg71BM00ds6pyMLAQ= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -765,8 +555,6 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -780,21 +568,15 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= -github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.0.14 h1:QRqdp6bb9M9S5yyKeYteXKuoKE4p0tGlra81fKOpWH8= -github.com/klauspost/cpuid/v2 v2.0.14/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= +github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.2/go.mod h1:XoLfkAiA2KeZsYh4DbHxD7h3nR2AZNqVQOa+LJuqPYs= github.com/koron/go-ssdp v0.0.3 h1:JivLMY45N76b4p/vsWGOKewBQu6uf39y8l+AQ7sDKx8= github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -810,222 +592,107 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= -github.com/libp2p/go-addr-util v0.1.0/go.mod h1:6I3ZYuFr2O/9D+SoyM0zEw0EF3YkldtTX406BpdQMqw= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= 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-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= -github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= github.com/libp2p/go-conn-security-multistream v0.2.1/go.mod h1:cR1d8gA0Hr59Fj6NhaTpFhJZrjSYuNmhpT2r25zYR70= -github.com/libp2p/go-conn-security-multistream v0.3.0/go.mod h1:EEP47t4fw/bTelVmEzIDqSe69hO/ip52xBEhZMLWAHM= -github.com/libp2p/go-doh-resolver v0.3.1/go.mod h1:y5go1ZppAq9N2eppbX0xON01CyPBeUg2yS6BTssssog= github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= -github.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc= github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= -github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-flow-metrics v0.0.3 h1:8tAs/hSdNvUiLgtlSy3mxwxWP4I9y/jlkPFT7epKdeM= github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A= -github.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM= -github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= +github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.12.0/go.mod h1:FpHZrfC1q7nA8jitvdjKBDF31hguaC676g/nT9PgQM0= -github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t2DTVAJxMo= -github.com/libp2p/go-libp2p v0.14.0/go.mod h1:dsQrWLAoIn+GkHPN/U+yypizkHiB9tnv79Os+kSgQ4Q= github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= -github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= -github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= -github.com/libp2p/go-libp2p v0.18.0/go.mod h1:+veaZ9z1SZQhmc5PW78jvnnxZ89Mgvmh4cggO11ETmw= -github.com/libp2p/go-libp2p v0.19.4/go.mod h1:MIt8y481VDhUe4ErWi1a4bvt/CjjFfOq6kZTothWIXY= -github.com/libp2p/go-libp2p v0.20.1/go.mod h1:XgJHsOhEBVBXp/2Sj9bm/yEyD94uunAaP6oaegdcKks= -github.com/libp2p/go-libp2p v0.21.0 h1:s9yYScuIFY33FOOzwTXbc8QqbvsRyKIWFf0FCSJKrfM= -github.com/libp2p/go-libp2p v0.21.0/go.mod h1:zvcA6/C4mr5/XQarRICh+L1SN9dAHHlSWDq4x5VYxg4= -github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo= -github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I= +github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw= +github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= -github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= -github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= -github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= github.com/libp2p/go-libp2p-autonat v0.4.2/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= -github.com/libp2p/go-libp2p-autonat v0.6.0/go.mod h1:bFC6kY8jwzNNWoqc8iGE57vsfwyJ/lP4O4DOV1e0B2o= -github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-blankhost v0.3.0/go.mod h1:urPC+7U01nCGgJ3ZsV8jdwTp6Ji9ID0dMTvq+aJ+nZU= -github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= -github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= -github.com/libp2p/go-libp2p-circuit v0.6.0/go.mod h1:kB8hY+zCpMeScyvFrKrGicRdid6vNXbunKE4rXATZ0M= -github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= -github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= -github.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA= github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= github.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII= github.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= github.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.5/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.11.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.12.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.14.0/go.mod h1:tLasfcVdTXnixsLB0QYaT1syJOhsbrhG7q6pGrHtBg8= -github.com/libp2p/go-libp2p-core v0.15.1/go.mod h1:agSaboYM4hzB1cWekgVReqV5M4g5M+2eNNejV+1EEhs= -github.com/libp2p/go-libp2p-core v0.16.1/go.mod h1:O3i/7y+LqUb0N+qhzXjBjjpchgptWAVMG1Voegk7b4c= -github.com/libp2p/go-libp2p-core v0.19.0/go.mod h1:AkA+FUKQfYt1FLNef5fOPlo/naAWjKy/RCjkcPjqzYg= -github.com/libp2p/go-libp2p-core v0.19.1 h1:zaZQQCeCrFMtxFa1wHy6AhsVynyNmZAvwgWqSSPT3WE= -github.com/libp2p/go-libp2p-core v0.19.1/go.mod h1:2uLhmmqDiFY+dw+70KkBLeKvvsJHGWUINRDdeV1ip7k= -github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= -github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= +github.com/libp2p/go-libp2p-core v0.20.1 h1:fQz4BJyIFmSZAiTbKV8qoYhEH5Dtv/cVhZbG3Ib/+Cw= +github.com/libp2p/go-libp2p-core v0.20.1/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= -github.com/libp2p/go-libp2p-discovery v0.0.5/go.mod h1:YtF20GUxjgoKZ4zmXj8j3Nb2TUSBHFlOCetzYdbZL5I= -github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= -github.com/libp2p/go-libp2p-discovery v0.6.0/go.mod h1:/u1voHt0tKIe5oIA1RHBKQLVCWPna2dXmPNHc2zR9S8= github.com/libp2p/go-libp2p-discovery v0.7.0 h1:6Iu3NyningTb/BmUnEhcTwzwbs4zcywwbfTulM9LHuc= -github.com/libp2p/go-libp2p-discovery v0.7.0/go.mod h1:zPug0Rxib1aQG9iIdwOpRpBf18cAfZgzicO826UQP4I= -github.com/libp2p/go-libp2p-gostream v0.3.0/go.mod h1:pLBQu8db7vBMNINGsAwLL/ZCE8wng5V1FThoaE5rNjc= github.com/libp2p/go-libp2p-gostream v0.3.1 h1:XlwohsPn6uopGluEWs1Csv1QCEjrTXf2ZQagzZ5paAg= -github.com/libp2p/go-libp2p-gostream v0.3.1/go.mod h1:1V3b+u4Zhaq407UUY9JLCpboaeufAeVQbnvAt12LRsI= -github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= -github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= -github.com/libp2p/go-libp2p-http v0.2.1/go.mod h1:9KdioZ7XqNH0eZkZG9bulZLzHv11A7/12fT97agqWhg= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.15.0/go.mod h1:rZtPxYu1TnHHz6n1RggdGrxUX/tA1C2/Wiw3ZMUDrU0= -github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio= -github.com/libp2p/go-libp2p-kbucket v0.4.7/go.mod h1:XyVo99AfQH0foSf176k4jY1xUJ2+jUJIZCSDm7r2YKk= -github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= github.com/libp2p/go-libp2p-loggables v0.1.0 h1:h3w8QFfCt2UJl/0/NW4K829HX/0S4KD31PQ7m8UXXO8= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= -github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= -github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I= github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= -github.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2UAR2KFZKUJEynEs= github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw= github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= -github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M= -github.com/libp2p/go-libp2p-mplex v0.6.0/go.mod h1:i3usuPrBbh9FD2fLZjGpotyNkwr42KStYZQY7BeTiu4= -github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= -github.com/libp2p/go-libp2p-nat v0.1.0/go.mod h1:DQzAG+QbDYjN1/C3B6vXucLtz3u9rEonLVPtZVzQqks= -github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= github.com/libp2p/go-libp2p-noise v0.2.0/go.mod h1:IEbYhBBzGyvdLBoxxULL/SGbJARhUeqlO8lVSREYu2Q= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= -github.com/libp2p/go-libp2p-noise v0.4.0/go.mod h1:BzzY5pyzCYSyJbQy9oD8z5oP2idsafjt4/X42h9DjZU= -github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= -github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= -github.com/libp2p/go-libp2p-peerstore v0.0.1/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= -github.com/libp2p/go-libp2p-peerstore v0.0.6/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= github.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= -github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.7/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA= -github.com/libp2p/go-libp2p-peerstore v0.4.0/go.mod h1:rDJUFyzEWPpXpEwywkcTYYzDHlwza8riYMaUzaN6hX0= -github.com/libp2p/go-libp2p-peerstore v0.6.0/go.mod h1:DGEmKdXrcYpK9Jha3sS7MhqYdInxJy84bIPtSu65bKc= -github.com/libp2p/go-libp2p-peerstore v0.7.0/go.mod h1:cdUWTHro83vpg6unCpGUr8qJoX3e93Vy8o97u5ppIM0= -github.com/libp2p/go-libp2p-peerstore v0.7.1 h1:7FpALlqR+3+oOBXdzm3AVt0vjMYLW1b7jM03E4iEHlw= -github.com/libp2p/go-libp2p-peerstore v0.7.1/go.mod h1:cdUWTHro83vpg6unCpGUr8qJoX3e93Vy8o97u5ppIM0= +github.com/libp2p/go-libp2p-peerstore v0.7.0 h1:2iIUwok3vtmnWJTZeTeLgnBO6GbkXcwSRwgZHEKrQZs= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= -github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= -github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= -github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= github.com/libp2p/go-libp2p-pubsub v0.7.0 h1:Fd9198JVc3pCsKuzd37TclzM0QcHA+uDyoiG2pvT7s4= -github.com/libp2p/go-libp2p-pubsub v0.7.0/go.mod h1:EuyBJFtF8qF67IEA98biwK8Xnw5MNJpJ/Z+8iWCMFwc= -github.com/libp2p/go-libp2p-pubsub-router v0.5.0/go.mod h1:TRJKskSem3C0aSb3CmRgPwq6IleVFzds6hS09fmZbGM= github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA= -github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= -github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= -github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= -github.com/libp2p/go-libp2p-quic-transport v0.16.0/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= -github.com/libp2p/go-libp2p-quic-transport v0.16.1/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= -github.com/libp2p/go-libp2p-quic-transport v0.17.0/go.mod h1:x4pw61P3/GRCcSLypcQJE/Q2+E9f4X+5aRcZLXf20LM= -github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= -github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= -github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= -github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0= -github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= -github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y= -github.com/libp2p/go-libp2p-resource-manager v0.2.1/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ= -github.com/libp2p/go-libp2p-resource-manager v0.3.0/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ= -github.com/libp2p/go-libp2p-resource-manager v0.5.1 h1:jm0mdqn7yfh7wbUzlj948BYZX0KZ3RW7OqerkGQ5rYY= -github.com/libp2p/go-libp2p-resource-manager v0.5.1/go.mod h1:CggtV6EZb+Y0dGh41q5ezO4udcVKyhcEFpydHD8EMe0= -github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= -github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= +github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= -github.com/libp2p/go-libp2p-swarm v0.0.6/go.mod h1:s5GZvzg9xXe8sbeESuFpjt8CJPTCa8mhEusweJqyFy8= github.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4= github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU= github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= -github.com/libp2p/go-libp2p-swarm v0.3.1/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= -github.com/libp2p/go-libp2p-swarm v0.4.0/go.mod h1:XVFcO52VoLoo0eitSxNQWYq4D6sydGOweTOAjJNraCw= github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat6JknzUehFx8xW4= -github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= -github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc= -github.com/libp2p/go-libp2p-swarm v0.10.0/go.mod h1:71ceMcV6Rg/0rIQ97rsZWMzto1l9LnNquef+efcRbmA= -github.com/libp2p/go-libp2p-swarm v0.10.2/go.mod h1:Pdkq0QU5a+qu+oyqIV3bknMsnzk9lnNyKvB9acJ5aZs= -github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -1034,72 +701,34 @@ github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eq github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= -github.com/libp2p/go-libp2p-testing v0.7.0/go.mod h1:OLbdn9DbgdMwv00v+tlp1l3oe2Cl+FAjoWIA2pa0X6E= -github.com/libp2p/go-libp2p-testing v0.8.0/go.mod h1:gRdsNxQSxAZowTgcLY7CC33xPmleZzoBpqSYbWenqPc= -github.com/libp2p/go-libp2p-testing v0.9.0/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldraIanyjuRiAbK/XQU= -github.com/libp2p/go-libp2p-testing v0.9.2/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldraIanyjuRiAbK/XQU= -github.com/libp2p/go-libp2p-testing v0.11.0 h1:+R7FRl/U3Y00neyBSM2qgDzqz3HkWH24U9nMlascHL4= -github.com/libp2p/go-libp2p-testing v0.11.0/go.mod h1:qG4sF27dfKFoK9KlVzK2y52LQKhp0VEmLjV5aDqr1Hg= +github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= -github.com/libp2p/go-libp2p-tls v0.3.1/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= -github.com/libp2p/go-libp2p-tls v0.4.1/go.mod h1:EKCixHEysLNDlLUoKxv+3f/Lp90O2EXNjTr0UQDnrIw= -github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= -github.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= -github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc= github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.0/go.mod h1:J4ko0ObtZSmgn5BX5AmegP+dK3CSnU2lMCKsSq/EY0s= github.com/libp2p/go-libp2p-transport-upgrader v0.4.2/go.mod h1:NR8ne1VwfreD5VIWIU62Agt/J18ekORFU/j1i2y8zvk= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= -github.com/libp2p/go-libp2p-transport-upgrader v0.7.0/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= -github.com/libp2p/go-libp2p-transport-upgrader v0.7.1/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= -github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= -github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8= -github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= -github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po= -github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5cMVO9S94Y6gkv4= -github.com/libp2p/go-libp2p-yamux v0.5.3/go.mod h1:Vy3TMonBAfTMXHWopsMc8iX/XGRYrRlpUaMzaeuHV/s= github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE= -github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k= -github.com/libp2p/go-libp2p-yamux v0.8.0/go.mod h1:yTkPgN2ib8FHyU1ZcVD7aelzyAqXXwEPbyx+aSKm9h8= -github.com/libp2p/go-libp2p-yamux v0.8.1/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= -github.com/libp2p/go-libp2p-yamux v0.8.2/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= -github.com/libp2p/go-libp2p-yamux v0.9.1/go.mod h1:wRc6wvyxQINFcKe7daL4BeQ02Iyp+wxyC8WCNfngBrA= -github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= -github.com/libp2p/go-mplex v0.4.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= -github.com/libp2p/go-mplex v0.6.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= -github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W168L9EU= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= -github.com/libp2p/go-msgio v0.1.0/go.mod h1:eNlv2vy9V2X/kNldcZ+SShFE++o2Yjxwx6RAYsmgJnE= github.com/libp2p/go-msgio v0.2.0 h1:W6shmB+FeynDrUVl2dgFQvzfBZcXiyqY4VmpQLu9FqU= github.com/libp2p/go-msgio v0.2.0/go.mod h1:dBVM1gW3Jk9XqHkU4eKdGvVHdLa51hoGfll6jMJMSlY= -github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg= @@ -1114,52 +743,29 @@ github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIY github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= +github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= -github.com/libp2p/go-reuseport v0.1.0/go.mod h1:bQVn9hmfcTaoo0c9v5pBhOarsU1eNOBZdaAd2hzXRKU= github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560= -github.com/libp2p/go-reuseport v0.2.0/go.mod h1:bvVho6eLMm6Bz5hmU0LYN3ixd3nPPvtIlaURZZgOY4k= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= -github.com/libp2p/go-reuseport-transport v0.0.5/go.mod h1:TC62hhPc8qs5c/RoXDZG6YmjK+/YWUPC0yYmeUecbjc= -github.com/libp2p/go-reuseport-transport v0.1.0/go.mod h1:vev0C0uMkzriDY59yFHD9v+ujJvYmDQVLowvAjEOmfw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-socket-activation v0.1.0/go.mod h1:gzda2dNkMG5Ti2OfWNNwW0FDIbj0g/aJJU320FcLfhk= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= -github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ= -github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= -github.com/libp2p/go-stream-muxer-multistream v0.4.0/go.mod h1:nb+dGViZleRP4XcyHuZSVrJCBl55nRBOMmiSL/dyziw= -github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-tcp-transport v0.2.3/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= -github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= -github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI= -github.com/libp2p/go-tcp-transport v0.5.0/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= -github.com/libp2p/go-tcp-transport v0.5.1/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= -github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= -github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= -github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU= -github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= -github.com/libp2p/go-ws-transport v0.6.0/go.mod h1:dXqtI9e2JV9FtF1NOtWVZSKXh5zXvnuwPXfj8GPBbYU= -github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -1167,27 +773,12 @@ github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/h github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U= -github.com/libp2p/go-yamux/v2 v2.1.1/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= -github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs= -github.com/libp2p/go-yamux/v3 v3.0.1/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= -github.com/libp2p/go-yamux/v3 v3.0.2/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= -github.com/libp2p/go-yamux/v3 v3.1.1/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= github.com/libp2p/go-yamux/v3 v3.1.2 h1:lNEy28MBk1HavUAlzKgShp+F6mn/ea1nDYWftZhFW9Q= -github.com/libp2p/go-yamux/v3 v3.1.2/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= -github.com/libp2p/zeroconf/v2 v2.1.1/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= -github.com/lucas-clemente/quic-go v0.21.2/go.mod h1:vF5M1XqhBAHgbjKcJOXY3JZz3GP0T3FQhz/uyOUS38Q= -github.com/lucas-clemente/quic-go v0.23.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lucas-clemente/quic-go v0.25.0/go.mod h1:YtzP8bxRVCBlO77yRanE264+fY/T2U9ZlW1AaHOsMOg= -github.com/lucas-clemente/quic-go v0.27.0/go.mod h1:AzgQoPda7N+3IqMMMkywBKggIFo2KT6pfnlrQ2QieeI= -github.com/lucas-clemente/quic-go v0.27.1/go.mod h1:AzgQoPda7N+3IqMMMkywBKggIFo2KT6pfnlrQ2QieeI= -github.com/lucas-clemente/quic-go v0.28.0 h1:9eXVRgIkMQQyiyorz/dAaOYIx3TFzXsIFkNFz4cxuJM= -github.com/lucas-clemente/quic-go v0.28.0/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= +github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91YNEIslzU= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -1196,38 +787,24 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-15 v0.1.4/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-15 v0.1.5/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= github.com/marten-seemann/qtls-go1-16 v0.1.5 h1:o9JrYPPco/Nukd/HpOHMHZoBDXQqoNtUCmny98/1uqQ= -github.com/marten-seemann/qtls-go1-16 v0.1.5/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= -github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-17 v0.1.1/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= github.com/marten-seemann/qtls-go1-17 v0.1.2 h1:JADBlm0LYiVbuSySCHeY863dNkcpMmDR7s0bLKJeYlQ= -github.com/marten-seemann/qtls-go1-17 v0.1.2/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= -github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI= -github.com/marten-seemann/qtls-go1-18 v0.1.1/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= github.com/marten-seemann/qtls-go1-18 v0.1.2 h1:JH6jmzbduz0ITVQ7ShevK10Av5+jBEKAHMntXmIV7kM= -github.com/marten-seemann/qtls-go1-18 v0.1.2/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= -github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1 h1:7m/WlWcSROrcK5NxuXaxYD32BZqe/LEEnBrWcH/cOqQ= -github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= +github.com/marten-seemann/qtls-go1-19 v0.1.0 h1:rLFKD/9mp/uq1SYGYuVZhm83wkmU95pK5df3GufyYYU= 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.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= +github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= @@ -1235,10 +812,7 @@ github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00v github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.48/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= @@ -1267,8 +841,6 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= @@ -1291,15 +863,11 @@ github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= -github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= -github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= -github.com/multiformats/go-multiaddr v0.6.0 h1:qMnoOPj2s8xxPU5kZ57Cqdr0hHhARz7mFsPMIiYNqzg= -github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= +github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= +github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= -github.com/multiformats/go-multiaddr-dns v0.3.0/go.mod h1:mNzQ4eTGDg0ll1N9jKPOUogZPoJ30W8a7zk66FQPpdQ= 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.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= @@ -1317,11 +885,9 @@ github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/g github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= -github.com/multiformats/go-multicodec v0.2.0/go.mod h1:/y4YVwkfMyry5kFbMTbLJKErhycTIftytRV+llXdyS4= github.com/multiformats/go-multicodec v0.3.0/go.mod h1:qGGaQmioCDh+TeFOnxrbU0DaIPw8yFgAZgFG0V7p1qQ= github.com/multiformats/go-multicodec v0.3.1-0.20210902112759-1539a079fd61/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.3.1-0.20211210143421-a526f306ed2c/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= -github.com/multiformats/go-multicodec v0.4.1/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.5.0 h1:EgU6cBe/D7WRwQb1KmnBvU7lrcFGMggZVTPtOW9dDHs= github.com/multiformats/go-multicodec v0.5.0/go.mod h1:DiY2HFaEp5EhEXb/iYzVAunmyX/aSFMxq2KMKfWEues= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= @@ -1332,19 +898,13 @@ github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpK github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= -github.com/multiformats/go-multihash v0.0.16/go.mod h1:zhfEIgVnB/rPMfxgFw15ZmGoNaKyNUIE4IWHG/kC+Ag= github.com/multiformats/go-multihash v0.1.0/go.mod h1:RJlXsxt6vHGaia+S8We0ErjhojtKzPP2AH4+kYM7k84= -github.com/multiformats/go-multihash v0.2.0 h1:oytJb9ZA1OUW0r0f9ea18GiaPOo4SXyc7p2movyUuo4= -github.com/multiformats/go-multihash v0.2.0/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= +github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= +github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= -github.com/multiformats/go-multistream v0.2.0/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-multistream v0.2.1/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-multistream v0.2.2/go.mod h1:UIcnm7Zuo8HKG+HkWgfQsGL+/MIEhyTqbODbIUwSXKs= -github.com/multiformats/go-multistream v0.3.0/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= -github.com/multiformats/go-multistream v0.3.1/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o= github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= @@ -1365,7 +925,6 @@ github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJE github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -1375,20 +934,15 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1403,7 +957,6 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 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/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -1411,7 +964,6 @@ github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+ github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1420,7 +972,6 @@ github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6J github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e h1:ZOcivgkkFRnjfoTcGsDq3UQYiBmekwLA+qg0OjyB/ls= @@ -1428,16 +979,12 @@ github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXx github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1446,49 +993,28 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= -github.com/prometheus/common v0.35.0 h1:Eyr+Pw2VymWejHqCugNaQXkAi6KayVNxaHeu6khmFBE= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= -github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/raulk/go-watchdog v1.2.0/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= 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/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -1524,14 +1050,11 @@ github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5k github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1571,35 +1094,24 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4= github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= -github.com/warpfork/go-testmark v0.9.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.10.0 h1:E86YlUMYfwIacEsQGlnTvjk1IgYkyTGjPhF0RnwTCmw= -github.com/warpfork/go-testmark v0.10.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0= github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= @@ -1614,9 +1126,7 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20220302191723-37c43cae8e14/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799 h1:DOOT2B85S0tHoLGTzV+FakaSSihgRCVwZkjqKQP5L/w= github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= @@ -1624,32 +1134,21 @@ github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9 github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= github.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE= -github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= -github.com/whyrusleeping/go-sysinfo v0.0.0-20190219211824-4a357d4b90b1/go.mod h1:tKH72zYNt/exx6/5IQO6L9LoQ0rEjd5SbbWaDTs9Zso= github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= -github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= -github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb h1:/7/dQyiKnxAOj9L69FhST7uMe17U015XPzX7cy+5ykM= -github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb/go.mod h1:pbNsDSxn1ICiNn9Ct4ZGNrwzfkkwYbx/lw8VuyutFIg= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= -github.com/xorcare/golden v0.6.0 h1:E8emU8bhyMIEpYmgekkTUaw4vtcrRE+Wa0c5wYIcgXc= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= +github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8= +github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/ybbus/jsonrpc/v2 v2.1.6/go.mod h1:rIuG1+ORoiqocf9xs/v+ecaAVeo3zcZHQgInyKFMeg0= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -1663,36 +1162,25 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I= -go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.2.0 h1:wKN260u4DesJYhyjxDa7LRFkuhH7ncEVKU37LWcyNIo= -go.opentelemetry.io/otel/sdk v1.2.0/go.mod h1:jNN8QtpvbsKhgaC6V5lHiejMoKD+V8uadoSafgHPx1U= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0= -go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/dig v1.12.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/fx v1.15.0/go.mod h1:jI3RazQUhGv5KkpZIRv+kuP4CcgX3fnc0qX8bLnzbx8= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1707,11 +1195,9 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.22.0 h1:Zcye5DUgBloQ9BaT4qc9BnjOFog5TvBSAGkJ3Nf70c0= +go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= @@ -1723,13 +1209,11 @@ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1737,7 +1221,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1747,13 +1230,9 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1762,13 +1241,11 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20210615023648-acb5c1269671/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= golang.org/x/exp v0.0.0-20210714144626-1041f73d31d8/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20210715201039-d37aa40e8013 h1:Jp57DBw4K7mimZNA3F9f7CndVcUt4kJjmyJf2rzJHoI= +golang.org/x/exp v0.0.0-20210715201039-d37aa40e8013/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1788,14 +1265,10 @@ golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f/go.mod h1:skQtrUTUwhdJvXM golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1818,32 +1291,19 @@ golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1851,20 +1311,10 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220630215102-69896b714898 h1:K7wO6V1IrczY9QOQ2WkVpw4JQSwCd52UsxVEirZUfiw= -golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= +golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1872,8 +1322,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1882,12 +1330,11 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ 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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1910,51 +1357,32 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524152521-dbbf3f1254d4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191206220618-eeba5f6aabab/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1963,34 +1391,23 @@ golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210511113859-b0526f3d8744/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025112917-711f33c9992c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211209171907-798191bca915/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2019,56 +1436,32 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -2081,14 +1474,6 @@ google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2096,7 +1481,6 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2114,24 +1498,8 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2147,17 +1515,9 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= 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= @@ -2166,13 +1526,11 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2185,7 +1543,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -2194,7 +1551,6 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2203,7 +1559,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= @@ -2215,27 +1570,10 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= -modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/golex v1.0.1 h1:EYKY1a3wStt0RzHaH8mdSRNg78Ub0OHxYfCRWw35YtM= -modernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254= -modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk= -modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk= -modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= -modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= -modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/retrievalmarket/bindnodeoptions.go b/retrievalmarket/bindnodeoptions.go new file mode 100644 index 00000000..73c81d07 --- /dev/null +++ b/retrievalmarket/bindnodeoptions.go @@ -0,0 +1,165 @@ +package retrievalmarket + +import ( + "bytes" + "fmt" + "io" + + "github.com/ipld/go-ipld-prime/codec/dagcbor" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/ipld/go-ipld-prime/node/basicnode" + "github.com/ipld/go-ipld-prime/node/bindnode" + "github.com/ipld/go-ipld-prime/schema" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/crypto" +) + +// go type converter functions for bindnode for common Filecoin data types + +// CborGenCompatibleNodeBindnodeOption converts a CborGenCompatibleNode type to +// and from an Any field in a schema +var CborGenCompatibleNodeBindnodeOption = bindnode.TypedAnyConverter(&CborGenCompatibleNode{}, cborGenCompatibleNodeFromAny, cborGenCompatibleNodeToAny) + +// BigIntBindnodeOption converts a big.Int type to and from a Bytes field in a +// schema +var BigIntBindnodeOption = bindnode.TypedBytesConverter(&big.Int{}, bigIntFromBytes, bigIntToBytes) + +// TokenAmountBindnodeOption converts a filecoin abi.TokenAmount type to and +// from a Bytes field in a schema +var TokenAmountBindnodeOption = bindnode.TypedBytesConverter(&abi.TokenAmount{}, tokenAmountFromBytes, tokenAmountToBytes) + +// AddressBindnodeOption converts a filecoin Address type to and from a Bytes +// field in a schema +var AddressBindnodeOption = bindnode.TypedBytesConverter(&address.Address{}, addressFromBytes, addressToBytes) + +// SignatureBindnodeOption converts a filecoin Signature type to and from a +// Bytes field in a schema +var SignatureBindnodeOption = bindnode.TypedBytesConverter(&crypto.Signature{}, signatureFromBytes, signatureToBytes) + +// CborGenCompatibleNode is for cbor-gen / go-ipld-prime compatibility, to +// replace Deferred types that are used to represent datamodel.Nodes. +// This shouldn't be used as a pointer (nullable/optional) as it can consume +// "Null" tokens and therefore be a Null. Instead, use +// CborGenCompatibleNode#IsNull to check for null status. +type CborGenCompatibleNode struct { + Node datamodel.Node +} + +func (sn CborGenCompatibleNode) IsNull() bool { + return sn.Node == nil || sn.Node == datamodel.Null +} + +// UnmarshalCBOR is for cbor-gen compatibility +func (sn *CborGenCompatibleNode) UnmarshalCBOR(r io.Reader) error { + // use cbg.Deferred.UnmarshalCBOR to figure out how much to pull + def := cbg.Deferred{} + if err := def.UnmarshalCBOR(r); err != nil { + return err + } + // convert it to a Node + na := basicnode.Prototype.Any.NewBuilder() + if err := dagcbor.Decode(na, bytes.NewReader(def.Raw)); err != nil { + return err + } + sn.Node = na.Build() + return nil +} + +// MarshalCBOR is for cbor-gen compatibility +func (sn *CborGenCompatibleNode) MarshalCBOR(w io.Writer) error { + node := datamodel.Null + if sn != nil && sn.Node != nil { + node = sn.Node + if tn, ok := node.(schema.TypedNode); ok { + node = tn.Representation() + } + } + return dagcbor.Encode(node, w) +} + +func cborGenCompatibleNodeFromAny(node datamodel.Node) (interface{}, error) { + return &CborGenCompatibleNode{Node: node}, nil +} + +func cborGenCompatibleNodeToAny(iface interface{}) (datamodel.Node, error) { + sn, ok := iface.(*CborGenCompatibleNode) + if !ok { + return nil, fmt.Errorf("expected *CborGenCompatibleNode value") + } + if sn.Node == nil { + return datamodel.Null, nil + } + return sn.Node, nil +} + +func tokenAmountFromBytes(b []byte) (interface{}, error) { + return bigIntFromBytes(b) +} + +func bigIntFromBytes(b []byte) (interface{}, error) { + if len(b) == 0 { + return big.NewInt(0), nil + } + return big.FromBytes(b) +} + +func tokenAmountToBytes(iface interface{}) ([]byte, error) { + return bigIntToBytes(iface) +} + +func bigIntToBytes(iface interface{}) ([]byte, error) { + bi, ok := iface.(*big.Int) + if !ok { + return nil, fmt.Errorf("expected *big.Int value") + } + if bi == nil || bi.Int == nil { + *bi = big.Zero() + } + return bi.Bytes() +} + +func addressFromBytes(b []byte) (interface{}, error) { + return address.NewFromBytes(b) +} + +func addressToBytes(iface interface{}) ([]byte, error) { + addr, ok := iface.(*address.Address) + if !ok { + return nil, fmt.Errorf("expected *Address value") + } + return addr.Bytes(), nil +} + +// Signature is a byteprefix union +func signatureFromBytes(b []byte) (interface{}, error) { + if len(b) > crypto.SignatureMaxLength { + return nil, fmt.Errorf("string too long") + } + if len(b) == 0 { + return nil, fmt.Errorf("string empty") + } + var s crypto.Signature + switch crypto.SigType(b[0]) { + default: + return nil, fmt.Errorf("invalid signature type in cbor input: %d", b[0]) + case crypto.SigTypeSecp256k1: + s.Type = crypto.SigTypeSecp256k1 + case crypto.SigTypeBLS: + s.Type = crypto.SigTypeBLS + } + s.Data = b[1:] + return &s, nil +} + +func signatureToBytes(iface interface{}) ([]byte, error) { + s, ok := iface.(*crypto.Signature) + if !ok { + return nil, fmt.Errorf("expected *Signature value") + } + ba := append([]byte{byte(s.Type)}, s.Data...) + return ba, nil +} diff --git a/retrievalmarket/common.go b/retrievalmarket/common.go deleted file mode 100644 index fc2c8e05..00000000 --- a/retrievalmarket/common.go +++ /dev/null @@ -1,22 +0,0 @@ -package retrievalmarket - -import ( - "bytes" - - "github.com/ipld/go-ipld-prime" - "github.com/ipld/go-ipld-prime/codec/dagcbor" - basicnode "github.com/ipld/go-ipld-prime/node/basic" - cbg "github.com/whyrusleeping/cbor-gen" -) - -// DecodeNode validates and computes a decoded ipld.Node selector from the -// provided cbor-encoded selector -func DecodeNode(defnode *cbg.Deferred) (ipld.Node, error) { - reader := bytes.NewReader(defnode.Raw) - nb := basicnode.Prototype.Any.NewBuilder() - err := dagcbor.Decode(nb, reader) - if err != nil { - return nil, err - } - return nb.Build(), nil -} diff --git a/retrievalmarket/doc.go b/retrievalmarket/doc.go index 06a445ea..2f80f780 100644 --- a/retrievalmarket/doc.go +++ b/retrievalmarket/doc.go @@ -56,15 +56,16 @@ Deal Flow The primary mechanism for initiating storage deals is the `Retrieve` method on the RetrievalClient. -When `Retrieve` is called, it allocates a new DealID from its stored counter, constructs a DealProposal, sends -the deal proposal to the provider, initiates tracking of deal state and hands the deal to the Client FSM, -and returns the DealID which constitutes the identifier for that deal. - -The Retrieval provider receives the deal in `HandleDealStream`. `HandleDealStream` initiates tracking of deal state -on the Provider side and hands the deal to the Provider FSM, which handles the rest of deal flow. +When `Retrieve` is called, it allocates a new DealID from its stored counter, constructs a DealProposal, +initiates tracking of deal state and hands the deal to the Client FSM, and returns the DealID which constitutes +the identifier for that deal. From this point forward, deal negotiation is completely asynchronous and runs in the FSMs. +The FSM opens a data transfer to the provider containing the deal proposal. The provider receives the deal proposal in +its request validator. The request validator initiates tracking of deal state on the Provider side and hands the deal to +the Provider FSM, which handles the rest of deal flow. + A user of the modules can monitor deal progress through `SubscribeToEvents` methods on RetrievalClient and RetrievalProvider, or by simply calling `ListDeals` to get all deal statuses. diff --git a/retrievalmarket/events.go b/retrievalmarket/events.go index 7c61c098..36079095 100644 --- a/retrievalmarket/events.go +++ b/retrievalmarket/events.go @@ -256,6 +256,13 @@ const ( // ProviderEventClientCancelled happens when the provider gets a cancel message from the client's data transfer ProviderEventClientCancelled + + // ProviderEventLastPaymentRequested is emitted when the transfer goes into finalization + ProviderEventLastPaymentRequested + + // ProviderEventProcessPayment occurs when the provider has received a voucher from the client that it needs + // to process as a payment + ProviderEventProcessPayment ) // ProviderEvents is a human readable map of provider event name -> event description @@ -278,4 +285,6 @@ var ProviderEvents = map[ProviderEvent]string{ ProviderEventCleanupComplete: "ProviderEventCleanupComplete", ProviderEventMultiStoreError: "ProviderEventMultiStoreError", ProviderEventClientCancelled: "ProviderEventClientCancelled", + ProviderEventLastPaymentRequested: "ProviderEventLastPaymentRequested", + ProviderEventProcessPayment: "ProviderEventProcessPayment", } diff --git a/retrievalmarket/impl/askstore/askstore_impl_test.go b/retrievalmarket/impl/askstore/askstore_impl_test.go index 9db56526..2d68e207 100644 --- a/retrievalmarket/impl/askstore/askstore_impl_test.go +++ b/retrievalmarket/impl/askstore/askstore_impl_test.go @@ -1,9 +1,6 @@ package askstore_test import ( - "bytes" - "context" - "math/rand" "testing" "github.com/ipfs/go-datastore" @@ -14,7 +11,6 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/askstore" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" ) func TestAskStoreImpl(t *testing.T) { @@ -51,26 +47,3 @@ func TestAskStoreImpl(t *testing.T) { stored = newStore.GetAsk() require.Equal(t, newAsk, stored) } -func TestMigrations(t *testing.T) { - ds := dss.MutexWrap(datastore.NewMapDatastore()) - oldAsk := &migrations.Ask0{ - PricePerByte: abi.NewTokenAmount(rand.Int63()), - UnsealPrice: abi.NewTokenAmount(rand.Int63()), - PaymentInterval: rand.Uint64(), - PaymentIntervalIncrease: rand.Uint64(), - } - buf := new(bytes.Buffer) - err := oldAsk.MarshalCBOR(buf) - require.NoError(t, err) - ds.Put(context.TODO(), datastore.NewKey("retrieval-ask"), buf.Bytes()) - newStore, err := askstore.NewAskStore(ds, datastore.NewKey("retrieval-ask")) - require.NoError(t, err) - ask := newStore.GetAsk() - expectedAsk := &retrievalmarket.Ask{ - PricePerByte: oldAsk.PricePerByte, - UnsealPrice: oldAsk.UnsealPrice, - PaymentInterval: oldAsk.PaymentInterval, - PaymentIntervalIncrease: oldAsk.PaymentIntervalIncrease, - } - require.Equal(t, expectedAsk, ask) -} diff --git a/retrievalmarket/impl/client.go b/retrievalmarket/impl/client.go index 06c6ef96..020809df 100644 --- a/retrievalmarket/impl/client.go +++ b/retrievalmarket/impl/client.go @@ -12,11 +12,12 @@ import ( bstore "github.com/ipfs/go-ipfs-blockstore" logging "github.com/ipfs/go-log/v2" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + versioning "github.com/filecoin-project/go-ds-versioning/pkg" versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" @@ -103,41 +104,21 @@ func NewClient( StateEntryFuncs: clientstates.ClientStateEntryFuncs, FinalityStates: clientstates.ClientFinalityStates, Notifier: c.notifySubscribers, - }, retrievalMigrations, "2") + }, retrievalMigrations, versioning.VersionKey("2")) if err != nil { return nil, err } - err = dataTransfer.RegisterVoucherResultType(&retrievalmarket.DealResponse{}) + err = dataTransfer.RegisterVoucherType(retrievalmarket.DealProposalType, nil) if err != nil { return nil, err } - err = dataTransfer.RegisterVoucherResultType(&migrations.DealResponse0{}) - if err != nil { - return nil, err - } - err = dataTransfer.RegisterVoucherType(&retrievalmarket.DealProposal{}, nil) - if err != nil { - return nil, err - } - err = dataTransfer.RegisterVoucherType(&migrations.DealProposal0{}, nil) - if err != nil { - return nil, err - } - err = dataTransfer.RegisterVoucherType(&retrievalmarket.DealPayment{}, nil) - if err != nil { - return nil, err - } - err = dataTransfer.RegisterVoucherType(&migrations.DealPayment0{}, nil) + err = dataTransfer.RegisterVoucherType(retrievalmarket.DealPaymentType, nil) if err != nil { return nil, err } dataTransfer.SubscribeToEvents(dtutils.ClientDataTransferSubscriber(c.stateMachines)) transportConfigurer := dtutils.TransportConfigurer(network.ID(), &clientStoreGetter{c}) - err = dataTransfer.RegisterTransportConfigurer(&retrievalmarket.DealProposal{}, transportConfigurer) - if err != nil { - return nil, err - } - err = dataTransfer.RegisterTransportConfigurer(&migrations.DealProposal0{}, transportConfigurer) + err = dataTransfer.RegisterTransportConfigurer(retrievalmarket.DealProposalType, transportConfigurer) if err != nil { return nil, err } @@ -418,44 +399,18 @@ func (c *clientDealEnvironment) Node() retrievalmarket.RetrievalClientNode { return c.c.node } -func (c *clientDealEnvironment) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *retrievalmarket.DealProposal, legacy bool) (datatransfer.ChannelID, error) { +func (c *clientDealEnvironment) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *retrievalmarket.DealProposal) (datatransfer.ChannelID, error) { sel := selectorparse.CommonSelector_ExploreAllRecursively if proposal.SelectorSpecified() { - var err error - sel, err = retrievalmarket.DecodeNode(proposal.Selector) - if err != nil { - return datatransfer.ChannelID{}, xerrors.Errorf("selector is invalid: %w", err) - } + sel = proposal.Selector.Node } - - var vouch datatransfer.Voucher = proposal - if legacy { - vouch = &migrations.DealProposal0{ - PayloadCID: proposal.PayloadCID, - ID: proposal.ID, - Params0: migrations.Params0{ - Selector: proposal.Selector, - PieceCID: proposal.PieceCID, - PricePerByte: proposal.PricePerByte, - PaymentInterval: proposal.PaymentInterval, - PaymentIntervalIncrease: proposal.PaymentIntervalIncrease, - UnsealPrice: proposal.UnsealPrice, - }, - } - } - return c.c.dataTransfer.OpenPullDataChannel(ctx, to, vouch, proposal.PayloadCID, sel) + vouch := retrievalmarket.BindnodeRegistry.TypeToNode(proposal) + return c.c.dataTransfer.OpenPullDataChannel(ctx, to, datatransfer.TypedVoucher{Voucher: vouch, Type: retrievalmarket.DealProposalType}, proposal.PayloadCID, sel) } -func (c *clientDealEnvironment) SendDataTransferVoucher(ctx context.Context, channelID datatransfer.ChannelID, payment *retrievalmarket.DealPayment, legacy bool) error { - var vouch datatransfer.Voucher = payment - if legacy { - vouch = &migrations.DealPayment0{ - ID: payment.ID, - PaymentChannel: payment.PaymentChannel, - PaymentVoucher: payment.PaymentVoucher, - } - } - return c.c.dataTransfer.SendVoucher(ctx, channelID, vouch) +func (c *clientDealEnvironment) SendDataTransferVoucher(ctx context.Context, channelID datatransfer.ChannelID, payment *retrievalmarket.DealPayment) error { + vouch := retrievalmarket.BindnodeRegistry.TypeToNode(payment) + return c.c.dataTransfer.SendVoucher(ctx, channelID, datatransfer.TypedVoucher{Voucher: vouch, Type: retrievalmarket.DealPaymentType}) } func (c *clientDealEnvironment) CloseDataTransfer(ctx context.Context, channelID datatransfer.ChannelID) error { diff --git a/retrievalmarket/impl/client_test.go b/retrievalmarket/impl/client_test.go index f0e29037..9b462203 100644 --- a/retrievalmarket/impl/client_test.go +++ b/retrievalmarket/impl/client_test.go @@ -13,22 +13,22 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" dss "github.com/ipfs/go-datastore/sync" - "github.com/ipld/go-ipld-prime/codec/dagcbor" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cbg "github.com/whyrusleeping/cbor-gen" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + versionedds "github.com/filecoin-project/go-ds-versioning/pkg/datastore" + "github.com/filecoin-project/go-ds-versioning/pkg/versioned" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-fil-markets/retrievalmarket" retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/testnodes" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" + "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations/maptypes" "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" "github.com/filecoin-project/go-fil-markets/shared_testutil" @@ -45,24 +45,11 @@ func TestClient_Construction(t *testing.T) { require.NoError(t, err) require.Len(t, dt.Subscribers, 1) - require.Len(t, dt.RegisteredVoucherResultTypes, 2) - _, ok := dt.RegisteredVoucherResultTypes[0].(*retrievalmarket.DealResponse) - require.True(t, ok) - _, ok = dt.RegisteredVoucherResultTypes[1].(*migrations.DealResponse0) - require.True(t, ok) - require.Len(t, dt.RegisteredVoucherTypes, 4) - _, ok = dt.RegisteredVoucherTypes[0].VoucherType.(*retrievalmarket.DealProposal) - require.True(t, ok) - _, ok = dt.RegisteredVoucherTypes[1].VoucherType.(*migrations.DealProposal0) - require.True(t, ok) - _, ok = dt.RegisteredVoucherTypes[2].VoucherType.(*retrievalmarket.DealPayment) - require.True(t, ok) - _, ok = dt.RegisteredVoucherTypes[3].VoucherType.(*migrations.DealPayment0) - require.True(t, ok) - require.Len(t, dt.RegisteredTransportConfigurers, 2) - _, ok = dt.RegisteredTransportConfigurers[0].VoucherType.(*retrievalmarket.DealProposal) - _, ok = dt.RegisteredTransportConfigurers[1].VoucherType.(*migrations.DealProposal0) - require.True(t, ok) + require.Len(t, dt.RegisteredVoucherTypes, 2) + require.Equal(t, dt.RegisteredVoucherTypes[0].VoucherType, retrievalmarket.DealProposalType) + require.Equal(t, dt.RegisteredVoucherTypes[1].VoucherType, retrievalmarket.DealPaymentType) + require.Len(t, dt.RegisteredTransportConfigurers, 1) + require.Equal(t, dt.RegisteredTransportConfigurers[0].VoucherType, retrievalmarket.DealProposalType) } func TestClient_Query(t *testing.T) { @@ -309,7 +296,7 @@ func TestClient_DuplicateRetrieve(t *testing.T) { // Retrieve first payload CID from first peer params := retrievalmarket.Params{ - Selector: nil, + Selector: retrievalmarket.CborGenCompatibleNode{}, PieceCID: &tut.GenerateCids(1)[0], PricePerByte: abi.NewTokenAmount(1), PaymentInterval: 1, @@ -387,11 +374,11 @@ func TestMigrations(t *testing.T) { voucherShortfalls := make([]abi.TokenAmount, numDeals) selfPeer := tut.GeneratePeers(1)[0] - allSelectorBuf := new(bytes.Buffer) - err := dagcbor.Encode(selectorparse.CommonSelector_ExploreAllRecursively, allSelectorBuf) + emptyList, err := versioned.BuilderList{}.Build() + require.NoError(t, err) + oldDs, migrate := versionedds.NewVersionedDatastore(retrievalDs, emptyList, "1") + err = migrate(ctx) require.NoError(t, err) - allSelectorBytes := allSelectorBuf.Bytes() - for i := 0; i < numDeals; i++ { payloadCIDs[i] = tut.GenerateCids(1)[0] iDs[i] = retrievalmarket.DealID(rand.Uint64()) @@ -421,13 +408,13 @@ func TestMigrations(t *testing.T) { fundsSpents[i] = big.NewInt(rand.Int63()) unsealFundsPaids[i] = big.NewInt(rand.Int63()) voucherShortfalls[i] = big.NewInt(rand.Int63()) - deal := migrations.ClientDealState0{ - DealProposal0: migrations.DealProposal0{ + deal := maptypes.ClientDealState1{ + DealProposal: retrievalmarket.DealProposal{ PayloadCID: payloadCIDs[i], ID: iDs[i], - Params0: migrations.Params0{ - Selector: &cbg.Deferred{ - Raw: allSelectorBytes, + Params: retrievalmarket.Params{ + Selector: retrievalmarket.CborGenCompatibleNode{ + Node: selectorparse.CommonSelector_ExploreAllRecursively, }, PieceCID: pieceCIDs[i], PricePerByte: pricePerBytes[i], @@ -443,7 +430,7 @@ func TestMigrations(t *testing.T) { TotalFunds: totalFundss[i], ClientWallet: address.TestAddress, MinerWallet: address.TestAddress2, - PaymentInfo: &migrations.PaymentInfo0{ + PaymentInfo: &retrievalmarket.PaymentInfo{ PayCh: address.TestAddress, Lane: lanes[i], }, @@ -462,7 +449,7 @@ func TestMigrations(t *testing.T) { buf := new(bytes.Buffer) err := deal.MarshalCBOR(buf) require.NoError(t, err) - err = retrievalDs.Put(ctx, datastore.NewKey(fmt.Sprint(deal.ID)), buf.Bytes()) + err = oldDs.Put(ctx, datastore.NewKey(fmt.Sprint(deal.ID)), buf.Bytes()) require.NoError(t, err) } retrievalClient, err := retrievalimpl.NewClient(net, dt, testnodes.NewTestRetrievalClientNode(testnodes.TestRetrievalClientNodeParams{}), &tut.TestPeerResolver{}, retrievalDs, ba) @@ -478,8 +465,8 @@ func TestMigrations(t *testing.T) { PayloadCID: payloadCIDs[i], ID: iDs[i], Params: retrievalmarket.Params{ - Selector: &cbg.Deferred{ - Raw: allSelectorBytes, + Selector: retrievalmarket.CborGenCompatibleNode{ + Node: selectorparse.CommonSelector_ExploreAllRecursively, }, PieceCID: pieceCIDs[i], PricePerByte: pricePerBytes[i], diff --git a/retrievalmarket/impl/clientstates/client_fsm.go b/retrievalmarket/impl/clientstates/client_fsm.go index 1eb1ba9d..478a66e6 100644 --- a/retrievalmarket/impl/clientstates/client_fsm.go +++ b/retrievalmarket/impl/clientstates/client_fsm.go @@ -7,7 +7,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" diff --git a/retrievalmarket/impl/clientstates/client_states.go b/retrievalmarket/impl/clientstates/client_states.go index 4d55d7f5..f3e61c6d 100644 --- a/retrievalmarket/impl/clientstates/client_states.go +++ b/retrievalmarket/impl/clientstates/client_states.go @@ -5,10 +5,10 @@ import ( "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" @@ -23,16 +23,15 @@ var log = logging.Logger("markets-rtvl") type ClientDealEnvironment interface { // Node returns the node interface for this deal Node() rm.RetrievalClientNode - OpenDataTransfer(ctx context.Context, to peer.ID, proposal *rm.DealProposal, legacy bool) (datatransfer.ChannelID, error) - SendDataTransferVoucher(context.Context, datatransfer.ChannelID, *rm.DealPayment, bool) error + OpenDataTransfer(ctx context.Context, to peer.ID, proposal *rm.DealProposal) (datatransfer.ChannelID, error) + SendDataTransferVoucher(context.Context, datatransfer.ChannelID, *rm.DealPayment) error CloseDataTransfer(context.Context, datatransfer.ChannelID) error FinalizeBlockstore(context.Context, rm.DealID) error } // ProposeDeal sends the proposal to the other party func ProposeDeal(ctx fsm.Context, environment ClientDealEnvironment, deal rm.ClientDealState) error { - legacy := deal.Status == rm.DealStatusRetryLegacy - channelID, err := environment.OpenDataTransfer(ctx.Context(), deal.Sender, &deal.DealProposal, legacy) + channelID, err := environment.OpenDataTransfer(ctx.Context(), deal.Sender, &deal.DealProposal) if err != nil { return ctx.Trigger(rm.ClientEventWriteDealProposalErrored, err) } @@ -190,7 +189,7 @@ func SendFunds(ctx fsm.Context, environment ClientDealEnvironment, deal rm.Clien ID: deal.DealProposal.ID, PaymentChannel: deal.PaymentInfo.PayCh, PaymentVoucher: voucher, - }, deal.LegacyProtocol) + }) if err != nil { return ctx.Trigger(rm.ClientEventWriteDealPaymentErrored, err) } diff --git a/retrievalmarket/impl/clientstates/client_states_test.go b/retrievalmarket/impl/clientstates/client_states_test.go index 099b3d98..f9c27255 100644 --- a/retrievalmarket/impl/clientstates/client_states_test.go +++ b/retrievalmarket/impl/clientstates/client_states_test.go @@ -7,12 +7,12 @@ import ( "testing" "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin/v8/paych" @@ -44,11 +44,11 @@ func (e *fakeEnvironment) Node() retrievalmarket.RetrievalClientNode { return e.node } -func (e *fakeEnvironment) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *rm.DealProposal, legacy bool) (datatransfer.ChannelID, error) { +func (e *fakeEnvironment) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *rm.DealProposal) (datatransfer.ChannelID, error) { return datatransfer.ChannelID{ID: datatransfer.TransferID(rand.Uint64()), Responder: to, Initiator: testnet.GeneratePeers(1)[0]}, e.OpenDataTransferError } -func (e *fakeEnvironment) SendDataTransferVoucher(_ context.Context, _ datatransfer.ChannelID, _ *rm.DealPayment, _ bool) error { +func (e *fakeEnvironment) SendDataTransferVoucher(_ context.Context, _ datatransfer.ChannelID, _ *rm.DealPayment) error { return e.SendDataTransferVoucherError } diff --git a/retrievalmarket/impl/dtutils/dtutils.go b/retrievalmarket/impl/dtutils/dtutils.go index f1b41595..691b1032 100644 --- a/retrievalmarket/impl/dtutils/dtutils.go +++ b/retrievalmarket/impl/dtutils/dtutils.go @@ -10,13 +10,12 @@ import ( bstore "github.com/ipfs/go-ipfs-blockstore" logging "github.com/ipfs/go-log/v2" "github.com/ipld/go-ipld-prime" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-statemachine/fsm" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" ) var log = logging.Logger("retrievalmarket_impl") @@ -29,6 +28,10 @@ type EventReceiver interface { const noProviderEvent = rm.ProviderEvent(math.MaxUint64) func providerEvent(event datatransfer.Event, channelState datatransfer.ChannelState) (rm.ProviderEvent, []interface{}) { + // complete event is triggered by the actual status of completed rather than a data transfer event + if channelState.Status() == datatransfer.Completed { + return rm.ProviderEventComplete, nil + } switch event.Code { case datatransfer.Accept: return rm.ProviderEventDealAccepted, []interface{}{channelState.ChannelID()} @@ -36,6 +39,18 @@ func providerEvent(event datatransfer.Event, channelState datatransfer.ChannelSt return rm.ProviderEventDataTransferError, []interface{}{fmt.Errorf("deal data transfer stalled (peer hungup)")} case datatransfer.Error: return rm.ProviderEventDataTransferError, []interface{}{fmt.Errorf("deal data transfer failed: %s", event.Message)} + case datatransfer.DataLimitExceeded: + // DataLimitExceeded indicates it's time to wait for a payment + return rm.ProviderEventPaymentRequested, nil + case datatransfer.BeginFinalizing: + // BeginFinalizing indicates it's time to wait for a final payment + // Because the legacy client expects a final voucher, we dispatch this event event when + // the deal is free -- so that we have a chance to send this final voucher before completion + // TODO: do not send the legacy voucher when the client no longer expects it + return rm.ProviderEventLastPaymentRequested, nil + case datatransfer.NewVoucher: + // NewVoucher indicates a potential new payment we should attempt to process + return rm.ProviderEventProcessPayment, nil case datatransfer.Cancel: return rm.ProviderEventClientCancelled, nil default: @@ -50,26 +65,24 @@ func providerEvent(event datatransfer.Event, channelState datatransfer.ChannelSt // event or moving to error if a data transfer error occurs func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { return func(event datatransfer.Event, channelState datatransfer.ChannelState) { - dealProposal, ok := dealProposalFromVoucher(channelState.Voucher()) - // if this event is for a transfer not related to storage, ignore - if !ok { + voucher := channelState.Voucher() + if voucher.Voucher == nil { + log.Errorf("received empty voucher") return } - - if channelState.Status() == datatransfer.Completed { - err := deals.Send(rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: channelState.Recipient()}, rm.ProviderEventComplete) - if err != nil { - log.Errorf("processing dt event: %s", err) - } + dealProposal, err := rm.DealProposalFromNode(voucher.Voucher) + // if this event is for a transfer not related to storage, ignore + if err != nil { + return } - + dealID := rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: channelState.Recipient()} retrievalEvent, params := providerEvent(event, channelState) if retrievalEvent == noProviderEvent { return } log.Debugw("processing retrieval provider dt event", "event", datatransfer.Events[event.Code], "dealID", dealProposal.ID, "peer", channelState.OtherPeer(), "retrievalEvent", rm.ProviderEvents[retrievalEvent]) - err := deals.Send(rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: channelState.Recipient()}, retrievalEvent, params...) + err = deals.Send(dealID, retrievalEvent, params...) if err != nil { log.Errorf("processing dt event: %s", err) } @@ -109,9 +122,10 @@ func clientEvent(event datatransfer.Event, channelState datatransfer.ChannelStat case datatransfer.Cancel: return rm.ClientEventProviderCancelled, nil case datatransfer.NewVoucherResult: - response, ok := dealResponseFromVoucherResult(channelState.LastVoucherResult()) - if !ok { - log.Errorf("unexpected voucher result received: %s", channelState.LastVoucher().Type()) + voucher := channelState.LastVoucherResult() + response, err := rm.DealResponseFromNode(voucher.Voucher) + if err != nil { + log.Errorf("unexpected voucher result received: %s", err.Error()) return noEvent, nil } @@ -135,10 +149,10 @@ func clientEvent(event datatransfer.Event, channelState datatransfer.ChannelStat // an event to the appropriate state machine func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { return func(event datatransfer.Event, channelState datatransfer.ChannelState) { - dealProposal, ok := dealProposalFromVoucher(channelState.Voucher()) - + voucher := channelState.Voucher() + dealProposal, err := rm.DealProposalFromNode(voucher.Voucher) // if this event is for a transfer not related to retrieval, ignore - if !ok { + if err != nil { return } @@ -150,7 +164,7 @@ func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { log.Debugw("processing retrieval client dt event", "event", datatransfer.Events[event.Code], "dealID", dealProposal.ID, "peer", channelState.OtherPeer(), "retrievalEvent", rm.ClientEvents[retrievalEvent]) // data transfer events for progress do not affect deal state - err := deals.Send(dealProposal.ID, retrievalEvent, params...) + err = deals.Send(dealProposal.ID, retrievalEvent, params...) if err != nil { log.Errorf("processing dt event %s for state %s: %s", datatransfer.Events[event.Code], datatransfer.Statuses[channelState.Status()], err) @@ -171,9 +185,10 @@ type StoreConfigurableTransport interface { // TransportConfigurer configurers the graphsync transport to use a custom blockstore per deal func TransportConfigurer(thisPeer peer.ID, storeGetter StoreGetter) datatransfer.TransportConfigurer { - return func(channelID datatransfer.ChannelID, voucher datatransfer.Voucher, transport datatransfer.Transport) { - dealProposal, ok := dealProposalFromVoucher(voucher) - if !ok { + return func(channelID datatransfer.ChannelID, voucher datatransfer.TypedVoucher, transport datatransfer.Transport) { + dealProposal, err := rm.DealProposalFromNode(voucher.Voucher) + if err != nil { + log.Debugf("not a deal proposal voucher: %s", err.Error()) return } gsTransport, ok := transport.(StoreConfigurableTransport) @@ -195,33 +210,3 @@ func TransportConfigurer(thisPeer peer.ID, storeGetter StoreGetter) datatransfer } } } - -func dealProposalFromVoucher(voucher datatransfer.Voucher) (*rm.DealProposal, bool) { - dealProposal, ok := voucher.(*rm.DealProposal) - // if this event is for a transfer not related to storage, ignore - if ok { - return dealProposal, true - } - - legacyProposal, ok := voucher.(*migrations.DealProposal0) - if !ok { - return nil, false - } - newProposal := migrations.MigrateDealProposal0To1(*legacyProposal) - return &newProposal, true -} - -func dealResponseFromVoucherResult(vres datatransfer.VoucherResult) (*rm.DealResponse, bool) { - dealResponse, ok := vres.(*rm.DealResponse) - // if this event is for a transfer not related to storage, ignore - if ok { - return dealResponse, true - } - - legacyResponse, ok := vres.(*migrations.DealResponse0) - if !ok { - return nil, false - } - newResponse := migrations.MigrateDealResponse0To1(*legacyResponse) - return &newResponse, true -} diff --git a/retrievalmarket/impl/dtutils/dtutils_test.go b/retrievalmarket/impl/dtutils/dtutils_test.go index b439994b..f09a5803 100644 --- a/retrievalmarket/impl/dtutils/dtutils_test.go +++ b/retrievalmarket/impl/dtutils/dtutils_test.go @@ -9,41 +9,30 @@ import ( ds "github.com/ipfs/go-datastore" bstore "github.com/ipfs/go-ipfs-blockstore" "github.com/ipld/go-ipld-prime" - peer "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-statemachine/fsm" "github.com/filecoin-project/go-fil-markets/retrievalmarket" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/dtutils" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" "github.com/filecoin-project/go-fil-markets/shared_testutil" ) func TestProviderDataTransferSubscriber(t *testing.T) { dealProposal := shared_testutil.MakeTestDealProposal() - legacyProposal := migrations.DealProposal0{ - PayloadCID: dealProposal.PayloadCID, - ID: dealProposal.ID, - Params0: migrations.Params0{ - Selector: dealProposal.Selector, - PieceCID: dealProposal.PieceCID, - PricePerByte: dealProposal.PricePerByte, - PaymentInterval: dealProposal.PaymentInterval, - PaymentIntervalIncrease: dealProposal.PaymentIntervalIncrease, - UnsealPrice: dealProposal.UnsealPrice, - }, - } + node := rm.BindnodeRegistry.TypeToNode(dealProposal) + dealProposalVoucher := datatransfer.TypedVoucher{Voucher: node, Type: rm.DealProposalType} testPeers := shared_testutil.GeneratePeers(2) transferID := datatransfer.TransferID(rand.Uint64()) tests := map[string]struct { code datatransfer.EventCode message string - state shared_testutil.TestChannelParams + status datatransfer.Status ignored bool - expectedID interface{} expectedEvent fsm.EventName expectedArgs []interface{} }{ @@ -51,95 +40,69 @@ func TestProviderDataTransferSubscriber(t *testing.T) { ignored: true, }, "accept": { - code: datatransfer.Accept, - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&dealProposal}, - Status: datatransfer.Ongoing}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, - expectedEvent: rm.ProviderEventDealAccepted, - expectedArgs: []interface{}{datatransfer.ChannelID{ID: transferID, Initiator: testPeers[1], Responder: testPeers[0]}}, - }, - "accept, legacy": { - code: datatransfer.Accept, - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&legacyProposal}, - Status: datatransfer.Ongoing}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, + code: datatransfer.Accept, + status: datatransfer.Ongoing, expectedEvent: rm.ProviderEventDealAccepted, expectedArgs: []interface{}{datatransfer.ChannelID{ID: transferID, Initiator: testPeers[1], Responder: testPeers[0]}}, }, "error": { - code: datatransfer.Error, - message: "something went wrong", - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&dealProposal}, - Status: datatransfer.Ongoing}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, + code: datatransfer.Error, + message: "something went wrong", + status: datatransfer.Ongoing, expectedEvent: rm.ProviderEventDataTransferError, expectedArgs: []interface{}{errors.New("deal data transfer failed: something went wrong")}, }, "disconnected": { - code: datatransfer.Disconnected, - message: "something went wrong", - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&dealProposal}, - Status: datatransfer.Ongoing}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, + code: datatransfer.Disconnected, + message: "something went wrong", + status: datatransfer.Ongoing, expectedEvent: rm.ProviderEventDataTransferError, expectedArgs: []interface{}{errors.New("deal data transfer stalled (peer hungup)")}, }, "completed": { - code: datatransfer.ResumeResponder, - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&dealProposal}, - Status: datatransfer.Completed}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, + code: datatransfer.ResumeResponder, + status: datatransfer.Completed, expectedEvent: rm.ProviderEventComplete, }, "cancel": { - code: datatransfer.Cancel, - state: shared_testutil.TestChannelParams{ - IsPull: true, - TransferID: transferID, - Sender: testPeers[0], - Recipient: testPeers[1], - Vouchers: []datatransfer.Voucher{&dealProposal}, - Status: datatransfer.Completed}, - expectedID: rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}, + code: datatransfer.Cancel, + status: datatransfer.Cancelling, expectedEvent: rm.ProviderEventClientCancelled, }, + "data limit exceeded": { + code: datatransfer.DataLimitExceeded, + status: datatransfer.Ongoing, + expectedEvent: rm.ProviderEventPaymentRequested, + }, + "begin finalizing": { + code: datatransfer.BeginFinalizing, + status: datatransfer.Finalizing, + expectedEvent: rm.ProviderEventLastPaymentRequested, + }, + "new voucher": { + code: datatransfer.NewVoucher, + status: datatransfer.Ongoing, + expectedEvent: rm.ProviderEventProcessPayment, + }, } for test, data := range tests { t.Run(test, func(t *testing.T) { fdg := &fakeDealGroup{} subscriber := dtutils.ProviderDataTransferSubscriber(fdg) - subscriber(datatransfer.Event{Code: data.code, Message: data.message}, shared_testutil.NewTestChannel(data.state)) if !data.ignored { + subscriber(datatransfer.Event{Code: data.code, Message: data.message}, shared_testutil.NewTestChannel(shared_testutil.TestChannelParams{ + IsPull: true, + TransferID: transferID, + Sender: testPeers[0], + Recipient: testPeers[1], + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + Status: data.status})) require.True(t, fdg.called) - require.Equal(t, fdg.lastID, data.expectedID) + require.Equal(t, fdg.lastID, rm.ProviderDealIdentifier{DealID: dealProposal.ID, Receiver: testPeers[1]}) require.Equal(t, fdg.lastEvent, data.expectedEvent) require.Equal(t, fdg.lastArgs, data.expectedArgs) } else { + subscriber(datatransfer.Event{Code: data.code, Message: data.message}, shared_testutil.NewTestChannel(shared_testutil.TestChannelParams{})) require.False(t, fdg.called) } }) @@ -148,17 +111,11 @@ func TestProviderDataTransferSubscriber(t *testing.T) { } func TestClientDataTransferSubscriber(t *testing.T) { dealProposal := shared_testutil.MakeTestDealProposal() - legacyProposal := migrations.DealProposal0{ - PayloadCID: dealProposal.PayloadCID, - ID: dealProposal.ID, - Params0: migrations.Params0{ - Selector: dealProposal.Selector, - PieceCID: dealProposal.PieceCID, - PricePerByte: dealProposal.PricePerByte, - PaymentInterval: dealProposal.PaymentInterval, - PaymentIntervalIncrease: dealProposal.PaymentIntervalIncrease, - UnsealPrice: dealProposal.UnsealPrice, - }, + node := rm.BindnodeRegistry.TypeToNode(dealProposal) + dealProposalVoucher := datatransfer.TypedVoucher{Voucher: node, Type: retrievalmarket.DealProposalType} + dealResponseVoucher := func(dealResponse retrievalmarket.DealResponse) datatransfer.TypedVoucher { + node := rm.BindnodeRegistry.TypeToNode(&dealResponse) + return datatransfer.TypedVoucher{Voucher: node, Type: retrievalmarket.DealResponseType} } paymentOwed := shared_testutil.MakeTestTokenAmount() tests := map[string]struct { @@ -176,7 +133,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { "progress": { code: datatransfer.DataReceivedProgress, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.Ongoing, Received: 1000}, expectedID: dealProposal.ID, @@ -186,7 +143,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { "finish transfer": { code: datatransfer.FinishTransfer, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.TransferFinished}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventAllBlocksReceived, @@ -194,7 +151,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { "cancel": { code: datatransfer.Cancel, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventProviderCancelled, @@ -202,12 +159,12 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - rejected": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusRejected, ID: dealProposal.ID, Message: "something went wrong", - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventDealRejected, @@ -216,12 +173,12 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - not found": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusDealNotFound, ID: dealProposal.ID, Message: "something went wrong", - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventDealNotFound, @@ -230,23 +187,11 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - accepted": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusAccepted, - ID: dealProposal.ID, - }}, - Status: datatransfer.Ongoing}, - expectedID: dealProposal.ID, - expectedEvent: rm.ClientEventDealAccepted, - }, - "new voucher result - accepted, legacy": { - code: datatransfer.NewVoucherResult, - state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&legacyProposal}, - VoucherResults: []datatransfer.VoucherResult{&migrations.DealResponse0{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusAccepted, ID: dealProposal.ID, - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventDealAccepted, @@ -254,12 +199,12 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - funds needed last payment": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusFundsNeededLastPayment, ID: dealProposal.ID, PaymentOwed: paymentOwed, - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventLastPaymentRequested, @@ -268,11 +213,11 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - completed": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusCompleted, ID: dealProposal.ID, - }}, + })}, Status: datatransfer.ResponderCompleted}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventComplete, @@ -280,12 +225,12 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - funds needed": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusFundsNeeded, ID: dealProposal.ID, PaymentOwed: paymentOwed, - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventPaymentRequested, @@ -294,11 +239,11 @@ func TestClientDataTransferSubscriber(t *testing.T) { "new voucher result - unexpected response": { code: datatransfer.NewVoucherResult, state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, - VoucherResults: []datatransfer.VoucherResult{&retrievalmarket.DealResponse{ + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, + VoucherResults: []datatransfer.TypedVoucher{dealResponseVoucher(retrievalmarket.DealResponse{ Status: retrievalmarket.DealStatusPaymentChannelAddingFunds, ID: dealProposal.ID, - }}, + })}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventUnknownResponseReceived, @@ -308,7 +253,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { code: datatransfer.Error, message: "something went wrong", state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventDataTransferError, @@ -318,7 +263,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { code: datatransfer.Disconnected, message: "something went wrong", state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.Ongoing}, expectedID: dealProposal.ID, expectedEvent: rm.ClientEventDataTransferError, @@ -328,7 +273,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { code: datatransfer.Error, message: datatransfer.ErrRejected.Error(), state: shared_testutil.TestChannelParams{ - Vouchers: []datatransfer.Voucher{&dealProposal}, + Vouchers: []datatransfer.TypedVoucher{dealProposalVoucher}, Status: datatransfer.Ongoing, Message: datatransfer.ErrRejected.Error()}, expectedID: dealProposal.ID, @@ -375,9 +320,13 @@ func TestTransportConfigurer(t *testing.T) { expectedDealID := rm.DealID(rand.Uint64()) thisPeer := expectedChannelID.Initiator expectedPeer := expectedChannelID.Responder + dealProposalVoucher := func(proposal rm.DealProposal) datatransfer.TypedVoucher { + node := rm.BindnodeRegistry.TypeToNode(&proposal) + return datatransfer.TypedVoucher{Voucher: node, Type: rm.DealProposalType} + } testCases := map[string]struct { - voucher datatransfer.Voucher + voucher datatransfer.TypedVoucher transport datatransfer.Transport returnedStore bstore.Blockstore returnedStoreErr error @@ -385,22 +334,22 @@ func TestTransportConfigurer(t *testing.T) { useStoreCalled bool }{ "non-storage voucher": { - voucher: nil, + voucher: datatransfer.TypedVoucher{}, getterCalled: false, }, "non-configurable transport": { - voucher: &rm.DealProposal{ + voucher: dealProposalVoucher(rm.DealProposal{ PayloadCID: payloadCID, ID: expectedDealID, - }, + }), transport: &fakeTransport{}, getterCalled: false, }, "store getter errors": { - voucher: &rm.DealProposal{ + voucher: dealProposalVoucher(rm.DealProposal{ PayloadCID: payloadCID, ID: expectedDealID, - }, + }), transport: &fakeGsTransport{Transport: &fakeTransport{}}, getterCalled: true, useStoreCalled: false, @@ -408,21 +357,10 @@ func TestTransportConfigurer(t *testing.T) { returnedStoreErr: errors.New("something went wrong"), }, "store getter succeeds": { - voucher: &rm.DealProposal{ - PayloadCID: payloadCID, - ID: expectedDealID, - }, - transport: &fakeGsTransport{Transport: &fakeTransport{}}, - getterCalled: true, - useStoreCalled: true, - returnedStore: bstore.NewBlockstore(ds.NewMapDatastore()), - returnedStoreErr: nil, - }, - "store getter succeeds, legacy": { - voucher: &migrations.DealProposal0{ + voucher: dealProposalVoucher(rm.DealProposal{ PayloadCID: payloadCID, ID: expectedDealID, - }, + }), transport: &fakeGsTransport{Transport: &fakeTransport{}}, getterCalled: true, useStoreCalled: true, @@ -473,7 +411,7 @@ type fakeTransport struct{} var _ datatransfer.Transport = (*fakeTransport)(nil) -func (ft *fakeTransport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, root ipld.Link, stor ipld.Node, channel datatransfer.ChannelState, msg datatransfer.Message) error { +func (ft *fakeTransport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, root datamodel.Link, stor datamodel.Node, channel datatransfer.ChannelState, msg datatransfer.Message) error { return nil } diff --git a/retrievalmarket/impl/integration_test.go b/retrievalmarket/impl/integration_test.go index cb306239..a5746dee 100644 --- a/retrievalmarket/impl/integration_test.go +++ b/retrievalmarket/impl/integration_test.go @@ -16,7 +16,7 @@ import ( graphsyncimpl "github.com/ipfs/go-graphsync/impl" "github.com/ipfs/go-graphsync/network" "github.com/ipld/go-car" - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" cidlink "github.com/ipld/go-ipld-prime/linking/cid" basicnode "github.com/ipld/go-ipld-prime/node/basic" "github.com/ipld/go-ipld-prime/traversal/selector/builder" @@ -25,9 +25,8 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - dtimpl "github.com/filecoin-project/go-data-transfer/impl" - "github.com/filecoin-project/go-data-transfer/testutil" - dtgstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync" + dtimpl "github.com/filecoin-project/go-data-transfer/v2/impl" + dtgstransport "github.com/filecoin-project/go-data-transfer/v2/transport/graphsync" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin/v8/paych" @@ -122,7 +121,7 @@ func requireSetupTestClientAndProvider(ctx context.Context, t *testing.T, payChA dtTransport1 := dtgstransport.NewTransport(testData.Host1.ID(), gs1) dt1, err := dtimpl.NewDataTransfer(testData.DTStore1, testData.DTNet1, dtTransport1) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt1) + tut.StartAndWaitForReadyDT(ctx, t, dt1) require.NoError(t, err) clientDs := namespace.Wrap(testData.Ds1, datastore.NewKey("/retrievals/client")) ba := tut.NewTestRetrievalBlockstoreAccessor() @@ -166,7 +165,7 @@ func requireSetupTestClientAndProvider(ctx context.Context, t *testing.T, payChA dtTransport2 := dtgstransport.NewTransport(testData.Host2.ID(), gs2) dt2, err := dtimpl.NewDataTransfer(testData.DTStore2, testData.DTNet2, dtTransport2) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt2) + tut.StartAndWaitForReadyDT(ctx, t, dt2) require.NoError(t, err) providerDs := namespace.Wrap(testData.Ds2, datastore.NewKey("/retrievals/provider")) @@ -215,7 +214,7 @@ func TestClientCanMakeDealWithProvider(t *testing.T) { filename string filesize uint64 voucherAmts []abi.TokenAmount - selector ipld.Node + selector datamodel.Node unsealPrice abi.TokenAmount zeroPricePerByte bool paramsV1, addFunds bool @@ -226,7 +225,6 @@ func TestClientCanMakeDealWithProvider(t *testing.T) { channelAvailableFunds retrievalmarket.ChannelAvailableFunds fundsReplenish abi.TokenAmount cancelled bool - disableNewDeals bool }{ {name: "1 block file retrieval succeeds", filename: "lorem_under_1_block.txt", @@ -238,7 +236,7 @@ func TestClientCanMakeDealWithProvider(t *testing.T) { filename: "lorem_under_1_block.txt", filesize: 410, unsealPrice: abi.NewTokenAmount(100), - voucherAmts: []abi.TokenAmount{abi.NewTokenAmount(100), abi.NewTokenAmount(410100)}, + voucherAmts: []abi.TokenAmount{abi.NewTokenAmount(100), abi.NewTokenAmount(100), abi.NewTokenAmount(410100)}, selector: selectorparse.CommonSelector_ExploreAllRecursively, paramsV1: true, }, @@ -348,13 +346,6 @@ func TestClientCanMakeDealWithProvider(t *testing.T) { paymentInterval: 9000, paymentIntervalIncrease: 1920, }, - - {name: "multi-block file retrieval succeeds, with provider only accepting legacy deals", - filename: "lorem.txt", - filesize: 19000, - disableNewDeals: true, - voucherAmts: []abi.TokenAmount{abi.NewTokenAmount(10174000), abi.NewTokenAmount(19958000)}, - }, } for i, testCase := range testCases { @@ -456,7 +447,7 @@ func TestClientCanMakeDealWithProvider(t *testing.T) { defer cancel() provider := setupProvider(bgCtx, t, testData, payloadCID, pieceInfo, carFile.Name(), expectedQR, - providerPaymentAddr, providerNode, sectorAccessor, decider, testCase.disableNewDeals) + providerPaymentAddr, providerNode, sectorAccessor, decider) tut.StartAndWaitForReady(ctx, t, provider) retrievalPeer := retrievalmarket.RetrievalPeer{Address: providerPaymentAddr, ID: testData.Host2.ID()} @@ -523,13 +514,10 @@ Message: %s Provider: Event: %s Status: %s -TotalSent: %d FundsReceived: %s Message: %s -CurrentInterval: %d ` - t.Logf(msg, retrievalmarket.ProviderEvents[event], retrievalmarket.DealStatuses[state.Status], state.TotalSent, state.FundsReceived.String(), state.Message, - state.CurrentInterval) + t.Logf(msg, retrievalmarket.ProviderEvents[event], retrievalmarket.DealStatuses[state.Status], state.FundsReceived.String(), state.Message) }) // **** Send the query for the Piece @@ -658,7 +646,7 @@ func setupClient( dtTransport1 := dtgstransport.NewTransport(testData.Host1.ID(), gs1) dt1, err := dtimpl.NewDataTransfer(testData.DTStore1, testData.DTNet1, dtTransport1) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt1) + tut.StartAndWaitForReadyDT(ctx, t, dt1) require.NoError(t, err) clientDs := namespace.Wrap(testData.Ds1, datastore.NewKey("/retrievals/client")) ba := tut.NewTestRetrievalBlockstoreAccessor() @@ -679,7 +667,6 @@ func setupProvider( providerNode retrievalmarket.RetrievalProviderNode, sectorAccessor retrievalmarket.SectorAccessor, decider retrievalimpl.DealDecider, - disableNewDeals bool, ) retrievalmarket.RetrievalProvider { nw2 := rmnet.NewFromLibp2pHost(testData.Host2, rmnet.RetryParameters(0, 0, 0, 0)) pieceStore := tut.NewTestPieceStore() @@ -698,14 +685,11 @@ func setupProvider( dtTransport2 := dtgstransport.NewTransport(testData.Host2.ID(), gs2) dt2, err := dtimpl.NewDataTransfer(testData.DTStore2, testData.DTNet2, dtTransport2) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt2) + tut.StartAndWaitForReadyDT(ctx, t, dt2) require.NoError(t, err) providerDs := namespace.Wrap(testData.Ds2, datastore.NewKey("/retrievals/provider")) opts := []retrievalimpl.RetrievalProviderOption{retrievalimpl.DealDeciderOpt(decider)} - if disableNewDeals { - opts = append(opts, retrievalimpl.DisableNewDeals()) - } priceFunc := func(ctx context.Context, dealPricingParams retrievalmarket.PricingInput) (retrievalmarket.Ask, error) { ask := retrievalmarket.Ask{} diff --git a/retrievalmarket/impl/ipld_compat_test.go b/retrievalmarket/impl/ipld_compat_test.go new file mode 100644 index 00000000..9ec7590c --- /dev/null +++ b/retrievalmarket/impl/ipld_compat_test.go @@ -0,0 +1,334 @@ +package retrievalimpl_test + +// TODO(rvagg): this is a transitional package to test compatibility between +// cbor-gen and bindnode - it can be removed if/when cbor-gen is also removed + +import ( + "bytes" + "encoding/hex" + "testing" + + "github.com/ipfs/go-cid" + "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/codec/dagcbor" + "github.com/ipld/go-ipld-prime/node/basicnode" + "github.com/ipld/go-ipld-prime/schema" + selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" + "github.com/stretchr/testify/assert" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/builtin/v8/paych" + "github.com/filecoin-project/go-state-types/crypto" + + "github.com/filecoin-project/go-fil-markets/retrievalmarket" +) + +func TestIpldCompat_DealResponse(t *testing.T) { + compareDealResponse := func(t *testing.T, drExpected retrievalmarket.DealResponse, drActual retrievalmarket.DealResponse) { + assert.Equal(t, drExpected.ID, drActual.ID) + assert.Equal(t, drExpected.Message, drActual.Message) + compareBigInt(t, drExpected.PaymentOwed, drActual.PaymentOwed, "PaymentOwed") + assert.Equal(t, drExpected.Status, drActual.Status) + } + + for _, testCase := range []struct { + label string + dr retrievalmarket.DealResponse + }{ + {"empty", retrievalmarket.DealResponse{}}, + {"full", retrievalmarket.DealResponse{ + Status: 2, + ID: 3, + PaymentOwed: big.NewInt(10001), + Message: "bip bop", + }}, + {"negPayment", retrievalmarket.DealResponse{ // maybe nonsense, but worth a test + Status: 2, + ID: 3, + PaymentOwed: big.NewInt(-10001), + Message: "bip bop", + }}, + } { + t.Run(testCase.label, func(t *testing.T) { + // encode the DealResponse with cbor-gen to bytes + var originalBuf bytes.Buffer + assert.Nil(t, testCase.dr.MarshalCBOR(&originalBuf)) + originalBytes := originalBuf.Bytes() + + // decode the bytes to DealResponse with bindnode + nb := basicnode.Prototype.Any.NewBuilder() + assert.Nil(t, dagcbor.Decode(nb, &originalBuf)) + node := nb.Build() + drBindnodeIface, err := retrievalmarket.BindnodeRegistry.TypeFromNode(node, &retrievalmarket.DealResponse{}) + assert.Nil(t, err) + drBindnode, ok := drBindnodeIface.(*retrievalmarket.DealResponse) + assert.True(t, ok) + + // compare objects + compareDealResponse(t, testCase.dr, *drBindnode) + + // encode the new DealResponse with bindnode to bytes + node = retrievalmarket.BindnodeRegistry.TypeToNode(drBindnode) + var bindnodeBuf bytes.Buffer + dagcbor.Encode(node.(schema.TypedNode).Representation(), &bindnodeBuf) + bindnodeBytes := bindnodeBuf.Bytes() + + compareCbor(t, originalBytes, bindnodeBytes) + + // decode the new bytes to DealResponse with cbor-gen + var roundtripdr retrievalmarket.DealResponse + assert.Nil(t, roundtripdr.UnmarshalCBOR(&bindnodeBuf)) + + // compare objects + compareDealResponse(t, testCase.dr, *drBindnode) + }) + } +} + +func TestIpldCompat_DealProposal(t *testing.T) { + acid, err := cid.Decode("bafy2bzaceashdsqgbnisdg76gdhupvkpop4br5rs3veuy4whuxagnoco6px6e") + assert.Nil(t, err) + aselector := selectorparse.CommonSelector_MatchChildren + + compareDealProposal := func(t *testing.T, drExpected retrievalmarket.DealProposal, drActual retrievalmarket.DealProposal) { + // for cbor-gen we get the selector as a deferred bytes, but an datamodel.Node for bindnode, + // so we make them both bytes and compare those + assert.Equal(t, drExpected.PayloadCID, drActual.PayloadCID, "PayloadCID") + assert.Equal(t, drExpected.ID, drActual.ID, "ID") + if !drExpected.Selector.IsNull() || !drActual.Selector.IsNull() { + assert.True(t, ipld.DeepEqual(drExpected.Selector.Node, drActual.Selector.Node), "Selector") + } + assert.Equal(t, drExpected.Params.PieceCID, drActual.Params.PieceCID, "PieceCID") + compareBigInt(t, drExpected.Params.PricePerByte, drActual.Params.PricePerByte, "PricePerByte") + assert.Equal(t, drExpected.Params.PaymentInterval, drActual.Params.PaymentInterval, "PaymentInterval") + assert.Equal(t, drExpected.Params.PaymentIntervalIncrease, drActual.Params.PaymentIntervalIncrease, "PaymentIntervalIncrease") + compareBigInt(t, drExpected.Params.UnsealPrice, drActual.Params.UnsealPrice, "UnsealPrice") + } + + for _, testCase := range []struct { + label string + dp retrievalmarket.DealProposal + }{ + {"empty", retrievalmarket.DealProposal{PayloadCID: acid}}, // PayloadCID is a required field + {"optional", retrievalmarket.DealProposal{ + PayloadCID: acid, + ID: 1010, + Params: retrievalmarket.Params{ + Selector: retrievalmarket.CborGenCompatibleNode{}, + PieceCID: nil, + PricePerByte: abi.NewTokenAmount(1001), + PaymentInterval: 20, + PaymentIntervalIncrease: 30, + UnsealPrice: abi.NewTokenAmount(2002), + }, + }}, + {"full", retrievalmarket.DealProposal{ + PayloadCID: acid, + ID: 1010, + Params: retrievalmarket.Params{ + Selector: retrievalmarket.CborGenCompatibleNode{Node: aselector}, + PieceCID: &acid, + PricePerByte: abi.NewTokenAmount(1001), + PaymentInterval: 20, + PaymentIntervalIncrease: 30, + UnsealPrice: abi.NewTokenAmount(2002), + }, + }}, + } { + t.Run(testCase.label, func(t *testing.T) { + // encode the DealProposal with cbor-gen to bytes + var originalBuf bytes.Buffer + assert.Nil(t, testCase.dp.MarshalCBOR(&originalBuf)) + originalBytes := originalBuf.Bytes() + + // roundtrip the original DealProposal using cbor-gen so we can compare + // decoded forms + var roundtripdr retrievalmarket.DealProposal + assert.Nil(t, roundtripdr.UnmarshalCBOR(bytes.NewReader(originalBytes))) + + // decode the bytes to DealProposal with bindnode + nb := basicnode.Prototype.Any.NewBuilder() + assert.Nil(t, dagcbor.Decode(nb, &originalBuf)) + node := nb.Build() + dpBindnodeIface, err := retrievalmarket.BindnodeRegistry.TypeFromNode(node, &retrievalmarket.DealProposal{}) + assert.Nil(t, err) + dpBindnode, ok := dpBindnodeIface.(*retrievalmarket.DealProposal) + assert.True(t, ok) + + // compare objects + compareDealProposal(t, testCase.dp, *dpBindnode) + + // encode the new DealProposal with bindnode to bytes + node = retrievalmarket.BindnodeRegistry.TypeToNode(dpBindnode) + var bindnodeBuf bytes.Buffer + dagcbor.Encode(node.(schema.TypedNode).Representation(), &bindnodeBuf) + bindnodeBytes := bindnodeBuf.Bytes() + + compareCbor(t, originalBytes, bindnodeBytes) + + // decode the new bytes to DealProposal with cbor-gen + var roundtripFromBindnodeDr retrievalmarket.DealProposal + assert.Nil(t, roundtripFromBindnodeDr.UnmarshalCBOR(&bindnodeBuf)) + + // compare objects + compareDealProposal(t, roundtripdr, *dpBindnode) + // compareDealProposal(t, roundtripFromBindnodeDr, *dpBindnode) + }) + } +} + +func TestIpldCompat_DealPayment(t *testing.T) { + compareDealPayment := func(t *testing.T, dpExpected retrievalmarket.DealPayment, dpActual retrievalmarket.DealPayment) { + assert.Equal(t, dpExpected.ID, dpActual.ID, "ID") + assert.Equal(t, dpExpected.PaymentChannel.String(), dpActual.PaymentChannel.String(), "PaymentChannel") + assert.Equal(t, dpExpected.PaymentVoucher == nil, dpActual.PaymentVoucher == nil, "PaymentVoucher") + } + + for _, testCase := range []struct { + label string + dp retrievalmarket.DealPayment + }{ + // addresses can't be null, and they're not marked nullable or optional, so we have to insert them + {"empty", retrievalmarket.DealPayment{PaymentChannel: address.TestAddress}}, + {"empty voucher", retrievalmarket.DealPayment{ + ID: 1001, + PaymentChannel: address.TestAddress, + PaymentVoucher: &paych.SignedVoucher{ + ChannelAddr: address.TestAddress2, + }, + }}, + {"mostly full voucher", retrievalmarket.DealPayment{ + ID: 1001, + PaymentChannel: address.TestAddress, + PaymentVoucher: &paych.SignedVoucher{ + ChannelAddr: address.TestAddress2, + TimeLockMin: abi.ChainEpoch(2222), + TimeLockMax: abi.ChainEpoch(333333), + SecretHash: []byte("1234567890abcdef"), + Extra: nil, + Lane: 100, + Nonce: 200, + Amount: big.MustFromString("12345678901234567891234567890123456789012345678901234567890"), + MinSettleHeight: abi.ChainEpoch(444444444), + Signature: nil, + }, + }}, + {"full", retrievalmarket.DealPayment{ + ID: 1001, + PaymentChannel: address.TestAddress, + PaymentVoucher: &paych.SignedVoucher{ + ChannelAddr: address.TestAddress2, + TimeLockMin: abi.ChainEpoch(2222), + TimeLockMax: abi.ChainEpoch(333333), + SecretHash: []byte("1234567890abcdef"), + Extra: &paych.ModVerifyParams{ + Actor: address.TestAddress, + Method: abi.MethodNum(50), + Data: []byte("doo-bee-doo"), + }, + Lane: 100, + Nonce: 200, + Amount: big.MustFromString("12345678901234567891234567890123456789012345678901234567890"), + MinSettleHeight: abi.ChainEpoch(444444444), + Signature: &crypto.Signature{ + Type: crypto.SigTypeBLS, + Data: []byte("beep-boop-beep"), + }, + }, + }}, + {"full secp256k1", retrievalmarket.DealPayment{ + ID: 1001, + PaymentChannel: address.TestAddress, + PaymentVoucher: &paych.SignedVoucher{ + ChannelAddr: address.TestAddress2, + TimeLockMin: abi.ChainEpoch(2222), + TimeLockMax: abi.ChainEpoch(333333), + SecretHash: []byte("1234567890abcdef"), + Extra: &paych.ModVerifyParams{ + Actor: address.TestAddress, + Method: abi.MethodNum(50), + Data: []byte("doo-bee-doo"), + }, + Lane: 100, + Nonce: 200, + Amount: big.MustFromString("12345678901234567891234567890123456789012345678901234567890"), + MinSettleHeight: abi.ChainEpoch(444444444), + Signature: &crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: []byte("bop-bee-bop"), + }, + }, + }}, + } { + t.Run(testCase.label, func(t *testing.T) { + // encode the DealPayment with cbor-gen to bytes + var originalBuf bytes.Buffer + assert.Nil(t, testCase.dp.MarshalCBOR(&originalBuf)) + originalBytes := originalBuf.Bytes() + + // decode the bytes to DealPayment with bindnode + nb := basicnode.Prototype.Any.NewBuilder() + assert.Nil(t, dagcbor.Decode(nb, &originalBuf)) + node := nb.Build() + dpBindnodeIface, err := retrievalmarket.BindnodeRegistry.TypeFromNode(node, &retrievalmarket.DealPayment{}) + assert.Nil(t, err) + dpBindnode, ok := dpBindnodeIface.(*retrievalmarket.DealPayment) + assert.True(t, ok) + + // compare objects + compareDealPayment(t, testCase.dp, *dpBindnode) + + // encode the new DealPayment with bindnode to bytes + node = retrievalmarket.BindnodeRegistry.TypeToNode(dpBindnode) + var bindnodeBuf bytes.Buffer + dagcbor.Encode(node.(schema.TypedNode).Representation(), &bindnodeBuf) + bindnodeBytes := bindnodeBuf.Bytes() + + compareCbor(t, originalBytes, bindnodeBytes) + + // decode the new bytes to DealPayment with cbor-gen + var roundtripdp retrievalmarket.DealPayment + assert.Nil(t, roundtripdp.UnmarshalCBOR(&bindnodeBuf)) + + // compare objects + compareDealPayment(t, testCase.dp, *dpBindnode) + }) + } +} + +// this exists not because the encoding bytes are different but the unitialized +// form may be different in the empty case; functionally they should be the same +func compareBigInt(t *testing.T, expected big.Int, actual big.Int, msg string) { + // special case `nil` because it ends up being an empty bytes (0x40) which is + // big.Int(0) in a round-trip according to cbor-gen encoding + if expected.Int == nil { + expected = big.Zero() + } + assert.Equal(t, expected, actual, msg) +} + +// needed because cbor-gen sorts maps differently, so we can't compare bytes +// so instead we round-trip them, untyped, through go-ipld-prime and compare the +// output bytes +func compareCbor(t *testing.T, cb1 []byte, cb2 []byte) { + assert.Equal(t, len(cb1), len(cb2)) + rt := func(cb []byte) []byte { + na := basicnode.Prototype.Any.NewBuilder() + err := dagcbor.Decode(na, bytes.NewReader(cb)) + assert.Nil(t, err) + n := na.Build() + var buf bytes.Buffer + err = dagcbor.Encode(n, &buf) + assert.Nil(t, err) + return buf.Bytes() + } + if !bytes.Equal(rt(cb1), rt(cb2)) { + t.Logf( + "Round-tripped node forms of CBOR are not equal:\n\tExpected: %s\n\tActual: %s", + hex.EncodeToString(cb1), + hex.EncodeToString(cb2)) + assert.Fail(t, "decoded cbor different") + } +} diff --git a/retrievalmarket/impl/provider.go b/retrievalmarket/impl/provider.go index ab0e75d5..b7b8e05f 100644 --- a/retrievalmarket/impl/provider.go +++ b/retrievalmarket/impl/provider.go @@ -17,8 +17,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" - versioning "github.com/filecoin-project/go-ds-versioning/pkg" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" @@ -61,7 +60,6 @@ type Provider struct { sa retrievalmarket.SectorAccessor network rmnet.RetrievalMarketNetwork requestValidator *requestvalidation.ProviderRequestValidator - revalidator *requestvalidation.ProviderRevalidator minerAddress address.Address pieceStore piecestore.PieceStore readyMgr *shared.ReadyManager @@ -104,13 +102,6 @@ func DealDeciderOpt(dd DealDecider) RetrievalProviderOption { } } -// DisableNewDeals disables setup for v1 deal protocols -func DisableNewDeals() RetrievalProviderOption { - return func(provider *Provider) { - provider.disableNewDeals = true - } -} - // NewProvider returns a new retrieval Provider func NewProvider(minerAddress address.Address, node retrievalmarket.RetrievalProviderNode, @@ -142,11 +133,6 @@ func NewProvider(minerAddress address.Address, stores: stores.NewReadOnlyBlockstores(), } - err := shared.MoveKey(ds, "retrieval-ask", "retrieval-ask/latest") - if err != nil { - return nil, err - } - askStore, err := askstore.NewAskStore(namespace.Wrap(ds, datastore.NewKey("retrieval-ask")), datastore.NewKey("latest")) if err != nil { return nil, err @@ -165,61 +151,32 @@ func NewProvider(minerAddress address.Address, StateEntryFuncs: providerstates.ProviderStateEntryFuncs, FinalityStates: providerstates.ProviderFinalityStates, Notifier: p.notifySubscribers, - }, retrievalMigrations, versioning.VersionKey("1")) + Options: fsm.Options{ + ConsumeAllEventsBeforeEntryFuncs: true, + }, + }, retrievalMigrations, "2") if err != nil { return nil, err } p.Configure(opts...) p.requestValidator = requestvalidation.NewProviderRequestValidator(&providerValidationEnvironment{p}) transportConfigurer := dtutils.TransportConfigurer(network.ID(), &providerStoreGetter{p}) - p.revalidator = requestvalidation.NewProviderRevalidator(&providerRevalidatorEnvironment{p}) - if p.disableNewDeals { - err = p.dataTransfer.RegisterVoucherType(&migrations.DealProposal0{}, p.requestValidator) - if err != nil { - return nil, err - } - err = p.dataTransfer.RegisterRevalidator(&migrations.DealPayment0{}, p.revalidator) - if err != nil { - return nil, err - } - } else { - err = p.dataTransfer.RegisterVoucherType(&retrievalmarket.DealProposal{}, p.requestValidator) - if err != nil { - return nil, err - } - err = p.dataTransfer.RegisterVoucherType(&migrations.DealProposal0{}, p.requestValidator) - if err != nil { - return nil, err - } - - err = p.dataTransfer.RegisterRevalidator(&retrievalmarket.DealPayment{}, p.revalidator) - if err != nil { - return nil, err - } - err = p.dataTransfer.RegisterRevalidator(&migrations.DealPayment0{}, requestvalidation.NewLegacyRevalidator(p.revalidator)) - if err != nil { - return nil, err - } - - err = p.dataTransfer.RegisterVoucherResultType(&retrievalmarket.DealResponse{}) - if err != nil { - return nil, err - } - - err = p.dataTransfer.RegisterTransportConfigurer(&retrievalmarket.DealProposal{}, transportConfigurer) - if err != nil { - return nil, err - } + err = p.dataTransfer.RegisterVoucherType(retrievalmarket.DealProposalType, p.requestValidator) + if err != nil { + return nil, err } - err = p.dataTransfer.RegisterVoucherResultType(&migrations.DealResponse0{}) + + err = p.dataTransfer.RegisterVoucherType(retrievalmarket.DealPaymentType, p.requestValidator) if err != nil { return nil, err } - err = p.dataTransfer.RegisterTransportConfigurer(&migrations.DealProposal0{}, transportConfigurer) + + err = p.dataTransfer.RegisterTransportConfigurer(retrievalmarket.DealProposalType, transportConfigurer) if err != nil { return nil, err } + dataTransfer.SubscribeToEvents(dtutils.ProviderDataTransferSubscriber(p.stateMachines)) return p, nil } @@ -673,6 +630,9 @@ var ProviderFSMParameterSpec = fsm.Parameters{ StateKeyField: "Status", Events: providerstates.ProviderEvents, StateEntryFuncs: providerstates.ProviderStateEntryFuncs, + Options: fsm.Options{ + ConsumeAllEventsBeforeEntryFuncs: true, + }, } // DefaultPricingFunc is the default pricing policy that will be used to price retrieval deals. diff --git a/retrievalmarket/impl/provider_environments.go b/retrievalmarket/impl/provider_environments.go index d13e928d..96538751 100644 --- a/retrievalmarket/impl/provider_environments.go +++ b/retrievalmarket/impl/provider_environments.go @@ -7,11 +7,11 @@ import ( "github.com/ipfs/go-cid" bstore "github.com/ipfs/go-ipfs-blockstore" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" "github.com/filecoin-project/dagstore" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" @@ -107,27 +107,15 @@ func (pve *providerValidationEnvironment) BeginTracking(pds retrievalmarket.Prov } if pds.UnsealPrice.GreaterThan(big.Zero()) { - return pve.p.stateMachines.Send(pds.Identifier(), retrievalmarket.ProviderEventPaymentRequested, uint64(0)) + return pve.p.stateMachines.Send(pds.Identifier(), retrievalmarket.ProviderEventPaymentRequested) } return pve.p.stateMachines.Send(pds.Identifier(), retrievalmarket.ProviderEventOpen) } -type providerRevalidatorEnvironment struct { - p *Provider -} - -func (pre *providerRevalidatorEnvironment) Node() retrievalmarket.RetrievalProviderNode { - return pre.p.node -} - -func (pre *providerRevalidatorEnvironment) SendEvent(dealID retrievalmarket.ProviderDealIdentifier, evt retrievalmarket.ProviderEvent, args ...interface{}) error { - return pre.p.stateMachines.Send(dealID, evt, args...) -} - -func (pre *providerRevalidatorEnvironment) Get(dealID retrievalmarket.ProviderDealIdentifier) (retrievalmarket.ProviderDealState, error) { +func (pve *providerValidationEnvironment) Get(dealID retrievalmarket.ProviderDealIdentifier) (retrievalmarket.ProviderDealState, error) { var deal retrievalmarket.ProviderDealState - err := pre.p.stateMachines.GetSync(context.TODO(), dealID, &deal) + err := pve.p.stateMachines.GetSync(context.TODO(), dealID, &deal) return deal, err } @@ -157,14 +145,12 @@ func (pde *providerDealEnvironment) PrepareBlockstore(ctx context.Context, dealI return err } -func (pde *providerDealEnvironment) TrackTransfer(deal retrievalmarket.ProviderDealState) error { - pde.p.revalidator.TrackChannel(deal) - return nil +func (pde *providerDealEnvironment) ChannelState(ctx context.Context, chid datatransfer.ChannelID) (datatransfer.ChannelState, error) { + return pde.p.dataTransfer.ChannelState(ctx, chid) } -func (pde *providerDealEnvironment) UntrackTransfer(deal retrievalmarket.ProviderDealState) error { - pde.p.revalidator.UntrackChannel(deal) - return nil +func (pde *providerDealEnvironment) UpdateValidationStatus(ctx context.Context, chid datatransfer.ChannelID, result datatransfer.ValidationResult) error { + return pde.p.dataTransfer.UpdateValidationStatus(ctx, chid, result) } func (pde *providerDealEnvironment) ResumeDataTransfer(ctx context.Context, chid datatransfer.ChannelID) error { diff --git a/retrievalmarket/impl/provider_test.go b/retrievalmarket/impl/provider_test.go index 6efe5ab1..2b5b253f 100644 --- a/retrievalmarket/impl/provider_test.go +++ b/retrievalmarket/impl/provider_test.go @@ -12,26 +12,23 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" dss "github.com/ipfs/go-datastore/sync" - "github.com/ipld/go-ipld-prime/codec/dagcbor" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multicodec" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cbg "github.com/whyrusleeping/cbor-gen" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-fil-markets/piecestore" - piecemigrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations" "github.com/filecoin-project/go-fil-markets/retrievalmarket" retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/requestvalidation" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/testnodes" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" + "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations/maptypes" "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" tut "github.com/filecoin-project/go-fil-markets/shared_testutil" ) @@ -1078,32 +1075,16 @@ func TestProvider_Construct(t *testing.T) { ) require.NoError(t, err) require.Len(t, dt.Subscribers, 1) - require.Len(t, dt.RegisteredVoucherResultTypes, 2) - _, ok := dt.RegisteredVoucherResultTypes[0].(*retrievalmarket.DealResponse) - require.True(t, ok) - _, ok = dt.RegisteredVoucherResultTypes[1].(*migrations.DealResponse0) - require.True(t, ok) require.Len(t, dt.RegisteredVoucherTypes, 2) - _, ok = dt.RegisteredVoucherTypes[0].VoucherType.(*retrievalmarket.DealProposal) - require.True(t, ok) - _, ok = dt.RegisteredVoucherTypes[0].Validator.(*requestvalidation.ProviderRequestValidator) - require.True(t, ok) - _, ok = dt.RegisteredVoucherTypes[1].VoucherType.(*migrations.DealProposal0) + require.Equal(t, dt.RegisteredVoucherTypes[0].VoucherType, retrievalmarket.DealProposalType) + _, ok := dt.RegisteredVoucherTypes[0].Validator.(*requestvalidation.ProviderRequestValidator) require.True(t, ok) + require.Equal(t, dt.RegisteredVoucherTypes[1].VoucherType, retrievalmarket.DealPaymentType) _, ok = dt.RegisteredVoucherTypes[1].Validator.(*requestvalidation.ProviderRequestValidator) require.True(t, ok) - require.Len(t, dt.RegisteredRevalidators, 2) - _, ok = dt.RegisteredRevalidators[0].VoucherType.(*retrievalmarket.DealPayment) - require.True(t, ok) - _, ok = dt.RegisteredRevalidators[0].Revalidator.(*requestvalidation.ProviderRevalidator) - require.True(t, ok) - _, ok = dt.RegisteredRevalidators[1].VoucherType.(*migrations.DealPayment0) - require.True(t, ok) - require.Len(t, dt.RegisteredTransportConfigurers, 2) - _, ok = dt.RegisteredTransportConfigurers[0].VoucherType.(*retrievalmarket.DealProposal) - _, ok = dt.RegisteredTransportConfigurers[1].VoucherType.(*migrations.DealProposal0) + require.Len(t, dt.RegisteredTransportConfigurers, 1) + require.Equal(t, dt.RegisteredTransportConfigurers[0].VoucherType, retrievalmarket.DealProposalType) - require.True(t, ok) } func TestProviderConfigOpts(t *testing.T) { @@ -1207,19 +1188,13 @@ func TestProviderMigrations(t *testing.T) { storeIDs := make([]uint64, numDeals) channelIDs := make([]datatransfer.ChannelID, numDeals) receivers := make([]peer.ID, numDeals) - totalSents := make([]uint64, numDeals) messages := make([]string, numDeals) - currentIntervals := make([]uint64, numDeals) fundsReceiveds := make([]abi.TokenAmount, numDeals) selfPeer := tut.GeneratePeers(1)[0] dealIDs := make([]abi.DealID, numDeals) sectorIDs := make([]abi.SectorNumber, numDeals) offsets := make([]abi.PaddedPieceSize, numDeals) lengths := make([]abi.PaddedPieceSize, numDeals) - allSelectorBuf := new(bytes.Buffer) - err := dagcbor.Encode(selectorparse.CommonSelector_ExploreAllRecursively, allSelectorBuf) - require.NoError(t, err) - allSelectorBytes := allSelectorBuf.Bytes() for i := 0; i < numDeals; i++ { payloadCIDs[i] = tut.GenerateCids(1)[0] @@ -1237,21 +1212,19 @@ func TestProviderMigrations(t *testing.T) { Initiator: receivers[i], ID: datatransfer.TransferID(rand.Uint64()), } - totalSents[i] = rand.Uint64() messages[i] = string(tut.RandomBytes(20)) - currentIntervals[i] = rand.Uint64() fundsReceiveds[i] = big.NewInt(rand.Int63()) dealIDs[i] = abi.DealID(rand.Uint64()) sectorIDs[i] = abi.SectorNumber(rand.Uint64()) offsets[i] = abi.PaddedPieceSize(rand.Uint64()) lengths[i] = abi.PaddedPieceSize(rand.Uint64()) - deal := migrations.ProviderDealState0{ - DealProposal0: migrations.DealProposal0{ + deal := maptypes.ProviderDealState1{ + DealProposal: retrievalmarket.DealProposal{ PayloadCID: payloadCIDs[i], ID: iDs[i], - Params0: migrations.Params0{ - Selector: &cbg.Deferred{ - Raw: allSelectorBytes, + Params: retrievalmarket.Params{ + Selector: retrievalmarket.CborGenCompatibleNode{ + Node: selectorparse.CommonSelector_ExploreAllRecursively, }, PieceCID: pieceCIDs[i], PricePerByte: pricePerBytes[i], @@ -1262,9 +1235,9 @@ func TestProviderMigrations(t *testing.T) { }, StoreID: storeIDs[i], ChannelID: channelIDs[i], - PieceInfo: &piecemigrations.PieceInfo0{ + PieceInfo: &piecestore.PieceInfo{ PieceCID: pieceCID, - Deals: []piecemigrations.DealInfo0{ + Deals: []piecestore.DealInfo{ { DealID: dealIDs[i], SectorID: sectorIDs[i], @@ -1273,12 +1246,10 @@ func TestProviderMigrations(t *testing.T) { }, }, }, - Status: retrievalmarket.DealStatusCompleted, - Receiver: receivers[i], - TotalSent: totalSents[i], - Message: messages[i], - CurrentInterval: currentIntervals[i], - FundsReceived: fundsReceiveds[i], + Status: retrievalmarket.DealStatusCompleted, + Receiver: receivers[i], + Message: messages[i], + FundsReceived: fundsReceiveds[i], } buf := new(bytes.Buffer) err := deal.MarshalCBOR(buf) @@ -1286,17 +1257,6 @@ func TestProviderMigrations(t *testing.T) { err = providerDs.Put(ctx, datastore.NewKey(fmt.Sprint(deal.ID)), buf.Bytes()) require.NoError(t, err) } - oldAsk := &migrations.Ask0{ - PricePerByte: abi.NewTokenAmount(rand.Int63()), - UnsealPrice: abi.NewTokenAmount(rand.Int63()), - PaymentInterval: rand.Uint64(), - PaymentIntervalIncrease: rand.Uint64(), - } - askBuf := new(bytes.Buffer) - err = oldAsk.MarshalCBOR(askBuf) - require.NoError(t, err) - err = providerDs.Put(ctx, datastore.NewKey("retrieval-ask"), askBuf.Bytes()) - require.NoError(t, err) priceFunc := func(ctx context.Context, dealPricingParams retrievalmarket.PricingInput) (retrievalmarket.Ask, error) { ask := retrievalmarket.Ask{} @@ -1326,8 +1286,8 @@ func TestProviderMigrations(t *testing.T) { PayloadCID: payloadCIDs[i], ID: iDs[i], Params: retrievalmarket.Params{ - Selector: &cbg.Deferred{ - Raw: allSelectorBytes, + Selector: retrievalmarket.CborGenCompatibleNode{ + Node: selectorparse.CommonSelector_ExploreAllRecursively, }, PieceCID: pieceCIDs[i], PricePerByte: pricePerBytes[i], @@ -1349,13 +1309,10 @@ func TestProviderMigrations(t *testing.T) { }, }, }, - Status: retrievalmarket.DealStatusCompleted, - Receiver: receivers[i], - TotalSent: totalSents[i], - Message: messages[i], - CurrentInterval: currentIntervals[i], - FundsReceived: fundsReceiveds[i], - LegacyProtocol: true, + Status: retrievalmarket.DealStatusCompleted, + Receiver: receivers[i], + Message: messages[i], + FundsReceived: fundsReceiveds[i], } require.Equal(t, expectedDeal, deal) } diff --git a/retrievalmarket/impl/providerstates/provider_fsm.go b/retrievalmarket/impl/providerstates/provider_fsm.go index 2f92566f..3d798a52 100644 --- a/retrievalmarket/impl/providerstates/provider_fsm.go +++ b/retrievalmarket/impl/providerstates/provider_fsm.go @@ -1,7 +1,7 @@ package providerstates import ( - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" @@ -21,9 +21,7 @@ var ProviderEvents = fsm.Events{ From(rm.DealStatusNew).ToNoChange(). Action( func(deal *rm.ProviderDealState) error { - deal.TotalSent = 0 deal.FundsReceived = abi.NewTokenAmount(0) - deal.CurrentInterval = deal.PaymentInterval return nil }, ), @@ -47,35 +45,31 @@ var ProviderEvents = fsm.Events{ // receiving blocks fsm.Event(rm.ProviderEventBlockSent). FromMany(rm.DealStatusOngoing).ToNoChange(). - From(rm.DealStatusUnsealed).To(rm.DealStatusOngoing). - Action(func(deal *rm.ProviderDealState, totalSent uint64) error { - deal.TotalSent = totalSent - return nil - }), - fsm.Event(rm.ProviderEventBlocksCompleted). - FromMany(rm.DealStatusOngoing).To(rm.DealStatusBlocksComplete), + From(rm.DealStatusUnsealed).To(rm.DealStatusOngoing), // request payment fsm.Event(rm.ProviderEventPaymentRequested). FromMany(rm.DealStatusOngoing, rm.DealStatusUnsealed).To(rm.DealStatusFundsNeeded). From(rm.DealStatusFundsNeeded).ToJustRecord(). - From(rm.DealStatusBlocksComplete).To(rm.DealStatusFundsNeededLastPayment). - From(rm.DealStatusNew).To(rm.DealStatusFundsNeededUnseal). - Action(func(deal *rm.ProviderDealState, totalSent uint64) error { - deal.TotalSent = totalSent - return nil - }), + From(rm.DealStatusNew).To(rm.DealStatusFundsNeededUnseal), + + fsm.Event(rm.ProviderEventLastPaymentRequested). + FromMany(rm.DealStatusOngoing, rm.DealStatusUnsealed).To(rm.DealStatusFundsNeededLastPayment), // receive and process payment fsm.Event(rm.ProviderEventSaveVoucherFailed). - FromMany(rm.DealStatusFundsNeeded, rm.DealStatusFundsNeededLastPayment).To(rm.DealStatusFailing). + FromMany(rm.DealStatusFundsNeededUnseal, rm.DealStatusFundsNeeded, rm.DealStatusFundsNeededLastPayment).To(rm.DealStatusFailing). Action(recordError), + fsm.Event(rm.ProviderEventPartialPaymentReceived). - FromMany(rm.DealStatusFundsNeeded, rm.DealStatusFundsNeededLastPayment).ToNoChange(). + FromMany(rm.DealStatusFundsNeededUnseal, + rm.DealStatusFundsNeeded, + rm.DealStatusFundsNeededLastPayment).ToNoChange(). Action(func(deal *rm.ProviderDealState, fundsReceived abi.TokenAmount) error { deal.FundsReceived = big.Add(deal.FundsReceived, fundsReceived) return nil }), + fsm.Event(rm.ProviderEventPaymentReceived). From(rm.DealStatusFundsNeeded).To(rm.DealStatusOngoing). From(rm.DealStatusFundsNeededLastPayment).To(rm.DealStatusFinalizing). @@ -83,16 +77,14 @@ var ProviderEvents = fsm.Events{ FromMany(rm.DealStatusBlocksComplete, rm.DealStatusOngoing, rm.DealStatusFinalizing).ToJustRecord(). Action(func(deal *rm.ProviderDealState, fundsReceived abi.TokenAmount) error { deal.FundsReceived = big.Add(deal.FundsReceived, fundsReceived) - - // only update interval if the payment is for bytes and not for unsealing. - if deal.Status != rm.DealStatusFundsNeededUnseal { - deal.CurrentInterval = deal.NextInterval() - } return nil }), + // processing incoming payment + fsm.Event(rm.ProviderEventProcessPayment).FromAny().ToNoChange(), + // completing - fsm.Event(rm.ProviderEventComplete).FromMany(rm.DealStatusBlocksComplete, rm.DealStatusFinalizing).To(rm.DealStatusCompleting), + fsm.Event(rm.ProviderEventComplete).FromAny().To(rm.DealStatusCompleting), fsm.Event(rm.ProviderEventCleanupComplete).From(rm.DealStatusCompleting).To(rm.DealStatusCompleted), // Cancellation / Error cleanup @@ -125,12 +117,14 @@ var ProviderEvents = fsm.Events{ // ProviderStateEntryFuncs are the handlers for different states in a retrieval provider var ProviderStateEntryFuncs = fsm.StateEntryFuncs{ - rm.DealStatusFundsNeededUnseal: TrackTransfer, - rm.DealStatusUnsealing: UnsealData, - rm.DealStatusUnsealed: UnpauseDeal, - rm.DealStatusFailing: CancelDeal, - rm.DealStatusCancelling: CancelDeal, - rm.DealStatusCompleting: CleanupDeal, + rm.DealStatusUnsealing: UnsealData, + rm.DealStatusUnsealed: UnpauseDeal, + rm.DealStatusFundsNeeded: UpdateFunding, + rm.DealStatusFundsNeededUnseal: UpdateFunding, + rm.DealStatusFundsNeededLastPayment: UpdateFunding, + rm.DealStatusFailing: CancelDeal, + rm.DealStatusCancelling: CancelDeal, + rm.DealStatusCompleting: CleanupDeal, } // ProviderFinalityStates are the terminal states for a retrieval provider diff --git a/retrievalmarket/impl/providerstates/provider_states.go b/retrievalmarket/impl/providerstates/provider_states.go index 1e33f0c0..949db147 100644 --- a/retrievalmarket/impl/providerstates/provider_states.go +++ b/retrievalmarket/impl/providerstates/provider_states.go @@ -7,7 +7,9 @@ import ( "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine" "github.com/filecoin-project/go-statemachine/fsm" @@ -22,11 +24,11 @@ type ProviderDealEnvironment interface { // Node returns the node interface for this deal Node() rm.RetrievalProviderNode PrepareBlockstore(ctx context.Context, dealID rm.DealID, pieceCid cid.Cid) error - TrackTransfer(deal rm.ProviderDealState) error - UntrackTransfer(deal rm.ProviderDealState) error DeleteStore(dealID rm.DealID) error ResumeDataTransfer(context.Context, datatransfer.ChannelID) error CloseDataTransfer(context.Context, datatransfer.ChannelID) error + ChannelState(ctx context.Context, chid datatransfer.ChannelID) (datatransfer.ChannelState, error) + UpdateValidationStatus(ctx context.Context, chid datatransfer.ChannelID, result datatransfer.ValidationResult) error } // UnsealData fetches the piece containing data needed for the retrieval, @@ -39,25 +41,13 @@ func UnsealData(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.Pr return ctx.Trigger(rm.ProviderEventUnsealComplete) } -// TrackTransfer resumes a deal so we can start sending data after its unsealed -func TrackTransfer(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { - err := environment.TrackTransfer(deal) - if err != nil { - return ctx.Trigger(rm.ProviderEventDataTransferError, err) - } - return nil -} - // UnpauseDeal resumes a deal so we can start sending data after its unsealed func UnpauseDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { log.Debugf("unpausing data transfer for deal %d", deal.ID) - err := environment.TrackTransfer(deal) - if err != nil { - return ctx.Trigger(rm.ProviderEventDataTransferError, err) - } + if deal.ChannelID != nil { log.Debugf("resuming data transfer for deal %d", deal.ID) - err = environment.ResumeDataTransfer(ctx.Context(), *deal.ChannelID) + err := environment.ResumeDataTransfer(ctx.Context(), *deal.ChannelID) if err != nil { return ctx.Trigger(rm.ProviderEventDataTransferError, err) } @@ -65,14 +55,141 @@ func UnpauseDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.P return nil } -// CancelDeal clears a deal that went wrong for an unknown reason -func CancelDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { - // Read next response (or fail) - err := environment.UntrackTransfer(deal) +// UpdateFunding saves payments as needed until a transfer can resume +func UpdateFunding(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { + log.Debugf("handling new event while in ongoing state of transfer %d", deal.ID) + // if we have no channel ID yet, there's no need to attempt to process payment based on channel state + if deal.ChannelID == nil { + return nil + } + // read the channel state based on the channel id + channelState, err := environment.ChannelState(ctx.Context(), *deal.ChannelID) if err != nil { return ctx.Trigger(rm.ProviderEventDataTransferError, err) } - err = environment.DeleteStore(deal.ID) + // process funding and produce the new validation status + result := updateFunding(ctx, environment, deal, channelState) + // update the validation status on the channel + err = environment.UpdateValidationStatus(ctx.Context(), *deal.ChannelID, result) + if err != nil { + return ctx.Trigger(rm.ProviderEventDataTransferError, err) + } + return nil +} + +func updateFunding(ctx fsm.Context, + environment ProviderDealEnvironment, + deal rm.ProviderDealState, + channelState datatransfer.ChannelState) datatransfer.ValidationResult { + // process payment, determining how many more funds we have then the current deal.FundsReceived + received, err := processLastVoucher(ctx, environment, channelState) + if err != nil { + return errorDealResponse(deal.Identifier(), err) + } + + if received.Nil() { + received = big.Zero() + } + + // calculate the current amount paid + totalPaid := big.Add(deal.FundsReceived, received) + + // check whether money is owed based on deal parameters, total amount paid, and current state of the transfer + owed := deal.Params.OutstandingBalance(totalPaid, channelState.Queued(), channelState.Status().InFinalization()) + log.Debugf("provider: owed %d, total received %d = received so far %d + newly received %d, unseal price %d, price per byte %d, bytes sent: %d, in finalization: %v", + owed, totalPaid, deal.FundsReceived, received, deal.UnsealPrice, deal.PricePerByte, channelState.Queued(), channelState.Status().InFinalization()) + + var voucherResult *rm.DealResponse + if owed.GreaterThan(big.Zero()) { + // if payment is still owed but we received funds, send a partial payment received event + if received.GreaterThan(big.Zero()) { + log.Debugf("provider: owed %d: sending partial payment request", owed) + _ = ctx.Trigger(rm.ProviderEventPartialPaymentReceived, received) + } + // sending this response voucher is primarily to cover for current client logic -- + // our client expects a voucher requesting payment before it sends anything + // TODO: remove this when the client no longer expects a voucher + if received.GreaterThan(big.Zero()) || deal.Status != rm.DealStatusFundsNeededUnseal { + voucherResult = &rm.DealResponse{ + ID: deal.ID, + Status: deal.Status, + PaymentOwed: owed, + } + } + } else { + // send an event to record payment received + _ = ctx.Trigger(rm.ProviderEventPaymentReceived, received) + if deal.Status == rm.DealStatusFundsNeededLastPayment { + log.Debugf("provider: funds needed: last payment") + // sending this response voucher is primarily to cover for current client logic -- + // our client expects a voucher announcing completion from the provider before it finishes + // TODO: remove this when the current no longer expects a voucher + voucherResult = &rm.DealResponse{ + ID: deal.ID, + Status: rm.DealStatusCompleted, + } + } + } + vr := datatransfer.ValidationResult{ + Accepted: true, + ForcePause: deal.Status == rm.DealStatusUnsealing || deal.Status == rm.DealStatusFundsNeededUnseal, + RequiresFinalization: owed.GreaterThan(big.Zero()) || deal.Status != rm.DealStatusFundsNeededLastPayment, + DataLimit: deal.Params.NextInterval(totalPaid), + } + if voucherResult != nil { + node := rm.BindnodeRegistry.TypeToNode(voucherResult) + vr.VoucherResult = &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType} + } + return vr +} + +func savePayment(ctx fsm.Context, env ProviderDealEnvironment, payment *rm.DealPayment) (abi.TokenAmount, error) { + tok, _, err := env.Node().GetChainHead(context.TODO()) + if err != nil { + _ = ctx.Trigger(rm.ProviderEventSaveVoucherFailed, err) + return big.Zero(), err + } + // Save voucher + received, err := env.Node().SavePaymentVoucher(context.TODO(), payment.PaymentChannel, payment.PaymentVoucher, nil, big.Zero(), tok) + if err != nil { + _ = ctx.Trigger(rm.ProviderEventSaveVoucherFailed, err) + return big.Zero(), err + } + return received, nil +} + +func processLastVoucher(ctx fsm.Context, env ProviderDealEnvironment, channelState datatransfer.ChannelState) (abi.TokenAmount, error) { + voucher := channelState.LastVoucher() + + // read payment and return response if present + if payment, err := rm.DealPaymentFromNode(voucher.Voucher); err == nil { + return savePayment(ctx, env, payment) + } + + if _, err := rm.DealProposalFromNode(voucher.Voucher); err == nil { + return big.Zero(), nil + } + + return big.Zero(), errors.New("wrong voucher type") +} + +func errorDealResponse(dealID rm.ProviderDealIdentifier, errMsg error) datatransfer.ValidationResult { + dr := rm.DealResponse{ + ID: dealID.DealID, + Message: errMsg.Error(), + Status: rm.DealStatusErrored, + } + node := rm.BindnodeRegistry.TypeToNode(&dr) + return datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType}, + } +} + +// CancelDeal clears a deal that went wrong for an unknown reason +func CancelDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { + // Read next response (or fail) + err := environment.DeleteStore(deal.ID) if err != nil { return ctx.Trigger(rm.ProviderEventMultiStoreError, err) } @@ -87,11 +204,7 @@ func CancelDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.Pr // CleanupDeal runs to do memory cleanup for an in progress deal func CleanupDeal(ctx fsm.Context, environment ProviderDealEnvironment, deal rm.ProviderDealState) error { - err := environment.UntrackTransfer(deal) - if err != nil { - return ctx.Trigger(rm.ProviderEventDataTransferError, err) - } - err = environment.DeleteStore(deal.ID) + err := environment.DeleteStore(deal.ID) if err != nil { return ctx.Trigger(rm.ProviderEventMultiStoreError, err) } diff --git a/retrievalmarket/impl/providerstates/provider_states_test.go b/retrievalmarket/impl/providerstates/provider_states_test.go index 49a9e554..16303df6 100644 --- a/retrievalmarket/impl/providerstates/provider_states_test.go +++ b/retrievalmarket/impl/providerstates/provider_states_test.go @@ -6,19 +6,26 @@ import ( "math/rand" "testing" + "github.com/ipfs/go-cid" + "github.com/ipld/go-ipld-prime/node/basicnode" + selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" + "github.com/filecoin-project/go-address" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/builtin/v8/paych" "github.com/filecoin-project/go-statemachine/fsm" fsmtest "github.com/filecoin-project/go-statemachine/fsm/testutil" "github.com/filecoin-project/go-fil-markets/piecestore" + "github.com/filecoin-project/go-fil-markets/retrievalmarket" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/providerstates" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/testnodes" rmtesting "github.com/filecoin-project/go-fil-markets/retrievalmarket/testing" + "github.com/filecoin-project/go-fil-markets/shared" testnet "github.com/filecoin-project/go-fil-markets/shared_testutil" ) @@ -77,7 +84,6 @@ func TestUnsealData(t *testing.T) { }, }, }, - TotalSent: 0, FundsReceived: abi.NewTokenAmount(0), } } @@ -130,15 +136,6 @@ func TestUnpauseDeal(t *testing.T) { runUnpauseDeal(t, setupEnv, dealState) require.Equal(t, dealState.Status, rm.DealStatusUnsealed) }) - t.Run("error tracking channel", func(t *testing.T) { - dealState := makeDealState(rm.DealStatusUnsealed) - setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { - fe.TrackTransferError = errors.New("something went wrong tracking") - } - runUnpauseDeal(t, setupEnv, dealState) - require.Equal(t, dealState.Status, rm.DealStatusErrored) - require.Equal(t, dealState.Message, "something went wrong tracking") - }) t.Run("error resuming channel", func(t *testing.T) { dealState := makeDealState(rm.DealStatusUnsealed) setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { @@ -150,6 +147,398 @@ func TestUnpauseDeal(t *testing.T) { }) } +func TestUpdateFunding(t *testing.T) { + ctx := context.Background() + emptyDealPayment := rm.DealPayment{} + emptyDealPaymentNode := rm.BindnodeRegistry.TypeToNode(&emptyDealPayment) + emptyDealPaymentVoucher := datatransfer.TypedVoucher{Voucher: emptyDealPaymentNode, Type: rm.DealPaymentType} + emptyDealProposal := rm.DealProposal{} + emptyDealProposalNode := rm.BindnodeRegistry.TypeToNode(&emptyDealProposal) + emptyDealProposalVoucher := datatransfer.TypedVoucher{Voucher: emptyDealProposalNode, Type: rm.DealProposalType} + dealResponseVoucher := func(resp rm.DealResponse) *datatransfer.TypedVoucher { + node := rm.BindnodeRegistry.TypeToNode(&resp) + return &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType} + } + eventMachine, err := fsm.NewEventProcessor(rm.ProviderDealState{}, "Status", providerstates.ProviderEvents) + require.NoError(t, err) + testCases := map[string]struct { + status rm.DealStatus + emptyChannelID bool + fundReceived abi.TokenAmount + lastVoucher datatransfer.TypedVoucher + queued uint64 + dtStatus datatransfer.Status + channelStateErr error + chainHeadErr error + savePaymentErr error + savePaymentAmount abi.TokenAmount + updateValidationStatusErr error + expectedFinalStatus rm.DealStatus + expectedFundsReceived abi.TokenAmount + expectedReceivedValidation datatransfer.ValidationResult + expectedMessage string + }{ + "when empty channel id does nothing": { + status: rm.DealStatusFundsNeededUnseal, + emptyChannelID: true, + expectedFinalStatus: rm.DealStatusFundsNeededUnseal, + }, + "when error getting channel state, errors channel": { + status: rm.DealStatusFundsNeededUnseal, + channelStateErr: errors.New("couldn't get channel state"), + expectedFinalStatus: rm.DealStatusErrored, + expectedMessage: "couldn't get channel state", + }, + "when last voucher incorrect type, sends response": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: datatransfer.TypedVoucher{Voucher: basicnode.NewString("Fake Voucher"), Type: datatransfer.TypeIdentifier("Fake")}, + expectedFinalStatus: rm.DealStatusFundsNeededUnseal, + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Message: "wrong voucher type", + Status: rm.DealStatusErrored, + }), + }, + }, + "when received payment with nothing owed on unseal, updates status, forces pause": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: emptyDealPaymentVoucher, + queued: 0, + dtStatus: datatransfer.ResponderPaused, + savePaymentAmount: defaultUnsealPrice, + expectedFinalStatus: rm.DealStatusUnsealing, + expectedFundsReceived: defaultUnsealPrice, + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + ForcePause: true, + DataLimit: defaultCurrentInterval, + }, + }, + "when received payment with nothing owed, updates data limits, funds, and status": { + status: rm.DealStatusFundsNeeded, + fundReceived: defaultUnsealPrice, + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + savePaymentAmount: defaultPaymentPerInterval, + expectedFinalStatus: rm.DealStatusOngoing, + expectedFundsReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "when received payment with nothing owed on last payment, sends response, sets finalization false, updates status": { + status: rm.DealStatusFundsNeededLastPayment, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + savePaymentAmount: defaultPaymentPerInterval, + expectedFinalStatus: rm.DealStatusFinalizing, + expectedFundsReceived: big.Add(defaultUnsealPrice, big.Add(defaultPaymentPerInterval, defaultPaymentPerInterval)), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusCompleted, + }), + RequiresFinalization: false, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "when received payment with more owed on unseal, sends response, stays paused": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: emptyDealPaymentVoucher, + queued: 0, + dtStatus: datatransfer.ResponderPaused, + savePaymentAmount: big.Div(defaultUnsealPrice, big.NewInt(2)), + expectedFinalStatus: rm.DealStatusFundsNeededUnseal, + expectedFundsReceived: big.Div(defaultUnsealPrice, big.NewInt(2)), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusFundsNeededUnseal, + PaymentOwed: big.Div(defaultUnsealPrice, big.NewInt(2)), + }), + RequiresFinalization: true, + ForcePause: true, + DataLimit: defaultCurrentInterval, + }, + }, + "when received payment with more owed, sends response and does not change data limit": { + status: rm.DealStatusFundsNeeded, + fundReceived: defaultUnsealPrice, + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + savePaymentAmount: big.Div(defaultPaymentPerInterval, big.NewInt(2)), + expectedFinalStatus: rm.DealStatusFundsNeeded, + expectedFundsReceived: big.Add(defaultUnsealPrice, big.Div(defaultPaymentPerInterval, big.NewInt(2))), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusFundsNeeded, + PaymentOwed: big.Div(defaultPaymentPerInterval, big.NewInt(2)), + }), + RequiresFinalization: true, + DataLimit: defaultCurrentInterval, + }, + }, + "when received payment with more owed on last payment, sends response and does not change finalization status": { + status: rm.DealStatusFundsNeededLastPayment, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + savePaymentAmount: big.Div(defaultPaymentPerInterval, big.NewInt(2)), + expectedFinalStatus: rm.DealStatusFundsNeededLastPayment, + expectedFundsReceived: big.Add(defaultUnsealPrice, big.Add(defaultPaymentPerInterval, big.Div(defaultPaymentPerInterval, big.NewInt(2)))), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusFundsNeededLastPayment, + PaymentOwed: big.Div(defaultPaymentPerInterval, big.NewInt(2)), + }), + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "when money owed with no payment on unseal, leaves request paused": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: emptyDealProposalVoucher, + queued: 0, + dtStatus: datatransfer.ResponderPaused, + expectedFinalStatus: rm.DealStatusFundsNeededUnseal, + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + ForcePause: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval, + }, + }, + "when money owed with no payment, sends response and does not change data limit": { + status: rm.DealStatusFundsNeeded, + fundReceived: defaultUnsealPrice, + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + expectedFinalStatus: rm.DealStatusFundsNeeded, + expectedFundsReceived: defaultUnsealPrice, + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusFundsNeeded, + PaymentOwed: defaultPaymentPerInterval, + }), + RequiresFinalization: true, + DataLimit: defaultCurrentInterval, + }, + }, + "when no payment and money owed for last payment, sends response and does not change finalization status": { + status: rm.DealStatusFundsNeededLastPayment, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + expectedFinalStatus: rm.DealStatusFundsNeededLastPayment, + expectedFundsReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusFundsNeededLastPayment, + PaymentOwed: defaultPaymentPerInterval, + }), + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "when surplus payment with nothing owed, updates data limits accordingly": { + status: rm.DealStatusFundsNeeded, + fundReceived: defaultUnsealPrice, + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + savePaymentAmount: big.Mul(defaultPricePerByte, big.NewIntUnsigned(defaultCurrentInterval+defaultCurrentInterval+defaultIntervalIncrease)), + expectedFinalStatus: rm.DealStatusOngoing, + expectedFundsReceived: big.Add(defaultUnsealPrice, big.Mul(defaultPricePerByte, big.NewIntUnsigned(defaultCurrentInterval+defaultCurrentInterval+defaultIntervalIncrease))), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + + defaultCurrentInterval + defaultIntervalIncrease + + defaultCurrentInterval + (2 * defaultIntervalIncrease), + }, + }, + "when no money owed and no payment, updates data limits and status": { + status: rm.DealStatusFundsNeeded, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + expectedFinalStatus: rm.DealStatusOngoing, + expectedFundsReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "when no money owed and no payment on last payment, sends response, sets finalization false, updates status": { + status: rm.DealStatusFundsNeededLastPayment, + fundReceived: big.Add(defaultUnsealPrice, big.Add(defaultPaymentPerInterval, defaultPaymentPerInterval)), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + expectedFinalStatus: rm.DealStatusFinalizing, + expectedFundsReceived: big.Add(defaultUnsealPrice, big.Add(defaultPaymentPerInterval, defaultPaymentPerInterval)), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Status: rm.DealStatusCompleted, + }), + RequiresFinalization: false, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + }, + "get chain head error": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: emptyDealPaymentVoucher, + chainHeadErr: errors.New("something went wrong"), + expectedFinalStatus: rm.DealStatusFailing, + expectedMessage: "something went wrong", + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Message: "something went wrong", + Status: rm.DealStatusErrored, + }), + }, + }, + "save payment voucher error": { + status: rm.DealStatusFundsNeededUnseal, + lastVoucher: emptyDealPaymentVoucher, + savePaymentErr: errors.New("something went wrong"), + expectedFinalStatus: rm.DealStatusFailing, + expectedMessage: "something went wrong", + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: dealResponseVoucher(rm.DealResponse{ + ID: dealID, + Message: "something went wrong", + Status: rm.DealStatusErrored, + }), + }, + }, + "update validation status error": { + status: rm.DealStatusFundsNeeded, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + lastVoucher: emptyDealPaymentVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.ResponderPaused, + updateValidationStatusErr: errors.New("something went wrong"), + expectedFinalStatus: rm.DealStatusErrored, + expectedFundsReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + expectedReceivedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, + }, + expectedMessage: "something went wrong", + }, + } + for testCase, data := range testCases { + t.Run(testCase, func(t *testing.T) { + if data.fundReceived.Nil() { + data.fundReceived = big.Zero() + } + if data.expectedFundsReceived.Nil() { + data.expectedFundsReceived = big.Zero() + } + params, err := rm.NewParamsV1( + defaultPricePerByte, + defaultCurrentInterval, + defaultIntervalIncrease, + selectorparse.CommonSelector_ExploreAllRecursively, + nil, + defaultUnsealPrice, + ) + require.NoError(t, err) + dealState := &rm.ProviderDealState{ + Status: data.status, + FundsReceived: data.fundReceived, + DealProposal: rm.DealProposal{ + ID: dealID, + Params: params, + }, + } + if !data.emptyChannelID { + dealState.ChannelID = &datatransfer.ChannelID{ + Initiator: "initiator", + Responder: dealState.Receiver, + ID: 1, + } + } + chst := testnet.NewTestChannel(testnet.TestChannelParams{ + Vouchers: []datatransfer.TypedVoucher{ + data.lastVoucher, + }, + Status: data.dtStatus, + Queued: data.queued, + }) + node := &simpleProviderNode{ + chainHeadErr: data.chainHeadErr, + receivedAmount: data.savePaymentAmount, + receivedErr: data.savePaymentErr, + } + environment := rmtesting.NewTestProviderDealEnvironment(node) + environment.ChannelStateError = data.channelStateErr + environment.ReturnedChannelState = chst + environment.UpdateValidationStatusError = data.updateValidationStatusErr + fsmCtx := fsmtest.NewTestContext(ctx, eventMachine) + err = providerstates.UpdateFunding(fsmCtx, environment, *dealState) + require.NoError(t, err) + fsmCtx.ReplayEvents(t, dealState) + require.Equal(t, data.expectedFinalStatus, dealState.Status) + require.True(t, data.expectedFundsReceived.Equals(dealState.FundsReceived)) + require.Equal(t, data.expectedMessage, dealState.Message) + require.True(t, data.expectedReceivedValidation.Equals(environment.NewValidationStatus)) + }) + } +} + +type simpleProviderNode struct { + chainHeadErr error + receivedAmount abi.TokenAmount + receivedErr error +} + +func (s *simpleProviderNode) GetChainHead(ctx context.Context) (shared.TipSetToken, abi.ChainEpoch, error) { + return shared.TipSetToken{}, 0, s.chainHeadErr +} + +func (s *simpleProviderNode) SavePaymentVoucher(ctx context.Context, paymentChannel address.Address, voucher *paych.SignedVoucher, proof []byte, expectedAmount abi.TokenAmount, tok shared.TipSetToken) (abi.TokenAmount, error) { + return s.receivedAmount, s.receivedErr +} + +func (s *simpleProviderNode) GetMinerWorkerAddress(ctx context.Context, miner address.Address, tok shared.TipSetToken) (address.Address, error) { + panic("not implemented") +} +func (s *simpleProviderNode) GetRetrievalPricingInput(ctx context.Context, pieceCID cid.Cid, storageDeals []abi.DealID) (retrievalmarket.PricingInput, error) { + panic("not implemented") +} + func TestCancelDeal(t *testing.T) { ctx := context.Background() eventMachine, err := fsm.NewEventProcessor(rm.ProviderDealState{}, "Status", providerstates.ProviderEvents) @@ -180,15 +569,6 @@ func TestCancelDeal(t *testing.T) { require.Equal(t, dealState.Status, rm.DealStatusErrored) require.Equal(t, dealState.Message, "Existing error") }) - t.Run("error untracking channel", func(t *testing.T) { - dealState := makeDealState(rm.DealStatusFailing) - setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { - fe.UntrackTransferError = errors.New("something went wrong untracking") - } - runCancelDeal(t, setupEnv, dealState) - require.Equal(t, dealState.Status, rm.DealStatusErrored) - require.Equal(t, dealState.Message, "something went wrong untracking") - }) t.Run("error deleting store", func(t *testing.T) { dealState := makeDealState(rm.DealStatusFailing) setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { @@ -232,15 +612,6 @@ func TestCleanupDeal(t *testing.T) { runCleanupDeal(t, setupEnv, dealState) require.Equal(t, dealState.Status, rm.DealStatusCompleted) }) - t.Run("error untracking channel", func(t *testing.T) { - dealState := makeDealState(rm.DealStatusCompleting) - setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { - fe.UntrackTransferError = errors.New("something went wrong untracking") - } - runCleanupDeal(t, setupEnv, dealState) - require.Equal(t, dealState.Status, rm.DealStatusErrored) - require.Equal(t, dealState.Message, "something went wrong untracking") - }) t.Run("error deleting store", func(t *testing.T) { dealState := makeDealState(rm.DealStatusCompleting) setupEnv := func(fe *rmtesting.TestProviderDealEnvironment) { @@ -260,13 +631,12 @@ var defaultPricePerByte = abi.NewTokenAmount(500) var defaultPaymentPerInterval = big.Mul(defaultPricePerByte, abi.NewTokenAmount(int64(defaultCurrentInterval))) var defaultTotalSent = uint64(5000) var defaultFundsReceived = abi.NewTokenAmount(2500000) +var defaultUnsealPrice = defaultPaymentPerInterval func makeDealState(status rm.DealStatus) *rm.ProviderDealState { return &rm.ProviderDealState{ - Status: status, - TotalSent: defaultTotalSent, - CurrentInterval: defaultCurrentInterval, - FundsReceived: defaultFundsReceived, + Status: status, + FundsReceived: defaultFundsReceived, DealProposal: rm.DealProposal{ ID: dealID, Params: rm.NewParamsV0(defaultPricePerByte, defaultCurrentInterval, defaultIntervalIncrease), diff --git a/retrievalmarket/impl/requestvalidation/requestvalidation.go b/retrievalmarket/impl/requestvalidation/requestvalidation.go index 95a8fed1..caf13b5d 100644 --- a/retrievalmarket/impl/requestvalidation/requestvalidation.go +++ b/retrievalmarket/impl/requestvalidation/requestvalidation.go @@ -1,47 +1,40 @@ package requestvalidation import ( - "bytes" "context" "errors" "time" "github.com/ipfs/go-cid" "github.com/ipld/go-ipld-prime" - "github.com/ipld/go-ipld-prime/codec/dagcbor" + "github.com/ipld/go-ipld-prime/datamodel" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" + rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" ) -var allSelectorBytes []byte +var allSelector = selectorparse.CommonSelector_ExploreAllRecursively var askTimeout = 5 * time.Second -func init() { - buf := new(bytes.Buffer) - _ = dagcbor.Encode(selectorparse.CommonSelector_ExploreAllRecursively, buf) - allSelectorBytes = buf.Bytes() -} - // ValidationEnvironment contains the dependencies needed to validate deals type ValidationEnvironment interface { - GetAsk(ctx context.Context, payloadCid cid.Cid, pieceCid *cid.Cid, piece piecestore.PieceInfo, isUnsealed bool, client peer.ID) (retrievalmarket.Ask, error) + GetAsk(ctx context.Context, payloadCid cid.Cid, pieceCid *cid.Cid, piece piecestore.PieceInfo, isUnsealed bool, client peer.ID) (rm.Ask, error) GetPiece(c cid.Cid, pieceCID *cid.Cid) (piecestore.PieceInfo, bool, error) // CheckDealParams verifies the given deal params are acceptable - CheckDealParams(ask retrievalmarket.Ask, pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, unsealPrice abi.TokenAmount) error + CheckDealParams(ask rm.Ask, pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, unsealPrice abi.TokenAmount) error // RunDealDecisioningLogic runs custom deal decision logic to decide if a deal is accepted, if present - RunDealDecisioningLogic(ctx context.Context, state retrievalmarket.ProviderDealState) (bool, string, error) + RunDealDecisioningLogic(ctx context.Context, state rm.ProviderDealState) (bool, string, error) // StateMachines returns the FSM Group to begin tracking with - BeginTracking(pds retrievalmarket.ProviderDealState) error + BeginTracking(pds rm.ProviderDealState) error + Get(dealID rm.ProviderDealIdentifier) (rm.ProviderDealState, error) } // ProviderRequestValidator validates incoming requests for the Retrieval Provider @@ -55,113 +48,67 @@ func NewProviderRequestValidator(env ValidationEnvironment) *ProviderRequestVali } // ValidatePush validates a push request received from the peer that will send data -func (rv *ProviderRequestValidator) ValidatePush(isRestart bool, _ datatransfer.ChannelID, sender peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - return nil, errors.New("No pushes accepted") +func (rv *ProviderRequestValidator) ValidatePush(_ datatransfer.ChannelID, sender peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{}, errors.New("No pushes accepted") } // ValidatePull validates a pull request received from the peer that will receive data -func (rv *ProviderRequestValidator) ValidatePull(isRestart bool, _ datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - proposal, ok := voucher.(*retrievalmarket.DealProposal) - var legacyProtocol bool - if !ok { - legacyProposal, ok := voucher.(*migrations.DealProposal0) - if !ok { - return nil, errors.New("wrong voucher type") - } - newProposal := migrations.MigrateDealProposal0To1(*legacyProposal) - proposal = &newProposal - legacyProtocol = true - } - response, err := rv.validatePull(isRestart, receiver, proposal, legacyProtocol, baseCid, selector) - if response == nil { - return nil, err - } - if legacyProtocol { - downgradedResponse := migrations.DealResponse0{ - Status: response.Status, - ID: response.ID, - Message: response.Message, - PaymentOwed: response.PaymentOwed, - } - return &downgradedResponse, err +func (rv *ProviderRequestValidator) ValidatePull(_ datatransfer.ChannelID, receiver peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + proposal, err := rm.DealProposalFromNode(voucher) + if err != nil { + return datatransfer.ValidationResult{}, err } + + response, err := rv.validatePull(receiver, proposal, baseCid, selector) return response, err } +func rejectProposal(proposal *rm.DealProposal, status rm.DealStatus, reason string) (datatransfer.ValidationResult, error) { + dr := rm.DealResponse{ + ID: proposal.ID, + Status: status, + Message: reason, + } + node := rm.BindnodeRegistry.TypeToNode(&dr) + return datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType}, + }, nil +} + // validatePull is called by the data provider when a new graphsync pull // request is created. This can be the initial pull request or a new request // created when the data transfer is restarted (eg after a connection failure). // By default the graphsync request starts immediately sending data, unless // validatePull returns ErrPause or the data-transfer has not yet started // (because the provider is still unsealing the data). -func (rv *ProviderRequestValidator) validatePull(isRestart bool, receiver peer.ID, proposal *retrievalmarket.DealProposal, legacyProtocol bool, baseCid cid.Cid, selector ipld.Node) (*retrievalmarket.DealResponse, error) { +func (rv *ProviderRequestValidator) validatePull(receiver peer.ID, proposal *rm.DealProposal, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { // Check the proposal CID matches if proposal.PayloadCID != baseCid { - return nil, errors.New("incorrect CID for this proposal") + return rejectProposal(proposal, rm.DealStatusRejected, "incorrect CID for this proposal") } // Check the proposal selector matches - buf := new(bytes.Buffer) - err := dagcbor.Encode(selector, buf) - if err != nil { - return nil, err - } - bytesCompare := allSelectorBytes + sel := allSelector if proposal.SelectorSpecified() { - bytesCompare = proposal.Selector.Raw - } - if !bytes.Equal(buf.Bytes(), bytesCompare) { - return nil, errors.New("incorrect selector for this proposal") + sel = proposal.Selector.Node } - - // If the validation is for a restart request, return nil, which means - // the data-transfer should not be explicitly paused or resumed - if isRestart { - return nil, nil + if !ipld.DeepEqual(sel, selector) { + return rejectProposal(proposal, rm.DealStatusRejected, "incorrect selector specified for this proposal") } // This is a new graphsync request (not a restart) - pds := retrievalmarket.ProviderDealState{ - DealProposal: *proposal, - Receiver: receiver, - LegacyProtocol: legacyProtocol, - CurrentInterval: proposal.PaymentInterval, - } - - // Decide whether to accept the deal - status, err := rv.acceptDeal(&pds) - - response := retrievalmarket.DealResponse{ - ID: proposal.ID, - Status: status, - } - - if status == retrievalmarket.DealStatusFundsNeededUnseal { - response.PaymentOwed = pds.UnsealPrice - } - - if err != nil { - response.Message = err.Error() - return &response, err - } - - err = rv.env.BeginTracking(pds) - if err != nil { - return nil, err + deal := rm.ProviderDealState{ + DealProposal: *proposal, + Receiver: receiver, } - // Pause the data transfer while unsealing the data. - // The state machine will unpause the transfer when unsealing completes. - return &response, datatransfer.ErrPause -} - -func (rv *ProviderRequestValidator) acceptDeal(deal *retrievalmarket.ProviderDealState) (retrievalmarket.DealStatus, error) { pieceInfo, isUnsealed, err := rv.env.GetPiece(deal.PayloadCID, deal.PieceCID) if err != nil { - if err == retrievalmarket.ErrNotFound { - return retrievalmarket.DealStatusDealNotFound, err + if err == rm.ErrNotFound { + return rejectProposal(proposal, rm.DealStatusDealNotFound, err.Error()) } - return retrievalmarket.DealStatusErrored, err + return rejectProposal(proposal, rm.DealStatusErrored, err.Error()) } ctx, cancel := context.WithTimeout(context.TODO(), askTimeout) @@ -169,29 +116,96 @@ func (rv *ProviderRequestValidator) acceptDeal(deal *retrievalmarket.ProviderDea ask, err := rv.env.GetAsk(ctx, deal.PayloadCID, deal.PieceCID, pieceInfo, isUnsealed, deal.Receiver) if err != nil { - return retrievalmarket.DealStatusErrored, err + return rejectProposal(proposal, rm.DealStatusErrored, err.Error()) } // check that the deal parameters match our required parameters or // reject outright err = rv.env.CheckDealParams(ask, deal.PricePerByte, deal.PaymentInterval, deal.PaymentIntervalIncrease, deal.UnsealPrice) if err != nil { - return retrievalmarket.DealStatusRejected, err + return rejectProposal(proposal, rm.DealStatusRejected, err.Error()) } - accepted, reason, err := rv.env.RunDealDecisioningLogic(context.TODO(), *deal) + accepted, reason, err := rv.env.RunDealDecisioningLogic(context.TODO(), deal) if err != nil { - return retrievalmarket.DealStatusErrored, err + return rejectProposal(proposal, rm.DealStatusErrored, err.Error()) } if !accepted { - return retrievalmarket.DealStatusRejected, errors.New(reason) + return rejectProposal(proposal, rm.DealStatusRejected, reason) } deal.PieceInfo = &pieceInfo + err = rv.env.BeginTracking(deal) + if err != nil { + return datatransfer.ValidationResult{}, err + } + + status := rm.DealStatusAccepted if deal.UnsealPrice.GreaterThan(big.Zero()) { - return retrievalmarket.DealStatusFundsNeededUnseal, nil + status = rm.DealStatusFundsNeededUnseal + } + // Pause the data transfer while unsealing the data. + // The state machine will unpause the transfer when unsealing completes. + dr := rm.DealResponse{ + ID: proposal.ID, + Status: status, + PaymentOwed: deal.Params.OutstandingBalance(big.Zero(), 0, false), + } + node := rm.BindnodeRegistry.TypeToNode(&dr) + result := datatransfer.ValidationResult{ + Accepted: true, + VoucherResult: &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType}, + ForcePause: true, + DataLimit: deal.Params.NextInterval(big.Zero()), + RequiresFinalization: true, + } + return result, nil +} + +// ValidateRestart validates a request on restart, based on its current state +func (rv *ProviderRequestValidator) ValidateRestart(channelID datatransfer.ChannelID, channelState datatransfer.ChannelState) (datatransfer.ValidationResult, error) { + voucher := channelState.Voucher() + proposal, err := rm.DealProposalFromNode(voucher.Voucher) + if err != nil { + return datatransfer.ValidationResult{}, errors.New("wrong voucher type") + } + + dealID := rm.ProviderDealIdentifier{DealID: proposal.ID, Receiver: channelState.OtherPeer()} + + // read the deal state + deal, err := rv.env.Get(dealID) + if err != nil { + return errorDealResponse(dealID, err) } - return retrievalmarket.DealStatusAccepted, nil + // produce validation based on current deal state and channel state + return datatransfer.ValidationResult{ + Accepted: true, + ForcePause: deal.Status == rm.DealStatusUnsealing || deal.Status == rm.DealStatusFundsNeededUnseal, + RequiresFinalization: requiresFinalization(deal, channelState), + DataLimit: deal.Params.NextInterval(deal.FundsReceived), + }, nil +} + +// requiresFinalization is true unless the deal is in finalization and no further funds are owed +func requiresFinalization(deal rm.ProviderDealState, channelState datatransfer.ChannelState) bool { + if deal.Status != rm.DealStatusFundsNeededLastPayment && deal.Status != rm.DealStatusFinalizing { + return true + } + owed := deal.Params.OutstandingBalance(deal.FundsReceived, channelState.Queued(), channelState.Status().InFinalization()) + return owed.GreaterThan(big.Zero()) +} + +func errorDealResponse(dealID rm.ProviderDealIdentifier, err error) (datatransfer.ValidationResult, error) { + dr := rm.DealResponse{ + ID: dealID.DealID, + Message: err.Error(), + Status: rm.DealStatusErrored, + } + node := rm.BindnodeRegistry.TypeToNode(&dr) + return datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType}, + }, nil } diff --git a/retrievalmarket/impl/requestvalidation/requestvalidation_test.go b/retrievalmarket/impl/requestvalidation/requestvalidation_test.go index ae4dfe99..2b108b2e 100644 --- a/retrievalmarket/impl/requestvalidation/requestvalidation_test.go +++ b/retrievalmarket/impl/requestvalidation/requestvalidation_test.go @@ -6,142 +6,126 @@ import ( "testing" "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" basicnode "github.com/ipld/go-ipld-prime/node/basic" "github.com/ipld/go-ipld-prime/traversal/selector/builder" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/go-fil-markets/retrievalmarket" + rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/requestvalidation" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" "github.com/filecoin-project/go-fil-markets/shared_testutil" ) func TestValidatePush(t *testing.T) { fve := &fakeValidationEnvironment{} sender := shared_testutil.GeneratePeers(1)[0] - voucher := shared_testutil.MakeTestDealProposal() + testDp := shared_testutil.MakeTestDealProposal() + voucher := rm.BindnodeRegistry.TypeToNode(testDp) requestValidator := requestvalidation.NewProviderRequestValidator(fve) - voucherResult, err := requestValidator.ValidatePush(false, datatransfer.ChannelID{}, sender, &voucher, voucher.PayloadCID, selectorparse.CommonSelector_ExploreAllRecursively) - require.Equal(t, nil, voucherResult) + validationResult, err := requestValidator.ValidatePush(datatransfer.ChannelID{}, sender, voucher, testDp.PayloadCID, selectorparse.CommonSelector_ExploreAllRecursively) + require.Nil(t, validationResult.VoucherResult) require.Error(t, err) } +func dealResponseToVoucher(t *testing.T, status rm.DealStatus, id rm.DealID, message string, owed *abi.TokenAmount) *datatransfer.TypedVoucher { + dr := rm.DealResponse{ + Status: status, + ID: id, + Message: message, + } + if owed != nil { + dr.PaymentOwed = *owed + } + node := rm.BindnodeRegistry.TypeToNode(&dr) + return &datatransfer.TypedVoucher{Voucher: node, Type: rm.DealResponseType} +} + func TestValidatePull(t *testing.T) { proposal := shared_testutil.MakeTestDealProposal() - legacyProposal := migrations.DealProposal0{ - PayloadCID: proposal.PayloadCID, - ID: proposal.ID, - Params0: migrations.Params0{ - Selector: proposal.Selector, - PieceCID: proposal.PieceCID, - PricePerByte: proposal.PricePerByte, - PaymentInterval: proposal.PaymentInterval, - PaymentIntervalIncrease: proposal.PaymentIntervalIncrease, - UnsealPrice: proposal.UnsealPrice, - }, - } + node := rm.BindnodeRegistry.TypeToNode(proposal) + proposalVoucher := datatransfer.TypedVoucher{Voucher: node, Type: rm.DealProposalType} + zero := big.Zero() + testCases := map[string]struct { - isRestart bool - fve fakeValidationEnvironment - sender peer.ID - voucher datatransfer.Voucher - baseCid cid.Cid - selector ipld.Node - expectedVoucherResult datatransfer.VoucherResult - expectedError error + fve fakeValidationEnvironment + sender peer.ID + voucher datatransfer.TypedVoucher + baseCid cid.Cid + selector datamodel.Node + expectedVoucherResult *datatransfer.TypedVoucher + expectedError error + expectAccepted bool + expectForcePause bool + expectDataLimit uint64 + expectRequiresFinalization bool }{ "not a retrieval voucher": { - expectedError: errors.New("wrong voucher type"), + expectedError: errors.New("empty voucher"), }, "proposal and base cid do not match": { - baseCid: shared_testutil.GenerateCids(1)[0], - voucher: &proposal, - expectedError: errors.New("incorrect CID for this proposal"), + baseCid: shared_testutil.GenerateCids(1)[0], + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusRejected, proposal.ID, "incorrect CID for this proposal", nil), }, "proposal and selector do not match": { - baseCid: proposal.PayloadCID, - selector: builder.NewSelectorSpecBuilder(basicnode.Prototype.Any).Matcher().Node(), - voucher: &proposal, - expectedError: errors.New("incorrect selector for this proposal"), + baseCid: proposal.PayloadCID, + selector: builder.NewSelectorSpecBuilder(basicnode.Prototype.Any).Matcher().Node(), + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusRejected, proposal.ID, "incorrect selector specified for this proposal", nil), }, "get piece other err": { fve: fakeValidationEnvironment{ RunDealDecisioningLogicAccepted: true, GetPieceErr: errors.New("something went wrong"), }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: errors.New("something went wrong"), - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusErrored, - ID: proposal.ID, - Message: "something went wrong", - }, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusErrored, proposal.ID, "something went wrong", nil), }, "get piece not found err": { fve: fakeValidationEnvironment{ RunDealDecisioningLogicAccepted: true, - GetPieceErr: retrievalmarket.ErrNotFound, - }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: retrievalmarket.ErrNotFound, - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusDealNotFound, - ID: proposal.ID, - Message: retrievalmarket.ErrNotFound.Error(), + GetPieceErr: rm.ErrNotFound, }, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusDealNotFound, proposal.ID, rm.ErrNotFound.Error(), nil), }, "check deal params err": { fve: fakeValidationEnvironment{ CheckDealParamsError: errors.New("something went wrong"), }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: errors.New("something went wrong"), - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusRejected, - ID: proposal.ID, - Message: "something went wrong", - }, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusRejected, proposal.ID, "something went wrong", nil), }, "run deal decioning error": { fve: fakeValidationEnvironment{ RunDealDecisioningLogicError: errors.New("something went wrong"), }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: errors.New("something went wrong"), - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusErrored, - ID: proposal.ID, - Message: "something went wrong", - }, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusErrored, proposal.ID, "something went wrong", nil), }, "run deal decioning rejected": { fve: fakeValidationEnvironment{ RunDealDecisioningLogicFailReason: "something went wrong", }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: errors.New("something went wrong"), - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusRejected, - ID: proposal.ID, - Message: "something went wrong", - }, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusRejected, proposal.ID, "something went wrong", nil), }, "begin tracking error": { fve: fakeValidationEnvironment{ @@ -150,57 +134,168 @@ func TestValidatePull(t *testing.T) { }, baseCid: proposal.PayloadCID, selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, + voucher: proposalVoucher, expectedError: errors.New("everything is awful"), }, "success": { fve: fakeValidationEnvironment{ RunDealDecisioningLogicAccepted: true, }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: datatransfer.ErrPause, - expectedVoucherResult: &retrievalmarket.DealResponse{ - Status: retrievalmarket.DealStatusAccepted, - ID: proposal.ID, + baseCid: proposal.PayloadCID, + selector: selectorparse.CommonSelector_ExploreAllRecursively, + voucher: proposalVoucher, + expectedVoucherResult: dealResponseToVoucher(t, rm.DealStatusAccepted, proposal.ID, "", &zero), + expectAccepted: true, + expectForcePause: true, + expectDataLimit: proposal.PaymentInterval, + expectRequiresFinalization: true, + }, + } + for testCase, data := range testCases { + t.Run(testCase, func(t *testing.T) { + requestValidator := requestvalidation.NewProviderRequestValidator(&data.fve) + validationResult, err := requestValidator.ValidatePull(datatransfer.ChannelID{}, data.sender, data.voucher.Voucher, data.baseCid, data.selector) + if data.expectedVoucherResult == nil { + require.Nil(t, validationResult.VoucherResult) + } else { + require.True(t, data.expectedVoucherResult.Equals(*validationResult.VoucherResult)) + } + require.Equal(t, data.expectAccepted, validationResult.Accepted) + require.Equal(t, data.expectForcePause, validationResult.ForcePause) + require.Equal(t, data.expectDataLimit, validationResult.DataLimit) + require.Equal(t, data.expectRequiresFinalization, validationResult.RequiresFinalization) + if data.expectedError == nil { + require.NoError(t, err) + } else { + require.Error(t, err) + require.EqualError(t, err, data.expectedError.Error()) + } + }) + } +} + +func TestValidateRestart(t *testing.T) { + + dealID := rm.DealID(10) + defaultCurrentInterval := uint64(1000) + defaultIntervalIncrease := uint64(500) + defaultPricePerByte := abi.NewTokenAmount(500) + defaultPaymentPerInterval := big.Mul(defaultPricePerByte, abi.NewTokenAmount(int64(defaultCurrentInterval))) + defaultUnsealPrice := defaultPaymentPerInterval + params, err := rm.NewParamsV1( + defaultPricePerByte, + defaultCurrentInterval, + defaultIntervalIncrease, + selectorparse.CommonSelector_ExploreAllRecursively, + nil, + defaultUnsealPrice, + ) + require.NoError(t, err) + proposal := rm.DealProposal{ + ID: dealID, + Params: params, + } + node := rm.BindnodeRegistry.TypeToNode(&proposal) + proposalVoucher := datatransfer.TypedVoucher{Voucher: node, Type: rm.DealProposalType} + + testCases := map[string]struct { + status rm.DealStatus + fundReceived abi.TokenAmount + voucher datatransfer.TypedVoucher + queued uint64 + dtStatus datatransfer.Status + dealErr error + expectedValidation datatransfer.ValidationResult + expectedValidationErr error + }{ + "normal operation": { + status: rm.DealStatusOngoing, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + voucher: proposalVoucher, + queued: defaultCurrentInterval, + dtStatus: datatransfer.Ongoing, + expectedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, }, }, - "success, legacyProposal": { - fve: fakeValidationEnvironment{ - RunDealDecisioningLogicAccepted: true, + "unsealing": { + status: rm.DealStatusUnsealing, + fundReceived: defaultUnsealPrice, + voucher: proposalVoucher, + queued: 0, + dtStatus: datatransfer.ResponderPaused, + expectedValidation: datatransfer.ValidationResult{ + Accepted: true, + ForcePause: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval, }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &legacyProposal, - expectedError: datatransfer.ErrPause, - expectedVoucherResult: &migrations.DealResponse0{ - Status: retrievalmarket.DealStatusAccepted, - ID: proposal.ID, + }, + "last payment, no money owed": { + status: rm.DealStatusFinalizing, + fundReceived: big.Add(defaultUnsealPrice, big.Add(defaultPaymentPerInterval, defaultPaymentPerInterval)), + voucher: proposalVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + expectedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: false, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, }, }, - "restart": { - isRestart: true, - fve: fakeValidationEnvironment{ - RunDealDecisioningLogicAccepted: true, + "last payment, money owed": { + status: rm.DealStatusFundsNeededLastPayment, + fundReceived: big.Add(defaultUnsealPrice, defaultPaymentPerInterval), + voucher: proposalVoucher, + queued: defaultCurrentInterval + defaultCurrentInterval, + dtStatus: datatransfer.Finalizing, + expectedValidation: datatransfer.ValidationResult{ + Accepted: true, + RequiresFinalization: true, + DataLimit: defaultCurrentInterval + defaultCurrentInterval + defaultIntervalIncrease, }, - baseCid: proposal.PayloadCID, - selector: selectorparse.CommonSelector_ExploreAllRecursively, - voucher: &proposal, - expectedError: nil, - expectedVoucherResult: nil, + }, + "get deal error": { + voucher: proposalVoucher, + dealErr: errors.New("something went wrong"), + expectedValidation: datatransfer.ValidationResult{ + Accepted: false, + VoucherResult: dealResponseToVoucher(t, rm.DealStatusErrored, dealID, "something went wrong", nil), + }, + }, + "wrong voucher type": { + voucher: datatransfer.TypedVoucher{Voucher: basicnode.NewString("bad voucher"), Type: datatransfer.TypeIdentifier("bad")}, + expectedValidationErr: errors.New("wrong voucher type"), }, } for testCase, data := range testCases { t.Run(testCase, func(t *testing.T) { - requestValidator := requestvalidation.NewProviderRequestValidator(&data.fve) - voucherResult, err := requestValidator.ValidatePull(data.isRestart, datatransfer.ChannelID{}, data.sender, data.voucher, data.baseCid, data.selector) - require.Equal(t, data.expectedVoucherResult, voucherResult) - if data.expectedError == nil { + dealState := &rm.ProviderDealState{ + Status: data.status, + FundsReceived: data.fundReceived, + DealProposal: rm.DealProposal{ + ID: dealID, + Params: params, + }, + } + fve := &fakeValidationEnvironment{GetDeal: *dealState, GetError: data.dealErr} + requestValidator := requestvalidation.NewProviderRequestValidator(fve) + chst := shared_testutil.NewTestChannel(shared_testutil.TestChannelParams{ + Vouchers: []datatransfer.TypedVoucher{ + data.voucher, + }, + Status: data.dtStatus, + Queued: data.queued, + }) + validationResult, err := requestValidator.ValidateRestart(datatransfer.ChannelID{}, chst) + require.True(t, data.expectedValidation.Equals(validationResult)) + if data.expectedValidationErr == nil { require.NoError(t, err) } else { require.Error(t, err) - require.EqualError(t, err, data.expectedError.Error()) + require.EqualError(t, err, data.expectedValidationErr.Error()) } }) } @@ -216,11 +311,13 @@ type fakeValidationEnvironment struct { RunDealDecisioningLogicError error BeginTrackingError error - Ask retrievalmarket.Ask + Ask rm.Ask + GetDeal rm.ProviderDealState + GetError error } func (fve *fakeValidationEnvironment) GetAsk(ctx context.Context, payloadCid cid.Cid, pieceCid *cid.Cid, - piece piecestore.PieceInfo, isUnsealed bool, client peer.ID) (retrievalmarket.Ask, error) { + piece piecestore.PieceInfo, isUnsealed bool, client peer.ID) (rm.Ask, error) { return fve.Ask, nil } @@ -229,16 +326,20 @@ func (fve *fakeValidationEnvironment) GetPiece(c cid.Cid, pieceCID *cid.Cid) (pi } // CheckDealParams verifies the given deal params are acceptable -func (fve *fakeValidationEnvironment) CheckDealParams(ask retrievalmarket.Ask, pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, unsealPrice abi.TokenAmount) error { +func (fve *fakeValidationEnvironment) CheckDealParams(ask rm.Ask, pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, unsealPrice abi.TokenAmount) error { return fve.CheckDealParamsError } // RunDealDecisioningLogic runs custom deal decision logic to decide if a deal is accepted, if present -func (fve *fakeValidationEnvironment) RunDealDecisioningLogic(ctx context.Context, state retrievalmarket.ProviderDealState) (bool, string, error) { +func (fve *fakeValidationEnvironment) RunDealDecisioningLogic(ctx context.Context, state rm.ProviderDealState) (bool, string, error) { return fve.RunDealDecisioningLogicAccepted, fve.RunDealDecisioningLogicFailReason, fve.RunDealDecisioningLogicError } // StateMachines returns the FSM Group to begin tracking with -func (fve *fakeValidationEnvironment) BeginTracking(pds retrievalmarket.ProviderDealState) error { +func (fve *fakeValidationEnvironment) BeginTracking(pds rm.ProviderDealState) error { return fve.BeginTrackingError } + +func (fve *fakeValidationEnvironment) Get(dealID rm.ProviderDealIdentifier) (rm.ProviderDealState, error) { + return fve.GetDeal, fve.GetError +} diff --git a/retrievalmarket/impl/requestvalidation/revalidator.go b/retrievalmarket/impl/requestvalidation/revalidator.go deleted file mode 100644 index 3c5b56ec..00000000 --- a/retrievalmarket/impl/requestvalidation/revalidator.go +++ /dev/null @@ -1,372 +0,0 @@ -package requestvalidation - -import ( - "context" - "errors" - "sync" - - logging "github.com/ipfs/go-log/v2" - - datatransfer "github.com/filecoin-project/go-data-transfer" - "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/go-state-types/big" - - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" -) - -var log = logging.Logger("markets-rtvl-reval") - -// RevalidatorEnvironment are the dependencies needed to -// build the logic of revalidation -- essentially, access to the node at statemachines -type RevalidatorEnvironment interface { - Node() rm.RetrievalProviderNode - SendEvent(dealID rm.ProviderDealIdentifier, evt rm.ProviderEvent, args ...interface{}) error - Get(dealID rm.ProviderDealIdentifier) (rm.ProviderDealState, error) -} - -type channelData struct { - dealID rm.ProviderDealIdentifier - totalSent uint64 - totalPaidFor uint64 - interval uint64 - pricePerByte abi.TokenAmount - reload bool - legacyProtocol bool -} - -// ProviderRevalidator defines data transfer revalidation logic in the context of -// a provider for a retrieval deal -type ProviderRevalidator struct { - env RevalidatorEnvironment - trackedChannelsLk sync.RWMutex - trackedChannels map[datatransfer.ChannelID]*channelData -} - -// NewProviderRevalidator returns a new instance of a ProviderRevalidator -func NewProviderRevalidator(env RevalidatorEnvironment) *ProviderRevalidator { - return &ProviderRevalidator{ - env: env, - trackedChannels: make(map[datatransfer.ChannelID]*channelData), - } -} - -// TrackChannel indicates a retrieval deal tracked by this provider. It associates -// a given channel ID with a retrieval deal, so that checks run for data sent -// on the channel -func (pr *ProviderRevalidator) TrackChannel(deal rm.ProviderDealState) { - if deal.ChannelID == nil { - return - } - - pr.trackedChannelsLk.Lock() - defer pr.trackedChannelsLk.Unlock() - pr.trackedChannels[*deal.ChannelID] = &channelData{ - dealID: deal.Identifier(), - } - pr.writeDealState(deal) -} - -// UntrackChannel indicates a retrieval deal is finish and no longer is tracked -// by this provider -func (pr *ProviderRevalidator) UntrackChannel(deal rm.ProviderDealState) { - // Sanity check - if deal.ChannelID == nil { - log.Errorf("cannot untrack deal %s: channel ID is nil", deal.ID) - return - } - - pr.trackedChannelsLk.Lock() - defer pr.trackedChannelsLk.Unlock() - delete(pr.trackedChannels, *deal.ChannelID) -} - -func (pr *ProviderRevalidator) loadDealState(channel *channelData) error { - if !channel.reload { - return nil - } - deal, err := pr.env.Get(channel.dealID) - if err != nil { - return err - } - pr.writeDealState(deal) - channel.reload = false - return nil -} - -func (pr *ProviderRevalidator) writeDealState(deal rm.ProviderDealState) { - channel := pr.trackedChannels[*deal.ChannelID] - channel.totalSent = deal.TotalSent - if !deal.PricePerByte.IsZero() { - channel.totalPaidFor = big.Div(big.Max(big.Sub(deal.FundsReceived, deal.UnsealPrice), big.Zero()), deal.PricePerByte).Uint64() - } - channel.interval = deal.CurrentInterval - channel.pricePerByte = deal.PricePerByte - channel.legacyProtocol = deal.LegacyProtocol -} - -// Revalidate revalidates a request with a new voucher -func (pr *ProviderRevalidator) Revalidate(channelID datatransfer.ChannelID, voucher datatransfer.Voucher) (datatransfer.VoucherResult, error) { - pr.trackedChannelsLk.RLock() - defer pr.trackedChannelsLk.RUnlock() - channel, ok := pr.trackedChannels[channelID] - if !ok { - return nil, nil - } - - // read payment, or fail - payment, ok := voucher.(*rm.DealPayment) - var legacyProtocol bool - if !ok { - legacyPayment, ok := voucher.(*migrations.DealPayment0) - if !ok { - return nil, errors.New("wrong voucher type") - } - newPayment := migrations.MigrateDealPayment0To1(*legacyPayment) - payment = &newPayment - legacyProtocol = true - } - - response, err := pr.processPayment(channel.dealID, payment) - if err == nil || err == datatransfer.ErrResume { - channel.reload = true - } - return finalResponse(response, legacyProtocol), err -} - -func (pr *ProviderRevalidator) processPayment(dealID rm.ProviderDealIdentifier, payment *rm.DealPayment) (*retrievalmarket.DealResponse, error) { - - tok, _, err := pr.env.Node().GetChainHead(context.TODO()) - if err != nil { - _ = pr.env.SendEvent(dealID, rm.ProviderEventSaveVoucherFailed, err) - return errorDealResponse(dealID, err), err - } - - deal, err := pr.env.Get(dealID) - if err != nil { - return errorDealResponse(dealID, err), err - } - - // Save voucher - received, err := pr.env.Node().SavePaymentVoucher(context.TODO(), payment.PaymentChannel, payment.PaymentVoucher, nil, big.Zero(), tok) - if err != nil { - _ = pr.env.SendEvent(dealID, rm.ProviderEventSaveVoucherFailed, err) - return errorDealResponse(dealID, err), err - } - - totalPaid := big.Add(deal.FundsReceived, received) - - // check if all payments are received to continue the deal, or send updated required payment - owed := paymentOwed(deal, totalPaid) - - log.Debugf("provider: owed %d: received voucher for %d, total received %d = received so far %d + newly received %d, total sent %d, unseal price %d, price per byte %d", - owed, payment.PaymentVoucher.Amount, totalPaid, deal.FundsReceived, received, deal.TotalSent, deal.UnsealPrice, deal.PricePerByte) - - if owed.GreaterThan(big.Zero()) { - log.Debugf("provider: owed %d: sending partial payment request", owed) - _ = pr.env.SendEvent(dealID, rm.ProviderEventPartialPaymentReceived, received) - return &rm.DealResponse{ - ID: deal.ID, - Status: deal.Status, - PaymentOwed: owed, - }, datatransfer.ErrPause - } - - // resume deal - _ = pr.env.SendEvent(dealID, rm.ProviderEventPaymentReceived, received) - - if deal.Status == rm.DealStatusFundsNeededLastPayment { - log.Debugf("provider: funds needed: last payment") - return &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusCompleted, - }, datatransfer.ErrResume - } - - // We shouldn't resume the data transfer if we haven't finished unsealing/reading the unsealed data into the - // local block-store. - if deal.Status == rm.DealStatusUnsealing || deal.Status == rm.DealStatusFundsNeededUnseal { - return nil, nil - } - - return nil, datatransfer.ErrResume -} - -func paymentOwed(deal rm.ProviderDealState, totalPaid big.Int) big.Int { - // Check if the payment covers unsealing - if totalPaid.LessThan(deal.UnsealPrice) { - log.Debugf("provider: total paid %d < unseal price %d", totalPaid, deal.UnsealPrice) - return big.Sub(deal.UnsealPrice, totalPaid) - } - - // Calculate how much payment has been made for transferred data - transferPayment := big.Sub(totalPaid, deal.UnsealPrice) - - // The provider sends data and the client sends payment for the data. - // The provider will send a limited amount of extra data before receiving - // payment. Given the current limit, check if the client has paid enough - // to unlock the next interval. - currentLimitLower := deal.IntervalLowerBound() - - log.Debugf("provider: total sent %d bytes, but require payment for interval lower bound %d bytes", - deal.TotalSent, currentLimitLower) - - // Calculate the minimum required payment - totalPaymentRequired := big.Mul(big.NewInt(int64(currentLimitLower)), deal.PricePerByte) - - // Calculate payment owed - owed := big.Sub(totalPaymentRequired, transferPayment) - log.Debugf("provider: payment owed %d = payment required %d - transfer paid %d", - owed, totalPaymentRequired, transferPayment) - - return owed -} - -func errorDealResponse(dealID rm.ProviderDealIdentifier, err error) *rm.DealResponse { - return &rm.DealResponse{ - ID: dealID.DealID, - Message: err.Error(), - Status: rm.DealStatusErrored, - } -} - -// OnPullDataSent is called on the responder side when more bytes are sent -// for a given pull request. It should return a VoucherResult + ErrPause to -// request revalidation or nil to continue uninterrupted, -// other errors will terminate the request -func (pr *ProviderRevalidator) OnPullDataSent(chid datatransfer.ChannelID, additionalBytesSent uint64) (bool, datatransfer.VoucherResult, error) { - pr.trackedChannelsLk.RLock() - defer pr.trackedChannelsLk.RUnlock() - channel, ok := pr.trackedChannels[chid] - if !ok { - return false, nil, nil - } - - err := pr.loadDealState(channel) - if err != nil { - return true, nil, err - } - - // Calculate how much data has been sent in total - channel.totalSent += additionalBytesSent - if channel.pricePerByte.IsZero() || channel.totalSent < channel.interval { - if !channel.pricePerByte.IsZero() { - log.Debugf("provider: total sent %d < interval %d, sending block", channel.totalSent, channel.interval) - } - return true, nil, pr.env.SendEvent(channel.dealID, rm.ProviderEventBlockSent, channel.totalSent) - } - - // Calculate the payment owed - paymentOwed := big.Mul(abi.NewTokenAmount(int64(channel.totalSent-channel.totalPaidFor)), channel.pricePerByte) - log.Debugf("provider: owed %d = (total sent %d - paid for %d) * price per byte %d: sending payment request", - paymentOwed, channel.totalSent, channel.totalPaidFor, channel.pricePerByte) - - // Request payment - err = pr.env.SendEvent(channel.dealID, rm.ProviderEventPaymentRequested, channel.totalSent) - if err != nil { - return true, nil, err - } - return true, finalResponse(&rm.DealResponse{ - ID: channel.dealID.DealID, - Status: rm.DealStatusFundsNeeded, - PaymentOwed: paymentOwed, - }, channel.legacyProtocol), datatransfer.ErrPause -} - -// OnPushDataReceived is called on the responder side when more bytes are received -// for a given push request. It should return a VoucherResult + ErrPause to -// request revalidation or nil to continue uninterrupted, -// other errors will terminate the request -func (pr *ProviderRevalidator) OnPushDataReceived(chid datatransfer.ChannelID, additionalBytesReceived uint64) (bool, datatransfer.VoucherResult, error) { - return false, nil, nil -} - -// OnComplete is called to make a final request for revalidation -- often for the -// purpose of settlement. -// if VoucherResult is non nil, the request will enter a settlement phase awaiting -// a final update -func (pr *ProviderRevalidator) OnComplete(chid datatransfer.ChannelID) (bool, datatransfer.VoucherResult, error) { - pr.trackedChannelsLk.RLock() - defer pr.trackedChannelsLk.RUnlock() - channel, ok := pr.trackedChannels[chid] - if !ok { - return false, nil, nil - } - - err := pr.loadDealState(channel) - if err != nil { - return true, nil, err - } - - err = pr.env.SendEvent(channel.dealID, rm.ProviderEventBlocksCompleted) - if err != nil { - return true, nil, err - } - - // Calculate how much payment is owed - paymentOwed := big.Mul(abi.NewTokenAmount(int64(channel.totalSent-channel.totalPaidFor)), channel.pricePerByte) - if paymentOwed.Equals(big.Zero()) { - return true, finalResponse(&rm.DealResponse{ - ID: channel.dealID.DealID, - Status: rm.DealStatusCompleted, - }, channel.legacyProtocol), nil - } - - // Send a request for payment - log.Debugf("provider: last payment owed %d = (total sent %d - paid for %d) * price per byte %d", - paymentOwed, channel.totalSent, channel.totalPaidFor, channel.pricePerByte) - err = pr.env.SendEvent(channel.dealID, rm.ProviderEventPaymentRequested, channel.totalSent) - if err != nil { - return true, nil, err - } - return true, finalResponse(&rm.DealResponse{ - ID: channel.dealID.DealID, - Status: rm.DealStatusFundsNeededLastPayment, - PaymentOwed: paymentOwed, - }, channel.legacyProtocol), datatransfer.ErrPause -} - -func finalResponse(response *rm.DealResponse, legacyProtocol bool) datatransfer.Voucher { - if response == nil { - return nil - } - if legacyProtocol { - downgradedResponse := migrations.DealResponse0{ - Status: response.Status, - ID: response.ID, - Message: response.Message, - PaymentOwed: response.PaymentOwed, - } - return &downgradedResponse - } - return response -} - -type legacyRevalidator struct { - providerRevalidator *ProviderRevalidator -} - -func (lrv *legacyRevalidator) Revalidate(channelID datatransfer.ChannelID, voucher datatransfer.Voucher) (datatransfer.VoucherResult, error) { - return lrv.providerRevalidator.Revalidate(channelID, voucher) -} - -func (lrv *legacyRevalidator) OnPullDataSent(chid datatransfer.ChannelID, additionalBytesSent uint64) (bool, datatransfer.VoucherResult, error) { - return false, nil, nil -} - -func (lrv *legacyRevalidator) OnPushDataReceived(chid datatransfer.ChannelID, additionalBytesReceived uint64) (bool, datatransfer.VoucherResult, error) { - return false, nil, nil -} - -func (lrv *legacyRevalidator) OnComplete(chid datatransfer.ChannelID) (bool, datatransfer.VoucherResult, error) { - return false, nil, nil -} - -// NewLegacyRevalidator adds a revalidator that will capture revalidation requests for the legacy protocol but -// won't double count data being sent -// TODO: the data transfer revalidator registration needs to be able to take multiple types to avoid double counting -// for data being sent. -func NewLegacyRevalidator(providerRevalidator *ProviderRevalidator) datatransfer.Revalidator { - return &legacyRevalidator{providerRevalidator: providerRevalidator} -} diff --git a/retrievalmarket/impl/requestvalidation/revalidator_test.go b/retrievalmarket/impl/requestvalidation/revalidator_test.go deleted file mode 100644 index ffe3fccd..00000000 --- a/retrievalmarket/impl/requestvalidation/revalidator_test.go +++ /dev/null @@ -1,577 +0,0 @@ -package requestvalidation_test - -import ( - "errors" - "math/rand" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" - "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/go-state-types/big" - - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/requestvalidation" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/testnodes" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" - "github.com/filecoin-project/go-fil-markets/shared_testutil" -) - -func TestOnPushDataReceived(t *testing.T) { - fre := &fakeRevalidatorEnvironment{} - revalidator := requestvalidation.NewProviderRevalidator(fre) - channelID := shared_testutil.MakeTestChannelID() - handled, voucherResult, err := revalidator.OnPushDataReceived(channelID, rand.Uint64()) - require.False(t, handled) - require.NoError(t, err) - require.Nil(t, voucherResult) -} - -func TestOnPullDataSent(t *testing.T) { - deal := *makeDealState(rm.DealStatusOngoing) - dealZeroPricePerByte := deal - dealZeroPricePerByte.PricePerByte = big.Zero() - legacyDeal := deal - legacyDeal.LegacyProtocol = true - testCases := map[string]struct { - noSend bool - expectedID rm.ProviderDealIdentifier - expectedEvent rm.ProviderEvent - expectedArgs []interface{} - deal rm.ProviderDealState - channelID datatransfer.ChannelID - dataAmount uint64 - expectedHandled bool - expectedResult datatransfer.VoucherResult - expectedError error - }{ - "not tracked": { - deal: deal, - channelID: shared_testutil.MakeTestChannelID(), - noSend: true, - }, - "record block": { - deal: deal, - channelID: *deal.ChannelID, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventBlockSent, - expectedArgs: []interface{}{deal.TotalSent + uint64(500)}, - expectedHandled: true, - dataAmount: uint64(500), - }, - "record block zero price per byte": { - deal: dealZeroPricePerByte, - channelID: *dealZeroPricePerByte.ChannelID, - expectedID: dealZeroPricePerByte.Identifier(), - expectedEvent: rm.ProviderEventBlockSent, - expectedArgs: []interface{}{dealZeroPricePerByte.TotalSent + uint64(500)}, - expectedHandled: true, - dataAmount: uint64(500), - }, - "request payment": { - deal: deal, - channelID: *deal.ChannelID, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventPaymentRequested, - expectedArgs: []interface{}{deal.TotalSent + defaultCurrentInterval}, - dataAmount: defaultCurrentInterval, - expectedError: datatransfer.ErrPause, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusFundsNeeded, - PaymentOwed: big.Mul(abi.NewTokenAmount(int64(defaultCurrentInterval)), defaultPricePerByte), - }, - expectedHandled: true, - }, - "request payment, legacy": { - deal: legacyDeal, - channelID: *legacyDeal.ChannelID, - expectedID: legacyDeal.Identifier(), - expectedEvent: rm.ProviderEventPaymentRequested, - expectedArgs: []interface{}{legacyDeal.TotalSent + defaultCurrentInterval}, - dataAmount: defaultCurrentInterval, - expectedError: datatransfer.ErrPause, - expectedResult: &migrations.DealResponse0{ - ID: legacyDeal.ID, - Status: rm.DealStatusFundsNeeded, - PaymentOwed: big.Mul(abi.NewTokenAmount(int64(defaultCurrentInterval)), defaultPricePerByte), - }, - expectedHandled: true, - }, - } - for testCase, data := range testCases { - t.Run(testCase, func(t *testing.T) { - tn := testnodes.NewTestRetrievalProviderNode() - fre := &fakeRevalidatorEnvironment{ - node: tn, - returnedDeal: data.deal, - getError: nil, - } - revalidator := requestvalidation.NewProviderRevalidator(fre) - revalidator.TrackChannel(data.deal) - handled, voucherResult, err := revalidator.OnPullDataSent(data.channelID, data.dataAmount) - require.Equal(t, data.expectedHandled, handled) - require.Equal(t, data.expectedResult, voucherResult) - if data.expectedError == nil { - require.NoError(t, err) - } else { - require.Error(t, err) - require.EqualError(t, err, data.expectedError.Error()) - } - if !data.noSend { - require.Len(t, fre.sentEvents, 1) - event := fre.sentEvents[0] - require.Equal(t, data.expectedID, event.ID) - require.Equal(t, data.expectedEvent, event.Event) - require.Equal(t, data.expectedArgs, event.Args) - } else { - require.Len(t, fre.sentEvents, 0) - } - }) - } -} - -func TestOnComplete(t *testing.T) { - deal := *makeDealState(rm.DealStatusOngoing) - dealZeroPricePerByte := deal - dealZeroPricePerByte.PricePerByte = big.Zero() - legacyDeal := deal - legacyDeal.LegacyProtocol = true - channelID := *deal.ChannelID - testCases := map[string]struct { - expectedEvents []eventSent - deal rm.ProviderDealState - channelID datatransfer.ChannelID - expectedResult datatransfer.VoucherResult - expectedError error - unpaidAmount uint64 - }{ - "unpaid money": { - unpaidAmount: uint64(500), - expectedEvents: []eventSent{ - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlockSent, - Args: []interface{}{deal.TotalSent + 500}, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlocksCompleted, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventPaymentRequested, - Args: []interface{}{deal.TotalSent + 500}, - }, - }, - expectedError: datatransfer.ErrPause, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusFundsNeededLastPayment, - PaymentOwed: big.Mul(big.NewIntUnsigned(500), defaultPricePerByte), - }, - deal: deal, - channelID: channelID, - }, - "unpaid money, legacyDeal": { - unpaidAmount: uint64(500), - expectedEvents: []eventSent{ - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlockSent, - Args: []interface{}{deal.TotalSent + 500}, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlocksCompleted, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventPaymentRequested, - Args: []interface{}{deal.TotalSent + 500}, - }, - }, - expectedError: datatransfer.ErrPause, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: rm.DealStatusFundsNeededLastPayment, - PaymentOwed: big.Mul(big.NewIntUnsigned(500), defaultPricePerByte), - }, - deal: legacyDeal, - channelID: channelID, - }, - "all funds paid": { - unpaidAmount: uint64(0), - expectedEvents: []eventSent{ - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlockSent, - Args: []interface{}{deal.TotalSent}, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlocksCompleted, - }, - }, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusCompleted, - }, - deal: deal, - channelID: channelID, - }, - "all funds paid zero price per byte": { - unpaidAmount: uint64(0), - expectedEvents: []eventSent{ - { - ID: dealZeroPricePerByte.Identifier(), - Event: rm.ProviderEventBlockSent, - Args: []interface{}{dealZeroPricePerByte.TotalSent}, - }, - { - ID: dealZeroPricePerByte.Identifier(), - Event: rm.ProviderEventBlocksCompleted, - }, - }, - expectedResult: &rm.DealResponse{ - ID: dealZeroPricePerByte.ID, - Status: rm.DealStatusCompleted, - }, - deal: dealZeroPricePerByte, - channelID: channelID, - }, - "all funds paid, legacyDeal": { - unpaidAmount: uint64(0), - expectedEvents: []eventSent{ - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlockSent, - Args: []interface{}{deal.TotalSent}, - }, - { - ID: deal.Identifier(), - Event: rm.ProviderEventBlocksCompleted, - }, - }, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: rm.DealStatusCompleted, - }, - deal: legacyDeal, - channelID: channelID, - }, - } - for testCase, data := range testCases { - t.Run(testCase, func(t *testing.T) { - tn := testnodes.NewTestRetrievalProviderNode() - fre := &fakeRevalidatorEnvironment{ - node: tn, - returnedDeal: data.deal, - getError: nil, - } - revalidator := requestvalidation.NewProviderRevalidator(fre) - revalidator.TrackChannel(data.deal) - _, _, err := revalidator.OnPullDataSent(data.channelID, data.unpaidAmount) - require.NoError(t, err) - handled, voucherResult, err := revalidator.OnComplete(data.channelID) - require.True(t, handled) - require.Equal(t, data.expectedResult, voucherResult) - if data.expectedError != nil { - require.EqualError(t, err, data.expectedError.Error()) - } else { - require.NoError(t, err) - } - require.Equal(t, data.expectedEvents, fre.sentEvents) - }) - } -} - -func TestRevalidate(t *testing.T) { - payCh := address.TestAddress - - voucher := shared_testutil.MakeTestSignedVoucher() - voucher.Amount = big.Add(defaultFundsReceived, defaultPaymentPerInterval) - - smallerPaymentAmt := abi.NewTokenAmount(int64(defaultPaymentInterval / 2)) - smallerVoucher := shared_testutil.MakeTestSignedVoucher() - smallerVoucher.Amount = big.Add(defaultFundsReceived, smallerPaymentAmt) - - deal := *makeDealState(rm.DealStatusFundsNeeded) - deal.TotalSent = defaultTotalSent + defaultPaymentInterval + defaultPaymentInterval/2 - channelID := *deal.ChannelID - payment := &retrievalmarket.DealPayment{ - ID: deal.ID, - PaymentChannel: payCh, - PaymentVoucher: voucher, - } - smallerPayment := &retrievalmarket.DealPayment{ - ID: deal.ID, - PaymentChannel: payCh, - PaymentVoucher: smallerVoucher, - } - legacyPayment := &migrations.DealPayment0{ - ID: deal.ID, - PaymentChannel: payCh, - PaymentVoucher: voucher, - } - legacySmallerPayment := &migrations.DealPayment0{ - ID: deal.ID, - PaymentChannel: payCh, - PaymentVoucher: smallerVoucher, - } - lastPaymentDeal := deal - lastPaymentDeal.Status = rm.DealStatusFundsNeededLastPayment - testCases := map[string]struct { - configureTestNode func(tn *testnodes.TestRetrievalProviderNode) - noSend bool - expectedID rm.ProviderDealIdentifier - expectedEvent rm.ProviderEvent - expectedArgs []interface{} - getError error - deal rm.ProviderDealState - channelID datatransfer.ChannelID - voucher datatransfer.Voucher - expectedResult datatransfer.VoucherResult - expectedError error - }{ - "not tracked": { - deal: deal, - channelID: shared_testutil.MakeTestChannelID(), - noSend: true, - }, - "not a payment voucher": { - deal: deal, - channelID: channelID, - noSend: true, - expectedError: errors.New("wrong voucher type"), - }, - "error getting chain head": { - configureTestNode: func(tn *testnodes.TestRetrievalProviderNode) { - tn.ChainHeadError = errors.New("something went wrong") - }, - deal: deal, - channelID: channelID, - voucher: payment, - expectedError: errors.New("something went wrong"), - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventSaveVoucherFailed, - expectedArgs: []interface{}{errors.New("something went wrong")}, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusErrored, - Message: "something went wrong", - }, - }, - "error getting chain head, legacyPayment": { - configureTestNode: func(tn *testnodes.TestRetrievalProviderNode) { - tn.ChainHeadError = errors.New("something went wrong") - }, - deal: deal, - channelID: channelID, - voucher: legacyPayment, - expectedError: errors.New("something went wrong"), - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventSaveVoucherFailed, - expectedArgs: []interface{}{errors.New("something went wrong")}, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: rm.DealStatusErrored, - Message: "something went wrong", - }, - }, - "payment voucher error": { - configureTestNode: func(tn *testnodes.TestRetrievalProviderNode) { - _ = tn.ExpectVoucher(payCh, voucher, nil, voucher.Amount, abi.NewTokenAmount(0), errors.New("your money's no good here")) - }, - deal: deal, - channelID: channelID, - voucher: payment, - expectedError: errors.New("your money's no good here"), - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventSaveVoucherFailed, - expectedArgs: []interface{}{errors.New("your money's no good here")}, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusErrored, - Message: "your money's no good here", - }, - }, - "payment voucher error, legacy payment": { - configureTestNode: func(tn *testnodes.TestRetrievalProviderNode) { - _ = tn.ExpectVoucher(payCh, voucher, nil, voucher.Amount, abi.NewTokenAmount(0), errors.New("your money's no good here")) - }, - deal: deal, - channelID: channelID, - voucher: legacyPayment, - expectedError: errors.New("your money's no good here"), - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventSaveVoucherFailed, - expectedArgs: []interface{}{errors.New("your money's no good here")}, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: rm.DealStatusErrored, - Message: "your money's no good here", - }, - }, - "not enough funds send": { - deal: deal, - channelID: channelID, - voucher: smallerPayment, - expectedError: datatransfer.ErrPause, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventPartialPaymentReceived, - expectedArgs: []interface{}{smallerPaymentAmt}, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: deal.Status, - PaymentOwed: big.Sub(defaultPaymentPerInterval, smallerPaymentAmt), - }, - }, - "not enough funds send, legacyPayment": { - deal: deal, - channelID: channelID, - voucher: legacySmallerPayment, - expectedError: datatransfer.ErrPause, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventPartialPaymentReceived, - expectedArgs: []interface{}{smallerPaymentAmt}, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: deal.Status, - PaymentOwed: big.Sub(defaultPaymentPerInterval, smallerPaymentAmt), - }, - }, - "it works": { - deal: deal, - channelID: channelID, - voucher: payment, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventPaymentReceived, - expectedArgs: []interface{}{defaultPaymentPerInterval}, - expectedError: datatransfer.ErrResume, - }, - - "it completes": { - deal: lastPaymentDeal, - channelID: channelID, - voucher: payment, - expectedID: deal.Identifier(), - expectedEvent: rm.ProviderEventPaymentReceived, - expectedArgs: []interface{}{defaultPaymentPerInterval}, - expectedError: datatransfer.ErrResume, - expectedResult: &rm.DealResponse{ - ID: deal.ID, - Status: rm.DealStatusCompleted, - }, - }, - "it completes, legacy payment": { - deal: lastPaymentDeal, - channelID: channelID, - voucher: legacyPayment, - expectedID: deal.Identifier(), - expectedError: datatransfer.ErrResume, - expectedEvent: rm.ProviderEventPaymentReceived, - expectedArgs: []interface{}{defaultPaymentPerInterval}, - expectedResult: &migrations.DealResponse0{ - ID: deal.ID, - Status: rm.DealStatusCompleted, - }, - }, - "voucher already saved": { - deal: deal, - channelID: channelID, - voucher: payment, - expectedID: deal.Identifier(), - expectedError: datatransfer.ErrResume, - expectedEvent: rm.ProviderEventPaymentReceived, - expectedArgs: []interface{}{defaultPaymentPerInterval}, - }, - } - for testCase, data := range testCases { - t.Run(testCase, func(t *testing.T) { - tn := testnodes.NewTestRetrievalProviderNode() - tn.AddReceivedVoucher(deal.FundsReceived) - if data.configureTestNode != nil { - data.configureTestNode(tn) - } - fre := &fakeRevalidatorEnvironment{ - node: tn, - returnedDeal: data.deal, - getError: data.getError, - } - revalidator := requestvalidation.NewProviderRevalidator(fre) - revalidator.TrackChannel(data.deal) - voucherResult, err := revalidator.Revalidate(data.channelID, data.voucher) - require.Equal(t, data.expectedResult, voucherResult) - if data.expectedError == nil { - require.NoError(t, err) - } else { - require.Error(t, err) - require.EqualError(t, err, data.expectedError.Error()) - } - if !data.noSend { - require.Len(t, fre.sentEvents, 1) - event := fre.sentEvents[0] - require.Equal(t, data.expectedID, event.ID) - require.Equal(t, data.expectedEvent, event.Event) - require.Equal(t, data.expectedArgs, event.Args) - } else { - require.Len(t, fre.sentEvents, 0) - } - }) - } -} - -type eventSent struct { - ID rm.ProviderDealIdentifier - Event rm.ProviderEvent - Args []interface{} -} -type fakeRevalidatorEnvironment struct { - node rm.RetrievalProviderNode - sentEvents []eventSent - sendEventError error - returnedDeal rm.ProviderDealState - getError error -} - -func (fre *fakeRevalidatorEnvironment) Node() rm.RetrievalProviderNode { - return fre.node -} - -func (fre *fakeRevalidatorEnvironment) SendEvent(dealID rm.ProviderDealIdentifier, evt rm.ProviderEvent, args ...interface{}) error { - fre.sentEvents = append(fre.sentEvents, eventSent{dealID, evt, args}) - return fre.sendEventError -} - -func (fre *fakeRevalidatorEnvironment) Get(dealID rm.ProviderDealIdentifier) (rm.ProviderDealState, error) { - return fre.returnedDeal, fre.getError -} - -var dealID = retrievalmarket.DealID(10) -var defaultCurrentInterval = uint64(3000) -var defaultPaymentInterval = uint64(1000) -var defaultIntervalIncrease = uint64(0) -var defaultPricePerByte = abi.NewTokenAmount(1000) -var defaultPaymentPerInterval = big.Mul(defaultPricePerByte, abi.NewTokenAmount(int64(defaultPaymentInterval))) -var defaultTotalSent = defaultPaymentInterval -var defaultFundsReceived = big.Mul(defaultPricePerByte, abi.NewTokenAmount(int64(defaultTotalSent))) - -func makeDealState(status retrievalmarket.DealStatus) *retrievalmarket.ProviderDealState { - channelID := shared_testutil.MakeTestChannelID() - return &retrievalmarket.ProviderDealState{ - Status: status, - TotalSent: defaultTotalSent, - CurrentInterval: defaultCurrentInterval, - FundsReceived: defaultFundsReceived, - ChannelID: &channelID, - Receiver: channelID.Initiator, - DealProposal: retrievalmarket.DealProposal{ - ID: dealID, - Params: retrievalmarket.NewParamsV0(defaultPricePerByte, defaultPaymentInterval, defaultIntervalIncrease), - }, - } -} diff --git a/retrievalmarket/impl/testnodes/test_retrieval_provider_node.go b/retrievalmarket/impl/testnodes/test_retrieval_provider_node.go index c59176e0..8ae29e49 100644 --- a/retrievalmarket/impl/testnodes/test_retrieval_provider_node.go +++ b/retrievalmarket/impl/testnodes/test_retrieval_provider_node.go @@ -50,7 +50,7 @@ type TestRetrievalProviderNode struct { receivedPricingPieceCID cid.Cid isVerified bool - receivedVouchers []abi.TokenAmount + receivedVouchers map[expectedVoucherKey]abi.TokenAmount unsealPaused chan struct{} } @@ -60,6 +60,7 @@ var _ retrievalmarket.RetrievalProviderNode = &TestRetrievalProviderNode{} func NewTestRetrievalProviderNode() *TestRetrievalProviderNode { return &TestRetrievalProviderNode{ expectedVouchers: make(map[expectedVoucherKey]voucherResult), + receivedVouchers: make(map[expectedVoucherKey]abi.TokenAmount), } } @@ -110,7 +111,7 @@ func (trpn *TestRetrievalProviderNode) SavePaymentVoucher( for _, amt := range trpn.receivedVouchers { max = big.Max(max, amt) } - trpn.receivedVouchers = append(trpn.receivedVouchers, voucher.Amount) + trpn.receivedVouchers[key] = voucher.Amount rcvd := big.Sub(voucher.Amount, max) if rcvd.LessThan(big.Zero()) { rcvd = big.Zero() @@ -183,10 +184,6 @@ func (trpn *TestRetrievalProviderNode) ExpectVoucher( return nil } -func (trpn *TestRetrievalProviderNode) AddReceivedVoucher(amt abi.TokenAmount) { - trpn.receivedVouchers = append(trpn.receivedVouchers, amt) -} - func (trpn *TestRetrievalProviderNode) MaxReceivedVoucher() abi.TokenAmount { max := abi.NewTokenAmount(0) for _, amt := range trpn.receivedVouchers { diff --git a/retrievalmarket/migrations/maptypes/maptypes.go b/retrievalmarket/migrations/maptypes/maptypes.go index e73f6064..b11e2045 100644 --- a/retrievalmarket/migrations/maptypes/maptypes.go +++ b/retrievalmarket/migrations/maptypes/maptypes.go @@ -2,10 +2,10 @@ package maptypes import ( "github.com/ipfs/go-cid" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-fil-markets/piecestore" diff --git a/retrievalmarket/migrations/maptypes/maptypes_cbor_gen.go b/retrievalmarket/migrations/maptypes/maptypes_cbor_gen.go index b53d1feb..bca41930 100644 --- a/retrievalmarket/migrations/maptypes/maptypes_cbor_gen.go +++ b/retrievalmarket/migrations/maptypes/maptypes_cbor_gen.go @@ -11,7 +11,7 @@ import ( piecestore "github.com/filecoin-project/go-fil-markets/piecestore" retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/retrievalmarket/migrations/migrations.go b/retrievalmarket/migrations/migrations.go index 0c8aa7ef..18434b58 100644 --- a/retrievalmarket/migrations/migrations.go +++ b/retrievalmarket/migrations/migrations.go @@ -1,276 +1,16 @@ package migrations import ( - "github.com/ipfs/go-cid" - "github.com/libp2p/go-libp2p-core/peer" - cbg "github.com/whyrusleeping/cbor-gen" - - "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" - versioning "github.com/filecoin-project/go-ds-versioning/pkg" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-ds-versioning/pkg/versioned" - "github.com/filecoin-project/go-state-types/abi" - paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" - "github.com/filecoin-project/go-fil-markets/piecestore" - piecemigrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations/maptypes" ) -//go:generate cbor-gen-for Query0 QueryResponse0 DealProposal0 DealResponse0 Params0 QueryParams0 DealPayment0 ClientDealState0 ProviderDealState0 PaymentInfo0 RetrievalPeer0 Ask0 - -// PaymentInfo0 is version 0 of PaymentInfo -type PaymentInfo0 struct { - PayCh address.Address - Lane uint64 -} - -// ClientDealState0 is version 0 of ClientDealState -type ClientDealState0 struct { - DealProposal0 - StoreID *uint64 - ChannelID datatransfer.ChannelID - LastPaymentRequested bool - AllBlocksReceived bool - TotalFunds abi.TokenAmount - ClientWallet address.Address - MinerWallet address.Address - PaymentInfo *PaymentInfo0 - Status retrievalmarket.DealStatus - Sender peer.ID - TotalReceived uint64 - Message string - BytesPaidFor uint64 - CurrentInterval uint64 - PaymentRequested abi.TokenAmount - FundsSpent abi.TokenAmount - UnsealFundsPaid abi.TokenAmount - WaitMsgCID *cid.Cid // the CID of any message the client deal is waiting for - VoucherShortfall abi.TokenAmount -} - -// ProviderDealState0 is version 0 of ProviderDealState -type ProviderDealState0 struct { - DealProposal0 - StoreID uint64 - ChannelID datatransfer.ChannelID - PieceInfo *piecemigrations.PieceInfo0 - Status retrievalmarket.DealStatus - Receiver peer.ID - TotalSent uint64 - FundsReceived abi.TokenAmount - Message string - CurrentInterval uint64 -} - -// RetrievalPeer0 is version 0 of RetrievalPeer -type RetrievalPeer0 struct { - Address address.Address - ID peer.ID // optional - PieceCID *cid.Cid -} - -// QueryParams0 is version 0 of QueryParams -type QueryParams0 struct { - PieceCID *cid.Cid // optional, query if miner has this cid in this piece. some miners may not be able to respond. - //Selector ipld.Node // optional, query if miner has this cid in this piece. some miners may not be able to respond. - //MaxPricePerByte abi.TokenAmount // optional, tell miner uninterested if more expensive than this - //MinPaymentInterval uint64 // optional, tell miner uninterested unless payment interval is greater than this - //MinPaymentIntervalIncrease uint64 // optional, tell miner uninterested unless payment interval increase is greater than this -} - -// Query0 is version 0 of Query -type Query0 struct { - PayloadCID cid.Cid // V0 - QueryParams0 // V1 -} - -// QueryResponse0 is version 0 of QueryResponse -type QueryResponse0 struct { - Status retrievalmarket.QueryResponseStatus - PieceCIDFound retrievalmarket.QueryItemStatus // V1 - if a PieceCID was requested, the result - //SelectorFound QueryItemStatus // V1 - if a Selector was requested, the result - - Size uint64 // Total size of piece in bytes - //ExpectedPayloadSize uint64 // V1 - optional, if PayloadCID + selector are specified and miner knows, can offer an expected size - - PaymentAddress address.Address // address to send funds to -- may be different than miner addr - MinPricePerByte abi.TokenAmount - MaxPaymentInterval uint64 - MaxPaymentIntervalIncrease uint64 - Message string - UnsealPrice abi.TokenAmount -} - -// Params0 is version 0 of Params -type Params0 struct { - Selector *cbg.Deferred // V1 - PieceCID *cid.Cid - PricePerByte abi.TokenAmount - PaymentInterval uint64 // when to request payment - PaymentIntervalIncrease uint64 - UnsealPrice abi.TokenAmount -} - -// DealProposal0 is version 0 of DealProposal -type DealProposal0 struct { - PayloadCID cid.Cid - ID retrievalmarket.DealID - Params0 -} - -// Type method makes DealProposal0 usable as a voucher -func (dp *DealProposal0) Type() datatransfer.TypeIdentifier { - return "RetrievalDealProposal" -} - -// DealResponse0 is version 0 of DealResponse -type DealResponse0 struct { - Status retrievalmarket.DealStatus - ID retrievalmarket.DealID - - // payment required to proceed - PaymentOwed abi.TokenAmount - - Message string -} - -// Type method makes DealResponse0 usable as a voucher result -func (dr *DealResponse0) Type() datatransfer.TypeIdentifier { - return "RetrievalDealResponse" -} - -// DealPayment0 is version 0 of DealPayment -type DealPayment0 struct { - ID retrievalmarket.DealID - PaymentChannel address.Address - PaymentVoucher *paychtypes.SignedVoucher -} - -// Type method makes DealPayment0 usable as a voucher -func (dr *DealPayment0) Type() datatransfer.TypeIdentifier { - return "RetrievalDealPayment" -} - -// Ask0 is version 0 of Ask -type Ask0 struct { - PricePerByte abi.TokenAmount - UnsealPrice abi.TokenAmount - PaymentInterval uint64 - PaymentIntervalIncrease uint64 -} - -// MigrateQueryParams0To1 migrates tuple encoded query params to map encoded query params -func MigrateQueryParams0To1(oldParams QueryParams0) retrievalmarket.QueryParams { - return retrievalmarket.QueryParams{ - PieceCID: oldParams.PieceCID, - } -} - -// MigrateQuery0To1 migrates tuple encoded query to map encoded query -func MigrateQuery0To1(oldQuery Query0) retrievalmarket.Query { - return retrievalmarket.Query{ - PayloadCID: oldQuery.PayloadCID, - QueryParams: MigrateQueryParams0To1(oldQuery.QueryParams0), - } -} - -// MigrateQueryResponse0To1 migrates tuple encoded query response to map encoded query response -func MigrateQueryResponse0To1(oldQr QueryResponse0) retrievalmarket.QueryResponse { - return retrievalmarket.QueryResponse{ - Status: oldQr.Status, - PieceCIDFound: oldQr.PieceCIDFound, - Size: oldQr.Size, - PaymentAddress: oldQr.PaymentAddress, - MinPricePerByte: oldQr.MinPricePerByte, - MaxPaymentInterval: oldQr.MaxPaymentInterval, - MaxPaymentIntervalIncrease: oldQr.MaxPaymentIntervalIncrease, - Message: oldQr.Message, - UnsealPrice: oldQr.UnsealPrice, - } -} - -// MigrateParams0To1 migrates tuple encoded deal params to map encoded deal params -func MigrateParams0To1(oldParams Params0) retrievalmarket.Params { - return retrievalmarket.Params{ - Selector: oldParams.Selector, - PieceCID: oldParams.PieceCID, - PricePerByte: oldParams.PricePerByte, - PaymentInterval: oldParams.PaymentInterval, - PaymentIntervalIncrease: oldParams.PaymentIntervalIncrease, - UnsealPrice: oldParams.UnsealPrice, - } -} - -// MigrateDealPayment0To1 migrates a tuple encoded DealPayment to a map -// encoded deal payment -func MigrateDealPayment0To1(oldDp DealPayment0) retrievalmarket.DealPayment { - return retrievalmarket.DealPayment{ - ID: oldDp.ID, - PaymentChannel: oldDp.PaymentChannel, - PaymentVoucher: oldDp.PaymentVoucher, - } -} - -// MigrateDealProposal0To1 migrates a tuple encoded DealProposal to a map -// encoded deal proposal -func MigrateDealProposal0To1(oldDp DealProposal0) retrievalmarket.DealProposal { - return retrievalmarket.DealProposal{ - PayloadCID: oldDp.PayloadCID, - ID: oldDp.ID, - Params: MigrateParams0To1(oldDp.Params0), - } -} - -// MigrateDealResponse0To1 migrates a tuple encoded DealResponse to a map -// encoded deal response -func MigrateDealResponse0To1(oldDr DealResponse0) retrievalmarket.DealResponse { - return retrievalmarket.DealResponse{ - Status: oldDr.Status, - ID: oldDr.ID, - PaymentOwed: oldDr.PaymentOwed, - Message: oldDr.Message, - } -} - -// MigratePaymentInfo0To1 migrates an optional payment info tuple encoded struct -// to a map encoded struct -func MigratePaymentInfo0To1(oldPi *PaymentInfo0) *retrievalmarket.PaymentInfo { - if oldPi == nil { - return nil - } - return &retrievalmarket.PaymentInfo{ - PayCh: oldPi.PayCh, - Lane: oldPi.Lane, - } -} - -// MigrateClientDealState0To1 migrates a tuple encoded deal state to a map encoded deal state -func MigrateClientDealState0To1(oldDs *ClientDealState0) (*maptypes.ClientDealState1, error) { - return &maptypes.ClientDealState1{ - DealProposal: MigrateDealProposal0To1(oldDs.DealProposal0), - StoreID: oldDs.StoreID, - ChannelID: oldDs.ChannelID, - LastPaymentRequested: oldDs.LastPaymentRequested, - AllBlocksReceived: oldDs.AllBlocksReceived, - TotalFunds: oldDs.TotalFunds, - ClientWallet: oldDs.ClientWallet, - MinerWallet: oldDs.MinerWallet, - PaymentInfo: MigratePaymentInfo0To1(oldDs.PaymentInfo), - Status: oldDs.Status, - Sender: oldDs.Sender, - TotalReceived: oldDs.TotalReceived, - Message: oldDs.Message, - BytesPaidFor: oldDs.BytesPaidFor, - CurrentInterval: oldDs.CurrentInterval, - PaymentRequested: oldDs.PaymentRequested, - FundsSpent: oldDs.FundsSpent, - UnsealFundsPaid: oldDs.UnsealFundsPaid, - WaitMsgCID: oldDs.WaitMsgCID, - VoucherShortfall: oldDs.VoucherShortfall, - LegacyProtocol: true, - }, nil +// NoOpClientDealState0To1 does nothing (old type removed) +func NoOpClientDealState0To1(oldDs *maptypes.ClientDealState1) (*maptypes.ClientDealState1, error) { + return oldDs, nil } // MigrateClientDealState1To2 migrates from v1 to v2 of a ClientDealState. @@ -307,32 +47,12 @@ func MigrateClientDealState1To2(oldDs *maptypes.ClientDealState1) (*retrievalmar }, nil } -// MigrateProviderDealState0To1 migrates a tuple encoded deal state to a map encoded deal state -func MigrateProviderDealState0To1(oldDs *ProviderDealState0) (*maptypes.ProviderDealState1, error) { - var pieceInfo *piecestore.PieceInfo - var err error - if oldDs.PieceInfo != nil { - pieceInfo, err = piecemigrations.MigratePieceInfo0To1(oldDs.PieceInfo) - if err != nil { - return nil, err - } - } - return &maptypes.ProviderDealState1{ - DealProposal: MigrateDealProposal0To1(oldDs.DealProposal0), - StoreID: oldDs.StoreID, - ChannelID: oldDs.ChannelID, - PieceInfo: pieceInfo, - Status: oldDs.Status, - Receiver: oldDs.Receiver, - TotalSent: oldDs.TotalSent, - FundsReceived: oldDs.FundsReceived, - Message: oldDs.Message, - CurrentInterval: oldDs.CurrentInterval, - LegacyProtocol: true, - }, nil +// NoOpProviderDealState0To1 does nothing (old type removed) +func NoOpProviderDealState0To1(oldDs *maptypes.ProviderDealState1) (*maptypes.ProviderDealState1, error) { + return oldDs, nil } -// MigrateProviderDealState0To1 migrates from v1 to v2 of a +// MigrateProviderDealState1To2 migrates from v1 to v2 of a // MigrateProviderDealState. // The difference is that in v2 the ChannelID is a pointer, because the // ChannelID is not set until the data transfer has started, so it should @@ -343,44 +63,29 @@ func MigrateProviderDealState1To2(oldDs *maptypes.ProviderDealState1) (*retrieva chid = &oldDs.ChannelID } return &retrievalmarket.ProviderDealState{ - DealProposal: oldDs.DealProposal, - StoreID: oldDs.StoreID, - ChannelID: chid, - PieceInfo: oldDs.PieceInfo, - Status: oldDs.Status, - Receiver: oldDs.Receiver, - TotalSent: oldDs.TotalSent, - FundsReceived: oldDs.FundsReceived, - Message: oldDs.Message, - CurrentInterval: oldDs.CurrentInterval, - LegacyProtocol: oldDs.LegacyProtocol, - }, nil -} - -// MigrateAsk0To1 migrates a tuple encoded deal state to a map encoded deal state -func MigrateAsk0To1(oldAsk *Ask0) (*retrievalmarket.Ask, error) { - return &retrievalmarket.Ask{ - PricePerByte: oldAsk.PricePerByte, - UnsealPrice: oldAsk.UnsealPrice, - PaymentInterval: oldAsk.PaymentInterval, - PaymentIntervalIncrease: oldAsk.PaymentIntervalIncrease, + DealProposal: oldDs.DealProposal, + StoreID: oldDs.StoreID, + ChannelID: chid, + PieceInfo: oldDs.PieceInfo, + Status: oldDs.Status, + Receiver: oldDs.Receiver, + FundsReceived: oldDs.FundsReceived, + Message: oldDs.Message, }, nil } // ClientMigrations are migrations for the client's store of retrieval deals var ClientMigrations = versioned.BuilderList{ - versioned.NewVersionedBuilder(MigrateClientDealState0To1, "1"), + versioned.NewVersionedBuilder(NoOpClientDealState0To1, "1"), versioned.NewVersionedBuilder(MigrateClientDealState1To2, "2").OldVersion("1"), } // ProviderMigrations are migrations for the providers's store of retrieval deals var ProviderMigrations = versioned.BuilderList{ - versioned.NewVersionedBuilder(MigrateProviderDealState0To1, "1"). + versioned.NewVersionedBuilder(NoOpProviderDealState0To1, "1"). FilterKeys([]string{"/retrieval-ask", "/retrieval-ask/latest", "/retrieval-ask/1/latest", "/retrieval-ask/versions/current"}), versioned.NewVersionedBuilder(MigrateProviderDealState1To2, "2").OldVersion("1"), } // AskMigrations are migrations for the providers's retrieval ask -var AskMigrations = versioned.BuilderList{ - versioned.NewVersionedBuilder(MigrateAsk0To1, versioning.VersionKey("1")), -} +var AskMigrations = versioned.BuilderList{} diff --git a/retrievalmarket/migrations/migrations_cbor_gen.go b/retrievalmarket/migrations/migrations_cbor_gen.go deleted file mode 100644 index 43817f56..00000000 --- a/retrievalmarket/migrations/migrations_cbor_gen.go +++ /dev/null @@ -1,1815 +0,0 @@ -// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. - -package migrations - -import ( - "fmt" - "io" - "math" - "sort" - - migrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations" - retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" - paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" - cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" - cbg "github.com/whyrusleeping/cbor-gen" - xerrors "golang.org/x/xerrors" -) - -var _ = xerrors.Errorf -var _ = cid.Undef -var _ = math.E -var _ = sort.Sort - -var lengthBufQuery0 = []byte{130} - -func (t *Query0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufQuery0); err != nil { - return err - } - - // t.PayloadCID (cid.Cid) (struct) - - if err := cbg.WriteCid(cw, t.PayloadCID); err != nil { - return xerrors.Errorf("failed to write cid field t.PayloadCID: %w", err) - } - - // t.QueryParams0 (migrations.QueryParams0) (struct) - if err := t.QueryParams0.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *Query0) UnmarshalCBOR(r io.Reader) (err error) { - *t = Query0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 2 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.PayloadCID (cid.Cid) (struct) - - { - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PayloadCID: %w", err) - } - - t.PayloadCID = c - - } - // t.QueryParams0 (migrations.QueryParams0) (struct) - - { - - if err := t.QueryParams0.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.QueryParams0: %w", err) - } - - } - return nil -} - -var lengthBufQueryResponse0 = []byte{137} - -func (t *QueryResponse0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufQueryResponse0); err != nil { - return err - } - - // t.Status (retrievalmarket.QueryResponseStatus) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Status)); err != nil { - return err - } - - // t.PieceCIDFound (retrievalmarket.QueryItemStatus) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PieceCIDFound)); err != nil { - return err - } - - // t.Size (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Size)); err != nil { - return err - } - - // t.PaymentAddress (address.Address) (struct) - if err := t.PaymentAddress.MarshalCBOR(cw); err != nil { - return err - } - - // t.MinPricePerByte (big.Int) (struct) - if err := t.MinPricePerByte.MarshalCBOR(cw); err != nil { - return err - } - - // t.MaxPaymentInterval (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.MaxPaymentInterval)); err != nil { - return err - } - - // t.MaxPaymentIntervalIncrease (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.MaxPaymentIntervalIncrease)); err != nil { - return err - } - - // t.Message (string) (string) - if len(t.Message) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Message was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Message)); err != nil { - return err - } - - // t.UnsealPrice (big.Int) (struct) - if err := t.UnsealPrice.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *QueryResponse0) UnmarshalCBOR(r io.Reader) (err error) { - *t = QueryResponse0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 9 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.Status (retrievalmarket.QueryResponseStatus) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Status = retrievalmarket.QueryResponseStatus(extra) - - } - // t.PieceCIDFound (retrievalmarket.QueryItemStatus) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.PieceCIDFound = retrievalmarket.QueryItemStatus(extra) - - } - // t.Size (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Size = uint64(extra) - - } - // t.PaymentAddress (address.Address) (struct) - - { - - if err := t.PaymentAddress.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentAddress: %w", err) - } - - } - // t.MinPricePerByte (big.Int) (struct) - - { - - if err := t.MinPricePerByte.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.MinPricePerByte: %w", err) - } - - } - // t.MaxPaymentInterval (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.MaxPaymentInterval = uint64(extra) - - } - // t.MaxPaymentIntervalIncrease (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.MaxPaymentIntervalIncrease = uint64(extra) - - } - // t.Message (string) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Message = string(sval) - } - // t.UnsealPrice (big.Int) (struct) - - { - - if err := t.UnsealPrice.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.UnsealPrice: %w", err) - } - - } - return nil -} - -var lengthBufDealProposal0 = []byte{131} - -func (t *DealProposal0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufDealProposal0); err != nil { - return err - } - - // t.PayloadCID (cid.Cid) (struct) - - if err := cbg.WriteCid(cw, t.PayloadCID); err != nil { - return xerrors.Errorf("failed to write cid field t.PayloadCID: %w", err) - } - - // t.ID (retrievalmarket.DealID) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.ID)); err != nil { - return err - } - - // t.Params0 (migrations.Params0) (struct) - if err := t.Params0.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *DealProposal0) UnmarshalCBOR(r io.Reader) (err error) { - *t = DealProposal0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 3 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.PayloadCID (cid.Cid) (struct) - - { - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PayloadCID: %w", err) - } - - t.PayloadCID = c - - } - // t.ID (retrievalmarket.DealID) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.ID = retrievalmarket.DealID(extra) - - } - // t.Params0 (migrations.Params0) (struct) - - { - - if err := t.Params0.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Params0: %w", err) - } - - } - return nil -} - -var lengthBufDealResponse0 = []byte{132} - -func (t *DealResponse0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufDealResponse0); err != nil { - return err - } - - // t.Status (retrievalmarket.DealStatus) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Status)); err != nil { - return err - } - - // t.ID (retrievalmarket.DealID) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.ID)); err != nil { - return err - } - - // t.PaymentOwed (big.Int) (struct) - if err := t.PaymentOwed.MarshalCBOR(cw); err != nil { - return err - } - - // t.Message (string) (string) - if len(t.Message) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Message was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Message)); err != nil { - return err - } - return nil -} - -func (t *DealResponse0) UnmarshalCBOR(r io.Reader) (err error) { - *t = DealResponse0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 4 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.Status (retrievalmarket.DealStatus) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Status = retrievalmarket.DealStatus(extra) - - } - // t.ID (retrievalmarket.DealID) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.ID = retrievalmarket.DealID(extra) - - } - // t.PaymentOwed (big.Int) (struct) - - { - - if err := t.PaymentOwed.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentOwed: %w", err) - } - - } - // t.Message (string) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Message = string(sval) - } - return nil -} - -var lengthBufParams0 = []byte{134} - -func (t *Params0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufParams0); err != nil { - return err - } - - // t.Selector (typegen.Deferred) (struct) - if err := t.Selector.MarshalCBOR(cw); err != nil { - return err - } - - // t.PieceCID (cid.Cid) (struct) - - if t.PieceCID == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.PieceCID); err != nil { - return xerrors.Errorf("failed to write cid field t.PieceCID: %w", err) - } - } - - // t.PricePerByte (big.Int) (struct) - if err := t.PricePerByte.MarshalCBOR(cw); err != nil { - return err - } - - // t.PaymentInterval (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PaymentInterval)); err != nil { - return err - } - - // t.PaymentIntervalIncrease (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PaymentIntervalIncrease)); err != nil { - return err - } - - // t.UnsealPrice (big.Int) (struct) - if err := t.UnsealPrice.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *Params0) UnmarshalCBOR(r io.Reader) (err error) { - *t = Params0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 6 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.Selector (typegen.Deferred) (struct) - - { - - t.Selector = new(cbg.Deferred) - - if err := t.Selector.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("failed to read deferred field: %w", err) - } - } - // t.PieceCID (cid.Cid) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PieceCID: %w", err) - } - - t.PieceCID = &c - } - - } - // t.PricePerByte (big.Int) (struct) - - { - - if err := t.PricePerByte.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PricePerByte: %w", err) - } - - } - // t.PaymentInterval (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.PaymentInterval = uint64(extra) - - } - // t.PaymentIntervalIncrease (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.PaymentIntervalIncrease = uint64(extra) - - } - // t.UnsealPrice (big.Int) (struct) - - { - - if err := t.UnsealPrice.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.UnsealPrice: %w", err) - } - - } - return nil -} - -var lengthBufQueryParams0 = []byte{129} - -func (t *QueryParams0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufQueryParams0); err != nil { - return err - } - - // t.PieceCID (cid.Cid) (struct) - - if t.PieceCID == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.PieceCID); err != nil { - return xerrors.Errorf("failed to write cid field t.PieceCID: %w", err) - } - } - - return nil -} - -func (t *QueryParams0) UnmarshalCBOR(r io.Reader) (err error) { - *t = QueryParams0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 1 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.PieceCID (cid.Cid) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PieceCID: %w", err) - } - - t.PieceCID = &c - } - - } - return nil -} - -var lengthBufDealPayment0 = []byte{131} - -func (t *DealPayment0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufDealPayment0); err != nil { - return err - } - - // t.ID (retrievalmarket.DealID) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.ID)); err != nil { - return err - } - - // t.PaymentChannel (address.Address) (struct) - if err := t.PaymentChannel.MarshalCBOR(cw); err != nil { - return err - } - - // t.PaymentVoucher (paych.SignedVoucher) (struct) - if err := t.PaymentVoucher.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *DealPayment0) UnmarshalCBOR(r io.Reader) (err error) { - *t = DealPayment0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 3 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.ID (retrievalmarket.DealID) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.ID = retrievalmarket.DealID(extra) - - } - // t.PaymentChannel (address.Address) (struct) - - { - - if err := t.PaymentChannel.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentChannel: %w", err) - } - - } - // t.PaymentVoucher (paych.SignedVoucher) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.PaymentVoucher = new(paych.SignedVoucher) - if err := t.PaymentVoucher.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentVoucher pointer: %w", err) - } - } - - } - return nil -} - -var lengthBufClientDealState0 = []byte{148} - -func (t *ClientDealState0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufClientDealState0); err != nil { - return err - } - - // t.DealProposal0 (migrations.DealProposal0) (struct) - if err := t.DealProposal0.MarshalCBOR(cw); err != nil { - return err - } - - // t.StoreID (uint64) (uint64) - - if t.StoreID == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.StoreID)); err != nil { - return err - } - } - - // t.ChannelID (datatransfer.ChannelID) (struct) - if err := t.ChannelID.MarshalCBOR(cw); err != nil { - return err - } - - // t.LastPaymentRequested (bool) (bool) - if err := cbg.WriteBool(w, t.LastPaymentRequested); err != nil { - return err - } - - // t.AllBlocksReceived (bool) (bool) - if err := cbg.WriteBool(w, t.AllBlocksReceived); err != nil { - return err - } - - // t.TotalFunds (big.Int) (struct) - if err := t.TotalFunds.MarshalCBOR(cw); err != nil { - return err - } - - // t.ClientWallet (address.Address) (struct) - if err := t.ClientWallet.MarshalCBOR(cw); err != nil { - return err - } - - // t.MinerWallet (address.Address) (struct) - if err := t.MinerWallet.MarshalCBOR(cw); err != nil { - return err - } - - // t.PaymentInfo (migrations.PaymentInfo0) (struct) - if err := t.PaymentInfo.MarshalCBOR(cw); err != nil { - return err - } - - // t.Status (retrievalmarket.DealStatus) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Status)); err != nil { - return err - } - - // t.Sender (peer.ID) (string) - if len(t.Sender) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Sender was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Sender))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Sender)); err != nil { - return err - } - - // t.TotalReceived (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TotalReceived)); err != nil { - return err - } - - // t.Message (string) (string) - if len(t.Message) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Message was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Message)); err != nil { - return err - } - - // t.BytesPaidFor (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.BytesPaidFor)); err != nil { - return err - } - - // t.CurrentInterval (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.CurrentInterval)); err != nil { - return err - } - - // t.PaymentRequested (big.Int) (struct) - if err := t.PaymentRequested.MarshalCBOR(cw); err != nil { - return err - } - - // t.FundsSpent (big.Int) (struct) - if err := t.FundsSpent.MarshalCBOR(cw); err != nil { - return err - } - - // t.UnsealFundsPaid (big.Int) (struct) - if err := t.UnsealFundsPaid.MarshalCBOR(cw); err != nil { - return err - } - - // t.WaitMsgCID (cid.Cid) (struct) - - if t.WaitMsgCID == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.WaitMsgCID); err != nil { - return xerrors.Errorf("failed to write cid field t.WaitMsgCID: %w", err) - } - } - - // t.VoucherShortfall (big.Int) (struct) - if err := t.VoucherShortfall.MarshalCBOR(cw); err != nil { - return err - } - return nil -} - -func (t *ClientDealState0) UnmarshalCBOR(r io.Reader) (err error) { - *t = ClientDealState0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 20 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.DealProposal0 (migrations.DealProposal0) (struct) - - { - - if err := t.DealProposal0.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.DealProposal0: %w", err) - } - - } - // t.StoreID (uint64) (uint64) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - typed := uint64(extra) - t.StoreID = &typed - } - - } - // t.ChannelID (datatransfer.ChannelID) (struct) - - { - - if err := t.ChannelID.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.ChannelID: %w", err) - } - - } - // t.LastPaymentRequested (bool) (bool) - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") - } - switch extra { - case 20: - t.LastPaymentRequested = false - case 21: - t.LastPaymentRequested = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) - } - // t.AllBlocksReceived (bool) (bool) - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") - } - switch extra { - case 20: - t.AllBlocksReceived = false - case 21: - t.AllBlocksReceived = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) - } - // t.TotalFunds (big.Int) (struct) - - { - - if err := t.TotalFunds.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.TotalFunds: %w", err) - } - - } - // t.ClientWallet (address.Address) (struct) - - { - - if err := t.ClientWallet.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.ClientWallet: %w", err) - } - - } - // t.MinerWallet (address.Address) (struct) - - { - - if err := t.MinerWallet.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.MinerWallet: %w", err) - } - - } - // t.PaymentInfo (migrations.PaymentInfo0) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.PaymentInfo = new(PaymentInfo0) - if err := t.PaymentInfo.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentInfo pointer: %w", err) - } - } - - } - // t.Status (retrievalmarket.DealStatus) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Status = retrievalmarket.DealStatus(extra) - - } - // t.Sender (peer.ID) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Sender = peer.ID(sval) - } - // t.TotalReceived (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.TotalReceived = uint64(extra) - - } - // t.Message (string) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Message = string(sval) - } - // t.BytesPaidFor (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.BytesPaidFor = uint64(extra) - - } - // t.CurrentInterval (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.CurrentInterval = uint64(extra) - - } - // t.PaymentRequested (big.Int) (struct) - - { - - if err := t.PaymentRequested.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PaymentRequested: %w", err) - } - - } - // t.FundsSpent (big.Int) (struct) - - { - - if err := t.FundsSpent.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.FundsSpent: %w", err) - } - - } - // t.UnsealFundsPaid (big.Int) (struct) - - { - - if err := t.UnsealFundsPaid.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.UnsealFundsPaid: %w", err) - } - - } - // t.WaitMsgCID (cid.Cid) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.WaitMsgCID: %w", err) - } - - t.WaitMsgCID = &c - } - - } - // t.VoucherShortfall (big.Int) (struct) - - { - - if err := t.VoucherShortfall.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.VoucherShortfall: %w", err) - } - - } - return nil -} - -var lengthBufProviderDealState0 = []byte{138} - -func (t *ProviderDealState0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufProviderDealState0); err != nil { - return err - } - - // t.DealProposal0 (migrations.DealProposal0) (struct) - if err := t.DealProposal0.MarshalCBOR(cw); err != nil { - return err - } - - // t.StoreID (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.StoreID)); err != nil { - return err - } - - // t.ChannelID (datatransfer.ChannelID) (struct) - if err := t.ChannelID.MarshalCBOR(cw); err != nil { - return err - } - - // t.PieceInfo (migrations.PieceInfo0) (struct) - if err := t.PieceInfo.MarshalCBOR(cw); err != nil { - return err - } - - // t.Status (retrievalmarket.DealStatus) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Status)); err != nil { - return err - } - - // t.Receiver (peer.ID) (string) - if len(t.Receiver) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Receiver was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Receiver))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Receiver)); err != nil { - return err - } - - // t.TotalSent (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TotalSent)); err != nil { - return err - } - - // t.FundsReceived (big.Int) (struct) - if err := t.FundsReceived.MarshalCBOR(cw); err != nil { - return err - } - - // t.Message (string) (string) - if len(t.Message) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Message was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Message)); err != nil { - return err - } - - // t.CurrentInterval (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.CurrentInterval)); err != nil { - return err - } - - return nil -} - -func (t *ProviderDealState0) UnmarshalCBOR(r io.Reader) (err error) { - *t = ProviderDealState0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 10 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.DealProposal0 (migrations.DealProposal0) (struct) - - { - - if err := t.DealProposal0.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.DealProposal0: %w", err) - } - - } - // t.StoreID (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.StoreID = uint64(extra) - - } - // t.ChannelID (datatransfer.ChannelID) (struct) - - { - - if err := t.ChannelID.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.ChannelID: %w", err) - } - - } - // t.PieceInfo (migrations.PieceInfo0) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.PieceInfo = new(migrations.PieceInfo0) - if err := t.PieceInfo.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PieceInfo pointer: %w", err) - } - } - - } - // t.Status (retrievalmarket.DealStatus) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Status = retrievalmarket.DealStatus(extra) - - } - // t.Receiver (peer.ID) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Receiver = peer.ID(sval) - } - // t.TotalSent (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.TotalSent = uint64(extra) - - } - // t.FundsReceived (big.Int) (struct) - - { - - if err := t.FundsReceived.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.FundsReceived: %w", err) - } - - } - // t.Message (string) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.Message = string(sval) - } - // t.CurrentInterval (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.CurrentInterval = uint64(extra) - - } - return nil -} - -var lengthBufPaymentInfo0 = []byte{130} - -func (t *PaymentInfo0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufPaymentInfo0); err != nil { - return err - } - - // t.PayCh (address.Address) (struct) - if err := t.PayCh.MarshalCBOR(cw); err != nil { - return err - } - - // t.Lane (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Lane)); err != nil { - return err - } - - return nil -} - -func (t *PaymentInfo0) UnmarshalCBOR(r io.Reader) (err error) { - *t = PaymentInfo0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 2 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.PayCh (address.Address) (struct) - - { - - if err := t.PayCh.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PayCh: %w", err) - } - - } - // t.Lane (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Lane = uint64(extra) - - } - return nil -} - -var lengthBufRetrievalPeer0 = []byte{131} - -func (t *RetrievalPeer0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufRetrievalPeer0); err != nil { - return err - } - - // t.Address (address.Address) (struct) - if err := t.Address.MarshalCBOR(cw); err != nil { - return err - } - - // t.ID (peer.ID) (string) - if len(t.ID) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.ID was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ID))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.ID)); err != nil { - return err - } - - // t.PieceCID (cid.Cid) (struct) - - if t.PieceCID == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.PieceCID); err != nil { - return xerrors.Errorf("failed to write cid field t.PieceCID: %w", err) - } - } - - return nil -} - -func (t *RetrievalPeer0) UnmarshalCBOR(r io.Reader) (err error) { - *t = RetrievalPeer0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 3 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.Address (address.Address) (struct) - - { - - if err := t.Address.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Address: %w", err) - } - - } - // t.ID (peer.ID) (string) - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.ID = peer.ID(sval) - } - // t.PieceCID (cid.Cid) (struct) - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PieceCID: %w", err) - } - - t.PieceCID = &c - } - - } - return nil -} - -var lengthBufAsk0 = []byte{132} - -func (t *Ask0) MarshalCBOR(w io.Writer) error { - if t == nil { - _, err := w.Write(cbg.CborNull) - return err - } - - cw := cbg.NewCborWriter(w) - - if _, err := cw.Write(lengthBufAsk0); err != nil { - return err - } - - // t.PricePerByte (big.Int) (struct) - if err := t.PricePerByte.MarshalCBOR(cw); err != nil { - return err - } - - // t.UnsealPrice (big.Int) (struct) - if err := t.UnsealPrice.MarshalCBOR(cw); err != nil { - return err - } - - // t.PaymentInterval (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PaymentInterval)); err != nil { - return err - } - - // t.PaymentIntervalIncrease (uint64) (uint64) - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PaymentIntervalIncrease)); err != nil { - return err - } - - return nil -} - -func (t *Ask0) UnmarshalCBOR(r io.Reader) (err error) { - *t = Ask0{} - - cr := cbg.NewCborReader(r) - - maj, extra, err := cr.ReadHeader() - if err != nil { - return err - } - defer func() { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - }() - - if maj != cbg.MajArray { - return fmt.Errorf("cbor input should be of type array") - } - - if extra != 4 { - return fmt.Errorf("cbor input had wrong number of fields") - } - - // t.PricePerByte (big.Int) (struct) - - { - - if err := t.PricePerByte.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PricePerByte: %w", err) - } - - } - // t.UnsealPrice (big.Int) (struct) - - { - - if err := t.UnsealPrice.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.UnsealPrice: %w", err) - } - - } - // t.PaymentInterval (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.PaymentInterval = uint64(extra) - - } - // t.PaymentIntervalIncrease (uint64) (uint64) - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.PaymentIntervalIncrease = uint64(extra) - - } - return nil -} diff --git a/retrievalmarket/migrations/migrations_test.go b/retrievalmarket/migrations/migrations_test.go index 96a9e46f..2835f378 100644 --- a/retrievalmarket/migrations/migrations_test.go +++ b/retrievalmarket/migrations/migrations_test.go @@ -7,20 +7,22 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" dss "github.com/ipfs/go-datastore/sync" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" + "github.com/filecoin-project/go-ds-versioning/pkg/versioned" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" - "github.com/filecoin-project/go-fil-markets/piecestore/migrations" + "github.com/filecoin-project/go-fil-markets/piecestore" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/clientstates" "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/providerstates" + "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations/maptypes" ) func NewActorAddr(t testing.TB, data string) address.Address { @@ -38,11 +40,11 @@ func TestClientStateMigration(t *testing.T) { storeID := uint64(1) dummyCid, err := cid.Parse("bafkqaaa") require.NoError(t, err) - dealState := ClientDealState0{ - DealProposal0: DealProposal0{ + dealState := maptypes.ClientDealState1{ + DealProposal: retrievalmarket.DealProposal{ PayloadCID: dummyCid, ID: dealID, - Params0: Params0{ + Params: retrievalmarket.Params{ PieceCID: &dummyCid, PricePerByte: abi.NewTokenAmount(0), UnsealPrice: abi.NewTokenAmount(0), @@ -71,41 +73,45 @@ func TestClientStateMigration(t *testing.T) { testCases := []struct { name string - dealState0 *ClientDealState0 + dealState1 *maptypes.ClientDealState1 expChannelID *datatransfer.ChannelID }{{ name: "from v0 - v2 with channel ID", - dealState0: &dealState, + dealState1: &dealState, expChannelID: nil, }, { name: "from v0 - v2 with no channel ID", - dealState0: &dealStateWithChannelID, + dealState1: &dealStateWithChannelID, expChannelID: &chid, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { ds := dss.MutexWrap(datastore.NewMapDatastore()) - - // Store the v0 client deal state to the datastore - stateMachines0, err := fsm.New(ds, fsm.Parameters{ + emptyList, err := versioned.BuilderList{}.Build() + require.NoError(t, err) + stateMachines, migrateStateMachines, err := versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ Environment: &mockClientEnv{}, - StateType: ClientDealState0{}, + StateType: maptypes.ClientDealState1{}, StateKeyField: "Status", Events: fsm.Events{}, StateEntryFuncs: fsm.StateEntryFuncs{}, FinalityStates: []fsm.StateKey{}, - }) + }, emptyList, "1") require.NoError(t, err) - err = stateMachines0.Begin(dealID, tc.dealState0) + // Run migration to v1 datastore + err = migrateStateMachines(ctx) + require.NoError(t, err) + + err = stateMachines.Begin(dealID, tc.dealState1) require.NoError(t, err) // Prepare to run migration to v2 datastore retrievalMigrations, err := ClientMigrations.Build() require.NoError(t, err) - stateMachines, migrateStateMachines, err := versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ + stateMachines, migrateStateMachines, err = versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ Environment: &mockClientEnv{}, StateType: retrievalmarket.ClientDealState{}, StateKeyField: "Status", @@ -144,18 +150,18 @@ func TestProviderStateMigration(t *testing.T) { storeID := uint64(1) dummyCid, err := cid.Parse("bafkqaaa") require.NoError(t, err) - dealState := ProviderDealState0{ - DealProposal0: DealProposal0{ + dealState := maptypes.ProviderDealState1{ + DealProposal: retrievalmarket.DealProposal{ PayloadCID: dummyCid, ID: dealID, - Params0: Params0{ + Params: retrievalmarket.Params{ PieceCID: &dummyCid, PricePerByte: abi.NewTokenAmount(0), UnsealPrice: abi.NewTokenAmount(0), }, }, StoreID: storeID, - PieceInfo: &migrations.PieceInfo0{ + PieceInfo: &piecestore.PieceInfo{ PieceCID: dummyCid, Deals: nil, }, @@ -176,7 +182,7 @@ func TestProviderStateMigration(t *testing.T) { testCases := []struct { name string - dealState0 *ProviderDealState0 + dealState0 *maptypes.ProviderDealState1 expChannelID *datatransfer.ChannelID }{{ name: "from v0 - v2 with channel ID", @@ -191,26 +197,30 @@ func TestProviderStateMigration(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { ds := dss.MutexWrap(datastore.NewMapDatastore()) - - // Store the v0 provider deal state to the datastore - stateMachines0, err := fsm.New(ds, fsm.Parameters{ + emptyList, err := versioned.BuilderList{}.Build() + require.NoError(t, err) + stateMachines, migrateStateMachines, err := versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ Environment: &mockProviderEnv{}, - StateType: ProviderDealState0{}, + StateType: maptypes.ProviderDealState1{}, StateKeyField: "Status", Events: fsm.Events{}, StateEntryFuncs: fsm.StateEntryFuncs{}, FinalityStates: []fsm.StateKey{}, - }) + }, emptyList, "1") + require.NoError(t, err) + + // Run migration to v1 datastore + err = migrateStateMachines(ctx) require.NoError(t, err) - err = stateMachines0.Begin(dealID, tc.dealState0) + err = stateMachines.Begin(dealID, tc.dealState0) require.NoError(t, err) // Prepare to run migration to v2 datastore retrievalMigrations, err := ProviderMigrations.Build() require.NoError(t, err) - stateMachines, migrateStateMachines, err := versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ + stateMachines, migrateStateMachines, err = versionedfsm.NewVersionedFSM(ds, fsm.Parameters{ Environment: &mockProviderEnv{}, StateType: retrievalmarket.ProviderDealState{}, StateKeyField: "Status", @@ -247,11 +257,11 @@ func (e *mockClientEnv) Node() retrievalmarket.RetrievalClientNode { return nil } -func (e *mockClientEnv) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *retrievalmarket.DealProposal, legacy bool) (datatransfer.ChannelID, error) { +func (e *mockClientEnv) OpenDataTransfer(ctx context.Context, to peer.ID, proposal *retrievalmarket.DealProposal) (datatransfer.ChannelID, error) { return datatransfer.ChannelID{}, nil } -func (e *mockClientEnv) SendDataTransferVoucher(_ context.Context, _ datatransfer.ChannelID, _ *retrievalmarket.DealPayment, _ bool) error { +func (e *mockClientEnv) SendDataTransferVoucher(_ context.Context, _ datatransfer.ChannelID, _ *retrievalmarket.DealPayment) error { return nil } @@ -279,20 +289,19 @@ func (te *mockProviderEnv) Node() retrievalmarket.RetrievalProviderNode { func (te *mockProviderEnv) DeleteStore(dealID retrievalmarket.DealID) error { return nil } - -func (te *mockProviderEnv) TrackTransfer(deal retrievalmarket.ProviderDealState) error { +func (te *mockProviderEnv) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error { return nil } -func (te *mockProviderEnv) UntrackTransfer(deal retrievalmarket.ProviderDealState) error { +func (te *mockProviderEnv) CloseDataTransfer(_ context.Context, _ datatransfer.ChannelID) error { return nil } -func (te *mockProviderEnv) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error { - return nil +func (te *mockProviderEnv) ChannelState(_ context.Context, _ datatransfer.ChannelID) (datatransfer.ChannelState, error) { + return nil, nil } -func (te *mockProviderEnv) CloseDataTransfer(_ context.Context, _ datatransfer.ChannelID) error { +func (te *mockProviderEnv) UpdateValidationStatus(_ context.Context, _ datatransfer.ChannelID, _ datatransfer.ValidationResult) error { return nil } diff --git a/retrievalmarket/network/doc.go b/retrievalmarket/network/doc.go index 92e82a26..8bbd9c29 100644 --- a/retrievalmarket/network/doc.go +++ b/retrievalmarket/network/doc.go @@ -2,8 +2,7 @@ Package network providers an abstraction over a libp2p host for managing retrieval's Libp2p protocols: network.go - defines the interfaces that must be implemented to serve as a retrieval network -deal-stream.go - implements the `RetrievalDealStream` interface, a data stream for retrieval deal traffic only -query-stream.go - implements the `RetrievalQueryStream` interface, a data stream for retrieval query traffic only +query_stream.go - implements the `RetrievalQueryStream` interface, a data stream for retrieval query traffic only libp2p_impl.go - provides the production implementation of the `RetrievalMarketNetwork` interface. */ package network diff --git a/retrievalmarket/network/libp2p_impl.go b/retrievalmarket/network/libp2p_impl.go index f7e0ced8..71c820ca 100644 --- a/retrievalmarket/network/libp2p_impl.go +++ b/retrievalmarket/network/libp2p_impl.go @@ -6,10 +6,10 @@ import ( "time" logging "github.com/ipfs/go-log/v2" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" ma "github.com/multiformats/go-multiaddr" "github.com/filecoin-project/go-fil-markets/retrievalmarket" @@ -44,7 +44,6 @@ func NewFromLibp2pHost(h host.Host, options ...Option) RetrievalMarketNetwork { retryStream: shared.NewRetryStream(h), supportedProtocols: []protocol.ID{ retrievalmarket.QueryProtocolID, - retrievalmarket.OldQueryProtocolID, }, } for _, option := range options { @@ -64,7 +63,7 @@ type libp2pRetrievalMarketNetwork struct { supportedProtocols []protocol.ID } -// NewQueryStream creates a new RetrievalQueryStream using the provided peer.ID +// NewQueryStream creates a new RetrievalQueryStream using the provided peer.ID func (impl *libp2pRetrievalMarketNetwork) NewQueryStream(id peer.ID) (RetrievalQueryStream, error) { s, err := impl.retryStream.OpenStream(context.Background(), id, impl.supportedProtocols) if err != nil { @@ -72,9 +71,6 @@ func (impl *libp2pRetrievalMarketNetwork) NewQueryStream(id peer.ID) (RetrievalQ return nil, err } buffered := bufio.NewReaderSize(s, 16) - if s.Protocol() == retrievalmarket.OldQueryProtocolID { - return &oldQueryStream{p: id, rw: s, buffered: buffered}, nil - } return &queryStream{p: id, rw: s, buffered: buffered}, nil } @@ -105,12 +101,7 @@ func (impl *libp2pRetrievalMarketNetwork) handleNewQueryStream(s network.Stream) } remotePID := s.Conn().RemotePeer() buffered := bufio.NewReaderSize(s, 16) - var qs RetrievalQueryStream - if s.Protocol() == retrievalmarket.OldQueryProtocolID { - qs = &oldQueryStream{remotePID, s, buffered} - } else { - qs = &queryStream{remotePID, s, buffered} - } + qs := &queryStream{remotePID, s, buffered} impl.receiver.HandleQueryStream(qs) } diff --git a/retrievalmarket/network/libp2p_impl_test.go b/retrievalmarket/network/libp2p_impl_test.go index f4c103f8..d10d196c 100644 --- a/retrievalmarket/network/libp2p_impl_test.go +++ b/retrievalmarket/network/libp2p_impl_test.go @@ -5,8 +5,7 @@ import ( "testing" "time" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -30,100 +29,53 @@ func (tr *testReceiver) HandleQueryStream(s network.RetrievalQueryStream) { func TestQueryStreamSendReceiveQuery(t *testing.T) { ctx := context.Background() - testCases := map[string]struct { - senderDisabledNew bool - receiverDisabledNew bool - }{ - "both clients current version": {}, - "sender old supports old queries": { - senderDisabledNew: true, - }, - "receiver only supports old queries": { - receiverDisabledNew: true, - }, - } - for testCase, data := range testCases { - t.Run(testCase, func(t *testing.T) { - td := shared_testutil.NewLibp2pTestData(ctx, t) - var fromNetwork, toNetwork network.RetrievalMarketNetwork - if data.senderDisabledNew { - fromNetwork = network.NewFromLibp2pHost(td.Host1, network.SupportedProtocols([]protocol.ID{retrievalmarket.OldQueryProtocolID})) - } else { - fromNetwork = network.NewFromLibp2pHost(td.Host1) - } - if data.receiverDisabledNew { - toNetwork = network.NewFromLibp2pHost(td.Host2, network.SupportedProtocols([]protocol.ID{retrievalmarket.OldQueryProtocolID})) - } else { - toNetwork = network.NewFromLibp2pHost(td.Host2) - } - toHost := td.Host2.ID() - - // host1 gets no-op receiver - tr := &testReceiver{t: t} - require.NoError(t, fromNetwork.SetDelegate(tr)) - - // host2 gets receiver - qchan := make(chan retrievalmarket.Query) - tr2 := &testReceiver{t: t, queryStreamHandler: func(s network.RetrievalQueryStream) { - readq, err := s.ReadQuery() - require.NoError(t, err) - qchan <- readq - }} - require.NoError(t, toNetwork.SetDelegate(tr2)) - - // setup query stream host1 --> host 2 - assertQueryReceived(ctx, t, fromNetwork, toHost, qchan) - }) - } + td := shared_testutil.NewLibp2pTestData(ctx, t) + var fromNetwork, toNetwork network.RetrievalMarketNetwork + fromNetwork = network.NewFromLibp2pHost(td.Host1) + toNetwork = network.NewFromLibp2pHost(td.Host2) + toHost := td.Host2.ID() + + // host1 gets no-op receiver + tr := &testReceiver{t: t} + require.NoError(t, fromNetwork.SetDelegate(tr)) + + // host2 gets receiver + qchan := make(chan retrievalmarket.Query) + tr2 := &testReceiver{t: t, queryStreamHandler: func(s network.RetrievalQueryStream) { + readq, err := s.ReadQuery() + require.NoError(t, err) + qchan <- readq + }} + require.NoError(t, toNetwork.SetDelegate(tr2)) + + // setup query stream host1 --> host 2 + assertQueryReceived(ctx, t, fromNetwork, toHost, qchan) } func TestQueryStreamSendReceiveQueryResponse(t *testing.T) { ctx := context.Background() - testCases := map[string]struct { - senderDisabledNew bool - receiverDisabledNew bool - }{ - "both clients current version": {}, - "sender old supports old queries": { - senderDisabledNew: true, - }, - "receiver only supports old queries": { - receiverDisabledNew: true, - }, - } - for testCase, data := range testCases { - t.Run(testCase, func(t *testing.T) { - td := shared_testutil.NewLibp2pTestData(ctx, t) - var fromNetwork, toNetwork network.RetrievalMarketNetwork - if data.senderDisabledNew { - fromNetwork = network.NewFromLibp2pHost(td.Host1, network.SupportedProtocols([]protocol.ID{retrievalmarket.OldQueryProtocolID})) - } else { - fromNetwork = network.NewFromLibp2pHost(td.Host1) - } - if data.receiverDisabledNew { - toNetwork = network.NewFromLibp2pHost(td.Host2, network.SupportedProtocols([]protocol.ID{retrievalmarket.OldQueryProtocolID})) - } else { - toNetwork = network.NewFromLibp2pHost(td.Host2) - } - toHost := td.Host2.ID() - - // host1 gets no-op receiver - tr := &testReceiver{t: t} - require.NoError(t, fromNetwork.SetDelegate(tr)) - - // host2 gets receiver - qchan := make(chan retrievalmarket.QueryResponse) - tr2 := &testReceiver{t: t, queryStreamHandler: func(s network.RetrievalQueryStream) { - q, err := s.ReadQueryResponse() - require.NoError(t, err) - qchan <- q - }} - require.NoError(t, toNetwork.SetDelegate(tr2)) - - assertQueryResponseReceived(ctx, t, fromNetwork, toHost, qchan) - }) - } + td := shared_testutil.NewLibp2pTestData(ctx, t) + var fromNetwork, toNetwork network.RetrievalMarketNetwork + fromNetwork = network.NewFromLibp2pHost(td.Host1) + toNetwork = network.NewFromLibp2pHost(td.Host2) + toHost := td.Host2.ID() + + // host1 gets no-op receiver + tr := &testReceiver{t: t} + require.NoError(t, fromNetwork.SetDelegate(tr)) + + // host2 gets receiver + qchan := make(chan retrievalmarket.QueryResponse) + tr2 := &testReceiver{t: t, queryStreamHandler: func(s network.RetrievalQueryStream) { + q, err := s.ReadQueryResponse() + require.NoError(t, err) + qchan <- q + }} + require.NoError(t, toNetwork.SetDelegate(tr2)) + + assertQueryResponseReceived(ctx, t, fromNetwork, toHost, qchan) + } func TestQueryStreamSendReceiveMultipleSuccessful(t *testing.T) { diff --git a/retrievalmarket/network/network.go b/retrievalmarket/network/network.go index 404dea89..7d57fbf5 100644 --- a/retrievalmarket/network/network.go +++ b/retrievalmarket/network/network.go @@ -1,7 +1,7 @@ package network import ( - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" ma "github.com/multiformats/go-multiaddr" "github.com/filecoin-project/go-fil-markets/retrievalmarket" diff --git a/retrievalmarket/network/old_query_stream.go b/retrievalmarket/network/old_query_stream.go deleted file mode 100644 index 9b60bd61..00000000 --- a/retrievalmarket/network/old_query_stream.go +++ /dev/null @@ -1,78 +0,0 @@ -package network - -import ( - "bufio" - - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - - cborutil "github.com/filecoin-project/go-cbor-util" - - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" -) - -type oldQueryStream struct { - p peer.ID - rw network.MuxedStream - buffered *bufio.Reader -} - -var _ RetrievalQueryStream = (*oldQueryStream)(nil) - -func (qs *oldQueryStream) RemotePeer() peer.ID { - return qs.p -} - -func (qs *oldQueryStream) ReadQuery() (retrievalmarket.Query, error) { - var q migrations.Query0 - - if err := q.UnmarshalCBOR(qs.buffered); err != nil { - log.Warn(err) - return retrievalmarket.QueryUndefined, err - - } - - return migrations.MigrateQuery0To1(q), nil -} - -func (qs *oldQueryStream) WriteQuery(newQ retrievalmarket.Query) error { - q := migrations.Query0{ - PayloadCID: newQ.PayloadCID, - QueryParams0: migrations.QueryParams0{ - PieceCID: newQ.PieceCID, - }, - } - - return cborutil.WriteCborRPC(qs.rw, &q) -} - -func (qs *oldQueryStream) ReadQueryResponse() (retrievalmarket.QueryResponse, error) { - var resp migrations.QueryResponse0 - - if err := resp.UnmarshalCBOR(qs.buffered); err != nil { - log.Warn(err) - return retrievalmarket.QueryResponseUndefined, err - } - - return migrations.MigrateQueryResponse0To1(resp), nil -} - -func (qs *oldQueryStream) WriteQueryResponse(newQr retrievalmarket.QueryResponse) error { - qr := migrations.QueryResponse0{ - Status: newQr.Status, - PieceCIDFound: newQr.PieceCIDFound, - Size: newQr.Size, - PaymentAddress: newQr.PaymentAddress, - MinPricePerByte: newQr.MinPricePerByte, - MaxPaymentInterval: newQr.MaxPaymentInterval, - MaxPaymentIntervalIncrease: newQr.MaxPaymentIntervalIncrease, - Message: newQr.Message, - UnsealPrice: newQr.UnsealPrice, - } - return cborutil.WriteCborRPC(qs.rw, &qr) -} - -func (qs *oldQueryStream) Close() error { - return qs.rw.Close() -} diff --git a/retrievalmarket/network/query_stream.go b/retrievalmarket/network/query_stream.go index a46d63ef..ae5cdfe7 100644 --- a/retrievalmarket/network/query_stream.go +++ b/retrievalmarket/network/query_stream.go @@ -3,8 +3,8 @@ package network import ( "bufio" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" diff --git a/retrievalmarket/retrieval_restart_integration_test.go b/retrievalmarket/retrieval_restart_integration_test.go index 7c1fc4a9..52bfc4a2 100644 --- a/retrievalmarket/retrieval_restart_integration_test.go +++ b/retrievalmarket/retrieval_restart_integration_test.go @@ -9,10 +9,10 @@ import ( logger "github.com/ipfs/go-log/v2" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" - "github.com/filecoin-project/go-data-transfer/channelmonitor" - dtimpl "github.com/filecoin-project/go-data-transfer/impl" - dtnet "github.com/filecoin-project/go-data-transfer/network" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + "github.com/filecoin-project/go-data-transfer/v2/channelmonitor" + dtimpl "github.com/filecoin-project/go-data-transfer/v2/impl" + dtnet "github.com/filecoin-project/go-data-transfer/v2/network" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" @@ -111,7 +111,7 @@ func TestBounceConnectionDealTransferOngoing(t *testing.T) { // do a storage deal storageClientSeenDeal := doStorage(t, bgCtx, sh) - ctxTimeout, canc := context.WithTimeout(bgCtx, 5*time.Second) + ctxTimeout, canc := context.WithCancel(bgCtx) defer canc() // create a retrieval test harness @@ -241,7 +241,7 @@ func TestBounceConnectionDealTransferUnsealing(t *testing.T) { // do a storage deal storageClientSeenDeal := doStorage(t, bgCtx, sh) - ctxTimeout, canc := context.WithTimeout(bgCtx, 5*time.Second) + ctxTimeout, canc := context.WithCancel(bgCtx) defer canc() // create a retrieval test harness diff --git a/retrievalmarket/storage_retrieval_integration_test.go b/retrievalmarket/storage_retrieval_integration_test.go index f0810873..207b60c6 100644 --- a/retrievalmarket/storage_retrieval_integration_test.go +++ b/retrievalmarket/storage_retrieval_integration_test.go @@ -12,15 +12,15 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" "github.com/ipld/go-car" - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" cidlink "github.com/ipld/go-ipld-prime/linking/cid" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin/v8/paych" @@ -281,13 +281,10 @@ func checkRetrieve(t *testing.T, bgCtx context.Context, rh *retrievalHarness, sh Provider: Event: %s Status: %s - TotalSent: %d FundsReceived: %s Message: %s - CurrentInterval: %d - ` - t.Logf(msg, retrievalmarket.ProviderEvents[event], retrievalmarket.DealStatuses[state.Status], state.TotalSent, state.FundsReceived.String(), state.Message, - state.CurrentInterval) += ` + t.Logf(msg, retrievalmarket.ProviderEvents[event], retrievalmarket.DealStatuses[state.Status], state.FundsReceived.String(), state.Message) } }) @@ -506,12 +503,16 @@ func newRetrievalHarnessWithDeps( type fakeDTValidator struct{} -func (v *fakeDTValidator) ValidatePush(isRestart bool, _ datatransfer.ChannelID, sender peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - return nil, nil +func (v *fakeDTValidator) ValidatePush(_ datatransfer.ChannelID, sender peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil } -func (v *fakeDTValidator) ValidatePull(isRestart bool, _ datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - return nil, nil +func (v *fakeDTValidator) ValidatePull(_ datatransfer.ChannelID, receiver peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil +} + +func (v *fakeDTValidator) ValidateRestart(_ datatransfer.ChannelID, channelState datatransfer.ChannelState) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil } func doStorage(t *testing.T, ctx context.Context, sh *testharness.StorageHarness) storagemarket.ClientDeal { diff --git a/retrievalmarket/testing/test_provider_deal_environment.go b/retrievalmarket/testing/test_provider_deal_environment.go index 3d4191dc..c0453452 100644 --- a/retrievalmarket/testing/test_provider_deal_environment.go +++ b/retrievalmarket/testing/test_provider_deal_environment.go @@ -6,22 +6,25 @@ import ( "github.com/ipfs/go-cid" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl" + "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl/providerstates" ) // TestProviderDealEnvironment is a test implementation of ProviderDealEnvironment used // by the provider state machine. type TestProviderDealEnvironment struct { - node rm.RetrievalProviderNode - ResumeDataTransferError error - PrepareBlockstoreError error - TrackTransferError error - UntrackTransferError error - CloseDataTransferError error - DeleteStoreError error + node rm.RetrievalProviderNode + ResumeDataTransferError error + PrepareBlockstoreError error + CloseDataTransferError error + DeleteStoreError error + ReturnedChannelState datatransfer.ChannelState + ChannelStateError error + NewValidationStatus datatransfer.ValidationResult + UpdateValidationStatusError error } // NewTestProviderDealEnvironment returns a new TestProviderDealEnvironment instance @@ -44,14 +47,6 @@ func (te *TestProviderDealEnvironment) PrepareBlockstore(ctx context.Context, de return te.PrepareBlockstoreError } -func (te *TestProviderDealEnvironment) TrackTransfer(deal rm.ProviderDealState) error { - return te.TrackTransferError -} - -func (te *TestProviderDealEnvironment) UntrackTransfer(deal rm.ProviderDealState) error { - return te.UntrackTransferError -} - func (te *TestProviderDealEnvironment) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error { return te.ResumeDataTransferError } @@ -60,7 +55,18 @@ func (te *TestProviderDealEnvironment) CloseDataTransfer(_ context.Context, _ da return te.CloseDataTransferError } +func (te *TestProviderDealEnvironment) ChannelState(_ context.Context, _ datatransfer.ChannelID) (datatransfer.ChannelState, error) { + return te.ReturnedChannelState, te.ChannelStateError +} + +func (te *TestProviderDealEnvironment) UpdateValidationStatus(_ context.Context, _ datatransfer.ChannelID, status datatransfer.ValidationResult) error { + te.NewValidationStatus = status + return te.UpdateValidationStatusError +} + // TrivialTestDecider is a shortest possible DealDecider that accepts all deals var TrivialTestDecider retrievalimpl.DealDecider = func(_ context.Context, _ rm.ProviderDealState) (bool, string, error) { return true, "", nil } + +var _ providerstates.ProviderDealEnvironment = (*TestProviderDealEnvironment)(nil) diff --git a/retrievalmarket/types.go b/retrievalmarket/types.go index 301e7628..7d512140 100644 --- a/retrievalmarket/types.go +++ b/retrievalmarket/types.go @@ -1,20 +1,20 @@ package retrievalmarket import ( - "bytes" + _ "embed" "errors" "fmt" "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/ipld/go-ipld-prime/codec/dagcbor" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" - cbg "github.com/whyrusleeping/cbor-gen" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/ipld/go-ipld-prime/node/bindnode" + bindnoderegistry "github.com/ipld/go-ipld-prime/node/bindnode/registry" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" @@ -24,13 +24,13 @@ import ( //go:generate cbor-gen-for --map-encoding Query QueryResponse DealProposal DealResponse Params QueryParams DealPayment ClientDealState ProviderDealState PaymentInfo RetrievalPeer Ask +//go:embed types.ipldsch +var embedSchema []byte + // QueryProtocolID is the protocol for querying information about retrieval // deal parameters const QueryProtocolID = protocol.ID("/fil/retrieval/qry/1.0.0") -// OldQueryProtocolID is the old query protocol for tuple structs -const OldQueryProtocolID = protocol.ID("/fil/retrieval/qry/0.0.1") - // Unsubscribe is a function that unsubscribes a subscriber for either the // client or the provider type Unsubscribe func() @@ -69,7 +69,7 @@ type ClientDealState struct { } func (deal *ClientDealState) NextInterval() uint64 { - return deal.Params.NextInterval(deal.CurrentInterval) + return deal.Params.nextInterval(deal.CurrentInterval) } // ProviderDealState is the current state of a deal from the point of view @@ -78,23 +78,12 @@ type ProviderDealState struct { DealProposal StoreID uint64 - ChannelID *datatransfer.ChannelID - PieceInfo *piecestore.PieceInfo - Status DealStatus - Receiver peer.ID - TotalSent uint64 - FundsReceived abi.TokenAmount - Message string - CurrentInterval uint64 - LegacyProtocol bool -} - -func (deal *ProviderDealState) IntervalLowerBound() uint64 { - return deal.Params.IntervalLowerBound(deal.CurrentInterval) -} - -func (deal *ProviderDealState) NextInterval() uint64 { - return deal.Params.NextInterval(deal.CurrentInterval) + ChannelID *datatransfer.ChannelID + PieceInfo *piecestore.PieceInfo + Status DealStatus + Receiver peer.ID + FundsReceived abi.TokenAmount + Message string } // Identifier provides a unique id for this provider deal @@ -160,7 +149,7 @@ const ( // for the retrieval deal type QueryParams struct { PieceCID *cid.Cid // optional, query if miner has this cid in this piece. some miners may not be able to respond. - //Selector ipld.Node // optional, query if miner has this cid in this piece. some miners may not be able to respond. + //Selector datamodel.Node // optional, query if miner has this cid in this piece. some miners may not be able to respond. //MaxPricePerByte abi.TokenAmount // optional, tell miner uninterested if more expensive than this //MinPaymentInterval uint64 // optional, tell miner uninterested unless payment interval is greater than this //MinPaymentIntervalIncrease uint64 // optional, tell miner uninterested unless payment interval increase is greater than this @@ -244,7 +233,7 @@ func IsTerminalStatus(status DealStatus) bool { // Params are the parameters requested for a retrieval deal proposal type Params struct { - Selector *cbg.Deferred // V1 + Selector CborGenCompatibleNode // V1 PieceCID *cid.Cid PricePerByte abi.TokenAmount PaymentInterval uint64 // when to request payment @@ -252,15 +241,22 @@ type Params struct { UnsealPrice abi.TokenAmount } +// paramsBindnodeOptions is the bindnode options required to convert custom +// types used by the Param type +var paramsBindnodeOptions = []bindnode.Option{ + CborGenCompatibleNodeBindnodeOption, + TokenAmountBindnodeOption, +} + func (p Params) SelectorSpecified() bool { - return p.Selector != nil && !bytes.Equal(p.Selector.Raw, cbg.CborNull) + return !p.Selector.IsNull() } func (p Params) IntervalLowerBound(currentInterval uint64) uint64 { intervalSize := p.PaymentInterval var lowerBound uint64 var target uint64 - for target < currentInterval { + for target <= currentInterval { lowerBound = target target += intervalSize intervalSize += p.PaymentIntervalIncrease @@ -268,7 +264,62 @@ func (p Params) IntervalLowerBound(currentInterval uint64) uint64 { return lowerBound } -func (p Params) NextInterval(currentInterval uint64) uint64 { +// OutstandingBalance produces the amount owed based on the deal params +// for the given transfer state and funds received +func (p Params) OutstandingBalance(fundsReceived abi.TokenAmount, sent uint64, inFinalization bool) big.Int { + // Check if the payment covers unsealing + if fundsReceived.LessThan(p.UnsealPrice) { + return big.Sub(p.UnsealPrice, fundsReceived) + } + + // if unsealing funds are received and the retrieval is free, proceed + if p.PricePerByte.IsZero() { + return big.Zero() + } + + // Calculate how much payment has been made for transferred data + transferPayment := big.Sub(fundsReceived, p.UnsealPrice) + + // The provider sends data and the client sends payment for the data. + // The provider will send a limited amount of extra data before receiving + // payment. Given the current limit, check if the client has paid enough + // to unlock the next interval. + minimumBytesToPay := p.IntervalLowerBound(sent) + if inFinalization { + // for last payment, we need to get past zero + minimumBytesToPay = sent + } + + // Calculate the minimum required payment + totalPaymentRequired := big.Mul(big.NewInt(int64(minimumBytesToPay)), p.PricePerByte) + + // Calculate payment owed + owed := big.Sub(totalPaymentRequired, transferPayment) + if owed.LessThan(big.Zero()) { + return big.Zero() + } + return owed +} + +// NextInterval produces the maximum data that can be transferred before more +// payment is request +func (p Params) NextInterval(fundsReceived abi.TokenAmount) uint64 { + if p.PricePerByte.NilOrZero() { + return 0 + } + currentInterval := uint64(0) + bytesPaid := fundsReceived + if !p.UnsealPrice.NilOrZero() { + bytesPaid = big.Sub(bytesPaid, p.UnsealPrice) + } + bytesPaid = big.Div(bytesPaid, p.PricePerByte) + if bytesPaid.GreaterThan(big.Zero()) { + currentInterval = bytesPaid.Uint64() + } + return p.nextInterval(currentInterval) +} + +func (p Params) nextInterval(currentInterval uint64) uint64 { intervalSize := p.PaymentInterval var nextInterval uint64 for nextInterval <= currentInterval { @@ -289,20 +340,13 @@ func NewParamsV0(pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIn } // NewParamsV1 generates parameters for a retrieval deal, including a selector -func NewParamsV1(pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, sel ipld.Node, pieceCid *cid.Cid, unsealPrice abi.TokenAmount) (Params, error) { - var buffer bytes.Buffer - +func NewParamsV1(pricePerByte abi.TokenAmount, paymentInterval uint64, paymentIntervalIncrease uint64, sel datamodel.Node, pieceCid *cid.Cid, unsealPrice abi.TokenAmount) (Params, error) { if sel == nil { return Params{}, xerrors.New("selector required for NewParamsV1") } - err := dagcbor.Encode(sel, &buffer) - if err != nil { - return Params{}, xerrors.Errorf("error encoding selector: %w", err) - } - return Params{ - Selector: &cbg.Deferred{Raw: buffer.Bytes()}, + Selector: CborGenCompatibleNode{Node: sel}, PieceCID: pieceCid, PricePerByte: pricePerByte, PaymentInterval: paymentInterval, @@ -325,9 +369,24 @@ type DealProposal struct { Params } -// Type method makes DealProposal usable as a voucher -func (dp *DealProposal) Type() datatransfer.TypeIdentifier { - return "RetrievalDealProposal/1" +// DealProposalType is the DealProposal voucher type +const DealProposalType = datatransfer.TypeIdentifier("RetrievalDealProposal/1") + +// dealProposalBindnodeOptions is the bindnode options required to convert +// custom types used by the DealProposal type; the only custom types involved +// are for Params so we can reuse those options. +var dealProposalBindnodeOptions = paramsBindnodeOptions + +func DealProposalFromNode(node datamodel.Node) (*DealProposal, error) { + if node == nil { + return nil, fmt.Errorf("empty voucher") + } + dpIface, err := BindnodeRegistry.TypeFromNode(node, &DealProposal{}) + if err != nil { + return nil, xerrors.Errorf("invalid DealProposal: %w", err) + } + dp, _ := dpIface.(*DealProposal) // safe to assume type + return dp, nil } // DealProposalUndefined is an undefined deal proposal @@ -344,14 +403,28 @@ type DealResponse struct { Message string } -// Type method makes DealResponse usable as a voucher result -func (dr *DealResponse) Type() datatransfer.TypeIdentifier { - return "RetrievalDealResponse/1" -} +// DealResponseType is the DealResponse usable as a voucher type +const DealResponseType = datatransfer.TypeIdentifier("RetrievalDealResponse/1") + +// dealResponseBindnodeOptions is the bindnode options required to convert custom +// types used by the DealResponse type +var dealResponseBindnodeOptions = []bindnode.Option{TokenAmountBindnodeOption} // DealResponseUndefined is an undefined deal response var DealResponseUndefined = DealResponse{} +func DealResponseFromNode(node datamodel.Node) (*DealResponse, error) { + if node == nil { + return nil, fmt.Errorf("empty voucher") + } + dpIface, err := BindnodeRegistry.TypeFromNode(node, &DealResponse{}) + if err != nil { + return nil, xerrors.Errorf("invalid DealResponse: %w", err) + } + dp, _ := dpIface.(*DealResponse) // safe to assume type + return dp, nil +} + // DealPayment is a payment for an in progress retrieval deal type DealPayment struct { ID DealID @@ -359,14 +432,33 @@ type DealPayment struct { PaymentVoucher *paychtypes.SignedVoucher } -// Type method makes DealPayment usable as a voucher -func (dr *DealPayment) Type() datatransfer.TypeIdentifier { - return "RetrievalDealPayment/1" +// DealPaymentType is the DealPayment voucher type +const DealPaymentType = datatransfer.TypeIdentifier("RetrievalDealPayment/1") + +// dealPaymentBindnodeOptions is the bindnode options required to convert custom +// types used by the DealPayment type +var dealPaymentBindnodeOptions = []bindnode.Option{ + SignatureBindnodeOption, + AddressBindnodeOption, + BigIntBindnodeOption, + TokenAmountBindnodeOption, } // DealPaymentUndefined is an undefined deal payment var DealPaymentUndefined = DealPayment{} +func DealPaymentFromNode(node datamodel.Node) (*DealPayment, error) { + if node == nil { + return nil, fmt.Errorf("empty voucher") + } + dpIface, err := BindnodeRegistry.TypeFromNode(node, &DealPayment{}) + if err != nil { + return nil, xerrors.Errorf("invalid DealPayment: %w", err) + } + dp, _ := dpIface.(*DealPayment) // safe to assume type + return dp, nil +} + var ( // ErrNotFound means a piece was not found during retrieval ErrNotFound = errors.New("not found") @@ -434,3 +526,22 @@ type PricingInput struct { // CurrentAsk is the current configured ask in the ask-store. CurrentAsk Ask } + +var BindnodeRegistry = bindnoderegistry.NewRegistry() + +func init() { + for _, r := range []struct { + typ interface{} + typName string + opts []bindnode.Option + }{ + {(*Params)(nil), "Params", paramsBindnodeOptions}, + {(*DealProposal)(nil), "DealProposal", dealProposalBindnodeOptions}, + {(*DealResponse)(nil), "DealResponse", dealResponseBindnodeOptions}, + {(*DealPayment)(nil), "DealPayment", dealPaymentBindnodeOptions}, + } { + if err := BindnodeRegistry.RegisterType(r.typ, string(embedSchema), r.typName, r.opts...); err != nil { + panic(err.Error()) + } + } +} diff --git a/retrievalmarket/types.ipldsch b/retrievalmarket/types.ipldsch new file mode 100644 index 00000000..d24bf577 --- /dev/null +++ b/retrievalmarket/types.ipldsch @@ -0,0 +1,52 @@ +type Params struct { + Selector nullable Any # CborGenCompatibleNode + PieceCID nullable &Any + PricePerByte Bytes # abi.TokenAmount + PaymentInterval Int + PaymentIntervalIncrease Int + UnsealPrice Bytes # abi.TokenAmount +} + +type DealProposal struct { + PayloadCID &Any + ID Int # DealID + Params Params +} + +type DealResponse struct { + Status Int + ID Int + PaymentOwed Bytes + Message String +} + +type DealPayment struct { + ID Int # DealID + PaymentChannel Bytes # address.Address + PaymentVoucher nullable SignedVoucher +} + +type SignedVoucher struct { + ChannelAddr Bytes # addr.Address + TimeLockMin Int # abi.ChainEpoch + TimeLockMax Int # abi.ChainEpoch + SecretHash Bytes + Extra nullable ModVerifyParams + Lane Int + Nonce Int + Amount Bytes # big.Int + MinSettleHeight Int # abi.ChainEpoch + Merges [Merge] + Signature nullable Bytes # crypto.Signature +} representation tuple + +type ModVerifyParams struct { + Actor Bytes # addr.Address + Method Int # abi.MethodNum + Data Bytes +} representation tuple + +type Merge struct { + Lane Int + Nonce Int +} representation tuple diff --git a/retrievalmarket/types_cbor_gen.go b/retrievalmarket/types_cbor_gen.go index ad6aef03..4dbd7626 100644 --- a/retrievalmarket/types_cbor_gen.go +++ b/retrievalmarket/types_cbor_gen.go @@ -8,11 +8,11 @@ import ( "math" "sort" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" piecestore "github.com/filecoin-project/go-fil-markets/piecestore" paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) @@ -808,7 +808,7 @@ func (t *Params) MarshalCBOR(w io.Writer) error { return err } - // t.Selector (typegen.Deferred) (struct) + // t.Selector (retrievalmarket.CborGenCompatibleNode) (struct) if len("Selector") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Selector\" was too long") } @@ -950,16 +950,15 @@ func (t *Params) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Selector (typegen.Deferred) (struct) + // t.Selector (retrievalmarket.CborGenCompatibleNode) (struct) case "Selector": { - t.Selector = new(cbg.Deferred) - if err := t.Selector.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("failed to read deferred field: %w", err) + return xerrors.Errorf("unmarshaling t.Selector: %w", err) } + } // t.PieceCID (cid.Cid) (struct) case "PieceCID": @@ -2039,7 +2038,7 @@ func (t *ProviderDealState) MarshalCBOR(w io.Writer) error { cw := cbg.NewCborWriter(w) - if _, err := cw.Write([]byte{171}); err != nil { + if _, err := cw.Write([]byte{168}); err != nil { return err } @@ -2146,22 +2145,6 @@ func (t *ProviderDealState) MarshalCBOR(w io.Writer) error { return err } - // t.TotalSent (uint64) (uint64) - if len("TotalSent") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"TotalSent\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TotalSent"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("TotalSent")); err != nil { - return err - } - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TotalSent)); err != nil { - return err - } - // t.FundsReceived (big.Int) (struct) if len("FundsReceived") > cbg.MaxLength { return xerrors.Errorf("Value in field \"FundsReceived\" was too long") @@ -2200,38 +2183,6 @@ func (t *ProviderDealState) MarshalCBOR(w io.Writer) error { if _, err := io.WriteString(w, string(t.Message)); err != nil { return err } - - // t.CurrentInterval (uint64) (uint64) - if len("CurrentInterval") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CurrentInterval\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CurrentInterval"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("CurrentInterval")); err != nil { - return err - } - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.CurrentInterval)); err != nil { - return err - } - - // t.LegacyProtocol (bool) (bool) - if len("LegacyProtocol") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"LegacyProtocol\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LegacyProtocol"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("LegacyProtocol")); err != nil { - return err - } - - if err := cbg.WriteBool(w, t.LegacyProtocol); err != nil { - return err - } return nil } @@ -2364,21 +2315,6 @@ func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) (err error) { t.Receiver = peer.ID(sval) } - // t.TotalSent (uint64) (uint64) - case "TotalSent": - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.TotalSent = uint64(extra) - - } // t.FundsReceived (big.Int) (struct) case "FundsReceived": @@ -2400,39 +2336,6 @@ func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) (err error) { t.Message = string(sval) } - // t.CurrentInterval (uint64) (uint64) - case "CurrentInterval": - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.CurrentInterval = uint64(extra) - - } - // t.LegacyProtocol (bool) (bool) - case "LegacyProtocol": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") - } - switch extra { - case 20: - t.LegacyProtocol = false - case 21: - t.LegacyProtocol = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) - } default: // Field doesn't exist on this type, so ignore it diff --git a/retrievalmarket/types_test.go b/retrievalmarket/types_test.go index 47bd344b..7a289bca 100644 --- a/retrievalmarket/types_test.go +++ b/retrievalmarket/types_test.go @@ -5,10 +5,8 @@ import ( "encoding/json" "testing" - "github.com/ipld/go-ipld-prime/codec/dagcbor" - basicnode "github.com/ipld/go-ipld-prime/node/basic" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/test" + "github.com/libp2p/go-libp2p/core/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -36,11 +34,7 @@ func TestParamsMarshalUnmarshal(t *testing.T) { assert.Equal(t, params, *unmarshalled) - nb := basicnode.Prototype.Any.NewBuilder() - err = dagcbor.Decode(nb, bytes.NewBuffer(unmarshalled.Selector.Raw)) - assert.NoError(t, err) - sel := nb.Build() - assert.Equal(t, sel, allSelector) + assert.Equal(t, unmarshalled.Selector.Node, allSelector) } func TestPricingInputMarshalUnmarshalJSON(t *testing.T) { @@ -88,30 +82,33 @@ func TestParamsIntervalBounds(t *testing.T) { currentInterval: 10, paymentInterval: 10, intervalIncrease: 5, - expLowerBound: 0, + expLowerBound: 10, expNextInterval: 25, // 10 + (10 + 5) }, { currentInterval: 25, paymentInterval: 10, intervalIncrease: 5, - expLowerBound: 10, + expLowerBound: 25, expNextInterval: 45, // 10 + (10 + 5) + (10 + 5 + 5) }, { currentInterval: 45, paymentInterval: 10, intervalIncrease: 5, - expLowerBound: 25, + expLowerBound: 45, expNextInterval: 70, // 10 + (10 + 5) + (10 + 5 + 5) + (10 + 5 + 5 + 5) }} for _, tc := range testCases { t.Run("", func(t *testing.T) { + pricePerByte := abi.NewTokenAmount(1) params := retrievalmarket.Params{ + PricePerByte: pricePerByte, PaymentInterval: tc.paymentInterval, PaymentIntervalIncrease: tc.intervalIncrease, } + currentIntervalFundPrice := big.Mul(pricePerByte, big.NewIntUnsigned(tc.currentInterval)) lowerBound := params.IntervalLowerBound(tc.currentInterval) - nextInterval := params.NextInterval(tc.currentInterval) + nextInterval := params.NextInterval(currentIntervalFundPrice) require.Equal(t, tc.expLowerBound, lowerBound) require.Equal(t, tc.expNextInterval, nextInterval) diff --git a/shared/retrystream.go b/shared/retrystream.go index 485e39eb..34a75d08 100644 --- a/shared/retrystream.go +++ b/shared/retrystream.go @@ -6,9 +6,9 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/jpillora/backoff" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" "golang.org/x/xerrors" ) diff --git a/shared/retrystream_test.go b/shared/retrystream_test.go index f0e92bbf..d18fea66 100644 --- a/shared/retrystream_test.go +++ b/shared/retrystream_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" "github.com/stretchr/testify/require" "golang.org/x/xerrors" ) diff --git a/shared/selectors.go b/shared/selectors.go index 9422d29f..7bd07772 100644 --- a/shared/selectors.go +++ b/shared/selectors.go @@ -1,10 +1,10 @@ package shared import ( - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" ) // Deprecated: AllSelector is a compatibility alias for an entire DAG non-matching-selector. // Use github.com/ipld/go-ipld-prime/traversal/selector/parse.CommonSelector_ExploreAllRecursively instead. -func AllSelector() ipld.Node { return selectorparse.CommonSelector_ExploreAllRecursively } +func AllSelector() datamodel.Node { return selectorparse.CommonSelector_ExploreAllRecursively } diff --git a/shared_testutil/generators.go b/shared_testutil/generators.go index 988dbc78..beaf2f34 100644 --- a/shared_testutil/generators.go +++ b/shared_testutil/generators.go @@ -5,14 +5,14 @@ import ( "testing" "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/test" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/test" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin/v8/market" @@ -27,16 +27,16 @@ import ( // MakeTestSignedVoucher generates a random SignedVoucher that has all non-zero fields func MakeTestSignedVoucher() *paych.SignedVoucher { return &paych.SignedVoucher{ - ChannelAddr: address.TestAddress, - TimeLockMin: abi.ChainEpoch(rand.Int63()), - TimeLockMax: 0, + ChannelAddr: address.TestAddress, + TimeLockMin: abi.ChainEpoch(rand.Int63()), + TimeLockMax: 0, SecretHash: []byte("secret-preimage"), - Extra: MakeTestModVerifyParams(), - Lane: rand.Uint64(), - Nonce: rand.Uint64(), - Amount: MakeTestTokenAmount(), - Merges: []paych.Merge{MakeTestMerge()}, - Signature: MakeTestSignature(), + Extra: MakeTestModVerifyParams(), + Lane: uint64(rand.Uint32()), + Nonce: uint64(rand.Uint32()), + Amount: MakeTestTokenAmount(), + Merges: []paych.Merge{MakeTestMerge()}, + Signature: MakeTestSignature(), } } @@ -52,8 +52,8 @@ func MakeTestModVerifyParams() *paych.ModVerifyParams { // MakeTestMerge generates a random Merge that has all non-zero fields func MakeTestMerge() paych.Merge { return paych.Merge{ - Lane: rand.Uint64(), - Nonce: rand.Uint64(), + Lane: uint64(rand.Uint32()), + Nonce: uint64(rand.Uint32()), } } @@ -84,9 +84,9 @@ func MakeTestQueryResponse() retrievalmarket.QueryResponse { } // MakeTestDealProposal generates a valid, random DealProposal -func MakeTestDealProposal() retrievalmarket.DealProposal { +func MakeTestDealProposal() *retrievalmarket.DealProposal { cid := GenerateCids(1)[0] - return retrievalmarket.DealProposal{ + return &retrievalmarket.DealProposal{ PayloadCID: cid, ID: retrievalmarket.DealID(rand.Uint64()), Params: retrievalmarket.NewParamsV0(MakeTestTokenAmount(), rand.Uint64(), rand.Uint64()), @@ -293,12 +293,16 @@ func RequireGenerateRetrievalPeers(t *testing.T, numPeers int) []retrievalmarket type FakeDTValidator struct{} -func (v *FakeDTValidator) ValidatePush(isRestart bool, _ datatransfer.ChannelID, sender peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - return nil, nil +func (v *FakeDTValidator) ValidatePush(_ datatransfer.ChannelID, sender peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil } -func (v *FakeDTValidator) ValidatePull(isRestart bool, _ datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { - return nil, nil +func (v *FakeDTValidator) ValidatePull(_ datatransfer.ChannelID, receiver peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil +} + +func (v *FakeDTValidator) ValidateRestart(_ datatransfer.ChannelID, channelState datatransfer.ChannelState) (datatransfer.ValidationResult, error) { + return datatransfer.ValidationResult{Accepted: true}, nil } var _ datatransfer.RequestValidator = (*FakeDTValidator)(nil) diff --git a/shared_testutil/mocknet.go b/shared_testutil/mocknet.go index 667b522e..6622de61 100644 --- a/shared_testutil/mocknet.go +++ b/shared_testutil/mocknet.go @@ -17,13 +17,14 @@ import ( "github.com/ipfs/go-merkledag" unixfile "github.com/ipfs/go-unixfs/file" "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/libp2p/go-libp2p-core/host" + "github.com/libp2p/go-libp2p/core/host" mocknet "github.com/libp2p/go-libp2p/p2p/net/mock" "github.com/stretchr/testify/require" "golang.org/x/net/context" - dtnet "github.com/filecoin-project/go-data-transfer/network" + dtnet "github.com/filecoin-project/go-data-transfer/v2/network" "github.com/filecoin-project/go-fil-markets/shared_testutil/unixfs" ) @@ -108,7 +109,7 @@ func NewLibp2pTestData(ctx context.Context, t *testing.T) *Libp2pTestData { // LoadUnixFSFile injects the fixture `src` into the given blockstore from the // fixtures directory. If useSecondNode is true, fixture is injected to the second node; // otherwise the first node gets it -func (ltd *Libp2pTestData) LoadUnixFSFile(t *testing.T, src string, useSecondNode bool) (ipld.Link, string) { +func (ltd *Libp2pTestData) LoadUnixFSFile(t *testing.T, src string, useSecondNode bool) (datamodel.Link, string) { var dagService ipldformat.DAGService if useSecondNode { dagService = ltd.DagService2 @@ -119,7 +120,7 @@ func (ltd *Libp2pTestData) LoadUnixFSFile(t *testing.T, src string, useSecondNod } // LoadUnixFSFileToStore creates a CAR file from the fixture at `src` -func (ltd *Libp2pTestData) LoadUnixFSFileToStore(t *testing.T, src string) (ipld.Link, string) { +func (ltd *Libp2pTestData) LoadUnixFSFileToStore(t *testing.T, src string) (datamodel.Link, string) { dstore := dss.MutexWrap(datastore.NewMapDatastore()) bs := bstore.NewBlockstore(dstore) dagService := merkledag.NewDAGService(blockservice.New(bs, offline.Exchange(bs))) @@ -127,7 +128,7 @@ func (ltd *Libp2pTestData) LoadUnixFSFileToStore(t *testing.T, src string) (ipld return ltd.loadUnixFSFile(t, src, dagService) } -func (ltd *Libp2pTestData) loadUnixFSFile(t *testing.T, src string, dagService ipldformat.DAGService) (ipld.Link, string) { +func (ltd *Libp2pTestData) loadUnixFSFile(t *testing.T, src string, dagService ipldformat.DAGService) (datamodel.Link, string) { f, err := os.Open(src) require.NoError(t, err) @@ -144,7 +145,7 @@ func (ltd *Libp2pTestData) loadUnixFSFile(t *testing.T, src string, dagService i } // VerifyFileTransferred checks that the fixture file was sent from one node to the other. -func (ltd *Libp2pTestData) VerifyFileTransferred(t *testing.T, link ipld.Link, useSecondNode bool, readLen uint64) { +func (ltd *Libp2pTestData) VerifyFileTransferred(t *testing.T, link datamodel.Link, useSecondNode bool, readLen uint64) { var dagService ipldformat.DAGService if useSecondNode { dagService = ltd.DagService2 @@ -156,13 +157,13 @@ func (ltd *Libp2pTestData) VerifyFileTransferred(t *testing.T, link ipld.Link, u // VerifyFileTransferredIntoStore checks that the fixture file was sent from // one node to the other, and stored in the given CAR file -func (ltd *Libp2pTestData) VerifyFileTransferredIntoStore(t *testing.T, link ipld.Link, bs bstore.Blockstore, readLen uint64) { +func (ltd *Libp2pTestData) VerifyFileTransferredIntoStore(t *testing.T, link datamodel.Link, bs bstore.Blockstore, readLen uint64) { bsvc := blockservice.New(bs, offline.Exchange(bs)) dagService := merkledag.NewDAGService(bsvc) ltd.verifyFileTransferred(t, link, dagService, readLen) } -func (ltd *Libp2pTestData) verifyFileTransferred(t *testing.T, link ipld.Link, dagService ipldformat.DAGService, readLen uint64) { +func (ltd *Libp2pTestData) verifyFileTransferred(t *testing.T, link datamodel.Link, dagService ipldformat.DAGService, readLen uint64) { c := link.(cidlink.Link).Cid // load the root of the UnixFS DAG from the new blockstore diff --git a/shared_testutil/startandwait.go b/shared_testutil/startandwait.go index 970ab22d..79cd9d13 100644 --- a/shared_testutil/startandwait.go +++ b/shared_testutil/startandwait.go @@ -6,6 +6,8 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/net/context" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + "github.com/filecoin-project/go-fil-markets/shared" ) @@ -29,3 +31,18 @@ func StartAndWaitForReady(ctx context.Context, t *testing.T, startAndWaitable St require.NoError(t, err) } } + +// StartAndWaitForReadyDT is a utility function to start a go-data-transfer and verify it reaches the ready state +func StartAndWaitForReadyDT(ctx context.Context, t *testing.T, startAndWaitable datatransfer.Manager) { + ready := make(chan error, 1) + startAndWaitable.OnReady(func(err error) { + ready <- err + }) + require.NoError(t, startAndWaitable.Start(ctx)) + select { + case <-ctx.Done(): + t.Fatal("did not finish starting up module") + case err := <-ready: + require.NoError(t, err) + } +} diff --git a/shared_testutil/test_datatransfer.go b/shared_testutil/test_datatransfer.go index 0a031be3..6c9fac96 100644 --- a/shared_testutil/test_datatransfer.go +++ b/shared_testutil/test_datatransfer.go @@ -4,36 +4,28 @@ import ( "context" "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" ) -// RegisteredRevalidator records a voucher type that was registered for revalidations -type RegisteredRevalidator struct { - VoucherType datatransfer.Voucher - Revalidator datatransfer.Revalidator -} - // RegisteredVoucherType records a voucher typed that was registered type RegisteredVoucherType struct { - VoucherType datatransfer.Voucher + VoucherType datatransfer.TypeIdentifier Validator datatransfer.RequestValidator } // RegisteredTransportConfigurer records transport configurer registered for a voucher type type RegisteredTransportConfigurer struct { - VoucherType datatransfer.Voucher + VoucherType datatransfer.TypeIdentifier Configurer datatransfer.TransportConfigurer } // TestDataTransfer is a mock implementation of the data transfer libary // Most of its functions have no effect type TestDataTransfer struct { - RegisteredRevalidators []RegisteredRevalidator RegisteredVoucherTypes []RegisteredVoucherType - RegisteredVoucherResultTypes []datatransfer.VoucherResult RegisteredTransportConfigurers []RegisteredTransportConfigurer Subscribers []datatransfer.Subscriber } @@ -54,31 +46,19 @@ func (tdt *TestDataTransfer) Stop(context.Context) error { } // RegisterVoucherType records the registred voucher type -func (tdt *TestDataTransfer) RegisterVoucherType(voucherType datatransfer.Voucher, validator datatransfer.RequestValidator) error { +func (tdt *TestDataTransfer) RegisterVoucherType(voucherType datatransfer.TypeIdentifier, validator datatransfer.RequestValidator) error { tdt.RegisteredVoucherTypes = append(tdt.RegisteredVoucherTypes, RegisteredVoucherType{voucherType, validator}) return nil } -// RegisterRevalidator records the registred revalidator type -func (tdt *TestDataTransfer) RegisterRevalidator(voucherType datatransfer.Voucher, revalidator datatransfer.Revalidator) error { - tdt.RegisteredRevalidators = append(tdt.RegisteredRevalidators, RegisteredRevalidator{voucherType, revalidator}) - return nil -} - -// RegisterVoucherResultType records the registered result type -func (tdt *TestDataTransfer) RegisterVoucherResultType(resultType datatransfer.VoucherResult) error { - tdt.RegisteredVoucherResultTypes = append(tdt.RegisteredVoucherResultTypes, resultType) - return nil -} - // RegisterTransportConfigurer records the registered transport configurer -func (tdt *TestDataTransfer) RegisterTransportConfigurer(voucherType datatransfer.Voucher, configurer datatransfer.TransportConfigurer) error { +func (tdt *TestDataTransfer) RegisterTransportConfigurer(voucherType datatransfer.TypeIdentifier, configurer datatransfer.TransportConfigurer) error { tdt.RegisteredTransportConfigurers = append(tdt.RegisteredTransportConfigurers, RegisteredTransportConfigurer{voucherType, configurer}) return nil } // OpenPushDataChannel does nothing -func (tdt *TestDataTransfer) OpenPushDataChannel(ctx context.Context, to peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.ChannelID, error) { +func (tdt *TestDataTransfer) OpenPushDataChannel(ctx context.Context, to peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ChannelID, error) { return datatransfer.ChannelID{}, nil } @@ -87,12 +67,22 @@ func (tdt *TestDataTransfer) RestartDataTransferChannel(ctx context.Context, chI } // OpenPullDataChannel does nothing -func (tdt *TestDataTransfer) OpenPullDataChannel(ctx context.Context, to peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.ChannelID, error) { +func (tdt *TestDataTransfer) OpenPullDataChannel(ctx context.Context, to peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ChannelID, error) { return datatransfer.ChannelID{}, nil } // SendVoucher does nothing -func (tdt *TestDataTransfer) SendVoucher(ctx context.Context, chid datatransfer.ChannelID, voucher datatransfer.Voucher) error { +func (tdt *TestDataTransfer) SendVoucher(ctx context.Context, chid datatransfer.ChannelID, voucher datatransfer.TypedVoucher) error { + return nil +} + +// SendVoucherResult does nothing +func (tdt *TestDataTransfer) SendVoucherResult(ctx context.Context, chid datatransfer.ChannelID, voucherResult datatransfer.TypedVoucher) error { + return nil +} + +// UpdateValidationStatus does nothing +func (tdt *TestDataTransfer) UpdateValidationStatus(ctx context.Context, chid datatransfer.ChannelID, result datatransfer.ValidationResult) error { return nil } diff --git a/shared_testutil/test_ipld_tree.go b/shared_testutil/test_ipld_tree.go index eb59f6a4..ce92fd5a 100644 --- a/shared_testutil/test_ipld_tree.go +++ b/shared_testutil/test_ipld_tree.go @@ -13,6 +13,7 @@ import ( // to register multicodec _ "github.com/ipld/go-ipld-prime/codec/dagjson" + "github.com/ipld/go-ipld-prime/datamodel" "github.com/ipld/go-ipld-prime/fluent" cidlink "github.com/ipld/go-ipld-prime/linking/cid" basicnode "github.com/ipld/go-ipld-prime/node/basic" @@ -22,28 +23,28 @@ import ( // TestIPLDTree is a set of IPLD Data that forms a tree spread across some blocks // with a serialized in memory representation type TestIPLDTree struct { - Storage map[ipld.Link][]byte - LeafAlpha ipld.Node - LeafAlphaLnk ipld.Link + Storage map[datamodel.Link][]byte + LeafAlpha datamodel.Node + LeafAlphaLnk datamodel.Link LeafAlphaBlock blocks.Block - LeafBeta ipld.Node - LeafBetaLnk ipld.Link + LeafBeta datamodel.Node + LeafBetaLnk datamodel.Link LeafBetaBlock blocks.Block - MiddleMapNode ipld.Node - MiddleMapNodeLnk ipld.Link + MiddleMapNode datamodel.Node + MiddleMapNodeLnk datamodel.Link MiddleMapBlock blocks.Block - MiddleListNode ipld.Node - MiddleListNodeLnk ipld.Link + MiddleListNode datamodel.Node + MiddleListNodeLnk datamodel.Link MiddleListBlock blocks.Block - RootNode ipld.Node - RootNodeLnk ipld.Link + RootNode datamodel.Node + RootNodeLnk datamodel.Link RootBlock blocks.Block } // NewTestIPLDTree returns a fake tree of nodes, spread across 5 blocks func NewTestIPLDTree() TestIPLDTree { - var storage = make(map[ipld.Link][]byte) - encode := func(n ipld.Node) (ipld.Node, ipld.Link) { + var storage = make(map[datamodel.Link][]byte) + encode := func(n datamodel.Node) (datamodel.Node, datamodel.Link) { lb := cidlink.LinkPrototype{Prefix: cid.Prefix{ Version: 1, Codec: 0x0129, @@ -53,7 +54,7 @@ func NewTestIPLDTree() TestIPLDTree { lsys := cidlink.DefaultLinkSystem() lsys.StorageWriteOpener = func(ipld.LinkContext) (io.Writer, ipld.BlockWriteCommitter, error) { buf := bytes.Buffer{} - return &buf, func(lnk ipld.Link) error { + return &buf, func(lnk datamodel.Link) error { storage[lnk] = buf.Bytes() return nil }, nil diff --git a/shared_testutil/test_network_types.go b/shared_testutil/test_network_types.go index 89d0de03..f0e86aaa 100644 --- a/shared_testutil/test_network_types.go +++ b/shared_testutil/test_network_types.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/ipfs/go-cid" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" ma "github.com/multiformats/go-multiaddr" "github.com/stretchr/testify/require" diff --git a/shared_testutil/testchannel.go b/shared_testutil/testchannel.go index 5a1d2df3..4a8a985d 100644 --- a/shared_testutil/testchannel.go +++ b/shared_testutil/testchannel.go @@ -2,19 +2,20 @@ package shared_testutil import ( "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/ipld/go-ipld-prime/node/basicnode" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/exp/rand" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" ) // TestChannelParams are params for a new test data transfer channel type TestChannelParams struct { TransferID datatransfer.TransferID BaseCID cid.Cid - Selector ipld.Node + Selector datamodel.Node SelfPeer peer.ID Sender peer.ID Recipient peer.ID @@ -25,8 +26,8 @@ type TestChannelParams struct { Received uint64 Queued uint64 Status datatransfer.Status - Vouchers []datatransfer.Voucher - VoucherResults []datatransfer.VoucherResult + Vouchers []datatransfer.TypedVoucher + VoucherResults []datatransfer.TypedVoucher ReceivedCids []cid.Cid } @@ -35,7 +36,7 @@ type TestChannel struct { selfPeer peer.ID transferID datatransfer.TransferID baseCID cid.Cid - selector ipld.Node + selector datamodel.Node sender peer.ID recipient peer.ID totalSize uint64 @@ -45,36 +46,34 @@ type TestChannel struct { received uint64 queued uint64 status datatransfer.Status - vouchers []datatransfer.Voucher - voucherResults []datatransfer.VoucherResult + vouchers []datatransfer.TypedVoucher + voucherResults []datatransfer.TypedVoucher receivedCids []cid.Cid } -// FakeDTType is a fake voucher type -type FakeDTType struct{} - -// Type returns an identifier -func (f FakeDTType) Type() datatransfer.TypeIdentifier { return "Fake" } - // NewTestChannel makes a test channel with default params plus non-zero // values for TestChannelParams func NewTestChannel(params TestChannelParams) datatransfer.ChannelState { peers := GeneratePeers(2) tc := &TestChannel{ - selfPeer: peers[0], - transferID: datatransfer.TransferID(rand.Uint64()), - baseCID: GenerateCids(1)[0], - selector: selectorparse.CommonSelector_ExploreAllRecursively, - sender: peers[0], - recipient: peers[1], - totalSize: rand.Uint64(), - isPull: params.IsPull, - status: params.Status, - sent: rand.Uint64(), - received: rand.Uint64(), - queued: rand.Uint64(), - vouchers: []datatransfer.Voucher{FakeDTType{}}, - voucherResults: []datatransfer.VoucherResult{FakeDTType{}}, + selfPeer: peers[0], + transferID: datatransfer.TransferID(rand.Uint64()), + baseCID: GenerateCids(1)[0], + selector: selectorparse.CommonSelector_ExploreAllRecursively, + sender: peers[0], + recipient: peers[1], + totalSize: rand.Uint64(), + isPull: params.IsPull, + status: params.Status, + sent: params.Sent, + received: params.Received, + queued: params.Queued, + vouchers: []datatransfer.TypedVoucher{ + {Voucher: basicnode.NewString("Fake DT Voucher"), Type: datatransfer.TypeIdentifier("Fake")}, + }, + voucherResults: []datatransfer.TypedVoucher{ + {Voucher: basicnode.NewString("Fake DT Voucher"), Type: datatransfer.TypeIdentifier("Fake")}, + }, } tc.receivedCids = params.ReceivedCids @@ -110,15 +109,6 @@ func NewTestChannel(params TestChannelParams) datatransfer.ChannelState { if params.VoucherResults != nil { tc.voucherResults = params.VoucherResults } - if params.Sent != 0 { - tc.sent = params.Sent - } - if params.Received != 0 { - tc.received = params.Received - } - if params.Queued != 0 { - tc.queued = params.Queued - } return tc } @@ -142,7 +132,7 @@ func (tc *TestChannel) BaseCID() cid.Cid { // Selector returns the IPLD selector for this data transfer (represented as // an IPLD node) -func (tc *TestChannel) Selector() ipld.Node { +func (tc *TestChannel) Selector() datamodel.Node { return tc.selector } @@ -165,7 +155,7 @@ func (tc *TestChannel) SentCidsTotal() int64 { } // Voucher returns the voucher for this data transfer -func (tc *TestChannel) Voucher() datatransfer.Voucher { +func (tc *TestChannel) Voucher() datatransfer.TypedVoucher { return tc.vouchers[0] } @@ -218,6 +208,10 @@ func (tc *TestChannel) OtherParty(thisParty peer.ID) peer.ID { } return tc.sender } +func (tc *TestChannel) BothPaused() bool { return false } +func (tc *TestChannel) ResponderPaused() bool { return false } +func (tc *TestChannel) InitiatorPaused() bool { return false } +func (tc *TestChannel) SelfPaused() bool { return false } // Status is the current status of this channel func (tc *TestChannel) Status() datatransfer.Status { @@ -245,25 +239,33 @@ func (tc *TestChannel) Message() string { } // Vouchers returns all vouchers sent on this channel -func (tc *TestChannel) Vouchers() []datatransfer.Voucher { +func (tc *TestChannel) Vouchers() []datatransfer.TypedVoucher { return tc.vouchers } // VoucherResults are results of vouchers sent on the channel -func (tc *TestChannel) VoucherResults() []datatransfer.VoucherResult { +func (tc *TestChannel) VoucherResults() []datatransfer.TypedVoucher { return tc.voucherResults } // LastVoucher returns the last voucher sent on the channel -func (tc *TestChannel) LastVoucher() datatransfer.Voucher { +func (tc *TestChannel) LastVoucher() datatransfer.TypedVoucher { return tc.vouchers[len(tc.vouchers)-1] } // LastVoucherResult returns the last voucher result sent on the channel -func (tc *TestChannel) LastVoucherResult() datatransfer.VoucherResult { +func (tc *TestChannel) LastVoucherResult() datatransfer.TypedVoucher { return tc.voucherResults[len(tc.voucherResults)-1] } func (tc *TestChannel) Stages() *datatransfer.ChannelStages { return nil } + +func (tc *TestChannel) DataLimit() uint64 { + return 0 +} + +func (tc *TestChannel) RequiresFinalization() bool { + return false +} diff --git a/shared_testutil/testutil.go b/shared_testutil/testutil.go index 41a4daf3..5047cc3d 100644 --- a/shared_testutil/testutil.go +++ b/shared_testutil/testutil.go @@ -12,7 +12,7 @@ import ( "github.com/ipfs/go-datastore/namespace" blocksutil "github.com/ipfs/go-ipfs-blocksutil" "github.com/jbenet/go-random" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -27,7 +27,7 @@ import ( var blockGenerator = blocksutil.NewBlockGenerator() -//var prioritySeq int +// var prioritySeq int var seedSeq int64 // RandomBytes returns a byte array of the given size with random values. diff --git a/storagemarket/impl/client.go b/storagemarket/impl/client.go index 933dc9a7..4f9f08a3 100644 --- a/storagemarket/impl/client.go +++ b/storagemarket/impl/client.go @@ -14,7 +14,7 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" versioning "github.com/filecoin-project/go-ds-versioning/pkg" versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" "github.com/filecoin-project/go-state-types/abi" @@ -125,12 +125,12 @@ func NewClient( // register a data transfer event handler -- this will send events to the state machines based on DT events c.unsubDataTransfer = dataTransfer.SubscribeToEvents(dtutils.ClientDataTransferSubscriber(c.statemachines)) - err = dataTransfer.RegisterVoucherType(&requestvalidation.StorageDataTransferVoucher{}, requestvalidation.NewUnifiedRequestValidator(nil, &clientPullDeals{c})) + err = dataTransfer.RegisterVoucherType(requestvalidation.StorageDataTransferVoucherType, requestvalidation.NewUnifiedRequestValidator(nil, &clientPullDeals{c})) if err != nil { return nil, err } - err = dataTransfer.RegisterTransportConfigurer(&requestvalidation.StorageDataTransferVoucher{}, dtutils.TransportConfigurer(&clientStoreGetter{c})) + err = dataTransfer.RegisterTransportConfigurer(requestvalidation.StorageDataTransferVoucherType, dtutils.TransportConfigurer(&clientStoreGetter{c})) if err != nil { return nil, err } diff --git a/storagemarket/impl/client_environments.go b/storagemarket/impl/client_environments.go index 11094acb..eeb1e97e 100644 --- a/storagemarket/impl/client_environments.go +++ b/storagemarket/impl/client_environments.go @@ -6,11 +6,11 @@ import ( "github.com/ipfs/go-cid" bstore "github.com/ipfs/go-ipfs-blockstore" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-fil-markets/storagemarket/network" @@ -36,7 +36,7 @@ func (c *clientDealEnvironment) CleanBlockstore(payloadCid cid.Cid) error { return c.c.bstores.Done(payloadCid) } -func (c *clientDealEnvironment) StartDataTransfer(ctx context.Context, to peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.ChannelID, +func (c *clientDealEnvironment) StartDataTransfer(ctx context.Context, to peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ChannelID, error) { chid, err := c.c.dataTransfer.OpenPushDataChannel(ctx, to, voucher, baseCid, selector) return chid, err diff --git a/storagemarket/impl/client_test.go b/storagemarket/impl/client_test.go index 3b990c4e..651ea2e4 100644 --- a/storagemarket/impl/client_test.go +++ b/storagemarket/impl/client_test.go @@ -9,7 +9,7 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" cbg "github.com/whyrusleeping/cbor-gen" diff --git a/storagemarket/impl/clientstates/client_fsm.go b/storagemarket/impl/clientstates/client_fsm.go index 39aeacb0..52a7a55e 100644 --- a/storagemarket/impl/clientstates/client_fsm.go +++ b/storagemarket/impl/clientstates/client_fsm.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/go-cid" "golang.org/x/xerrors" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" diff --git a/storagemarket/impl/clientstates/client_states.go b/storagemarket/impl/clientstates/client_states.go index ce4667e0..de176136 100644 --- a/storagemarket/impl/clientstates/client_states.go +++ b/storagemarket/impl/clientstates/client_states.go @@ -6,12 +6,12 @@ import ( "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" - "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/datamodel" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-statemachine/fsm" @@ -35,7 +35,7 @@ type ClientDealEnvironment interface { CleanBlockstore(rootCid cid.Cid) error Node() storagemarket.StorageClientNode NewDealStream(ctx context.Context, p peer.ID) (network.StorageDealStream, error) - StartDataTransfer(ctx context.Context, to peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.ChannelID, error) + StartDataTransfer(ctx context.Context, to peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ChannelID, error) RestartDataTransfer(ctx context.Context, chid datatransfer.ChannelID) error GetProviderDealState(ctx context.Context, proposalCid cid.Cid) (*storagemarket.ProviderDealState, error) PollingInterval() time.Duration @@ -159,11 +159,14 @@ func InitiateDataTransfer(ctx fsm.Context, environment ClientDealEnvironment, de log.Infof("sending data for a deal %s", deal.ProposalCid) + voucher := requestvalidation.StorageDataTransferVoucher{Proposal: deal.ProposalCid} + node := requestvalidation.BindnodeRegistry.TypeToNode(&voucher) + // initiate a push data transfer. This will complete asynchronously and the // completion of the data transfer will trigger a change in deal state _, err := environment.StartDataTransfer(ctx.Context(), deal.Miner, - &requestvalidation.StorageDataTransferVoucher{Proposal: deal.ProposalCid}, + datatransfer.TypedVoucher{Voucher: node, Type: requestvalidation.StorageDataTransferVoucherType}, deal.DataRef.Root, selectorparse.CommonSelector_ExploreAllRecursively, ) diff --git a/storagemarket/impl/clientstates/client_states_test.go b/storagemarket/impl/clientstates/client_states_test.go index e3c99943..69e86646 100644 --- a/storagemarket/impl/clientstates/client_states_test.go +++ b/storagemarket/impl/clientstates/client_states_test.go @@ -7,14 +7,14 @@ import ( "time" "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin/v8/market" "github.com/filecoin-project/go-state-types/exitcode" @@ -729,16 +729,16 @@ type fakeEnvironment struct { type dataTransferParams struct { to peer.ID - voucher datatransfer.Voucher + voucher datatransfer.TypedVoucher baseCid cid.Cid - selector ipld.Node + selector datamodel.Node } type restartDataTransferParams struct { channelId datatransfer.ChannelID } -func (fe *fakeEnvironment) StartDataTransfer(_ context.Context, to peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.ChannelID, error) { +func (fe *fakeEnvironment) StartDataTransfer(_ context.Context, to peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ChannelID, error) { fe.startDataTransferCalls = append(fe.startDataTransferCalls, dataTransferParams{ to: to, voucher: voucher, diff --git a/storagemarket/impl/dtutils/dtutils.go b/storagemarket/impl/dtutils/dtutils.go index ed4b0b17..f7cab3c5 100644 --- a/storagemarket/impl/dtutils/dtutils.go +++ b/storagemarket/impl/dtutils/dtutils.go @@ -11,7 +11,7 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/ipld/go-ipld-prime" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-statemachine/fsm" "github.com/filecoin-project/go-fil-markets/storagemarket" @@ -32,13 +32,20 @@ type EventReceiver interface { // event or moving to error if a data transfer error occurs func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { return func(event datatransfer.Event, channelState datatransfer.ChannelState) { - voucher, ok := channelState.Voucher().(*requestvalidation.StorageDataTransferVoucher) + node := channelState.Voucher() + if node.Voucher == nil { + log.Debugw("ignoring data-transfer event as it's not storage related", "event", datatransfer.Events[event.Code], "channelID", + channelState.ChannelID()) + return + } + voucherIface, err := requestvalidation.BindnodeRegistry.TypeFromNode(node.Voucher, &requestvalidation.StorageDataTransferVoucher{}) // if this event is for a transfer not related to storage, ignore - if !ok { + if err != nil { log.Debugw("ignoring data-transfer event as it's not storage related", "event", datatransfer.Events[event.Code], "channelID", channelState.ChannelID()) return } + voucher, _ := voucherIface.(*requestvalidation.StorageDataTransferVoucher) // safe to assume type log.Debugw("processing storage provider dt event", "event", datatransfer.Events[event.Code], "proposalCid", voucher.Proposal, "channelID", channelState.ChannelID(), "channelState", datatransfer.Statuses[channelState.Status()]) @@ -47,12 +54,13 @@ func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber err := deals.Send(voucher.Proposal, storagemarket.ProviderEventDataTransferCompleted) if err != nil { log.Errorf("processing dt event: %s", err) + return } } // Translate from data transfer events to provider FSM events // Note: We ignore data transfer progress events (they do not affect deal state) - err := func() error { + err = func() error { switch event.Code { case datatransfer.Cancel: return deals.Send(voucher.Proposal, storagemarket.ProviderEventDataTransferCancelled) @@ -81,11 +89,21 @@ func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber // an event to the appropriate state machine func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { return func(event datatransfer.Event, channelState datatransfer.ChannelState) { - voucher, ok := channelState.Voucher().(*requestvalidation.StorageDataTransferVoucher) + // TODO: are these log messages valid for Client? + node := channelState.Voucher() + if node.Voucher == nil { + log.Debugw("ignoring data-transfer event as it's not storage related", "event", datatransfer.Events[event.Code], "channelID", + channelState.ChannelID()) + return + } + voucherIface, err := requestvalidation.BindnodeRegistry.TypeFromNode(node.Voucher, &requestvalidation.StorageDataTransferVoucher{}) // if this event is for a transfer not related to storage, ignore - if !ok { + if err != nil { + log.Debugw("ignoring data-transfer event as it's not storage related", "event", datatransfer.Events[event.Code], "channelID", + channelState.ChannelID()) return } + voucher, _ := voucherIface.(*requestvalidation.StorageDataTransferVoucher) // safe to assume type // Note: We ignore data transfer progress events (they do not affect deal state) log.Debugw("processing storage client dt event", "event", datatransfer.Events[event.Code], "proposalCid", voucher.Proposal, "channelID", @@ -95,10 +113,11 @@ func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { err := deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferComplete) if err != nil { log.Errorf("processing dt event: %s", err) + return } } - err := func() error { + err = func() error { switch event.Code { case datatransfer.Cancel: return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferCancelled) @@ -106,9 +125,9 @@ func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber { return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferRestarted, channelState.ChannelID()) case datatransfer.Disconnected: return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferStalled) - case datatransfer.TransferRequestQueued: - return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferQueued, channelState.ChannelID()) case datatransfer.Accept: + return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferQueued, channelState.ChannelID()) + case datatransfer.TransferInitiated: return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferInitiated, channelState.ChannelID()) case datatransfer.Error: return deals.Send(voucher.Proposal, storagemarket.ClientEventDataTransferFailed, fmt.Errorf("deal data transfer failed: %s", event.Message)) @@ -136,11 +155,18 @@ type StoreConfigurableTransport interface { // TransportConfigurer configurers the graphsync transport to use a custom blockstore per deal func TransportConfigurer(storeGetter StoreGetter) datatransfer.TransportConfigurer { - return func(channelID datatransfer.ChannelID, voucher datatransfer.Voucher, transport datatransfer.Transport) { - storageVoucher, ok := voucher.(*requestvalidation.StorageDataTransferVoucher) - if !ok { + return func(channelID datatransfer.ChannelID, voucher datatransfer.TypedVoucher, transport datatransfer.Transport) { + if voucher.Voucher == nil { + log.Errorf("attempting to configure data store, empty voucher") + return + } + voucherIface, err := requestvalidation.BindnodeRegistry.TypeFromNode(voucher.Voucher, &requestvalidation.StorageDataTransferVoucher{}) + // if this event is for a transfer not related to storage, ignore + if err != nil { + log.Errorf("attempting to configure data store, bad voucher: %s", err) return } + storageVoucher, _ := voucherIface.(*requestvalidation.StorageDataTransferVoucher) // safe to assume type gsTransport, ok := transport.(StoreConfigurableTransport) if !ok { return diff --git a/storagemarket/impl/dtutils/dtutils_test.go b/storagemarket/impl/dtutils/dtutils_test.go index cdd5dacb..02675f6e 100644 --- a/storagemarket/impl/dtutils/dtutils_test.go +++ b/storagemarket/impl/dtutils/dtutils_test.go @@ -9,10 +9,12 @@ import ( ds "github.com/ipfs/go-datastore" bs "github.com/ipfs/go-ipfs-blockstore" "github.com/ipld/go-ipld-prime" - peer "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/ipld/go-ipld-prime/node/basicnode" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-statemachine/fsm" "github.com/filecoin-project/go-fil-markets/shared_testutil" @@ -21,6 +23,14 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket/impl/requestvalidation" ) +func storageDataTransferVoucher(t *testing.T, proposalCid cid.Cid) datatransfer.TypedVoucher { + sdtv := requestvalidation.StorageDataTransferVoucher{ + Proposal: proposalCid, + } + node := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + return datatransfer.TypedVoucher{Voucher: node, Type: requestvalidation.StorageDataTransferVoucherType} +} + func TestProviderDataTransferSubscriber(t *testing.T) { ps := shared_testutil.GeneratePeers(2) init := ps[0] @@ -32,85 +42,71 @@ func TestProviderDataTransferSubscriber(t *testing.T) { message string status datatransfer.Status called bool - voucher datatransfer.Voucher + voucher datatransfer.TypedVoucher expectedID interface{} expectedEvent fsm.EventName expectedArgs []interface{} }{ "not a storage voucher": { called: false, - voucher: nil, + voucher: datatransfer.TypedVoucher{Voucher: basicnode.NewString("Nope"), Type: datatransfer.TypeIdentifier("Nope")}, }, "open event": { - code: datatransfer.Open, - status: datatransfer.Requested, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Open, + status: datatransfer.Requested, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ProviderEventDataTransferInitiated, expectedArgs: []interface{}{datatransfer.ChannelID{Initiator: init, Responder: resp, ID: tid}}, }, "restart event": { - code: datatransfer.Restart, - status: datatransfer.Ongoing, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Restart, + status: datatransfer.Ongoing, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ProviderEventDataTransferRestarted, expectedArgs: []interface{}{datatransfer.ChannelID{Initiator: init, Responder: resp, ID: tid}}, }, "disconnected event": { - code: datatransfer.Disconnected, - status: datatransfer.Ongoing, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Disconnected, + status: datatransfer.Ongoing, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ProviderEventDataTransferStalled, }, "completion status": { - code: datatransfer.Complete, - status: datatransfer.Completed, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Complete, + status: datatransfer.Completed, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ProviderEventDataTransferCompleted, }, "data received": { - code: datatransfer.DataReceived, - status: datatransfer.Ongoing, - called: false, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.DataReceived, + status: datatransfer.Ongoing, + called: false, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, }, "error event": { - code: datatransfer.Error, - message: "something went wrong", - status: datatransfer.Failed, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Error, + message: "something went wrong", + status: datatransfer.Failed, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ProviderEventDataTransferFailed, expectedArgs: []interface{}{errors.New("deal data transfer failed: something went wrong")}, }, "other event": { - code: datatransfer.DataSent, - status: datatransfer.Ongoing, - called: false, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.DataSent, + status: datatransfer.Ongoing, + called: false, + voucher: storageDataTransferVoucher(t, expectedProposalCID), }, } for test, data := range tests { @@ -118,7 +114,7 @@ func TestProviderDataTransferSubscriber(t *testing.T) { fdg := &fakeDealGroup{} subscriber := dtutils.ProviderDataTransferSubscriber(fdg) subscriber(datatransfer.Event{Code: data.code, Message: data.message}, shared_testutil.NewTestChannel( - shared_testutil.TestChannelParams{Vouchers: []datatransfer.Voucher{data.voucher}, Status: data.status, + shared_testutil.TestChannelParams{Vouchers: []datatransfer.TypedVoucher{data.voucher}, Status: data.status, Sender: init, Recipient: resp, TransferID: tid, IsPull: false}, )) if data.called { @@ -145,76 +141,73 @@ func TestClientDataTransferSubscriber(t *testing.T) { message string status datatransfer.Status called bool - voucher datatransfer.Voucher + voucher datatransfer.TypedVoucher expectedID interface{} expectedEvent fsm.EventName expectedArgs []interface{} }{ "not a storage voucher": { called: false, - voucher: nil, + voucher: datatransfer.TypedVoucher{Voucher: basicnode.NewString("Nope"), Type: datatransfer.TypeIdentifier("Nope")}, }, "completion event": { - code: datatransfer.Complete, - status: datatransfer.Completed, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Complete, + status: datatransfer.Completed, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ClientEventDataTransferComplete, }, "restart event": { - code: datatransfer.Restart, - status: datatransfer.Ongoing, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Restart, + status: datatransfer.Ongoing, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ClientEventDataTransferRestarted, expectedArgs: []interface{}{datatransfer.ChannelID{Initiator: init, Responder: resp, ID: tid}}, }, "disconnected event": { - code: datatransfer.Disconnected, - status: datatransfer.Ongoing, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Disconnected, + status: datatransfer.Ongoing, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ClientEventDataTransferStalled, }, "accept event": { - code: datatransfer.Accept, - status: datatransfer.Requested, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Accept, + status: datatransfer.Queued, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), + expectedID: expectedProposalCID, + expectedEvent: storagemarket.ClientEventDataTransferQueued, + expectedArgs: []interface{}{datatransfer.ChannelID{Initiator: init, Responder: resp, ID: tid}}, + }, + "transfer initiated event": { + code: datatransfer.TransferInitiated, + status: datatransfer.Ongoing, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ClientEventDataTransferInitiated, expectedArgs: []interface{}{datatransfer.ChannelID{Initiator: init, Responder: resp, ID: tid}}, }, "error event": { - code: datatransfer.Error, - message: "something went wrong", - status: datatransfer.Failed, - called: true, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.Error, + message: "something went wrong", + status: datatransfer.Failed, + called: true, + voucher: storageDataTransferVoucher(t, expectedProposalCID), expectedID: expectedProposalCID, expectedEvent: storagemarket.ClientEventDataTransferFailed, expectedArgs: []interface{}{errors.New("deal data transfer failed: something went wrong")}, }, "other event": { - code: datatransfer.DataReceived, - status: datatransfer.Ongoing, - called: false, - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + code: datatransfer.DataReceived, + status: datatransfer.Ongoing, + called: false, + voucher: storageDataTransferVoucher(t, expectedProposalCID), }, } @@ -223,7 +216,7 @@ func TestClientDataTransferSubscriber(t *testing.T) { fdg := &fakeDealGroup{} subscriber := dtutils.ClientDataTransferSubscriber(fdg) subscriber(datatransfer.Event{Code: data.code, Message: data.message}, shared_testutil.NewTestChannel( - shared_testutil.TestChannelParams{Vouchers: []datatransfer.Voucher{data.voucher}, Status: data.status, + shared_testutil.TestChannelParams{Vouchers: []datatransfer.TypedVoucher{data.voucher}, Status: data.status, Sender: init, Recipient: resp, TransferID: tid, IsPull: false}, )) if data.called { @@ -243,7 +236,7 @@ func TestTransportConfigurer(t *testing.T) { expectedChannelID := shared_testutil.MakeTestChannelID() testCases := map[string]struct { - voucher datatransfer.Voucher + voucher datatransfer.TypedVoucher transport datatransfer.Transport returnedStore bs.Blockstore returnedStoreErr error @@ -251,20 +244,16 @@ func TestTransportConfigurer(t *testing.T) { useStoreCalled bool }{ "non-storage voucher": { - voucher: nil, + voucher: datatransfer.TypedVoucher{Voucher: basicnode.NewString("Nope"), Type: datatransfer.TypeIdentifier("Nope")}, getterCalled: false, }, "non-configurable transport": { - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + voucher: storageDataTransferVoucher(t, expectedProposalCID), transport: &fakeTransport{}, getterCalled: false, }, "store getter errors": { - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + voucher: storageDataTransferVoucher(t, expectedProposalCID), transport: &fakeGsTransport{Transport: &fakeTransport{}}, getterCalled: true, useStoreCalled: false, @@ -272,9 +261,7 @@ func TestTransportConfigurer(t *testing.T) { returnedStoreErr: errors.New("something went wrong"), }, "store getter succeeds": { - voucher: &requestvalidation.StorageDataTransferVoucher{ - Proposal: expectedProposalCID, - }, + voucher: storageDataTransferVoucher(t, expectedProposalCID), transport: &fakeGsTransport{Transport: &fakeTransport{}}, getterCalled: true, useStoreCalled: true, @@ -336,7 +323,7 @@ func (fsg *fakeStoreGetter) Get(proposalCid cid.Cid) (bs.Blockstore, error) { type fakeTransport struct{} -func (ft *fakeTransport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, root ipld.Link, stor ipld.Node, channel datatransfer.ChannelState, msg datatransfer.Message) error { +func (ft *fakeTransport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, root datamodel.Link, stor datamodel.Node, channel datatransfer.ChannelState, msg datatransfer.Message) error { return nil } diff --git a/storagemarket/impl/ipld_compat_test.go b/storagemarket/impl/ipld_compat_test.go new file mode 100644 index 00000000..182f70b1 --- /dev/null +++ b/storagemarket/impl/ipld_compat_test.go @@ -0,0 +1,64 @@ +package storageimpl_test + +// TODO(rvagg): this is a transitional package to test compatibility between +// cbor-gen and bindnode - it can be removed if/when cbor-gen is also removed + +import ( + "bytes" + "fmt" + "testing" + + "github.com/ipfs/go-cid" + "github.com/ipld/go-ipld-prime/codec/dagcbor" + "github.com/ipld/go-ipld-prime/node/basicnode" + "github.com/ipld/go-ipld-prime/schema" + "github.com/stretchr/testify/assert" + + "github.com/filecoin-project/go-fil-markets/storagemarket/impl/requestvalidation" +) + +func TestIpldCompat_StorageDataTransferVoucher(t *testing.T) { + acid, err := cid.Decode("bafy2bzaceashdsqgbnisdg76gdhupvkpop4br5rs3veuy4whuxagnoco6px6e") + assert.Nil(t, err) + + for _, sdtv := range []requestvalidation.StorageDataTransferVoucher{ + {Proposal: acid}, + // {}, - we can't test this because cbor-gen generates an invalid byte repr for empty CID + } { + t.Run(fmt.Sprintf("with Proposal: %s", sdtv.Proposal), func(t *testing.T) { + // encode the StorageDataTransferVoucher with cbor-gen to bytes + var originalBuf bytes.Buffer + sdtv.MarshalCBOR(&originalBuf) + originalBytes := originalBuf.Bytes() + + // decode the bytes to StorageDataTransferVoucher with bindnode + nb := basicnode.Prototype.Any.NewBuilder() + dagcbor.Decode(nb, &originalBuf) + node := nb.Build() + sdtvBindnodeIface, err := requestvalidation.BindnodeRegistry.TypeFromNode(node, &requestvalidation.StorageDataTransferVoucher{}) + assert.Nil(t, err) + sdtvBindnode, ok := sdtvBindnodeIface.(*requestvalidation.StorageDataTransferVoucher) + assert.True(t, ok) + + // compare objects + assert.Equal(t, sdtv.Proposal, sdtvBindnode.Proposal) + + // encode the new StorageDataTransferVoucher with bindnode to bytes + node = requestvalidation.BindnodeRegistry.TypeToNode(sdtvBindnode) + var bindnodeBuf bytes.Buffer + dagcbor.Encode(node.(schema.TypedNode).Representation(), &bindnodeBuf) + bindnodeBytes := bindnodeBuf.Bytes() + + // compare bytes + assert.Equal(t, originalBytes, bindnodeBytes) + + // decode the new bytes to StorageDataTransferVoucher with cbor-gen + var roundtripSdtv requestvalidation.StorageDataTransferVoucher + err = roundtripSdtv.UnmarshalCBOR(&bindnodeBuf) + assert.Nil(t, err) + + // compare objects + assert.Equal(t, sdtv.Proposal, roundtripSdtv.Proposal) + }) + } +} diff --git a/storagemarket/impl/provider.go b/storagemarket/impl/provider.go index 3079c89c..c9d8ce10 100644 --- a/storagemarket/impl/provider.go +++ b/storagemarket/impl/provider.go @@ -18,7 +18,7 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" "github.com/filecoin-project/go-commp-utils/ffiwrapper" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" versioning "github.com/filecoin-project/go-ds-versioning/pkg" versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" commcid "github.com/filecoin-project/go-fil-commcid" @@ -183,12 +183,12 @@ func NewProvider(net network.StorageMarketNetwork, h.unsubDataTransfer = dataTransfer.SubscribeToEvents(dtutils.ProviderDataTransferSubscriber(h.deals)) pph := &providerPushDeals{h} - err = dataTransfer.RegisterVoucherType(&requestvalidation.StorageDataTransferVoucher{}, requestvalidation.NewUnifiedRequestValidator(pph, nil)) + err = dataTransfer.RegisterVoucherType(requestvalidation.StorageDataTransferVoucherType, requestvalidation.NewUnifiedRequestValidator(pph, nil)) if err != nil { return nil, err } - err = dataTransfer.RegisterTransportConfigurer(&requestvalidation.StorageDataTransferVoucher{}, dtutils.TransportConfigurer(&providerStoreGetter{h})) + err = dataTransfer.RegisterTransportConfigurer(requestvalidation.StorageDataTransferVoucherType, dtutils.TransportConfigurer(&providerStoreGetter{h})) if err != nil { return nil, err } diff --git a/storagemarket/impl/provider_environments.go b/storagemarket/impl/provider_environments.go index 82f4be1d..9b09ed92 100644 --- a/storagemarket/impl/provider_environments.go +++ b/storagemarket/impl/provider_environments.go @@ -9,7 +9,7 @@ import ( "github.com/ipfs/go-cid" bstore "github.com/ipfs/go-ipfs-blockstore" carv2 "github.com/ipld/go-car/v2" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" diff --git a/storagemarket/impl/provider_test.go b/storagemarket/impl/provider_test.go index cf9e1381..060dca99 100644 --- a/storagemarket/impl/provider_test.go +++ b/storagemarket/impl/provider_test.go @@ -9,7 +9,7 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/exp/rand" diff --git a/storagemarket/impl/providerstates/provider_fsm.go b/storagemarket/impl/providerstates/provider_fsm.go index 56aea931..c5a72702 100644 --- a/storagemarket/impl/providerstates/provider_fsm.go +++ b/storagemarket/impl/providerstates/provider_fsm.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/go-cid" "golang.org/x/xerrors" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-statemachine/fsm" diff --git a/storagemarket/impl/providerstates/provider_states_test.go b/storagemarket/impl/providerstates/provider_states_test.go index 60ad37d0..b30f22c3 100644 --- a/storagemarket/impl/providerstates/provider_states_test.go +++ b/storagemarket/impl/providerstates/provider_states_test.go @@ -14,14 +14,14 @@ import ( "github.com/ipfs/go-cid" carv2 "github.com/ipld/go-car/v2" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" mh "github.com/multiformats/go-multihash" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" diff --git a/storagemarket/impl/requestvalidation/common.go b/storagemarket/impl/requestvalidation/common.go index cc5f010c..b7e55f34 100644 --- a/storagemarket/impl/requestvalidation/common.go +++ b/storagemarket/impl/requestvalidation/common.go @@ -2,12 +2,10 @@ package requestvalidation import ( "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" "golang.org/x/xerrors" - datatransfer "github.com/filecoin-project/go-data-transfer" - "github.com/filecoin-project/go-fil-markets/storagemarket" ) @@ -20,15 +18,16 @@ import ( func ValidatePush( deals PushDeals, sender peer.ID, - voucher datatransfer.Voucher, + voucher datamodel.Node, baseCid cid.Cid, - Selector ipld.Node) error { - dealVoucher, ok := voucher.(*StorageDataTransferVoucher) - if !ok { - return xerrors.Errorf("voucher type %s: %w", voucher.Type(), ErrWrongVoucherType) + Selector datamodel.Node) error { + + dealVoucherIface, err := BindnodeRegistry.TypeFromNode(voucher, &StorageDataTransferVoucher{}) + if err != nil { + return xerrors.Errorf("could not decode StorageDataTransferVoucher: %w", err) } + dealVoucher, _ := dealVoucherIface.(*StorageDataTransferVoucher) // safe to assume type - var deal storagemarket.MinerDeal deal, err := deals.Get(dealVoucher.Proposal) if err != nil { return xerrors.Errorf("Proposal CID %s: %w", dealVoucher.Proposal.String(), ErrNoDeal) @@ -54,13 +53,15 @@ func ValidatePush( func ValidatePull( deals PullDeals, receiver peer.ID, - voucher datatransfer.Voucher, + voucher datamodel.Node, baseCid cid.Cid, - Selector ipld.Node) error { - dealVoucher, ok := voucher.(*StorageDataTransferVoucher) - if !ok { - return xerrors.Errorf("voucher type %s: %w", voucher.Type(), ErrWrongVoucherType) + Selector datamodel.Node) error { + + dealVoucherIface, err := BindnodeRegistry.TypeFromNode(voucher, &StorageDataTransferVoucher{}) + if err != nil { + return xerrors.Errorf("could not decode StorageDataTransferVoucher: %w", err) } + dealVoucher, _ := dealVoucherIface.(*StorageDataTransferVoucher) // safe to assume type deal, err := deals.Get(dealVoucher.Proposal) if err != nil { return xerrors.Errorf("Proposal CID %s: %w", dealVoucher.Proposal.String(), ErrNoDeal) diff --git a/storagemarket/impl/requestvalidation/request_validation_test.go b/storagemarket/impl/requestvalidation/request_validation_test.go index 110f79fa..5075d5bf 100644 --- a/storagemarket/impl/requestvalidation/request_validation_test.go +++ b/storagemarket/impl/requestvalidation/request_validation_test.go @@ -9,29 +9,26 @@ import ( "github.com/ipfs/go-datastore/namespace" dss "github.com/ipfs/go-datastore/sync" blocksutil "github.com/ipfs/go-ipfs-blocksutil" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/ipld/go-ipld-prime/node/basicnode" + "github.com/libp2p/go-libp2p/core/peer" xerrors "golang.org/x/xerrors" "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/builtin/v8/market" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-statestore" + tut "github.com/filecoin-project/go-fil-markets/shared_testutil" "github.com/filecoin-project/go-fil-markets/storagemarket" + "github.com/filecoin-project/go-fil-markets/storagemarket/impl/requestvalidation" rv "github.com/filecoin-project/go-fil-markets/storagemarket/impl/requestvalidation" ) var blockGenerator = blocksutil.NewBlockGenerator() -type wrongDTType struct { -} - -func (wrongDTType) Type() datatransfer.TypeIdentifier { - return "WrongDTTYPE" -} - func uniqueStorageDealProposal() (market.ClientDealProposal, error) { clientAddr, err := address.NewIDAddress(uint64(rand.Int())) if err != nil { @@ -131,20 +128,19 @@ func TestUnifiedRequestValidator(t *testing.T) { urv := rv.NewUnifiedRequestValidator(nil, &pullDeals{state}) t.Run("ValidatePush fails", func(t *testing.T) { - _, err := urv.ValidatePush(false, datatransfer.ChannelID{}, minerID, wrongDTType{}, block.Cid(), nil) + _, err := urv.ValidatePush(datatransfer.ChannelID{}, minerID, basicnode.NewString("wrong DT type"), block.Cid(), nil) if !xerrors.Is(err, rv.ErrNoPushAccepted) { t.Fatal("Push should fail for the client request validator for storage deals") } }) - AssertValidatesPulls(t, urv, minerID, state) }) t.Run("which only accepts pushes", func(t *testing.T) { urv := rv.NewUnifiedRequestValidator(&pushDeals{state}, nil) t.Run("ValidatePull fails", func(t *testing.T) { - _, err := urv.ValidatePull(false, datatransfer.ChannelID{}, clientID, wrongDTType{}, block.Cid(), nil) + _, err := urv.ValidatePull(datatransfer.ChannelID{}, clientID, basicnode.NewString("wrong DT type"), block.Cid(), nil) if !xerrors.Is(err, rv.ErrNoPullAccepted) { t.Fatal("Pull should fail for the provider request validator for storage deals") } @@ -171,10 +167,17 @@ func AssertPushValidator(t *testing.T, validator datatransfer.RequestValidator, if err != nil { t.Fatal("error serializing proposal") } - _, err = validator.ValidatePush(false, datatransfer.ChannelID{}, sender, &rv.StorageDataTransferVoucher{proposalNd.Cid()}, proposal.Proposal.PieceCID, nil) - if !xerrors.Is(err, rv.ErrNoDeal) { - t.Fatal("Push should fail if there is no deal stored") - } + sdtv := rv.StorageDataTransferVoucher{proposalNd.Cid()} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePush(t, validator, datatransfer.ChannelID{}, sender, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, proposal.Proposal.PieceCID, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePush fails wrong piece ref", func(t *testing.T) { minerDeal, err := newMinerDeal(sender, storagemarket.StorageDealProposalAccepted) @@ -184,10 +187,17 @@ func AssertPushValidator(t *testing.T, validator datatransfer.RequestValidator, if err := state.Begin(minerDeal.ProposalCid, &minerDeal); err != nil { t.Fatal("deal tracking failed") } - _, err = validator.ValidatePush(false, datatransfer.ChannelID{}, sender, &rv.StorageDataTransferVoucher{minerDeal.ProposalCid}, blockGenerator.Next().Cid(), nil) - if !xerrors.Is(err, rv.ErrWrongPiece) { - t.Fatal("Push should fail if piece ref is incorrect") - } + sdtv := rv.StorageDataTransferVoucher{minerDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePush(t, validator, datatransfer.ChannelID{}, sender, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, blockGenerator.Next().Cid(), nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePush fails wrong deal state", func(t *testing.T) { minerDeal, err := newMinerDeal(sender, storagemarket.StorageDealActive) @@ -198,10 +208,17 @@ func AssertPushValidator(t *testing.T, validator datatransfer.RequestValidator, t.Fatal("deal tracking failed") } ref := minerDeal.Ref - _, err = validator.ValidatePush(false, datatransfer.ChannelID{}, sender, &rv.StorageDataTransferVoucher{minerDeal.ProposalCid}, ref.Root, nil) - if !xerrors.Is(err, rv.ErrInacceptableDealState) { - t.Fatal("Push should fail if deal is in a state that cannot be data transferred") - } + sdtv := rv.StorageDataTransferVoucher{minerDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePush(t, validator, datatransfer.ChannelID{}, sender, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, ref.Root, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePush succeeds", func(t *testing.T) { minerDeal, err := newMinerDeal(sender, storagemarket.StorageDealValidating) @@ -212,10 +229,17 @@ func AssertPushValidator(t *testing.T, validator datatransfer.RequestValidator, t.Fatal("deal tracking failed") } ref := minerDeal.Ref - _, err = validator.ValidatePush(false, datatransfer.ChannelID{}, sender, &rv.StorageDataTransferVoucher{minerDeal.ProposalCid}, ref.Root, nil) - if err != nil { - t.Fatal("Push should should succeed when all parameters are correct") - } + sdtv := rv.StorageDataTransferVoucher{minerDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePush(t, validator, datatransfer.ChannelID{}, sender, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, ref.Root, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if !result.Accepted { + t.Fatal("should accept deal") + } + }) }) } @@ -229,10 +253,17 @@ func AssertValidatesPulls(t *testing.T, validator datatransfer.RequestValidator, if err != nil { t.Fatal("error serializing proposal") } - _, err = validator.ValidatePull(false, datatransfer.ChannelID{}, receiver, &rv.StorageDataTransferVoucher{proposalNd.Cid()}, proposal.Proposal.PieceCID, nil) - if !xerrors.Is(err, rv.ErrNoDeal) { - t.Fatal("Pull should fail if there is no deal stored") - } + sdtv := rv.StorageDataTransferVoucher{proposalNd.Cid()} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePull(t, validator, datatransfer.ChannelID{}, receiver, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, proposal.Proposal.PieceCID, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePull fails wrong piece ref", func(t *testing.T) { clientDeal, err := newClientDeal(receiver, storagemarket.StorageDealProposalAccepted) @@ -242,10 +273,17 @@ func AssertValidatesPulls(t *testing.T, validator datatransfer.RequestValidator, if err := state.Begin(clientDeal.ProposalCid, &clientDeal); err != nil { t.Fatal("deal tracking failed") } - _, err = validator.ValidatePull(false, datatransfer.ChannelID{}, receiver, &rv.StorageDataTransferVoucher{clientDeal.ProposalCid}, blockGenerator.Next().Cid(), nil) - if !xerrors.Is(err, rv.ErrWrongPiece) { - t.Fatal("Pull should fail if piece ref is incorrect") - } + sdtv := rv.StorageDataTransferVoucher{clientDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePull(t, validator, datatransfer.ChannelID{}, receiver, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, blockGenerator.Next().Cid(), nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePull fails wrong deal state", func(t *testing.T) { clientDeal, err := newClientDeal(receiver, storagemarket.StorageDealActive) @@ -256,10 +294,17 @@ func AssertValidatesPulls(t *testing.T, validator datatransfer.RequestValidator, t.Fatal("deal tracking failed") } payloadCid := clientDeal.DataRef.Root - _, err = validator.ValidatePull(false, datatransfer.ChannelID{}, receiver, &rv.StorageDataTransferVoucher{clientDeal.ProposalCid}, payloadCid, nil) - if !xerrors.Is(err, rv.ErrInacceptableDealState) { - t.Fatal("Pull should fail if deal is in a state that cannot be data transferred") - } + sdtv := rv.StorageDataTransferVoucher{clientDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePull(t, validator, datatransfer.ChannelID{}, receiver, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, payloadCid, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if result.Accepted { + t.Fatal("should not accept deal") + } + }) }) t.Run("ValidatePull succeeds", func(t *testing.T) { clientDeal, err := newClientDeal(receiver, storagemarket.StorageDealValidating) @@ -270,9 +315,46 @@ func AssertValidatesPulls(t *testing.T, validator datatransfer.RequestValidator, t.Fatal("deal tracking failed") } payloadCid := clientDeal.DataRef.Root - _, err = validator.ValidatePull(false, datatransfer.ChannelID{}, receiver, &rv.StorageDataTransferVoucher{clientDeal.ProposalCid}, payloadCid, nil) - if err != nil { - t.Fatal("Pull should should succeed when all parameters are correct") - } + sdtv := rv.StorageDataTransferVoucher{clientDeal.ProposalCid} + voucher := requestvalidation.BindnodeRegistry.TypeToNode(&sdtv) + checkValidateAndRevalidatePull(t, validator, datatransfer.ChannelID{}, receiver, datatransfer.TypedVoucher{Voucher: voucher, Type: rv.StorageDataTransferVoucherType}, payloadCid, nil, + func(t *testing.T, result datatransfer.ValidationResult, err error) { + if err != nil { + t.Fatal("unexpected error validating") + } + if !result.Accepted { + t.Fatal("should accept deal") + } + }) + }) +} + +func checkValidateAndRevalidatePush(t *testing.T, validator datatransfer.RequestValidator, chid datatransfer.ChannelID, sender peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node, + test func(t *testing.T, result datatransfer.ValidationResult, err error)) { + result, err := validator.ValidatePush(chid, sender, voucher.Voucher, baseCid, selector) + test(t, result, err) + channel := tut.NewTestChannel(tut.TestChannelParams{ + IsPull: false, + Sender: sender, + Vouchers: []datatransfer.TypedVoucher{voucher}, + BaseCID: baseCid, + Selector: selector, + }) + result, err = validator.ValidateRestart(chid, channel) + test(t, result, err) +} + +func checkValidateAndRevalidatePull(t *testing.T, validator datatransfer.RequestValidator, chid datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.TypedVoucher, baseCid cid.Cid, selector datamodel.Node, + test func(t *testing.T, result datatransfer.ValidationResult, err error)) { + result, err := validator.ValidatePull(chid, receiver, voucher.Voucher, baseCid, selector) + test(t, result, err) + channel := tut.NewTestChannel(tut.TestChannelParams{ + IsPull: true, + Recipient: receiver, + Vouchers: []datatransfer.TypedVoucher{voucher}, + BaseCID: baseCid, + Selector: selector, }) + result, err = validator.ValidateRestart(chid, channel) + test(t, result, err) } diff --git a/storagemarket/impl/requestvalidation/types.go b/storagemarket/impl/requestvalidation/types.go index eb32b1eb..50c89912 100644 --- a/storagemarket/impl/requestvalidation/types.go +++ b/storagemarket/impl/requestvalidation/types.go @@ -1,17 +1,22 @@ package requestvalidation import ( + _ "embed" "errors" "github.com/ipfs/go-cid" + bindnoderegistry "github.com/ipld/go-ipld-prime/node/bindnode/registry" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-fil-markets/storagemarket" ) //go:generate cbor-gen-for StorageDataTransferVoucher +//go:embed types.ipldsch +var embedSchema []byte + var ( // ErrWrongVoucherType means the voucher was not the correct type can validate against ErrWrongVoucherType = errors.New("cannot validate voucher type") @@ -49,7 +54,13 @@ type StorageDataTransferVoucher struct { Proposal cid.Cid } -// Type is the unique string identifier for a StorageDataTransferVoucher -func (dv *StorageDataTransferVoucher) Type() datatransfer.TypeIdentifier { - return "StorageDataTransferVoucher" +// StorageDataTransferVoucherType is the unique string identifier for a StorageDataTransferVoucher +const StorageDataTransferVoucherType = datatransfer.TypeIdentifier("StorageDataTransferVoucher") + +var BindnodeRegistry = bindnoderegistry.NewRegistry() + +func init() { + if err := BindnodeRegistry.RegisterType((*StorageDataTransferVoucher)(nil), string(embedSchema), "StorageDataTransferVoucher"); err != nil { + panic(err.Error()) + } } diff --git a/storagemarket/impl/requestvalidation/types.ipldsch b/storagemarket/impl/requestvalidation/types.ipldsch new file mode 100644 index 00000000..fa65c093 --- /dev/null +++ b/storagemarket/impl/requestvalidation/types.ipldsch @@ -0,0 +1,3 @@ +type StorageDataTransferVoucher struct { + Proposal &Any +} representation tuple diff --git a/storagemarket/impl/requestvalidation/unified_request_validator.go b/storagemarket/impl/requestvalidation/unified_request_validator.go index ab36622c..fc90e6f0 100644 --- a/storagemarket/impl/requestvalidation/unified_request_validator.go +++ b/storagemarket/impl/requestvalidation/unified_request_validator.go @@ -2,10 +2,10 @@ package requestvalidation import ( "github.com/ipfs/go-cid" - "github.com/ipld/go-ipld-prime" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/ipld/go-ipld-prime/datamodel" + "github.com/libp2p/go-libp2p/core/peer" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-fil-markets/storagemarket" ) @@ -50,23 +50,41 @@ func (v *UnifiedRequestValidator) SetPullDeals(pullDeals PullDeals) { // ValidatePush implements the ValidatePush method of a data transfer request validator. // If no pushStore exists, it rejects the request // Otherwise, it calls the ValidatePush function to validate the deal -func (v *UnifiedRequestValidator) ValidatePush(isRestart bool, _ datatransfer.ChannelID, sender peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { +func (v *UnifiedRequestValidator) ValidatePush(_ datatransfer.ChannelID, sender peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { if v.pushDeals == nil { - return nil, ErrNoPushAccepted + return datatransfer.ValidationResult{}, ErrNoPushAccepted } - return nil, ValidatePush(v.pushDeals, sender, voucher, baseCid, selector) + err := ValidatePush(v.pushDeals, sender, voucher, baseCid, selector) + if err != nil { + return datatransfer.ValidationResult{Accepted: false}, nil + } + return datatransfer.ValidationResult{Accepted: true}, nil } // ValidatePull implements the ValidatePull method of a data transfer request validator. // If no pullStore exists, it rejects the request // Otherwise, it calls the ValidatePull function to validate the deal -func (v *UnifiedRequestValidator) ValidatePull(isRestart bool, _ datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error) { +func (v *UnifiedRequestValidator) ValidatePull(_ datatransfer.ChannelID, receiver peer.ID, voucher datamodel.Node, baseCid cid.Cid, selector datamodel.Node) (datatransfer.ValidationResult, error) { if v.pullDeals == nil { - return nil, ErrNoPullAccepted + return datatransfer.ValidationResult{}, ErrNoPullAccepted } - return nil, ValidatePull(v.pullDeals, receiver, voucher, baseCid, selector) + err := ValidatePull(v.pullDeals, receiver, voucher, baseCid, selector) + if err != nil { + return datatransfer.ValidationResult{Accepted: false}, nil + } + return datatransfer.ValidationResult{Accepted: true}, nil +} + +func (v *UnifiedRequestValidator) ValidateRestart(chid datatransfer.ChannelID, channelState datatransfer.ChannelState) (datatransfer.ValidationResult, error) { + if channelState.IsPull() { + voucher := channelState.Voucher() + return v.ValidatePull(chid, channelState.Recipient(), voucher.Voucher, channelState.BaseCID(), channelState.Selector()) + } else { + voucher := channelState.Voucher() + return v.ValidatePush(chid, channelState.Sender(), voucher.Voucher, channelState.BaseCID(), channelState.Selector()) + } } var _ datatransfer.RequestValidator = &UnifiedRequestValidator{} diff --git a/storagemarket/integration_test.go b/storagemarket/integration_test.go index 3b27f60c..6a555aef 100644 --- a/storagemarket/integration_test.go +++ b/storagemarket/integration_test.go @@ -16,10 +16,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - datatransfer "github.com/filecoin-project/go-data-transfer" - "github.com/filecoin-project/go-data-transfer/channelmonitor" - dtimpl "github.com/filecoin-project/go-data-transfer/impl" - dtnet "github.com/filecoin-project/go-data-transfer/network" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + "github.com/filecoin-project/go-data-transfer/v2/channelmonitor" + dtimpl "github.com/filecoin-project/go-data-transfer/v2/impl" + dtnet "github.com/filecoin-project/go-data-transfer/v2/network" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-fil-markets/shared_testutil" diff --git a/storagemarket/migrations/migrations.go b/storagemarket/migrations/migrations.go index 97525012..00a3521e 100644 --- a/storagemarket/migrations/migrations.go +++ b/storagemarket/migrations/migrations.go @@ -6,7 +6,7 @@ import ( "unicode/utf8" "github.com/ipfs/go-cid" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" "github.com/filecoin-project/go-address" diff --git a/storagemarket/migrations/migrations_cbor_gen.go b/storagemarket/migrations/migrations_cbor_gen.go index 9b5c00c2..cdbdcc2d 100644 --- a/storagemarket/migrations/migrations_cbor_gen.go +++ b/storagemarket/migrations/migrations_cbor_gen.go @@ -13,7 +13,7 @@ import ( market "github.com/filecoin-project/go-state-types/builtin/v8/market" crypto "github.com/filecoin-project/go-state-types/crypto" cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/storagemarket/migrations/migrations_mapenc_types.go b/storagemarket/migrations/migrations_mapenc_types.go index 983d67f7..2f563f35 100644 --- a/storagemarket/migrations/migrations_mapenc_types.go +++ b/storagemarket/migrations/migrations_mapenc_types.go @@ -2,10 +2,10 @@ package migrations import ( "github.com/ipfs/go-cid" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" marketOld "github.com/filecoin-project/specs-actors/actors/builtin/market" diff --git a/storagemarket/migrations/migrations_mapenc_types_cbor_gen.go b/storagemarket/migrations/migrations_mapenc_types_cbor_gen.go index edb4e719..26f2675c 100644 --- a/storagemarket/migrations/migrations_mapenc_types_cbor_gen.go +++ b/storagemarket/migrations/migrations_mapenc_types_cbor_gen.go @@ -8,13 +8,13 @@ import ( "math" "sort" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" filestore "github.com/filecoin-project/go-fil-markets/filestore" storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket" abi "github.com/filecoin-project/go-state-types/abi" market "github.com/filecoin-project/specs-actors/actors/builtin/market" cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/storagemarket/network/ask_stream.go b/storagemarket/network/ask_stream.go index eed302e7..100ea6d9 100644 --- a/storagemarket/network/ask_stream.go +++ b/storagemarket/network/ask_stream.go @@ -3,8 +3,8 @@ package network import ( "bufio" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" ) diff --git a/storagemarket/network/deal_status_stream.go b/storagemarket/network/deal_status_stream.go index e23a46cf..4d42ce6d 100644 --- a/storagemarket/network/deal_status_stream.go +++ b/storagemarket/network/deal_status_stream.go @@ -3,9 +3,9 @@ package network import ( "bufio" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" ) diff --git a/storagemarket/network/deal_stream.go b/storagemarket/network/deal_stream.go index 00bb2651..e66a2beb 100644 --- a/storagemarket/network/deal_stream.go +++ b/storagemarket/network/deal_stream.go @@ -3,9 +3,9 @@ package network import ( "bufio" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" ) diff --git a/storagemarket/network/deal_stream_v110.go b/storagemarket/network/deal_stream_v110.go index d9cc3c4d..c419a32b 100644 --- a/storagemarket/network/deal_stream_v110.go +++ b/storagemarket/network/deal_stream_v110.go @@ -6,9 +6,9 @@ import ( "fmt" "unicode/utf8" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" diff --git a/storagemarket/network/legacy_ask_stream.go b/storagemarket/network/legacy_ask_stream.go index e983ebe6..2634bbf4 100644 --- a/storagemarket/network/legacy_ask_stream.go +++ b/storagemarket/network/legacy_ask_stream.go @@ -4,8 +4,8 @@ import ( "bufio" "context" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" diff --git a/storagemarket/network/legacy_deal_status_stream.go b/storagemarket/network/legacy_deal_status_stream.go index a793a8ea..4d3b5ab8 100644 --- a/storagemarket/network/legacy_deal_status_stream.go +++ b/storagemarket/network/legacy_deal_status_stream.go @@ -4,9 +4,9 @@ import ( "bufio" "context" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" diff --git a/storagemarket/network/legacy_deal_stream.go b/storagemarket/network/legacy_deal_stream.go index 8f4376bb..a2ac1a28 100644 --- a/storagemarket/network/legacy_deal_stream.go +++ b/storagemarket/network/legacy_deal_stream.go @@ -4,9 +4,9 @@ import ( "bufio" "context" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" cborutil "github.com/filecoin-project/go-cbor-util" diff --git a/storagemarket/network/libp2p_impl.go b/storagemarket/network/libp2p_impl.go index 60ddbe29..98ff0b05 100644 --- a/storagemarket/network/libp2p_impl.go +++ b/storagemarket/network/libp2p_impl.go @@ -6,10 +6,10 @@ import ( "time" logging "github.com/ipfs/go-log/v2" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/network" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" ma "github.com/multiformats/go-multiaddr" "github.com/filecoin-project/go-fil-markets/shared" diff --git a/storagemarket/network/libp2p_impl_test.go b/storagemarket/network/libp2p_impl_test.go index 7f89d955..7cfe93e1 100644 --- a/storagemarket/network/libp2p_impl_test.go +++ b/storagemarket/network/libp2p_impl_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/libp2p/go-libp2p-core/peer" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/storagemarket/network/network.go b/storagemarket/network/network.go index 83e506b8..ea11c170 100644 --- a/storagemarket/network/network.go +++ b/storagemarket/network/network.go @@ -3,7 +3,7 @@ package network import ( "context" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" ma "github.com/multiformats/go-multiaddr" "github.com/filecoin-project/go-state-types/crypto" diff --git a/storagemarket/testharness/dependencies/dependencies.go b/storagemarket/testharness/dependencies/dependencies.go index 33db6ff2..e816adc6 100644 --- a/storagemarket/testharness/dependencies/dependencies.go +++ b/storagemarket/testharness/dependencies/dependencies.go @@ -16,11 +16,10 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" - dtimpl "github.com/filecoin-project/go-data-transfer/impl" - network2 "github.com/filecoin-project/go-data-transfer/network" - "github.com/filecoin-project/go-data-transfer/testutil" - dtgstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" + dtimpl "github.com/filecoin-project/go-data-transfer/v2/impl" + network2 "github.com/filecoin-project/go-data-transfer/v2/network" + dtgstransport "github.com/filecoin-project/go-data-transfer/v2/transport/graphsync" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin/v8/market" @@ -151,7 +150,7 @@ func (gen *DepGenerator) New( dtTransport1 := dtgstransport.NewTransport(td.Host1.ID(), gs1) dt1, err := gen.ClientNewDataTransfer(td.DTStore1, td.DTTmpDir1, td.DTNet1, dtTransport1) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt1) + shared_testutil.StartAndWaitForReadyDT(ctx, t, dt1) discovery, err := discoveryimpl.NewLocal(namespace.Wrap(td.Ds1, datastore.NewKey("/deals/local"))) require.NoError(t, err) @@ -161,7 +160,7 @@ func (gen *DepGenerator) New( dtTransport2 := dtgstransport.NewTransport(td.Host2.ID(), gs2) dt2, err := gen.ProviderNewDataTransfer(td.DTStore2, td.DTTmpDir2, td.DTNet2, dtTransport2) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt2) + shared_testutil.StartAndWaitForReadyDT(ctx, t, dt2) storedAskDs := namespace.Wrap(td.Ds2, datastore.NewKey("/storage/ask")) storedAsk, err := storedask.NewStoredAsk(storedAskDs, datastore.NewKey("latest-ask"), providerNode, providerAddr) diff --git a/storagemarket/testharness/testharness.go b/storagemarket/testharness/testharness.go index 7c8ffcf0..6c11cc6e 100644 --- a/storagemarket/testharness/testharness.go +++ b/storagemarket/testharness/testharness.go @@ -14,14 +14,13 @@ import ( bstore "github.com/ipfs/go-ipfs-blockstore" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/libp2p/go-libp2p-core/protocol" + "github.com/libp2p/go-libp2p/core/protocol" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/net/context" - dtimpl "github.com/filecoin-project/go-data-transfer/impl" - "github.com/filecoin-project/go-data-transfer/testutil" - dtgstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync" + dtimpl "github.com/filecoin-project/go-data-transfer/v2/impl" + dtgstransport "github.com/filecoin-project/go-data-transfer/v2/transport/graphsync" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" @@ -147,7 +146,7 @@ func (h *StorageHarness) CreateNewProvider(t *testing.T, ctx context.Context, td dtTransport2 := dtgstransport.NewTransport(td.Host2.ID(), gs2) dt2, err := dtimpl.NewDataTransfer(td.DTStore2, td.DTNet2, dtTransport2) require.NoError(t, err) - testutil.StartAndWaitForReady(ctx, t, dt2) + shared_testutil.StartAndWaitForReadyDT(ctx, t, dt2) providerDs := namespace.Wrap(td.Ds1, datastore.NewKey("/deals/provider")) pi := shared_testutil.NewMockIndexProvider() diff --git a/storagemarket/types.go b/storagemarket/types.go index 42c02573..6ebed2e9 100644 --- a/storagemarket/types.go +++ b/storagemarket/types.go @@ -6,12 +6,12 @@ import ( "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" - "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p/core/peer" ma "github.com/multiformats/go-multiaddr" cbg "github.com/whyrusleeping/cbor-gen" "github.com/filecoin-project/go-address" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin/v8/market" "github.com/filecoin-project/go-state-types/crypto" @@ -170,7 +170,9 @@ type Log struct { // // TODO: the input should be a strongly-typed enum instead of a free-form string. // TODO: drop Get from GetStage to make this code more idiomatic. Return a -// second ok boolean to make it even more idiomatic. +// +// second ok boolean to make it even more idiomatic. +// // EXPERIMENTAL; subject to change. func (ds *DealStages) GetStage(stage string) *DealStage { if ds == nil { diff --git a/storagemarket/types_cbor_gen.go b/storagemarket/types_cbor_gen.go index a7b98641..dd07830e 100644 --- a/storagemarket/types_cbor_gen.go +++ b/storagemarket/types_cbor_gen.go @@ -8,13 +8,13 @@ import ( "math" "sort" - datatransfer "github.com/filecoin-project/go-data-transfer" + datatransfer "github.com/filecoin-project/go-data-transfer/v2" filestore "github.com/filecoin-project/go-fil-markets/filestore" abi "github.com/filecoin-project/go-state-types/abi" market "github.com/filecoin-project/go-state-types/builtin/v8/market" crypto "github.com/filecoin-project/go-state-types/crypto" cid "github.com/ipfs/go-cid" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/stores/kvcarbs.go b/stores/kvcarbs.go index f29f3976..e05d6f94 100644 --- a/stores/kvcarbs.go +++ b/stores/kvcarbs.go @@ -556,8 +556,9 @@ func loadCarSlow(s Store, cr *CarReader) (*CarHeader, error) { // Matches checks whether two headers match. // Two headers are considered matching if: -// 1. They have the same version number, and -// 2. They contain the same root CIDs in any order. +// 1. They have the same version number, and +// 2. They contain the same root CIDs in any order. +// // Note, this function explicitly ignores the order of roots. // If order of roots matter use reflect.DeepEqual instead. func (h CarHeader) Matches(other CarHeader) bool { @@ -1332,12 +1333,12 @@ func AllowDuplicatePuts(allow bool) carv2.Option { // successfully. On resumption the roots argument and WithDataPadding option must match the // previous instantiation of ReadWrite blockstore that created the file. More explicitly, the file // resuming from must: -// 1. start with a complete CARv2 car.Pragma. -// 2. contain a complete CARv1 data header with root CIDs matching the CIDs passed to the -// constructor, starting at offset optionally padded by WithDataPadding, followed by zero or -// more complete data sections. If any corrupt data sections are present the resumption will fail. -// Note, if set previously, the blockstore must use the same WithDataPadding option as before, -// since this option is used to locate the CARv1 data payload. +// 1. start with a complete CARv2 car.Pragma. +// 2. contain a complete CARv1 data header with root CIDs matching the CIDs passed to the +// constructor, starting at offset optionally padded by WithDataPadding, followed by zero or +// more complete data sections. If any corrupt data sections are present the resumption will fail. +// Note, if set previously, the blockstore must use the same WithDataPadding option as before, +// since this option is used to locate the CARv1 data payload. // // Note, resumption should be used with WithCidDeduplication, so that blocks that are successfully // written into the file are not re-written. Unless, the user explicitly wants duplicate blocks.