Commit Graph

2298 Commits

Author SHA1 Message Date
Łukasz Magiera
b094e0913d untangle fsjournal dependencies 2021-08-26 15:44:45 +02:00
Łukasz Magiera
5366821144 api for getting alert states 2021-08-26 15:44:45 +02:00
Łukasz Magiera
81b1dd12f8 Simple alert system; FD limit alerts 2021-08-26 15:44:45 +02:00
Aarsh Shah
928ac2191b fix throttling bug 2021-08-25 16:19:02 +05:30
Aarsh Shah
e1a056db46 ignore nil throttler 2021-08-24 10:42:00 +05:30
Łukasz Magiera
12875a9664 api/command for encoding actor params 2021-08-20 17:32:57 +02:00
Łukasz Magiera
0beb48f11d Fix error handling in SectorAddPieceToAny api impl 2021-08-19 12:56:40 +02:00
Jennifer Wang
7ff5844aa2 Merge branch 'releases' into jen/mas 2021-08-17 10:38:36 -04:00
Frrist
518b6f1d41
fix(miner): always create miner deal staging directory (#7098)
- fixes #7097

Co-authored-by: Raúl Kripalani <raul@protocol.ai>

Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2021-08-17 00:16:06 +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
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
eaff65c00f Remove network version panic 2021-08-12 23:50:30 -04:00
Raúl Kripalani
f9ea2e834c address nits. 2021-08-12 22:11:09 -04:00
Raúl Kripalani
85a4f8325f fix docs and nits. 2021-08-12 22:08:20 -04:00
Anton Evangelatov
45166e760b fixup 2021-08-12 22:06:11 -04:00
Anton Evangelatov
e90e71456b add RuntimeSubsystems API method; use it in lotus-miner info 2021-08-12 22:05:08 -04:00
ZenGround0
6da26dcefc Remove network version panic 2021-08-10 13:07:30 -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
Peter Rabbitson
eefdcb0454 Remove forgotten non-functioning config from the pre-mainnet days 2021-08-02 17:04:23 +02:00
frrist
ca697c9aa2 feat(miner deals): create subdir to miner repo for staged deals 2021-07-29 21:08:38 -07:00
vyzo
1d50dadc18 fix bug in message exclusion 2021-07-29 21:58:59 +03:00
Raúl Kripalani
b3c951c924 add RepoType#String; adjust repo parsing logic. 2021-07-29 12:22:27 -04:00
Raúl Kripalani
8442bac5b2 support MARKETS_API_INFO env var; support markets-repo, markets-api-url flags. 2021-07-29 12:20:05 -04:00
Raúl Kripalani
3144da86f3 add RepoType#String; adjust repo parsing logic. 2021-07-29 13:49:51 +01:00
Raúl Kripalani
4e19d8d562 support MARKETS_API_INFO env var; support markets-repo, markets-api-url flags. 2021-07-29 10:55:37 +01:00
Raúl Kripalani
d8c90b91be address nits. 2021-07-29 04:41:27 -04:00
Raúl Kripalani
c119ab6ed9 fix docs and nits. 2021-07-29 04:39:28 -04:00
Anton Evangelatov
0dd83c6755 fixup 2021-07-29 04:38:25 -04:00
Anton Evangelatov
9b7a7713a7 add RuntimeSubsystems API method; use it in lotus-miner info 2021-07-29 04:38:19 -04:00
Raúl Kripalani
d3742048f9 address nits. 2021-07-28 23:56:18 +01:00
Raúl Kripalani
a61ba7b09c Merge branch 'master' into nonsense/get-enabled-subsystems-api 2021-07-28 23:55:59 +01:00
Aayush Rajasekaran
21244704fc
Merge branch 'master' into mg/feat/configurable-sector-expirations 2021-07-28 16:45:27 -04:00
raulk
80aedcd276
Merge branch 'master' into nonsense/get-enabled-subsystems-api 2021-07-28 20:09:43 +01:00
Raúl Kripalani
07f40b9488 fix docs and nits. 2021-07-28 20:03:25 +01:00
Łukasz Magiera
389f71251c Remove townhall 2021-07-28 17:58:46 +02:00
Anton Evangelatov
4cf5c8f656 fixup 2021-07-28 16:23:04 +03:00
Anton Evangelatov
de4a847078 add RuntimeSubsystems API method; use it in lotus-miner info 2021-07-28 16:02:05 +03:00
Jiaying Wang
d45b4a7a1f
Merge branch 'master' into chore/cleanup-chain 2021-07-27 17:11:36 -04:00
Łukasz Magiera
9bd312881d VMSys doesn't belong in chainstore 2021-07-27 15:30:23 +02:00
vyzo
7c195245a1 make cfgdoc-gen 2021-07-27 12:13:26 +03:00
vyzo
9d25464703 use functional options for hotstore gc, rename MovingGC to FullGC 2021-07-27 09:53:22 +03:00
vyzo
aa0bd51b2c thread GCFrequency option into the splitstore config 2021-07-26 15:05:57 +03:00
vyzo
20f93a520f make cfgdoc-gen 2021-07-26 15:05:57 +03:00
vyzo
4cdb34e448 add docstrings for splitstore config 2021-07-26 15:05:57 +03:00
vyzo
5acae50e07 add config option for splitstore moving gc frequency 2021-07-26 15:05:57 +03:00
vyzo
a0d6fdba33 add ChainBlockstoreInfo APIv1 endpoint 2021-07-26 08:30:07 +03:00
vyzo
2dc72d5849 satisfy linter who wants to be a spell checker in comments 2021-07-25 11:47:21 +03:00
vyzo
3d2ae433ee add ChainCheckBlockstore API 2021-07-25 11:14:48 +03:00
Mike Greenberg
e68c59f984 fix: Update node config docs 2021-07-23 21:05:50 -04:00
Mike Greenberg
64d2b7a122 Merge branch 'origin/master' into mg/feat/configurable-sector-expirations
* origin/master: (47 commits)
  Fix links in issue templates
  Update issue templates and add templates for M1
  config: Add newlines consistently
  config: Add note on codegen to types.go
  fix lint
  cli docsgen
  config: Bring some docs from filecoin-docs
  add comment about the necessity of FileIO
  improve README
  config doc gen: generate formatted code
  config: Fix doc finding logic
  Nicer lotus-miner config commands
  Move doc-comment logic to the config pkg
  config: doc struct codegen
  lotus daemon config utils
  adjust compaction test with badger to hit the db
  add splitstore compaction test with badger markset
  update README with configuration options
  tweak badger options
  some tweaks in badger markset
  ...

Conflicts:
        node/config/def.go
2021-07-23 20:36:54 -04:00
Łukasz Magiera
91c6aca7e7 config: Add newlines consistently 2021-07-23 16:59:55 +02:00
Łukasz Magiera
80af6de316 config: Add note on codegen to types.go 2021-07-23 16:02:45 +02:00
Łukasz Magiera
ac2a1bfeab fix lint 2021-07-23 15:53:31 +02:00
Łukasz Magiera
a26712ebc4 config: Bring some docs from filecoin-docs 2021-07-23 15:40:40 +02:00
Łukasz Magiera
ed7f70e68e config doc gen: generate formatted code 2021-07-23 15:18:20 +02:00
Łukasz Magiera
3f4973cb41 config: Fix doc finding logic 2021-07-23 15:17:22 +02:00
Łukasz Magiera
8b1f19e94c Move doc-comment logic to the config pkg 2021-07-23 14:55:19 +02:00
Łukasz Magiera
97f5bb66c7 config: doc struct codegen 2021-07-23 13:55:50 +02:00
Mike Greenberg
adb62a3fff chore: Move cfg getter into PCPolicy; Clamp values on get 2021-07-22 15:07:03 -04:00
Mike Greenberg
9e34cce1f2 feat(config): support configurable CC sector expiration 2021-07-22 15:07:03 -04:00
Łukasz Magiera
660829703a Merge remote-tracking branch 'origin/master' into feat/split-net-api 2021-07-22 15:38:06 +02:00
Łukasz Magiera
da5aeda197
Merge branch 'master' into feat/splitstore-hot-messages 2021-07-22 12:58:06 +02:00
Peter Rabbitson
4830a3406b Introduce the LOTUS_CHAIN_BADGERSTORE_DISABLE_FSYNC envvar
Allows the user to control the opts.SyncWrites option of BadgerDs
2021-07-21 22:38:14 +02:00
Anton Evangelatov
fe31956713 fetch peer id from chain 2021-07-21 11:43:19 +02:00
vyzo
839b00ab40 rename messagepool ProtectMessages to ForEachPendingMessage 2021-07-20 09:23:36 +03:00
vyzo
ebbaf23af8 support out-of-chain reference protection 2021-07-20 09:02:40 +03:00
vyzo
1b77361301 add option for hotstore message retention 2021-07-17 08:35:35 +03:00
vyzo
e003203bea implement exposed splitstore 2021-07-15 13:12:10 +03:00
Łukasz Magiera
812dc266cf builder: Don't require specific NetAPI impl in StorageMinerAPI 2021-07-15 12:01:13 +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
Łukasz Magiera
583a8a13d9
Merge pull request #6629 from filecoin-project/feat/pledge-from-miner-balance
Config for collateral from miner available balance
2021-07-13 17:22:00 +02:00
Łukasz Magiera
837322ea59
Merge pull request #6356 from filecoin-project/nonsense/split-market-miner-processes
Support standalone miner-market process
2021-07-13 17:16:07 +02:00
Łukasz Magiera
7526a074d9 sealing: collateral buffer / falback config 2021-07-13 17:04:58 +02:00
Łukasz Magiera
c37401a1a3
Merge pull request #6474 from filecoin-project/feat/splitstore-redux
Splitstore Enhanchements
2021-07-13 12:43:57 +02:00
hannahhoward
92ec239202 fix(node): ClientRetrieve stops on cancel
When a deal is cancelled, any in progress calls to ClientRetrieve or ClientRetrieveWithEvents should
return
2021-07-12 14:46:18 -07:00
Łukasz Magiera
83f2368507 Add CollateralFromMinerBalance config 2021-07-12 14:11:58 +02:00
Anton Evangelatov
4bc9fa04ba rename cfg.Subsystems.EnableStorageMarket to EnableMarkets 2021-07-12 12:12:29 +02:00
Anton Evangelatov
056136ef5a rename argument from url to apiInfo 2021-07-12 11:36:22 +02:00
Anton Evangelatov
a423c46f2a rename mock.go to net.go 2021-07-12 11:35:03 +02:00
Anton Evangelatov
d89ddb9315 resolve conflicts 2021-07-12 11:34:37 +02:00
Anton Evangelatov
16784aa2cc remove pieceProvider from DI; small refactors 2021-07-12 11:30:26 +02:00
vyzo
c0a1cfffa1 rename noopstore to discardstore 2021-07-09 19:19:37 +03:00
vyzo
abdf4a161a explicitly switch marksets for concurrent marking
this has very noticeable impact in initial marking time; it also allows us
to get rid of the confusing ts monikers.
2021-07-09 04:26:36 +03:00
Łukasz Magiera
ed0cc0b56d Handle bad peerIDs in MarketListRetrievalDeals 2021-07-08 19:27:03 +02:00
Łukasz Magiera
8f5c0c60f5 Config for deal publishing control addresses 2021-07-07 18:00:54 +02:00
Anton Evangelatov
82efe01c70 fixup 2021-07-07 18:00:28 +02:00
Anton Evangelatov
6b014f57e5 pass Subsystems to StorageMiner option; add enableLibp2p bool in Settings 2021-07-07 13:56:37 +02:00
Anton Evangelatov
42ae876711 remove ApplyIfEnableLibP2P 2021-07-07 13:31:56 +02:00
Anton Evangelatov
7a78527fde remove not used sa; cleanup 2021-07-06 17:46:21 +02:00
Anton Evangelatov
10dc90f7fe addressing comments 2021-07-06 17:33:47 +02:00
Anton Evangelatov
898687ea2e
Update node/modules/storageminer.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-07-06 17:28:52 +02:00
Anton Evangelatov
ff2772a58c resolved conflicts 2021-07-06 16:00:41 +02:00
Łukasz Magiera
97207df705
Merge pull request #6639 from filecoin-project/frrist/context-in-statetree-diff
polish(statetree): accept a context in statetree diff for timeouts
2021-07-05 17:30:31 +02:00
Anton Evangelatov
4be0a7a215 resolve conflicts with master 2021-07-05 13:13:32 +02:00
vyzo
190cb18ab0 housekeeping
- remove defunct tracking store implementations
- update splitstore node config
- use mark set type config option (defaulting to mapts); a memory constrained node
  may want to use an on-disk one
2021-07-04 18:38:28 +03:00
vyzo
5f7ae1f489 update splistore DI constructor 2021-07-04 18:38:28 +03:00
vyzo
68bc5d2291 skip moving cold blocks when running with a noop coldstore
it is a noop but it still takes (a lot of) time because it has to read all the cold blocks.
2021-07-04 18:38:28 +03:00
vyzo
649b7dd162 add config option for hot headers 2021-07-04 18:38:28 +03:00
vyzo
997f2c098b keep headers hot when running with a noop splitstore 2021-07-04 18:38:28 +03:00