Commit Graph

18 Commits

Author SHA1 Message Date
Łukasz Magiera
965b1cf03c itests: Fix TestEthSubscribeLogs 2023-01-31 10:28:12 +01:00
Łukasz Magiera
68e20cebd7 itests: Test EAM interactions from accounts 2023-01-23 11:18:46 +01:00
raulk
1e845c61a2
add integration test to catch tipset CID flakiness. (#10071) 2023-01-19 18:25:23 +00:00
Shrenuj Bansal
2fa21ff091 Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes 2022-11-11 14:41:38 -05:00
Łukasz Magiera
888f97a35f netbs: Add an integration test 2022-11-08 13:38:28 +01:00
Shrenuj Bansal
900525f8c2 some cleanup 2022-10-17 16:13:30 -04:00
Shrenuj Bansal
99e7c322eb More wip 2022-09-27 16:08:04 +00:00
Shrenuj Bansal
3441224b2f WIP: rest of the stuff 2022-09-13 17:30:13 -04:00
Shrenuj Bansal
4171be0b98 Few more changes 2022-09-12 16:37:24 -04:00
Shrenuj Bansal
8f1b1bb1ff WIP: Raft consensus for lotus nodes in a cluster 2022-09-12 16:10:15 -04:00
Łukasz Magiera
6afb43afbb wallet: Move key.go into separate pkg to avoid import loops 2022-06-14 19:21:40 +02:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Łukasz Magiera
0536eb898d itests: Share WaitForSectorActive correctly 2022-03-21 12:07:00 +01: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
Raúl Kripalani
8a418bf982 rename {kit2=>kit}. 2021-06-18 19:45:29 +01:00
Raúl Kripalani
e84b8ab3a0 move new kit into kit2, re-enable unmigrated tests against kit1. 2021-06-11 18:26:25 +01:00
Raúl Kripalani
8b037e2da3 deals tests: migrate deals cycles tests and add coverage. 2021-06-10 18:25:02 +01:00
Raúl Kripalani
2bcedcf55f initial version of the new itest kit.
Still need to migrate all integration tests, add godocs,
and probably zap bugs.
2021-05-26 00:04:13 +01:00