From 890bc860a526a9306f17782735bd29f5880d7617 Mon Sep 17 00:00:00 2001 From: LinZexiao <55120714+LinZexiao@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:37:54 +0800 Subject: [PATCH 01/15] Merge pull request #472 from ipfs-force-community/fix/deal-uuid fix: use the received deal uuid --- cli/storage-deals.go | 8 ++++++-- storageprovider/stream.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cli/storage-deals.go b/cli/storage-deals.go index 891096f5..dfcba652 100644 --- a/cli/storage-deals.go +++ b/cli/storage-deals.go @@ -65,7 +65,7 @@ var dealsImportDataCmd = &cli.Command{ Usage: "Actually send transaction performing the action", }, }, - ArgsUsage: " ", + ArgsUsage: " ", Action: func(cctx *cli.Context) error { api, closer, err := NewMarketNode(cctx) if err != nil { @@ -104,7 +104,7 @@ var dealsBatchImportDataCmd = &cli.Command{ Flags: []cli.Flag{ &cli.StringSliceFlag{ Name: "proposals", - Usage: "proposal cid and car file, eg. --proposals , --proposals ,", + Usage: "proposal cid(or uuid) and car file, eg. --proposals , --proposals ,", }, &cli.StringFlag{ Name: "manifest", @@ -112,6 +112,10 @@ var dealsBatchImportDataCmd = &cli.Command{ proposalCID,pieceCID baadfdxxx,badddxxx basdefxxx,baefaxxx +or +uuid,pieceCID +baad-xxx,badddxxx +bass-xxx,baefaxxx `, }, &cli.BoolFlag{ diff --git a/storageprovider/stream.go b/storageprovider/stream.go index 14995ed9..53a5eda8 100644 --- a/storageprovider/stream.go +++ b/storageprovider/stream.go @@ -401,7 +401,7 @@ func (storageDealStream *StorageDealStream) HandleNewDealStream(s network2.Strea } deal := &types.MinerDeal{ - ID: uuid.New(), + ID: proposal.DealUUID, Client: s.Conn().RemotePeer(), Miner: storageDealStream.net.ID(), ClientDealProposal: proposal.ClientDealProposal, From 0ec79fd37c334e8332884c4c1bd85f6969dfdf23 Mon Sep 17 00:00:00 2001 From: LinZexiao <55120714+LinZexiao@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:12:44 +0800 Subject: [PATCH 02/15] Merge pull request #477 from ipfs-force-community/fix/clean-blockstore fix: clean blockstore after retrieval completed --- cli/retrieval-deals.go | 4 +--- .../provider_datatransfer_sub.go | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/cli/retrieval-deals.go b/cli/retrieval-deals.go index 0b703489..b486c572 100644 --- a/cli/retrieval-deals.go +++ b/cli/retrieval-deals.go @@ -111,13 +111,12 @@ part statuses: } _, _ = fmt.Fprintf(w, - "%s\t%d\t%s\t%s\t%s\t%d\t%d\t%d\t%s\n", + "%s\t%d\t%s\t%s\t%s\t%d\t%d\t%s\n", deal.Receiver.String(), deal.ID, payloadCid, retrievalmarket.DealStatuses[deal.Status], deal.PricePerByte.String(), - deal.TotalSent, deal.FundsReceived, deal.CurrentInterval, deal.Message, @@ -192,7 +191,6 @@ func outputRetrievalDeal(deal *market.ProviderDealState) error { {"PayloadCID", deal.PayloadCID}, {"Status", retrievalmarket.DealStatuses[deal.Status]}, {"PricePerByte", deal.PricePerByte.String()}, - {"BytesSent", deal.TotalSent}, {"Paid", deal.FundsReceived}, {"Interval", deal.CurrentInterval}, {"Message", deal.Message}, diff --git a/retrievalprovider/provider_datatransfer_sub.go b/retrievalprovider/provider_datatransfer_sub.go index 6648e84a..664cce06 100644 --- a/retrievalprovider/provider_datatransfer_sub.go +++ b/retrievalprovider/provider_datatransfer_sub.go @@ -24,6 +24,7 @@ func ProviderDataTransferSubscriber(deals IDatatransferHandler) datatransfer.Sub dealProposal, err := rm.DealProposalFromNode(voucher.Voucher) // if this event is for a transfer not related to storage, ignore if err != nil { + log.Errorf("received wrong voucher type: %s", err) return } @@ -40,26 +41,26 @@ func ProviderDataTransferSubscriber(deals IDatatransferHandler) datatransfer.Sub switch event.Code { case datatransfer.Accept: - mlog.With("retrievalEvent", rm.ProviderEventDealAccepted) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventDealAccepted]) err := deals.HandleAcceptFor(ctx, identify, channelState.ChannelID()) if err != nil { log.Errorf("processing dt event: %s", err) } case datatransfer.Disconnected: - mlog.With("retrievalEvent", rm.ProviderEventDataTransferError) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventDataTransferError]) err := deals.HandleDisconnectFor(ctx, identify, fmt.Errorf("deal data transfer stalled (peer hungup)")) if err != nil { log.Errorf("processing dt event: %s", err) } case datatransfer.Error: - mlog.With("retrievalEvent", rm.ProviderEventDataTransferError) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventDataTransferError]) err := deals.HandleErrorForDeal(ctx, identify, fmt.Errorf("deal data transfer failed: %s", event.Message)) if err != nil { log.Errorf("processing dt event: %s", err) } case datatransfer.DataLimitExceeded: // DataLimitExceeded indicates it's time to wait for a payment - mlog.With("retrievalEvent", rm.ProviderEventPaymentRequested) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventPaymentRequested]) err := deals.HandlePaymentRequested(ctx, identify) if err != nil { log.Errorf("processing dt event: %s", err) @@ -69,24 +70,32 @@ func ProviderDataTransferSubscriber(deals IDatatransferHandler) datatransfer.Sub // 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 - mlog.With("retrievalEvent", rm.ProviderEventLastPaymentRequested) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventLastPaymentRequested]) err := deals.HandleLastPayment(ctx, identify) if err != nil { log.Errorf("processing dt event: %s", err) } case datatransfer.NewVoucher: // NewVoucher indicates a potential new payment we should attempt to process - mlog.With("retrievalEvent", rm.ProviderEventProcessPayment) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventProcessPayment]) err := deals.HandleProcessPayment(ctx, identify) if err != nil { log.Errorf("processing dt event: %s", err) } case datatransfer.Cancel: - mlog.With("retrievalEvent", rm.ProviderEventClientCancelled) + mlog = mlog.With("retrievalEvent", rm.ProviderEvents[rm.ProviderEventClientCancelled]) err := deals.HandleCancelForDeal(ctx, identify) if err != nil { log.Errorf("processing dt event: %s", err) } + case datatransfer.NewVoucherResult: + mlog = mlog.With("channelStatus", channelState.Status()) + if channelState.Status() == datatransfer.Finalizing { + err := deals.HandleCompleteFor(ctx, identify) + if err != nil { + log.Errorf("processing dt event: %s", err) + } + } default: return } From 2b40e7808b94bfb9168da8bd943c537abd85c1f2 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Thu, 26 Oct 2023 15:33:21 +0800 Subject: [PATCH 03/15] chore: bump version to v2.10.0-rc3 --- CHANGELOG.md | 5 +++++ version/version.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6aac72..7cb65cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # droplet changelog +## v2.10.0-rc3 + +* fix: use the received deal uuid [[#473](https://github.com/ipfs-force-community/droplet/pull/473)] +* fix: clean blockstore after retrieval completed [[#478](https://github.com/ipfs-force-community/droplet/pull/478)] + ## v2.10.0-rc2 * feat/use deal bound from policy directly [[#467](https://github.com/ipfs-force-community/droplet/pull/467)] diff --git a/version/version.go b/version/version.go index 58153df5..fdb01113 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version var ( CurrentCommit string - Version = "v2.10.0-rc2" + Version = "v2.10.0-rc3" ) func UserVersion() string { From 91d1400c72d39f608d21cf06830a3b98d4f91d1b Mon Sep 17 00:00:00 2001 From: LinZexiao <55120714+LinZexiao@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:46:05 +0800 Subject: [PATCH 04/15] Merge pull request #471 from ipfs-force-community/feat/import-data-by-uuid feat: import data by uuid --- api/impl/venus_market.go | 21 +++++------- cli/storage-deals.go | 51 ++++++++++++++++++++--------- go.mod | 2 +- go.sum | 4 +-- storageprovider/storage_provider.go | 31 ++++++++++++------ 5 files changed, 69 insertions(+), 40 deletions(-) diff --git a/api/impl/venus_market.go b/api/impl/venus_market.go index f0759188..c2922585 100644 --- a/api/impl/venus_market.go +++ b/api/impl/venus_market.go @@ -1110,8 +1110,8 @@ func (m *MarketNodeImpl) UpdateDealStatus(ctx context.Context, miner address.Add return m.DealAssigner.UpdateDealStatus(ctx, miner, dealId, pieceStatus, dealStatus) } -func (m *MarketNodeImpl) DealsImportData(ctx context.Context, dealPropCid cid.Cid, file string, skipCommP bool) error { - deal, err := m.Repo.StorageDealRepo().GetDeal(ctx, dealPropCid) +func (m *MarketNodeImpl) DealsImportData(ctx context.Context, ref types.ImportDataRef, skipCommP bool) error { + deal, _, err := storageprovider.GetDealByDataRef(ctx, m.Repo.StorageDealRepo(), &ref) if err != nil { return err } @@ -1119,12 +1119,8 @@ func (m *MarketNodeImpl) DealsImportData(ctx context.Context, dealPropCid cid.Ci return err } - ref := &types.ImportDataRef{ - ProposalCID: dealPropCid, - File: file, - } res, err := m.DealsBatchImportData(ctx, types.ImportDataRefs{ - Refs: []*types.ImportDataRef{ref}, + Refs: []*types.ImportDataRef{&ref}, SkipCommP: skipCommP, }) if err != nil { @@ -1300,19 +1296,20 @@ func (m *MarketNodeImpl) DealsBatchImportData(ctx context.Context, refs types.Im refLen := len(refs.Refs) results := make([]*types.ImportDataResult, 0, refLen) validRefs := make([]*types.ImportDataRef, 0, refLen) + for _, ref := range refs.Refs { - deal, err := m.Repo.StorageDealRepo().GetDeal(ctx, ref.ProposalCID) + deal, target, err := storageprovider.GetDealByDataRef(ctx, m.Repo.StorageDealRepo(), ref) if err != nil { results = append(results, &types.ImportDataResult{ - ProposalCID: ref.ProposalCID, - Message: err.Error(), + Target: target, + Message: err.Error(), }) continue } if err := jwtclient.CheckPermissionByMiner(ctx, m.AuthClient, deal.Proposal.Provider); err != nil { results = append(results, &types.ImportDataResult{ - ProposalCID: ref.ProposalCID, - Message: err.Error(), + Target: target, + Message: err.Error(), }) continue } diff --git a/cli/storage-deals.go b/cli/storage-deals.go index dfcba652..b378f184 100644 --- a/cli/storage-deals.go +++ b/cli/storage-deals.go @@ -13,6 +13,7 @@ import ( tm "github.com/buger/goterm" "github.com/docker/go-units" + "github.com/google/uuid" "github.com/ipfs/go-cid" "github.com/urfave/cli/v2" @@ -79,12 +80,19 @@ var dealsImportDataCmd = &cli.Command{ return fmt.Errorf("must specify proposal CID and file path") } - propCid, err := cid.Decode(cctx.Args().Get(0)) - if err != nil { - return err + ref := market.ImportDataRef{ + File: cctx.Args().Get(1), } - fpath := cctx.Args().Get(1) + propCid, err := cid.Decode(cctx.Args().Get(0)) + if err == nil { + ref.ProposalCID = propCid + } else { + ref.UUID, err = uuid.Parse(cctx.Args().Get(0)) + if err != nil { + return err + } + } var skipCommP bool if cctx.IsSet("skip-commp") { @@ -94,7 +102,12 @@ var dealsImportDataCmd = &cli.Command{ skipCommP = true } - return api.DealsImportData(ctx, propCid, fpath, skipCommP) + if err := api.DealsImportData(ctx, ref, skipCommP); err != nil { + return err + } + fmt.Println("import data success") + + return nil }, } @@ -161,16 +174,24 @@ bass-xxx,baefaxxx if len(arr) != 2 { continue } + + ref := &market.ImportDataRef{ + File: arr[1], + } + if len(arr[1]) != 0 && len(carDir) != 0 { + ref.File = filepath.Join(carDir, ref.File) + } + proposalCID, err := cid.Parse(arr[0]) - if err == nil && len(arr[1]) != 0 { - ref := &market.ImportDataRef{ - ProposalCID: proposalCID, - File: arr[1], - } - if len(carDir) != 0 { - ref.File = filepath.Join(carDir, ref.File) - } + if err == nil { + ref.ProposalCID = proposalCID + refs = append(refs, ref) + continue + } + id, err := uuid.Parse(arr[0]) + if err == nil { + ref.UUID = id refs = append(refs, ref) } } @@ -192,9 +213,9 @@ bass-xxx,baefaxxx for _, r := range res { if len(r.Message) == 0 { - fmt.Printf("import data success: %s\n", r.ProposalCID) + fmt.Printf("import data success: %s\n", r.Target) } else { - fmt.Printf("import data failed, deal: %s, error: %s\n", r.ProposalCID, r.Message) + fmt.Printf("import data failed, deal: %s, error: %s\n", r.Target, r.Message) } } diff --git a/go.mod b/go.mod index 208cc156..2e1a9613 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.14.0-rc3 + github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 diff --git a/go.sum b/go.sum index e468640a..a5eb2ec4 100644 --- a/go.sum +++ b/go.sum @@ -379,8 +379,8 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= -github.com/filecoin-project/venus v1.14.0-rc3 h1:1Q825vaN+1ge8oUlZybwlBI+wZqtIF+lAinNAtMjVqM= -github.com/filecoin-project/venus v1.14.0-rc3/go.mod h1:bLEVCNZ6W3KIzM+If8fUveFHlz7LJcdPVsSHT1MJkMc= +github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac h1:WfkaY28lHUlu/NiQdd2f6fZ9xnVD86clvGMENysDc9M= +github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac/go.mod h1:zw20NIwK28DR4lywXNV5jtJsUEhV6haniEMQpJDfqNU= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= 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= diff --git a/storageprovider/storage_provider.go b/storageprovider/storage_provider.go index 40ca4a70..f7c8738f 100644 --- a/storageprovider/storage_provider.go +++ b/storageprovider/storage_provider.go @@ -283,27 +283,38 @@ func (p *StorageProviderImpl) Stop() error { return p.net.StopHandlingRequests() } +func GetDealByDataRef(ctx context.Context, r repo.StorageDealRepo, ref *types.ImportDataRef) (*types.MinerDeal, string, error) { + deal, err := r.GetDeal(ctx, ref.ProposalCID) + if err == nil { + return deal, ref.ProposalCID.String(), nil + } + deal, err = r.GetDealByUUID(ctx, ref.UUID) + return deal, ref.UUID.String(), err +} + // ImportDataForDeals manually batch imports data for offline storage deals func (p *StorageProviderImpl) ImportDataForDeals(ctx context.Context, refs []*types.ImportDataRef, skipCommP bool) ([]*types.ImportDataResult, error) { // TODO: be able to check if we have enough disk space results := make([]*types.ImportDataResult, 0, len(refs)) minerDeals := make(map[address.Address][]*types.MinerDeal) + targets := make(map[cid.Cid]string, len(refs)) for _, ref := range refs { - d, err := p.dealStore.GetDeal(ctx, ref.ProposalCID) + d, target, err := GetDealByDataRef(ctx, p.dealStore, ref) if err != nil { results = append(results, &types.ImportDataResult{ - ProposalCID: ref.ProposalCID, - Message: fmt.Errorf("failed getting deal: %v", err).Error(), + Target: target, + Message: fmt.Errorf("failed getting deal: %v", err).Error(), }) continue } if err := p.importDataForDeal(ctx, d, ref, skipCommP); err != nil { results = append(results, &types.ImportDataResult{ - ProposalCID: ref.ProposalCID, - Message: err.Error(), + Target: target, + Message: err.Error(), }) continue } + targets[d.ProposalCid] = target minerDeals[d.Proposal.Provider] = append(minerDeals[d.Proposal.Provider], d) } @@ -313,8 +324,8 @@ func (p *StorageProviderImpl) ImportDataForDeals(ctx context.Context, refs []*ty log.Errorf("batch reserver funds for %s failed: %v", provider, err) for _, deal := range deals { results = append(results, &types.ImportDataResult{ - ProposalCID: deal.ProposalCid, - Message: err.Error(), + Target: targets[deal.ProposalCid], + Message: err.Error(), }) } continue @@ -323,13 +334,13 @@ func (p *StorageProviderImpl) ImportDataForDeals(ctx context.Context, refs []*ty for _, deal := range deals { if err := res[deal.ProposalCid]; err != nil { results = append(results, &types.ImportDataResult{ - ProposalCID: deal.ProposalCid, - Message: err.Error(), + Target: targets[deal.ProposalCid], + Message: err.Error(), }) continue } results = append(results, &types.ImportDataResult{ - ProposalCID: deal.ProposalCid, + Target: targets[deal.ProposalCid], }) go func(deal *types.MinerDeal) { From f0f1199cdfce50dd3e2748d573301bed2274daaa Mon Sep 17 00:00:00 2001 From: LinZexiao <55120714+LinZexiao@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:08:14 +0800 Subject: [PATCH 05/15] Merge pull request #480 from ipfs-force-community/fix/import-boost-deal fix: set deal id when import deal from boost --- cli/util.go | 7 +++++++ cli/util_test.go | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/cli/util.go b/cli/util.go index 503674a4..b7548d62 100644 --- a/cli/util.go +++ b/cli/util.go @@ -18,6 +18,7 @@ import ( "github.com/docker/go-units" "github.com/fatih/color" + "github.com/google/uuid" "github.com/howeyc/gopass" "github.com/ipfs/go-cid" "github.com/ipfs/go-cidutil/cidenc" @@ -552,7 +553,13 @@ func (d *boostDeal) minerDeal() (deal *types.MinerDeal, err error) { } pieceCID := shared.MustParseCid(d.PieceCid) + id, err := uuid.Parse(d.ID) + if err != nil { + return nil, err + } + deal = &types.MinerDeal{ + ID: id, ClientDealProposal: market.ClientDealProposal{ Proposal: market.DealProposal{ PieceCID: pieceCID, diff --git a/cli/util_test.go b/cli/util_test.go index 4f0e7ee4..f8cd1ec7 100644 --- a/cli/util_test.go +++ b/cli/util_test.go @@ -26,6 +26,10 @@ func TestUnmarshalBoostDeal(t *testing.T) { assert.NoError(t, err) fmt.Println("create at", createAt) + minerDeal, err := deal.minerDeal() + assert.NoError(t, err) + assert.Equal(t, "1b4b8f7e-6b55-4f71-93d7-be1b46ea00c6", minerDeal.ID.String()) + data, err = os.ReadFile("./testdata/lotus_miner_query_result.json") assert.NoError(t, err) From 5ad45a8ebb45c063df43c4c93a6445bb7d972a59 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:08:06 +0800 Subject: [PATCH 06/15] chore: bump version to v2.10.0-rc4 --- CHANGELOG.md | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- version/version.go | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cb65cb9..cb8a3a00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # droplet changelog +## v2.10.0-rc4 + +fix: set deal id when import deal from boost [[#480](https://github.com/ipfs-force-community/droplet/pull/480)] +feat: import deal data by uuid [[#471](https://github.com/ipfs-force-community/droplet/pull/471)] + ## v2.10.0-rc3 * fix: use the received deal uuid [[#473](https://github.com/ipfs-force-community/droplet/pull/473)] diff --git a/go.mod b/go.mod index 2e1a9613..55e60cae 100644 --- a/go.mod +++ b/go.mod @@ -319,5 +319,5 @@ replace ( github.com/filecoin-project/dagstore => github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi github.com/filecoin-project/go-fil-markets => github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01 - github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.8 + github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe ) diff --git a/go.sum b/go.sum index a5eb2ec4..4f6ef669 100644 --- a/go.sum +++ b/go.sum @@ -699,8 +699,8 @@ github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 h1 github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833/go.mod h1:YKn4qXih+/2xQWpfJsaKGOi4POw5vH5grDmfPCCnx8g= github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01 h1:sD9/GoGBui1j5fpKepe1v4P5NsjurqbM8WQlk4LNZeI= github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01/go.mod h1:eryxo/oVgIxaR5g5CNr9PlvZOi+u/bak0IsPL/PT1hk= -github.com/ipfs-force-community/go-jsonrpc v0.1.8 h1:w7CWlLveL+aXD3gLg8Z7I1RcktCiMY0sp8dgJG37uWE= -github.com/ipfs-force-community/go-jsonrpc v0.1.8/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= +github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe h1:6gVbbNP4Cbv0HMudjRIdfmNvV+WDP6I95JMbCHj/YU0= +github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA= github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4= diff --git a/version/version.go b/version/version.go index fdb01113..67462989 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version var ( CurrentCommit string - Version = "v2.10.0-rc3" + Version = "v2.10.0-rc4" ) func UserVersion() string { From 9b40580af46a29e5ba8b4e6dba5600eca827a9f1 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:05:01 +0800 Subject: [PATCH 07/15] chore: update venus --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 55e60cae..a6ed1852 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac + github.com/filecoin-project/venus v1.14.0-rc4 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 diff --git a/go.sum b/go.sum index 4f6ef669..f29bc606 100644 --- a/go.sum +++ b/go.sum @@ -379,8 +379,8 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= -github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac h1:WfkaY28lHUlu/NiQdd2f6fZ9xnVD86clvGMENysDc9M= -github.com/filecoin-project/venus v1.14.0-rc3.0.20231019071557-12e011e709ac/go.mod h1:zw20NIwK28DR4lywXNV5jtJsUEhV6haniEMQpJDfqNU= +github.com/filecoin-project/venus v1.14.0-rc4 h1:DN0lVKUFlNZzPPIltoiex2DtIzP4hfBTfqk/Z1V7Qwc= +github.com/filecoin-project/venus v1.14.0-rc4/go.mod h1:nCXhYe+mtrtrF+ZAVWDNRprNfXOzRYznXkplAZTofyg= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= 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= From b56634e507e3738fca04a4e2297dce3eebbfecfa Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:20:01 +0800 Subject: [PATCH 08/15] chore: bump version to v2.10.0-rc5 --- CHANGELOG.md | 8 ++++++-- go.mod | 2 +- go.sum | 4 ++-- version/version.go | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb8a3a00..5403f84a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # droplet changelog +## v2.10.0-rc5 + +* chore: update venus to v1.14.0-rc4 + ## v2.10.0-rc4 -fix: set deal id when import deal from boost [[#480](https://github.com/ipfs-force-community/droplet/pull/480)] -feat: import deal data by uuid [[#471](https://github.com/ipfs-force-community/droplet/pull/471)] +* fix: set deal id when import deal from boost [[#480](https://github.com/ipfs-force-community/droplet/pull/480)] +* feat: import deal data by uuid [[#471](https://github.com/ipfs-force-community/droplet/pull/471)] ## v2.10.0-rc3 diff --git a/go.mod b/go.mod index a6ed1852..373c4cb0 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1 - github.com/ipfs-force-community/sophon-messager v1.14.0-rc1 + github.com/ipfs-force-community/sophon-messager v1.14.0-rc2 github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 github.com/ipfs/boxo v0.10.1 github.com/ipfs/go-blockservice v0.5.0 diff --git a/go.sum b/go.sum index f29bc606..4aba38ea 100644 --- a/go.sum +++ b/go.sum @@ -707,8 +707,8 @@ github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hm github.com/ipfs-force-community/sophon-auth v1.14.0-rc1/go.mod h1:d6J6u3zyIwcEajRho5BhVBcoIChEf0K76wP4yJEfEhc= github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1 h1:PXsKzeQQgeFhdhkRdD7s884b/VAIRZzIef35ABJ/fY0= github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1/go.mod h1:IoxmDkC9NG3+HGWizh48fP1cxvbN7fU9dIvRTxupk4Q= -github.com/ipfs-force-community/sophon-messager v1.14.0-rc1 h1:IkCsbJunxLRE0klOuFK0Be4+T0UqtG4qx1ZnETP+yEM= -github.com/ipfs-force-community/sophon-messager v1.14.0-rc1/go.mod h1:RtNzCvqbIt3et1g/OErE0ijraAJReCc7Ingz779hrcI= +github.com/ipfs-force-community/sophon-messager v1.14.0-rc2 h1:v0+MhuohdBUSHO/CE2FH0DgU2qa8g4gndFSb9xiX3RQ= +github.com/ipfs-force-community/sophon-messager v1.14.0-rc2/go.mod h1:aBI/4LuDGo1P3tpUC6l4KEGkDRCcmlpqcazVdaZPjDo= github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 h1:v/1/INcqm3kHLauWQYB63MwWJRWGz+3WEuUPp0jzIl8= github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7/go.mod h1:sSTUXgIu95tPHvgcYhdLuELmgPJWCP/pNMFtsrVtOyA= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= diff --git a/version/version.go b/version/version.go index 67462989..c1dcd119 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version var ( CurrentCommit string - Version = "v2.10.0-rc4" + Version = "v2.10.0-rc5" ) func UserVersion() string { From 3272e77a661cf5a43f906fdfc192869f8fb5457f Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:29:38 +0800 Subject: [PATCH 09/15] chore: remove invalid log --- retrievalprovider/provider_datatransfer_sub.go | 1 - 1 file changed, 1 deletion(-) diff --git a/retrievalprovider/provider_datatransfer_sub.go b/retrievalprovider/provider_datatransfer_sub.go index 664cce06..33f2d9a4 100644 --- a/retrievalprovider/provider_datatransfer_sub.go +++ b/retrievalprovider/provider_datatransfer_sub.go @@ -24,7 +24,6 @@ func ProviderDataTransferSubscriber(deals IDatatransferHandler) datatransfer.Sub dealProposal, err := rm.DealProposalFromNode(voucher.Voucher) // if this event is for a transfer not related to storage, ignore if err != nil { - log.Errorf("received wrong voucher type: %s", err) return } From 81242bdb4375dc5c0f350278616322dbfe986c36 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:12:46 +0800 Subject: [PATCH 10/15] fix: Paid retrieval failed --- retrievalprovider/datatransfer_handler.go | 12 ++++++++++++ retrievalprovider/provider_datatransfer_sub.go | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/retrievalprovider/datatransfer_handler.go b/retrievalprovider/datatransfer_handler.go index 5eb25df1..f4b5909c 100644 --- a/retrievalprovider/datatransfer_handler.go +++ b/retrievalprovider/datatransfer_handler.go @@ -21,6 +21,7 @@ type IDatatransferHandler interface { HandleCancelForDeal(context.Context, rm.ProviderDealIdentifier) error HandleErrorForDeal(context.Context, rm.ProviderDealIdentifier, error) error + TryHandleCompleted(context.Context, rm.ProviderDealIdentifier) error } var _ IDatatransferHandler = (*DataTransferHandler)(nil) @@ -42,6 +43,17 @@ func (d *DataTransferHandler) HandleCompleteFor(ctx context.Context, identifier return d.retrievalDealHandler.CleanupDeal(ctx, deal) } +func (d *DataTransferHandler) TryHandleCompleted(ctx context.Context, identifier rm.ProviderDealIdentifier) error { + deal, err := d.retrievalDealStore.GetDeal(ctx, identifier.Receiver, identifier.DealID) + if err != nil { + return err + } + if deal.Status == rm.DealStatusFinalizing { + return d.retrievalDealHandler.CleanupDeal(ctx, deal) + } + return nil +} + func (d *DataTransferHandler) HandleAcceptFor(ctx context.Context, identifier rm.ProviderDealIdentifier, channelId datatransfer.ChannelID) error { deal, err := d.retrievalDealStore.GetDeal(ctx, identifier.Receiver, identifier.DealID) if err != nil { diff --git a/retrievalprovider/provider_datatransfer_sub.go b/retrievalprovider/provider_datatransfer_sub.go index 33f2d9a4..ae315092 100644 --- a/retrievalprovider/provider_datatransfer_sub.go +++ b/retrievalprovider/provider_datatransfer_sub.go @@ -88,9 +88,10 @@ func ProviderDataTransferSubscriber(deals IDatatransferHandler) datatransfer.Sub log.Errorf("processing dt event: %s", err) } case datatransfer.NewVoucherResult: + // todo: 为了解决检索完成后订单状态还是 `DealStatusFinalizing`,在 `go-fil-markets` 中是没有处理这个状态 mlog = mlog.With("channelStatus", channelState.Status()) if channelState.Status() == datatransfer.Finalizing { - err := deals.HandleCompleteFor(ctx, identify) + err := deals.TryHandleCompleted(ctx, identify) if err != nil { log.Errorf("processing dt event: %s", err) } From d30bb1bc6a98424def9edecbcd09dac79f8d78ff Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:26:40 +0800 Subject: [PATCH 11/15] chore: update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 373c4cb0..181cb634 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.14.0-rc4 + github.com/filecoin-project/venus v1.14.0-rc6 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 @@ -319,5 +319,5 @@ replace ( github.com/filecoin-project/dagstore => github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi github.com/filecoin-project/go-fil-markets => github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01 - github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe + github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.9 ) diff --git a/go.sum b/go.sum index 4aba38ea..8a33233f 100644 --- a/go.sum +++ b/go.sum @@ -379,8 +379,8 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= -github.com/filecoin-project/venus v1.14.0-rc4 h1:DN0lVKUFlNZzPPIltoiex2DtIzP4hfBTfqk/Z1V7Qwc= -github.com/filecoin-project/venus v1.14.0-rc4/go.mod h1:nCXhYe+mtrtrF+ZAVWDNRprNfXOzRYznXkplAZTofyg= +github.com/filecoin-project/venus v1.14.0-rc6 h1:NiLlvc11lX1tCvxeLRGbjU+GKZlxC+MT4wiLLDj0GKQ= +github.com/filecoin-project/venus v1.14.0-rc6/go.mod h1:/apMxQl6VYz1FMeBStrP3BUsBCmDhyGUW91SLjVg5e8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= 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= @@ -699,8 +699,8 @@ github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 h1 github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833/go.mod h1:YKn4qXih+/2xQWpfJsaKGOi4POw5vH5grDmfPCCnx8g= github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01 h1:sD9/GoGBui1j5fpKepe1v4P5NsjurqbM8WQlk4LNZeI= github.com/ipfs-force-community/go-fil-markets v1.2.6-0.20230822060005-aee2cbae5b01/go.mod h1:eryxo/oVgIxaR5g5CNr9PlvZOi+u/bak0IsPL/PT1hk= -github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe h1:6gVbbNP4Cbv0HMudjRIdfmNvV+WDP6I95JMbCHj/YU0= -github.com/ipfs-force-community/go-jsonrpc v0.1.9-0.20231019092801-cb5ae7d36fbe/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= +github.com/ipfs-force-community/go-jsonrpc v0.1.9 h1:5QavBltfvV6fz/+EbYsCkVxJ1MSJncZm6YuPs1SLdZU= +github.com/ipfs-force-community/go-jsonrpc v0.1.9/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA= github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4= From 2cca5d23646a2b123feaa42c5c7fe517d804b943 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:37:59 +0800 Subject: [PATCH 12/15] opt: not check deal --- retrievalprovider/httpretrieval/server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/retrievalprovider/httpretrieval/server.go b/retrievalprovider/httpretrieval/server.go index 3349f54d..a0f7abc7 100644 --- a/retrievalprovider/httpretrieval/server.go +++ b/retrievalprovider/httpretrieval/server.go @@ -50,8 +50,9 @@ func (s *Server) RetrievalByPieceCID(w http.ResponseWriter, r *http.Request) { _, err = s.listDealsByPiece(ctx, pieceCIDStr) if err != nil { log.Warn(err) - badResponse(w, http.StatusNotFound, err) - return + // todo: reject deal? + // badResponse(w, http.StatusNotFound, err) + // return } store, err := s.pieceMgr.FindStorageForRead(ctx, pieceCIDStr) From 1a8e92ef329865d1a4821c2a295b3eab5c4a64d7 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:40:56 +0800 Subject: [PATCH 13/15] chore: bump version to v2.10.0-rc6 --- CHANGELOG.md | 6 ++++++ version/version.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5403f84a..57cf8c86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # droplet changelog +## v2.10.0-rc6 + +* chore: update venus to v1.14.0-rc6 +* fix: Paid retrieval failed [[#484](https://github.com/ipfs-force-community/droplet/pull/484)] + + ## v2.10.0-rc5 * chore: update venus to v1.14.0-rc4 diff --git a/version/version.go b/version/version.go index c1dcd119..4573db1d 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version var ( CurrentCommit string - Version = "v2.10.0-rc5" + Version = "v2.10.0-rc6" ) func UserVersion() string { From feb9bbdc058c212d3a0684103172114aaa646430 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:14:32 +0800 Subject: [PATCH 14/15] chore: bump version to v2.10.0 --- CHANGELOG.md | 2 ++ go.mod | 13 +++++++------ go.sum | 26 ++++++++++++++------------ version/version.go | 2 +- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57cf8c86..ba2452af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # droplet changelog +## v2.10.0 + ## v2.10.0-rc6 * chore: update venus to v1.14.0-rc6 diff --git a/go.mod b/go.mod index 181cb634..abd80492 100644 --- a/go.mod +++ b/go.mod @@ -25,12 +25,12 @@ require ( github.com/filecoin-project/go-fil-markets v1.28.4-0.20230816163331-bd08f1651b1d github.com/filecoin-project/go-jsonrpc v0.1.8 github.com/filecoin-project/go-padreader v0.0.1 - github.com/filecoin-project/go-state-types v0.12.5 + github.com/filecoin-project/go-state-types v0.12.8 github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/filecoin-project/venus v1.14.0-rc6 + github.com/filecoin-project/venus v1.14.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 @@ -38,9 +38,9 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 - github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 - github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1 - github.com/ipfs-force-community/sophon-messager v1.14.0-rc2 + github.com/ipfs-force-community/sophon-auth v1.14.0 + github.com/ipfs-force-community/sophon-gateway v1.14.0 + github.com/ipfs-force-community/sophon-messager v1.14.0 github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 github.com/ipfs/boxo v0.10.1 github.com/ipfs/go-blockservice v0.5.0 @@ -92,6 +92,7 @@ require ( ) require ( + github.com/hashicorp/golang-lru/arc/v2 v2.0.7 // indirect go.opentelemetry.io/otel/bridge/opencensus v0.39.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect go.opentelemetry.io/otel/metric v1.16.0 // indirect @@ -177,7 +178,7 @@ require ( github.com/hannahhoward/cbor-gen-for v0.0.0-20230214144701-5d17c9d5243c // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huin/goupnp v1.1.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.2.2 // indirect diff --git a/go.sum b/go.sum index 8a33233f..df1ae5fb 100644 --- a/go.sum +++ b/go.sum @@ -352,8 +352,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8= -github.com/filecoin-project/go-state-types v0.12.5 h1:VQ2N2T3JeUDdIHEo/xhjnT7Q218Wl0UYIyglqT7Z9Ck= -github.com/filecoin-project/go-state-types v0.12.5/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI= +github.com/filecoin-project/go-state-types v0.12.8 h1:W/UObdAsv+LbB9EfyLg92DSYoatzUWmlfV8FGyh30VA= +github.com/filecoin-project/go-state-types v0.12.8/go.mod h1:gR2NV0CSGSQwopxF+3In9nDh1sqvoYukLcs5vK0AHCA= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -379,8 +379,8 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= -github.com/filecoin-project/venus v1.14.0-rc6 h1:NiLlvc11lX1tCvxeLRGbjU+GKZlxC+MT4wiLLDj0GKQ= -github.com/filecoin-project/venus v1.14.0-rc6/go.mod h1:/apMxQl6VYz1FMeBStrP3BUsBCmDhyGUW91SLjVg5e8= +github.com/filecoin-project/venus v1.14.0 h1:h2m5D+cpXJ618PmqbWeLcZmSLOaLx2bRBKRzAB+Fqyo= +github.com/filecoin-project/venus v1.14.0/go.mod h1:8dsvkGM89g+3tDduyWDEFxp8Fzc0cOAief2Riv6Q1ZY= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= 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= @@ -670,8 +670,10 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -703,12 +705,12 @@ github.com/ipfs-force-community/go-jsonrpc v0.1.9 h1:5QavBltfvV6fz/+EbYsCkVxJ1MS github.com/ipfs-force-community/go-jsonrpc v0.1.9/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA= -github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4= -github.com/ipfs-force-community/sophon-auth v1.14.0-rc1/go.mod h1:d6J6u3zyIwcEajRho5BhVBcoIChEf0K76wP4yJEfEhc= -github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1 h1:PXsKzeQQgeFhdhkRdD7s884b/VAIRZzIef35ABJ/fY0= -github.com/ipfs-force-community/sophon-gateway v1.14.0-rc1/go.mod h1:IoxmDkC9NG3+HGWizh48fP1cxvbN7fU9dIvRTxupk4Q= -github.com/ipfs-force-community/sophon-messager v1.14.0-rc2 h1:v0+MhuohdBUSHO/CE2FH0DgU2qa8g4gndFSb9xiX3RQ= -github.com/ipfs-force-community/sophon-messager v1.14.0-rc2/go.mod h1:aBI/4LuDGo1P3tpUC6l4KEGkDRCcmlpqcazVdaZPjDo= +github.com/ipfs-force-community/sophon-auth v1.14.0 h1:ctBJ6UHkcytEzfVPgiiHo0cW4FGQrE7r1H3Um0FcHbo= +github.com/ipfs-force-community/sophon-auth v1.14.0/go.mod h1:d6J6u3zyIwcEajRho5BhVBcoIChEf0K76wP4yJEfEhc= +github.com/ipfs-force-community/sophon-gateway v1.14.0 h1:nl4RnYiwVwviYbi0qhdisUHqHaOdoux1BbT6ps/F1iY= +github.com/ipfs-force-community/sophon-gateway v1.14.0/go.mod h1:CspoELDrDr2UvEdOibcp0JGQgcx6XKst+1I6ma0TsD8= +github.com/ipfs-force-community/sophon-messager v1.14.0 h1:5g1S67y+3aF/b973gI4KC3Ja/QNcX6h9BPR4ZWu+l84= +github.com/ipfs-force-community/sophon-messager v1.14.0/go.mod h1:u20VTUE0MJU3H5qfCHg9rkuJUtiy4L4Y9yqd3QtT8c0= github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 h1:v/1/INcqm3kHLauWQYB63MwWJRWGz+3WEuUPp0jzIl8= github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7/go.mod h1:sSTUXgIu95tPHvgcYhdLuELmgPJWCP/pNMFtsrVtOyA= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= diff --git a/version/version.go b/version/version.go index 4573db1d..4c02e582 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version var ( CurrentCommit string - Version = "v2.10.0-rc6" + Version = "v2.10.0" ) func UserVersion() string { From b420c8dcd3137784d69c5fae0a96b247b796dc43 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:26:28 +0800 Subject: [PATCH 15/15] chore: fix lint --- piecestorage/s3_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piecestorage/s3_test.go b/piecestorage/s3_test.go index c9d51ee5..ec2315c3 100644 --- a/piecestorage/s3_test.go +++ b/piecestorage/s3_test.go @@ -130,12 +130,12 @@ func testS3PieceStorage(t *testing.T, s3Cfg *config.S3PieceStorage) { } func randomString(n int) string { - rand.Seed(time.Now().UnixNano()) + r := rand.New(rand.NewSource(time.Now().UnixNano())) letter := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") b := make([]rune, n) for i := range b { - b[i] = letter[rand.Intn(len(letter))] + b[i] = letter[r.Intn(len(letter))] } return string(b) }