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
Integrate CARv2 blockstore in the retrieval market #560
Conversation
14562e0
to
2b0175b
Compare
0edae9f
to
bbc081d
Compare
bbc081d
to
dd70879
Compare
@dirkmc Please can you write some unit tests for the |
f8eabc1
to
e3e351e
Compare
e3e351e
to
fb18a6b
Compare
e95617a
to
07597f8
Compare
* dagstore lotus mount impl * refactor: nicer error messages * mount api tests * refactor: integrate dag store (#565) Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
@@ -77,7 +77,8 @@ func (deal *ClientDealState) NextInterval() uint64 { | |||
// of a retrieval provider | |||
type ProviderDealState struct { | |||
DealProposal | |||
StoreID multistore.StoreID | |||
StoreID multistore.StoreID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can we get rid of this completely ? We don't need to support inflight storage deals after the upgrade. It'd be great if Markets does NOT depend on go-multistore
after the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this will enable Lotus to completely get rid of the go-multistore
dep and have a green CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migrations depend on this field being here.
We could get rid of it but we'd also have to get rid of those migrations. I'd suggest we do that in a separate PR.
|
||
// CarFileStore provides the path at which to store CAR files created during | ||
// storage or retrieval | ||
type CarFileStore interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a separate abstraction/impl here ? I think we can simply use the existing Filestore here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing fileStore in filestore/filestore.go is for a different use case - it's used to create a file at a path, and delete it later.
Whereas the carStore is just a way for code that uses the retrieval client to be able to tell the retrieval client where to create CAR files. The actual creation of the CAR files is managed by the go-car package.
0b1481b
to
9c440e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great !
|
||
"github.com/filecoin-project/go-fil-markets/shared_testutil" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you also write a test to verify that the lazy blockstore loads the underlying blockstore only once ? Can pass a CountingBlockstore
wrapper to the lazy blockstore...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -16,11 +16,12 @@ import ( | |||
datatransfer "github.com/filecoin-project/go-data-transfer" | |||
versioning "github.com/filecoin-project/go-ds-versioning/pkg" | |||
versionedfsm "github.com/filecoin-project/go-ds-versioning/pkg/fsm" | |||
"github.com/filecoin-project/go-multistore" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can we get rid of go-multistore
completely from go.mod
?
Codecov Report
@@ Coverage Diff @@
## feat/lotus-dagstore-mount #560 +/- ##
=============================================================
+ Coverage 65.69% 65.71% +0.02%
=============================================================
Files 56 65 +9
Lines 3756 4487 +731
=============================================================
+ Hits 2467 2948 +481
- Misses 1039 1264 +225
- Partials 250 275 +25
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHIP.
* dag store lotus mount * storage client code complete-tests remain * storage miner first draft * second draft * provider state tests are now working * most unit tests working and more unit tests * refactor: car store trackers (#559) * Apply suggestions from code review Co-authored-by: dirkmc <dirkmdev@gmail.com> * nits and review * integration testing changes * storage test harness changes * added more TODOs * fix itests for storage * get offline deal tests working * tests work * more tests * integration tests * fix blockstore finalize * Integrate CARv2 blockstore in the retrieval market (#560) * refactor: integrate dag store into retrieval market * fix all tests and the padding issue * refactor: move mount from shared testutil to dagstore dir * refactor: add tests for lazy blockstore * refactor: code cleanup * feat: update go-car to latest * Dagstore lotus mount Implementation with tests (#564) * dagstore lotus mount impl * refactor: nicer error messages * mount api tests * refactor: integrate dag store (#565) Co-authored-by: Dirk McCormick <dirkmdev@gmail.com> * some storage market fixes by aarsh * fix: better error messages in DAG store wrapper * refactor: simplify mock dag store wrapper * fix: TestBounceConnectionDealTransferOngoing * refactor: remove some commented out code * refactor: closable blockstore interface to use full blockstore * fix: TestBounceConnectionDealTransferUnsealing * refactor: add comment explaining lotus mount template * test: verify that the lazy blockstore is only initialized once * fix: comment * fix: always finalize blockstore before reaching complete state (#567) Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com> Co-authored-by: dirkmc <dirkmdev@gmail.com>
WIP
TODO