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

Storage market network abstraction #109

Merged
merged 3 commits into from
Feb 5, 2020

Conversation

hannahhoward
Copy link
Collaborator

Goals

Abstract away underlying libp2p connections within the storage market, so that we can test the modules more easily

Implementation

  • Create StorageMarketNetwork interface that exposes relevant protocol functionality to the Storage Client & Storage Provider.
  • Importantly this network deals directly in types used by the storage provider & client, with no information about the underlying network transportation
  • Integrate the network into the client & provider

@hannahhoward hannahhoward force-pushed the feat/storage-market-network-abstraction branch from d5047db to 1c2f98d Compare February 4, 2020 15:28
@hannahhoward hannahhoward force-pushed the feat/no-filestore-on-storage-client branch 2 times, most recently from 391c11b to 0e847a5 Compare February 4, 2020 22:08
@hannahhoward hannahhoward force-pushed the feat/storage-market-network-abstraction branch from 1c2f98d to 6cdb000 Compare February 4, 2020 22:12
@hannahhoward hannahhoward changed the base branch from feat/no-filestore-on-storage-client to master February 4, 2020 22:12
Copy link
Contributor

@ingar ingar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool. Thanks! 👍

go.sum Outdated
@@ -74,6 +74,7 @@ github.com/filecoin-project/go-sectorbuilder v0.0.1 h1:yiLSEprWA1E43DFTSCXLSuCst
github.com/filecoin-project/go-sectorbuilder v0.0.1/go.mod h1:3OZ4E3B2OuwhJjtxR4r7hPU9bCfB+A+hm4alLEsaeDc=
github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ=
github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI=
github.com/filecoin-project/lotus v0.2.7 h1:kMroa4l/F3fcQp1s0T4wIhV0w0RZ6PPeFioXb3Mpwkw=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eek

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that was fixed after mod tidy -- sorry

@@ -26,7 +26,7 @@ func (c *Client) failDeal(id cid.Cid, cerr error) {

s, ok := c.conns[id]
if ok {
_ = s.Reset()
_ = s.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close() is different than Reset(). Does it make sense to just close our end of the connection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should end the connection on a failed deal

build an abstraction layer for communicating with the network over storage protocols
Replace direct references to libp2p host with network abstraction layer in client and provider
@hannahhoward hannahhoward force-pushed the feat/storage-market-network-abstraction branch from 6cdb000 to 8833819 Compare February 5, 2020 19:55
@hannahhoward hannahhoward merged commit aa23f79 into master Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants