Commit Graph

3471 Commits

Author SHA1 Message Date
dirkmc
1da59fa2fe fix events API timeout handling for nil blocks (#7184) 2021-08-30 17:00:24 -07:00
Steven Allen
1cf556c3a2 feat: expose ChainGetPath on the gateway 2021-08-30 16:43:21 -07:00
Steven Allen
003eae81ce fix: address review 2021-08-30 16:43:21 -07:00
Steven Allen
f518e34131 fix: atomically get head when registering an observer
This lets us always call check (accurately).
2021-08-30 16:43:21 -07:00
Steven Allen
82ac0a24a0 test: improve chain event tests 2021-08-30 16:43:21 -07:00
Steven Allen
3846170302 refactor events system 2021-08-30 16:43:21 -07:00
Steven Allen
a875e9ba73 fix: check parents when adding tipsets to the "cache" 2021-08-30 16:43:21 -07:00
Steven Allen
43bbde1e6b fix: close chain head subscription when the reader is slow
The reader can just re-subscribe when they're ready to catch up. This
prevents a slow reader from bogging down the entire system.
2021-08-30 16:43:21 -07:00
Steven Allen
14754f1b18 chore: dedup datastore import 2021-08-30 16:43:21 -07:00
Dirk McCormick
7b7a5b0b21 revert: changes to OnDealExpiredOrChanged in #5431 #7201 2021-08-30 10:42:41 +02:00
dirkmc
77a19774cf fix events API timeout handling for nil blocks (#7184) 2021-08-27 09:05:00 +02:00
Aayush Rajasekaran
bdd1c36802 Incoming: improve a log message 2021-08-25 12:26:10 -04:00
Łukasz Magiera
927ef041f8 miner: Command to list expired sectors 2021-08-23 11:27:34 -07: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
Steven Allen
3235dbfaee fix genesis for actors v2 2021-08-11 13:30:15 -07:00
Aayush Rajasekaran
a52352b13a PreCommitPolicy: Don't try to align expirations on proving period boundaries 2021-08-11 12:44:12 -04:00
ZenGround0
b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04: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
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
whyrusleeping
bfd69f5381 WIP: dont panic if input is bad 2021-08-09 12:17:54 +02:00
Steven Allen
5a321f970e fix: vet actors shims
1. Check error in EraseAllUnproven
2. Avoid dead code.
2021-08-06 14:56:29 -07:00
Steven Allen
fe74311209
Merge branch 'master' into feat/print-runtime-send-update 2021-07-28 18:55:38 -07:00
frrist
256d12773b polish(errors): better state tree errors 2021-07-28 17:50:22 -07:00
ZenGround0
e09a25ca68 Remove unnecessary ret log 2021-07-28 18:26:29 -04:00
ZenGround0
a968784908 fix new panics in invoker_test.go 2021-07-28 18:26:29 -04:00
ZenGround0
0202192fc0 Log more call context during errors 2021-07-28 18:26:29 -04:00
Łukasz Magiera
389f71251c Remove townhall 2021-07-28 17:58:46 +02:00
Łukasz Magiera
c57c20c6e4 fix lint 2021-07-27 15:58:18 +02:00
Łukasz Magiera
05a3710288 chainstore: Fix test build 2021-07-27 15:53:47 +02:00
Łukasz Magiera
ae63a4b33b fix lotus-sim build 2021-07-27 15:49:01 +02:00
Łukasz Magiera
ce82f2827b stmgr: Put actor state accessors in actors.go 2021-07-27 15:43:11 +02:00
Łukasz Magiera
e7d73cbe56 vm: Remove unused ActorBalance 2021-07-27 15:34:39 +02:00
Łukasz Magiera
9bd312881d VMSys doesn't belong in chainstore 2021-07-27 15:30:23 +02:00
Łukasz Magiera
ca1cd741c3 stmgr: Split stmgr.go into smaller subfiles 2021-07-27 15:15:50 +02:00
Łukasz Magiera
50b217817e stmgr: Split upgrade code from upgrade runtime 2021-07-27 14:48:30 +02:00
Łukasz Magiera
6ba42e3e6b chainstore: refactor store.go into more subfiles 2021-07-27 14:41:36 +02:00
Peter Rabbitson
ed387b43cc Bump go-multihash, adjust test for supported version 2021-07-26 17:50:19 +02:00
Aayush Rajasekaran
104626acb7 ValidateBlock: Assert that block header height's are greater than their parents 2021-07-26 11:09:23 -04:00
Łukasz Magiera
f9752d8a0a
Merge branch 'master' into feat/compact-sectors-numbers-cmd 2021-07-22 19:00:33 +02:00
Łukasz Magiera
0656b62176 Merge remote-tracking branch 'origin/master' into feat/compact-sectors-numbers-cmd 2021-07-22 16:04:25 +02:00
ZenGround0
d6a8a7aeb8 Remove validation because of sync TestDrandNull test 2021-07-22 09:49:47 -04:00
ZenGround0
4cd05fa39c Lint 2021-07-22 09:49:47 -04:00
ZenGround0
ed844c5283 Use current ntwk version in mpool message check 2021-07-22 09:49:47 -04:00
ZenGround0
9fc4a25bd1 Fix tests with bad network version refs 2021-07-22 09:49:47 -04:00
ZenGround0
cbc07cb939 Add 6.5 to VersionForNetwork commit updated docs 2021-07-22 09:49:47 -04:00
ZenGround0
545cc723e0 Fix test 2021-07-22 09:49:47 -04:00
ZenGround0
47b5afa84b Add version six and a half 2021-07-22 09:49:47 -04:00
ZenGround0
f49a8248f0 PriceListByVersion 2021-07-22 09:49:47 -04:00
Łukasz Magiera
3006dda786
Merge pull request #6760 from ipfs-force-community/feat/cache_blkmsg_events
cache loaded block messages
2021-07-22 13:54:51 +02:00