Commit Graph

1180 Commits

Author SHA1 Message Date
Łukasz Magiera
12875a9664 api/command for encoding actor params 2021-08-20 17:32:57 +02:00
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
ZenGround0
b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04:00
Steven Allen
57bf5c2143 feat: add ChainGetTipSetAfterHeight
This is identical to ChainGetTipSetByHeight, but returns the tipset
following any null tipsets. This is what the user usually wants anyways.

(and I need it for another PR)
2021-08-05 12:07:14 -07:00
Raúl Kripalani
07f40b9488 fix docs and nits. 2021-07-28 20:03:25 +01:00
Anton Evangelatov
de4a847078 add RuntimeSubsystems API method; use it in lotus-miner info 2021-07-28 16:02:05 +03:00
Mike Greenberg
76a9f4241b feat: Graceful error when api impl is nil 2021-07-26 13:51:37 +02:00
vyzo
1f6935f8c4 make gen 2021-07-26 12:15:01 +03:00
vyzo
3c409d5023 require admin for running checks on the splitstore. 2021-07-26 12:13:41 +03:00
vyzo
77604db716 make gen 2021-07-26 08:33:25 +03:00
vyzo
a0d6fdba33 add ChainBlockstoreInfo APIv1 endpoint 2021-07-26 08:30:07 +03:00
vyzo
21bb2bda09 make gen 2021-07-25 11:25:29 +03:00
vyzo
5b2e4d8ad4 add permission tag to ChainCheckBlockstore API 2021-07-25 11:24:06 +03:00
vyzo
3d2ae433ee add ChainCheckBlockstore API 2021-07-25 11:14:48 +03:00
ZenGround0
fe5e1b23d5 Update api version to account for new network version 6.5 + new underlying repr 2021-07-22 09:49:47 -04:00
Łukasz Magiera
660829703a Merge remote-tracking branch 'origin/master' into feat/split-net-api 2021-07-22 15:38:06 +02:00
whyrusleeping
d89e2f065c add StateReadState to gateway api 2021-07-21 17:21:28 -07:00
Łukasz Magiera
d5c9cccf21 address net interface split review 2021-07-15 15:51:47 +02:00
Łukasz Magiera
b20581bac2 api: check that only the top-level internal struct gets picked up 2021-07-15 15:45:41 +02:00
Łukasz Magiera
49e26cce7d api: Separate the Net interface from Common 2021-07-15 11:41:30 +02:00
hunjixin
bdaa73a413 add ChainGetMessagesInTipset api 2021-07-15 14:52:09 +08:00
Anton Evangelatov
d89ddb9315 resolve conflicts 2021-07-12 11:34:37 +02:00
Łukasz Magiera
ee97aa0a8a dealpublisher: Use address selector 2021-07-07 19:12:03 +02:00
Łukasz Magiera
8f5c0c60f5 Config for deal publishing control addresses 2021-07-07 18:00:54 +02:00
Anton Evangelatov
4f0a96c9c7 resolved conflicts 2021-06-30 13:16:52 +02:00
Łukasz Magiera
c1303f1eac gateway: Add support for Version method 2021-06-28 19:05:27 +02:00
Łukasz Magiera
69e0dff56c api: Fix Wrap for nested proxy structs 2021-06-28 19:00:37 +02:00
Anton Evangelatov
d45bb14015 Merge branch 'master' into nonsense/split-market-miner-processes 2021-06-16 18:49:15 +02:00
Aayush Rajasekaran
bee548face Add utils to use multisigs as miner owners 2021-06-15 16:57:52 -04:00
Anton Evangelatov
090a16316c bump miner version apiv0 2021-06-15 13:59:51 +02:00
Anton Evangelatov
31e6fb154e resolve conflicts 2021-06-14 11:27:54 +02:00
Anton Evangelatov
9f3ec82cc1 initial resolution of conflicts 2021-06-08 13:01:22 +02:00
Raúl Kripalani
a274fcc533 Merge branch 'master' into raulk/itests 2021-06-07 23:44:22 +01:00
Raúl Kripalani
db1a61852d Merge branch 'master' into raulk/itests 2021-06-07 23:17:44 +01:00
Łukasz Magiera
8625da3479 Bump miner/worker api versions 2021-06-07 16:57:24 +02:00
aarshkshah1992
ddd9bf610e fix CI 2021-06-07 16:45:52 +05:30
aarshkshah1992
21e6b50294 finished rebasing PR 2021-06-07 16:02:15 +05:30
aarshkshah1992
ad4b182bfe remove read task type and run gen and docsgen 2021-06-07 15:03:06 +05:30
Dirk McCormick
52b90e4c9d test: offline deals 2021-06-04 22:42:07 +02:00
Łukasz Magiera
ba654285f0
Merge pull request #6397 from filecoin-project/fix/some-flaky-tests
Fix some flaky tests
2021-06-04 22:00:29 +02:00
Łukasz Magiera
a7746961fb Merge remote-tracking branch 'origin/master' into feat/list-retrievals 2021-06-04 20:49:01 +02:00
Anton Evangelatov
8bd09e39ca resolve merge conflicts 2021-06-04 16:17:00 +02:00
Łukasz Magiera
fd2d2d3ff4 Fix TestDeadlineToggling flakiness 2021-06-03 17:08:05 +02:00
Aayush Rajasekaran
cf18709100 Fix TestDeadlineToggling 2021-06-01 17:50:06 -04:00
Aayush Rajasekaran
f00cf70df0 Magik shouldn't write code at midnight 2021-06-01 17:31:44 -04:00
Łukasz Magiera
2f0a9f6c40 Improve AddVerifiedClient test 2021-06-01 21:28:48 +02:00
Łukasz Magiera
a676da8a7e Merge remote-tracking branch 'origin/master' into feat/nv13-1.11 2021-06-01 21:07:04 +02:00
Łukasz Magiera
dc642d0b7b Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-06-01 21:06:58 +02:00
Łukasz Magiera
5c5b8866c7 gofmt 2021-06-01 19:14:08 +02:00
Łukasz Magiera
8072573292 Fix TestWindowPostDispute 2021-06-01 19:11:32 +02:00