Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.2.0 #99

Merged
merged 2 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,33 @@ Minor release with initial benchmarks
|-------------|---------|---------|---------------|
| Hannah Howard | 1 | +1055/-39 | 17 |

# go-graphsync 0.2.0

Update to IPLD prime + several optimizations for performance

### Changelog

- github.com/ipfs/go-graphsync:
- style(imports): fix imports
- fix(selectorvalidator): memory optimization (#97) ([ipfs/go-graphsync#97](https://github.com/ipfs/go-graphsync/pull/97))
- Update [email protected] (#92) ([ipfs/go-graphsync#92](https://github.com/ipfs/go-graphsync/pull/92))
- refactor(metadata): use cbor-gen encoding (#96) ([ipfs/go-graphsync#96](https://github.com/ipfs/go-graphsync/pull/96))
- Release/v0.1.2 ([ipfs/go-graphsync#95](https://github.com/ipfs/go-graphsync/pull/95))
- Return Request context cancelled error (#93) ([ipfs/go-graphsync#93](https://github.com/ipfs/go-graphsync/pull/93))
- feat(benchmarks): add p2p stress test (#91) ([ipfs/go-graphsync#91](https://github.com/ipfs/go-graphsync/pull/91))
- github.com/hannahhoward/cbor-gen-for (null -> v0.0.0-20200817222906-ea96cece81f1):
- add flag to select map encoding ([hannahhoward/cbor-gen-for#1](https://github.com/hannahhoward/cbor-gen-for/pull/1))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Eric Myhre | 1 | +2919/-121 | 39 |
| Hannah Howard | 3 | +412/-103 | 15 |
| hannahhoward | 1 | +31/-31 | 7 |
| whyrusleeping | 1 | +31/-18 | 2 |
| Aarsh Shah | 1 | +27/-1 | 3 |

### 🙌🏽 Want to contribute?

Would you like to contribute to this repo and don’t know how? Here are a few places you can get started:
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/testnet/peernet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package testnet
import (
"context"

gsnet "github.com/ipfs/go-graphsync/network"

"github.com/libp2p/go-libp2p-core/peer"
tnet "github.com/libp2p/go-libp2p-testing/net"
mockpeernet "github.com/libp2p/go-libp2p/p2p/net/mock"

gsnet "github.com/ipfs/go-graphsync/network"
)

type peernet struct {
Expand Down
4 changes: 2 additions & 2 deletions ipldutil/ipldutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func Traverse(ctx context.Context, loader ipld.Loader, chooser traversal.LinkTar
node := nb.Build()
return traversal.Progress{
Cfg: &traversal.Config{
Ctx: ctx,
LinkLoader: loader,
Ctx: ctx,
LinkLoader: loader,
LinkTargetNodePrototypeChooser: chooser,
},
}.WalkAdv(node, s, fn)
Expand Down
4 changes: 2 additions & 2 deletions ipldutil/traverser.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ func (t *traverser) start() {
}
err = traversal.Progress{
Cfg: &traversal.Config{
Ctx: t.ctx,
LinkLoader: loader,
Ctx: t.ctx,
LinkLoader: loader,
LinkTargetNodePrototypeChooser: t.chooser,
},
}.WalkAdv(nd, sel, t.visitor)
Expand Down
4 changes: 2 additions & 2 deletions metadata/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (

"github.com/ipld/go-ipld-prime/codec/dagcbor"
"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"
"github.com/stretchr/testify/require"

"github.com/ipfs/go-graphsync/testutil"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
)

func TestDecodeEncodeMetadata(t *testing.T) {
Expand Down
16 changes: 8 additions & 8 deletions requestmanager/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ type ExecutionEnv struct {

// RequestExecution are parameters for a single request execution
type RequestExecution struct {
Ctx context.Context
P peer.ID
NetworkError chan error
Request gsmsg.GraphSyncRequest
LastResponse *atomic.Value
DoNotSendCids *cid.Set
Ctx context.Context
P peer.ID
NetworkError chan error
Request gsmsg.GraphSyncRequest
LastResponse *atomic.Value
DoNotSendCids *cid.Set
NodePrototypeChooser traversal.LinkTargetNodePrototypeChooser
ResumeMessages chan []graphsync.ExtensionData
PauseMessages chan struct{}
ResumeMessages chan []graphsync.ExtensionData
PauseMessages chan struct{}
}

// Start begins execution of a request in a go routine
Expand Down
14 changes: 7 additions & 7 deletions requestmanager/executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,13 @@ func (ree *requestExecutionEnv) requestExecution() (chan graphsync.ResponseProgr
TerminateRequest: ree.terminateRequest,
Loader: ree.fal.AsyncLoad,
}.Start(executor.RequestExecution{
Ctx: ree.ctx,
P: ree.p,
LastResponse: &lastResponse,
Request: ree.request,
DoNotSendCids: ree.doNotSendCids,
Ctx: ree.ctx,
P: ree.p,
LastResponse: &lastResponse,
Request: ree.request,
DoNotSendCids: ree.doNotSendCids,
NodePrototypeChooser: ree.nodeStyleChooser,
ResumeMessages: ree.resumeMessages,
PauseMessages: ree.pauseMessages,
ResumeMessages: ree.resumeMessages,
PauseMessages: ree.pauseMessages,
})
}
16 changes: 8 additions & 8 deletions requestmanager/requestmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ func (nrm *newRequestMessage) setupRequest(requestID graphsync.RequestID, rm *Re
Loader: rm.asyncLoader.AsyncLoad,
}.Start(
executor.RequestExecution{
Ctx: ctx,
P: p,
Request: request,
NetworkError: networkError,
LastResponse: lastResponse,
DoNotSendCids: doNotSendCids,
Ctx: ctx,
P: p,
Request: request,
NetworkError: networkError,
LastResponse: lastResponse,
DoNotSendCids: doNotSendCids,
NodePrototypeChooser: hooksResult.CustomChooser,
ResumeMessages: resumeMessages,
PauseMessages: pauseMessages,
ResumeMessages: resumeMessages,
PauseMessages: pauseMessages,
})
return incoming, incomingError
}
Expand Down