Skip to content

Commit

Permalink
Merge pull request #490 from ipfs-force-community/chore/merge-release…
Browse files Browse the repository at this point in the history
…-v2.10

chore: merge release v2.10 to master
  • Loading branch information
LinZexiao authored Nov 28, 2023
2 parents 30b02bc + 793af60 commit c10e8ba
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 27 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# droplet changelog

## v2.10.0

## 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

## 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)]
* 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)]
Expand Down
15 changes: 8 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ 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-rc3.0.20231019071557-12e011e709ac
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
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e
github.com/hashicorp/go-multierror v1.1.1
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
github.com/ipfs-force-community/metrics v1.0.1-0.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-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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -319,5 +320,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
)
30 changes: 16 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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 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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -699,16 +701,16 @@ 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 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=
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-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=
Expand Down
4 changes: 2 additions & 2 deletions piecestorage/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
12 changes: 12 additions & 0 deletions retrievalprovider/datatransfer_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions retrievalprovider/httpretrieval/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion retrievalprovider/provider_datatransfer_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,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)
}
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
var (
CurrentCommit string

Version = "v2.10.0-rc2"
Version = "v2.10.0"
)

func UserVersion() string {
Expand Down

0 comments on commit c10e8ba

Please sign in to comment.