Commit Graph

1126 Commits

Author SHA1 Message Date
Aayush Rajasekaran
32fc03886d CLI: Add a lotus multisig cancel command 2021-11-18 19:21:17 -05:00
Travis Person
60b3ae2ac2 add timeout flag to wait-api command 2021-11-02 17:28:11 +00:00
Jennifer Wang
dc6bd2b015 use existing util 2021-10-26 20:53:16 -04:00
Jennifer Wang
18834de7d0 parse attofil to fil 2021-10-26 19:37:29 -04:00
jennijuju
9369c54f54 rename a fil plus cmd upon request 2021-10-20 17:53:16 -07:00
Jakub Sztandera
35291983a1
Fix missnamed variable
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 14:06:21 +02:00
Jakub Sztandera
4853762763
Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 14:03:37 +02:00
Aayush Rajasekaran
e158b1d1e4 Bugfix: actor withdraw CLI should depend on network version 2021-10-09 20:17:03 -04:00
Peter Rabbitson
5e6aceeb0e Merge remote-tracking branch 'origin/master' into feat/datamodel-selector-retrieval 2021-10-05 18:15:51 +02:00
Aayush Rajasekaran
2bafdf7271 Modify tooling to support new WithdrawBalance return 2021-09-29 13:01:04 -04:00
Peter Rabbitson
0444435589 Expose basic text-based datamodel selector on retrieval
Syntaxt of selection is located at
https://pkg.go.dev/github.com/ipld/go-ipld-selector-text-lite#SelectorSpecFromPath

Example use, assuming that:
  - The root of the deal is a plain dag-pb unixfs directory
  - The directory is not sharded
  - The user wants to retrieve the first entry in that directory

  lotus client retrieve --miner f0XXXXX --datamodel-path-selector 'Links/0/Hash' bafyROOTCID ~/output

For a much more elaborate example see the top of ./itests/deals_partial_retrieval_test.go
2021-09-10 09:44:11 +02:00
Łukasz Magiera
727bb84592 stmgr: drop MethdosMap 2021-09-02 18:58:34 +02:00
Łukasz Magiera
95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
Łukasz Magiera
e2ba650a8c cli for checking alerts 2021-08-26 15:45:17 +02:00
Łukasz Magiera
1ac87279d7 Add --to-code to chain encode params 2021-08-20 18:13:05 +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
Anton Evangelatov
adcb8f3b15 improve get api error messages 2021-08-16 14:33:08 +03: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
73a644f320 Review response 2021-08-12 13:09:43 -04: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
ZenGround0
3bb5d4eb8f Strict major minor version checking on v0 and v1 apis 2021-08-11 16:40:14 -04:00
Anton Evangelatov
fa7e52dbda add explicit error msg if repo dir does not exist 2021-08-01 00:22:55 -04:00
Raúl Kripalani
00fb675452 fix compilation error. 2021-07-29 16:18:43 +01:00
Raúl Kripalani
8433aae1af use fallback api infos last; init service with markets-path. 2021-07-29 16:10:04 +01:00
Raúl Kripalani
b17fcfc4d1 bugfix. 2021-07-29 14:36:04 +01:00
Raúl Kripalani
3144da86f3 add RepoType#String; adjust repo parsing logic. 2021-07-29 13:49:51 +01:00
Raúl Kripalani
90427bc3af fix docs, add flag. 2021-07-29 13:39:03 +01:00
Raúl Kripalani
8fae68a5ae fix tests. 2021-07-29 13:21:55 +01:00
Raúl Kripalani
3b2c3a3f6b polish. 2021-07-29 12:56:08 +01:00
Raúl Kripalani
d9c6a32b8e refactor miner info command. 2021-07-29 12:54:08 +01:00
Raúl Kripalani
22c0884f5f target markets API for markets commands. 2021-07-29 12:37:29 +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
ZenGround0
11394aa4aa Improve cli docs 2021-07-29 00:29:27 -04:00
ZenGround0
5c823e9b42 PR #5109 + suggested fix 2021-07-28 23:59:59 -04:00
Raúl Kripalani
b04fb75a92 rename flag to very verbose. 2021-07-27 20:49:30 +01:00
Raúl Kripalani
48cddd3644 add a super verbose -vv flag to lotus and lotus-miner. 2021-07-27 14:25:28 +01:00
Łukasz Magiera
660829703a Merge remote-tracking branch 'origin/master' into feat/split-net-api 2021-07-22 15:38:06 +02:00
Steven Allen
f9c759fcb2 fix: always check if StateSearchMessage returns nil
It returns nil on "not found".

Fixes the cases not covered in:
https://github.com/filecoin-project/lotus/pull/6787
2021-07-20 11:28:27 -07:00
Łukasz Magiera
49e26cce7d api: Separate the Net interface from Common 2021-07-15 11:41:30 +02:00
Peter Rabbitson
6efd2e7335 Handle the --color flag via proper global state
Use `color.NoColor` as a global progressively modified as one descends
down command flags. Allows non-surprising operation when --color is
accepted at multiple layers, and even makes this behave predictably:

    lotus-miner --color actor control list --color=false
2021-07-13 12:22:29 +02:00
Peter Rabbitson
4dd59b566c Respect GOLOG_LOG_FMT=color 2021-07-08 10:44:37 +02:00
Peter Rabbitson
140a2e0200 Stabilize default text and make gen docsgen-cli 2021-07-08 10:44:13 +02:00
Peter Rabbitson
c7bb326c78 Enable color by default only if os.Stdout is a TTY 2021-07-07 18:12:24 +02:00
Jim Pick
17c0b9be44
Spelling fix
Change 'actorr' to 'actor'
2021-07-05 07:44:06 -07:00
Aayush Rajasekaran
069fd0a244 Add helptext to lotus chain export 2021-07-03 12:41:43 -04:00
Peter Rabbitson
30efcf21f0 Fix tiny error in check-client-datacap 2021-07-02 18:15:08 +02:00
Aayush Rajasekaran
cb4d7cb9e7 Make query-ask CLI more graceful 2021-06-24 12:57:54 -04:00
IPFSUnion
7c07dc9ed1 fix an error in msigLockCancel 2021-06-24 14:07:15 +08:00
Aayush Rajasekaran
4af59e0188
Apply suggestions from code review
Co-authored-by: Jennifer <42981373+jennijuju@users.noreply.github.com>
2021-06-22 19:23:24 -04:00