Skip to content

Commit

Permalink
Merge branch 'master' into depend-tagged-version
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Feb 12, 2023
2 parents f4b859e + 70d62f1 commit 06882d2
Show file tree
Hide file tree
Showing 94 changed files with 5,357 additions and 5,528 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
executors:
golang:
docker:
- image: circleci/golang:1.16
- image: cimg/go:1.17
resource_class: small

commands:
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# go-data-transfer changelog

# go-data-transfer v1.15.3

Fix a rare panic

### Changelog

- github.com/filecoin-project/go-data-transfer:
- fix(channels): avoid panic in Voucher (#354) ([filecoin-project/go-data-transfer#354](https://github.com/filecoin-project/go-data-transfer/pull/354))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Hannah Howard | 1 | +20/-5 | 1 |

# go-data-transfer v1.15.2

Minor big fixes and improvements

### Changelog

- github.com/filecoin-project/go-data-transfer:
- chore(deps): update libp2p v0.19.4 (#341) ([filecoin-project/go-data-transfer#341](https://github.com/filecoin-project/go-data-transfer/pull/341))
- Fix transfer message bindnode wrap passing pointer to pointer
- Log less important messages at debug level (#334) ([filecoin-project/go-data-transfer#334](https://github.com/filecoin-project/go-data-transfer/pull/334))
- fix(message): do not EncodeToNode selectors (#326) ([filecoin-project/go-data-transfer#326](https://github.com/filecoin-project/go-data-transfer/pull/326))
- ci(circle): update to non-legacy image (#328) ([filecoin-project/go-data-transfer#328](https://github.com/filecoin-project/go-data-transfer/pull/328))
- Merge branch 'release/v1.15.1'

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Hannah Howard | 3 | +318/-105 | 8 |
| Andrew Gillis | 1 | +3/-3 | 1 |
| Masih H. Derkani | 1 | +1/-1 | 1 |

# go-data-transfer v1.15.1

Minor fixes and stability updates for v1.15.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import (

"github.com/filecoin-project/go-statemachine"

datatransfer "github.com/filecoin-project/go-data-transfer"
datatransfer "github.com/filecoin-project/go-data-transfer/v2"
)
```

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This module encapsulates protocols for exchanging piece data between storage cli

**Requires go 1.13**

Install the module in your package or app with `go get "github.com/filecoin-project/go-data-transfer/datatransfer"`
Install the module in your package or app with `go get "github.com/filecoin-project/go-data-transfer/v2"`


### Initialize a data transfer module
Expand All @@ -31,9 +31,9 @@ Install the module in your package or app with `go get "github.com/filecoin-proj

import (
gsimpl "github.com/ipfs/go-graphsync/impl"
datatransfer "github.com/filecoin-project/go-data-transfer/impl"
gstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync"
"github.com/libp2p/go-libp2p-core/host"
datatransfer "github.com/filecoin-project/go-data-transfer/v2/impl"
gstransport "github.com/filecoin-project/go-data-transfer/v2/transport/graphsync"
"github.com/libp2p/go-libp2p/core/host"
)

```
Expand Down Expand Up @@ -85,7 +85,7 @@ func (vl *myValidator) ValidatePush(
sender peer.ID,
voucher datatransfer.Voucher,
baseCid cid.Cid,
selector ipld.Node) error {
selector datamodel.Node) error {
v := voucher.(*myVoucher)
if v.data == "" || v.data != "validpush" {
Expand All @@ -99,7 +99,7 @@ func (vl *myValidator) ValidatePull(
receiver peer.ID,
voucher datatransfer.Voucher,
baseCid cid.Cid,
selector ipld.Node) error {
selector datamodel.Node) error {
v := voucher.(*myVoucher)
if v.data == "" || v.data != "validpull" {
Expand Down Expand Up @@ -135,7 +135,7 @@ must be sent with the request. Using the trivial examples above:
For more detail, please see the [unit tests](https://github.com/filecoin-project/go-data-transfer/blob/master/impl/impl_test.go).

### Open a Push or Pull Request
For a push or pull request, provide a context, a `datatransfer.Voucher`, a host recipient `peer.ID`, a baseCID `cid.CID` and a selector `ipld.Node`. These
For a push or pull request, provide a context, a `datatransfer.Voucher`, a host recipient `peer.ID`, a baseCID `cid.CID` and a selector `datamodel.Node`. These
calls return a `datatransfer.ChannelID` and any error:
```go
channelID, err := dtm.OpenPullDataChannel(ctx, recipient, voucher, baseCid, selector)
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
"github.com/stretchr/testify/require"

datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-data-transfer/benchmarks/testinstance"
tn "github.com/filecoin-project/go-data-transfer/benchmarks/testnet"
"github.com/filecoin-project/go-data-transfer/testutil"
datatransfer "github.com/filecoin-project/go-data-transfer/v2"
"github.com/filecoin-project/go-data-transfer/v2/benchmarks/testinstance"
tn "github.com/filecoin-project/go-data-transfer/v2/benchmarks/testnet"
"github.com/filecoin-project/go-data-transfer/v2/testutil"
)

const stdBlockSize = 8000
Expand Down Expand Up @@ -64,7 +64,7 @@ func BenchmarkRoundtripSuccess(b *testing.B) {
}

func p2pStrestTest(ctx context.Context, b *testing.B, numfiles int, df distFunc, tdm *tempDirMaker, diskBasedDatastore bool, limitBandwidth bool) {
mn := mocknet.New(ctx)
mn := mocknet.New()
if limitBandwidth {
mn.SetLinkDefaults(mocknet.LinkOptions{Latency: 100 * time.Millisecond, Bandwidth: 16 << 20})
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func p2pStrestTest(ctx context.Context, b *testing.B, numfiles int, df distFunc,
timer := time.NewTimer(30 * time.Second)
start := time.Now()
for j := 0; j < numfiles; j++ {
_, err := pusher.Manager.OpenPushDataChannel(ctx, receiver.Peer, testutil.NewFakeDTType(), allCids[j], allSelector)
_, err := pusher.Manager.OpenPushDataChannel(ctx, receiver.Peer, testutil.NewTestTypedVoucher(), allCids[j], allSelector)
if err != nil {
b.Fatalf("received error on request: %s", err.Error())
}
Expand Down
19 changes: 9 additions & 10 deletions benchmarks/testinstance/testinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (
blockstore "github.com/ipfs/go-ipfs-blockstore"
delay "github.com/ipfs/go-ipfs-delay"
"github.com/ipld/go-ipld-prime"
peer "github.com/libp2p/go-libp2p-core/peer"

datatransfer "github.com/filecoin-project/go-data-transfer"
tn "github.com/filecoin-project/go-data-transfer/benchmarks/testnet"
dtimpl "github.com/filecoin-project/go-data-transfer/impl"
dtnet "github.com/filecoin-project/go-data-transfer/network"
"github.com/filecoin-project/go-data-transfer/testutil"
gstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync"
peer "github.com/libp2p/go-libp2p/core/peer"

datatransfer "github.com/filecoin-project/go-data-transfer/v2"
tn "github.com/filecoin-project/go-data-transfer/v2/benchmarks/testnet"
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-data-transfer/v2/testutil"
gstransport "github.com/filecoin-project/go-data-transfer/v2/transport/graphsync"
)

// TempDirGenerator is any interface that can generate temporary directories
Expand Down Expand Up @@ -188,8 +188,7 @@ func NewInstance(ctx context.Context, net tn.Network, tempDir string, diskBasedD
sv := testutil.NewStubbedValidator()
sv.StubSuccessPull()
sv.StubSuccessPush()
dt.RegisterVoucherType(testutil.NewFakeDTType(), sv)
dt.RegisterVoucherResultType(testutil.NewFakeDTType())
dt.RegisterVoucherType(testutil.TestVoucherType, sv)
return Instance{
Adapter: dtNet,
Peer: p,
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/testnet/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package testnet

import (
gsnet "github.com/ipfs/go-graphsync/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"

dtnet "github.com/filecoin-project/go-data-transfer/network"
dtnet "github.com/filecoin-project/go-data-transfer/v2/network"
)

// Network is an interface for generating graphsync network interfaces
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/testnet/peernet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"

gsnet "github.com/ipfs/go-graphsync/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
mockpeernet "github.com/libp2p/go-libp2p/p2p/net/mock"

dtnet "github.com/filecoin-project/go-data-transfer/network"
dtnet "github.com/filecoin-project/go-data-transfer/v2/network"
)

type peernet struct {
Expand Down
6 changes: 3 additions & 3 deletions channelmonitor/channelmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

"github.com/bep/debounce"
logging "github.com/ipfs/go-log/v2"
"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"
"github.com/filecoin-project/go-data-transfer/channels"
datatransfer "github.com/filecoin-project/go-data-transfer/v2"
"github.com/filecoin-project/go-data-transfer/v2/channels"
)

var log = logging.Logger("dt-chanmon")
Expand Down
Loading

0 comments on commit 06882d2

Please sign in to comment.