Commit Graph

13317 Commits

Author SHA1 Message Date
Aarsh Shah
d7076778e2
integrate DAG store and CARv2 in deal-making (#6671)
This commit removes badger from the deal-making processes, and
moves to a new architecture with the dagstore as the cental
component on the miner-side, and CARv2s on the client-side.

Every deal that has been handed off to the sealing subsystem becomes
a shard in the dagstore. Shards are mounted via the LotusMount, which
teaches the dagstore how to load the related piece when serving
retrievals.

When the miner starts the Lotus for the first time with this patch,
we will perform a one-time migration of all active deals into the
dagstore. This is a lightweight process, and it consists simply
of registering the shards in the dagstore.

Shards are backed by the unsealed copy of the piece. This is currently
a CARv1. However, the dagstore keeps CARv2 indices for all pieces, so
when it's time to acquire a shard to serve a retrieval, the unsealed
CARv1 is joined with its index (safeguarded by the dagstore), to form
a read-only blockstore, thus taking the place of the monolithic
badger.

Data transfers have been adjusted to interface directly with CARv2 files.
On inbound transfers (client retrievals, miner storage deals), we stream
the received data into a CARv2 ReadWrite blockstore. On outbound transfers
(client storage deals, miner retrievals), we serve the data off a CARv2
ReadOnly blockstore.

Client-side imports are managed by the refactored *imports.Manager
component (when not using IPFS integration). Just like it before, we use
the go-filestore library to avoid duplicating the data from the original
file in the resulting UnixFS DAG (concretely the leaves). However, the
target of those imports are what we call "ref-CARv2s": CARv2 files placed
under the `$LOTUS_PATH/imports` directory, containing the intermediate
nodes in full, and the leaves as positional references to the original file
on disk.

Client-side retrievals are placed into CARv2 files in the location:
`$LOTUS_PATH/retrievals`.

A new set of `Dagstore*` JSON-RPC operations and `lotus-miner dagstore`
subcommands have been introduced on the miner-side to inspect and manage
the dagstore.

Despite moving to a CARv2-backed system, the IPFS integration has been
respected, and it continues to be possible to make storage deals with data
held in an IPFS node, and to perform retrievals directly into an IPFS node.

NOTE: because the "staging" and "client" Badger blockstores are no longer
used, existing imports on the client will be rendered useless. On startup,
Lotus will enumerate all imports and print WARN statements on the log for
each import that needs to be reimported. These log lines contain these
messages:

- import lacks carv2 path; import will not work; please reimport
- import has missing/broken carv2; please reimport

At the end, we will print a "sanity check completed" message indicating
the count of imports found, and how many were deemed broken.

Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>

Co-authored-by: Raúl Kripalani <raul@protocol.ai>
Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
2021-08-16 23:34:32 +01:00
raulk
473a192b85
fix build after merging #6097. (#7096)
fix build after merging #6097.
2021-08-16 23:18:32 +01:00
ZenGround0
10615b53ad
Merge pull request #6853 from filecoin-project/frrist/miner-temp-file-path
feat(miner deals): create subdir to miner repo for staged deals
2021-08-16 16:19:05 -04:00
ZenGround0
2e5b492edd
Merge pull request #6097 from filcloud/sectors-renew
Extending sectors: more practical and flexible tools
2021-08-16 13:50:38 -04:00
raulk
0d7654d2c9
Merge pull request #7088 from filecoin-project/nonsense/improve-get-api-error-msgs 2021-08-16 14:38:58 +01:00
He Weidong
92402e9f23 Update doc 2021-08-16 21:31:21 +08:00
Anton Evangelatov
adcb8f3b15 improve get api error messages 2021-08-16 14:33:08 +03:00
He Weidong
b50b1e9ac4 Optimize for ci 2021-08-14 10:41:01 +08:00
He Weidong
c5f81d35f5 minor modification 2021-08-13 13:47:48 +08:00
Jiaying Wang
6812c293b1
Merge pull request #6944 from filecoin-project/Lotus---release-process
Lotus release process  - how we make releases
2021-08-13 00:41:42 -04:00
Jennifer Wang
34dc70ca2a nits 2021-08-13 00:39:51 -04:00
ZenGround0
ce58b119bf
Merge pull request #7038 from filecoin-project/spike/restrict-api-versions
Strict major minor version checking on v0 and v1 apis
2021-08-12 14:34:31 -04:00
ZenGround0
2d8c9bba99 more fix 2021-08-12 14:03:19 -04:00
ZenGround0
c8720fef02 Fix tests 2021-08-12 14:01:24 -04:00
ZenGround0
73a644f320 Review response 2021-08-12 13:09:43 -04:00
raulk
3960f719db
Merge pull request #7042 from filecoin-project/fix/lotus-miner-net-markets 2021-08-12 16:45:58 +01:00
Raúl Kripalani
2484fbc1f7 remove commented code. 2021-08-12 15:38:19 +01:00
Raúl Kripalani
5f6166435c make lotus-miner net commands hit markets subsystem. 2021-08-12 11:15:00 +01:00
Steven Allen
af9a71ac7c
Merge pull request #6998 from filecoin-project/feat/latest-genesis
Test with latest actors version
2021-08-11 14:29:18 -07:00
Steven Allen
ee44312c00
Merge pull request #7039 from filecoin-project/fix/codecov-again
codecov: fix mock name
2021-08-11 13:56:59 -07:00
Steven Allen
4214ab12ef codecov: fix mock name 2021-08-11 13:50:33 -07:00
ZenGround0
3bb5d4eb8f Strict major minor version checking on v0 and v1 apis 2021-08-11 16:40:14 -04:00
Steven Allen
dcff06bd91 test: genesis actors version
Properly handle genesis in actors tests. Fast-forward upgrading to
actors v13 doesn't work because there needs to be at least a day between
v0 genesis and v13 (due to differences in miner cron).
2021-08-11 13:30:15 -07:00
Steven Allen
3235dbfaee fix genesis for actors v2 2021-08-11 13:30:15 -07:00
Steven Allen
9911ab1000
Merge pull request #7037 from filecoin-project/fix/codecov-regex
codecov: fix regexes
2021-08-11 13:27:14 -07:00
Steven Allen
4bf8cb455b codecov: fix regexes
Unfortunately, these changes don't apply till they hit master.
2021-08-11 13:25:19 -07:00
Steven Allen
cbb7c191e6
Merge pull request #7036 from filecoin-project/codecov/ignore-old-shims
Magically increase code coverage
2021-08-11 13:14:25 -07:00
Steven Allen
b2714e19d5 codecov: ignore generated and non-essential code
1. Ignore debugging/testing commands.
2. Ignore build related code.
3. Ignore all generated "mocks" code.
4. Ignore all *_gen.go files.
5. Ignore old actors shims.
2021-08-11 12:38:20 -07:00
Steven Allen
498644acab
Merge pull request #7011 from filecoin-project/fix/no-t-aux
fix: don't check for t_aux when proving
2021-08-11 11:28:29 -07:00
Łukasz Magiera
e8a6ea1dc8
Merge pull request #7027 from swift-mx/master
Support --actor in miner actor control list
2021-08-11 19:56:30 +02:00
Aayush Rajasekaran
07c636bf86
Merge pull request #7018 from filecoin-project/asr/sector-exp-alignment
PreCommitPolicy: Don't try to align expirations on proving period boundaries
2021-08-11 13:05:27 -04:00
Aayush Rajasekaran
a52352b13a PreCommitPolicy: Don't try to align expirations on proving period boundaries 2021-08-11 12:44:12 -04:00
ZenGround0
14dcc477f1
Merge pull request #7022 from filecoin-project/revert/pricelist-fix
revert pricelist by version to pricelist by epoch
2021-08-11 12:14:26 -04:00
ZenGround0
bfda864c1b Fix docsgen 2021-08-11 09:49:23 -04:00
ZenGround0
bf41240ee1 Update deps to revert version representation 2021-08-11 09:49:23 -04:00
ZenGround0
b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04:00
swift-mx
d6562bccfc
Merge branch 'filecoin-project:master' into master 2021-08-11 19:25:27 +08:00
mx
46a93bb78a fix: get other actor controlList 2021-08-11 19:23:37 +08:00
Steven Allen
130fc6fce1
Merge pull request #7019 from filecoin-project/asr/genesis-shed
Shed: Include network name in genesis-verify
2021-08-10 16:25:02 -07:00
Steven Allen
65e3540d03
Merge pull request #7007 from filecoin-project/fix/panic-less
Dont panic if input is bad
2021-08-10 16:22:56 -07:00
Aayush Rajasekaran
feb9d3c557 Shed: Include network name in genesis-verify 2021-08-10 14:46:24 -04:00
ZenGround0
234030218c Fix actor policy codegen 2021-08-10 13:32:00 -04:00
ZenGround0
6da26dcefc Remove network version panic 2021-08-10 13:07:30 -04:00
vyzo
c24d4e11d5
Merge pull request #6949 from filecoin-project/fix/splitstore-memory-usage
Reduce splitstore memory usage during chain walks
2021-08-10 11:05:41 +03:00
vyzo
eb0a62e9e9 RIP bloom filter markset; you weren't used anyway. 2021-08-10 10:47:01 +03:00
vyzo
742c85bf81 add SupportsVisitor in the markset env interface 2021-08-10 10:47:01 +03:00
vyzo
79f348a01c make the write lock scope limited within a function
Also avoid removing the writing set if there was an error while writing.
2021-08-10 10:47:01 +03:00
vyzo
a9403b42f0 deduplicate put code 2021-08-10 10:47:01 +03:00
vyzo
1a59b73adc add .tmp suffix to transient db names 2021-08-10 10:47:01 +03:00
vyzo
26a5832f92 simplify and deduplicate Has/Visit using helper methods tryPending and tryDB. 2021-08-10 10:47:01 +03:00