Commit Graph

1218 Commits

Author SHA1 Message Date
Peter Rabbitson
af0d9b650d Error on corner cases with corresponding negative tests 2021-10-04 23:21:24 +02:00
Peter Rabbitson
2a1094fc17 Merge banch feat/go-fil-markets-v1.13.0 into feat/datamodel-selector-retrieval 2021-10-04 21:56:11 +02:00
Jennifer Wang
38e01cba83 Merge branch 'release/v1.12.0' into jen/12tomaster 2021-10-04 02:38:00 -04:00
Aayush Rajasekaran
c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
Aayush Rajasekaran
b9bfcc4b69 Randomness: Move getters from ChainAPI to StateAPI 2021-09-21 14:20:15 -04:00
Aayush Rajasekaran
1d6db306ec Randomness: Move getters from ChainAPI to StateAPI 2021-09-15 00:03:13 +02: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
Peter Rabbitson
2c5f4386ba Prepare the retrieval codepath for selectors
Slight import-name shuffle, no functional changes
2021-09-09 12:42:58 +02:00
Łukasz Magiera
95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
Łukasz Magiera
5366821144 api for getting alert states 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
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
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
vyzo
1d50dadc18 fix bug in message exclusion 2021-07-29 21:58:59 +03: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
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
Łukasz Magiera
660829703a Merge remote-tracking branch 'origin/master' into feat/split-net-api 2021-07-22 15:38:06 +02:00
Anton Evangelatov
fe31956713 fetch peer id from chain 2021-07-21 11:43:19 +02: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
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
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
Anton Evangelatov
a423c46f2a rename mock.go to net.go 2021-07-12 11:35:03 +02:00
Łukasz Magiera
ed0cc0b56d Handle bad peerIDs in MarketListRetrievalDeals 2021-07-08 19:27:03 +02:00
Anton Evangelatov
ff2772a58c resolved conflicts 2021-07-06 16:00:41 +02:00
Anton Evangelatov
9e85492b85 fix test 2021-07-02 12:24:07 +02:00
Anton Evangelatov
4194c7fa24 revert back optional for Miner; remove ActorAddress call in node.MinerHandler 2021-07-02 11:58:31 +02:00
Raúl Kripalani
1869de7662 unwire host from storage.Miner. 2021-07-01 13:53:20 +01:00
frrist
d02a2a2cfa polish(statetree): accept a context in statetree diff for timeouts
- this operation can take a while, this changes gives users the option
to abort if it takes "too long".
2021-06-30 16:40:43 -07:00
Anton Evangelatov
4f0a96c9c7 resolved conflicts 2021-06-30 13:16:52 +02:00
Anton Evangelatov
9ec7cd7239 enable libp2p options 2021-06-30 12:55:43 +02:00
Łukasz Magiera
3f3336340f Fix wallet error messages 2021-06-25 10:48:47 +02:00
Anton Evangelatov
4217ec5308 make auth on remote rpc server optional 2021-06-23 13:27:03 +02:00
Anton Evangelatov
d45bb14015 Merge branch 'master' into nonsense/split-market-miner-processes 2021-06-16 18:49:15 +02:00
Łukasz Magiera
0514f38dc4 Merge remote-tracking branch 'origin/master' into chore/merge-1.10 2021-06-14 13:27:53 +02:00
Anton Evangelatov
beb5bffaf6 fix log.Error; rename RemoteStore 2021-06-09 13:05:54 +02:00
Anton Evangelatov
9f3ec82cc1 initial resolution of conflicts 2021-06-08 13:01:22 +02:00
Jakub Sztandera
f9acd07987
Update libp2p to 0.14.1
This does not resolve the CI issue but prepares us for it after https://github.com/libp2p/go-libp2p/pull/1116

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-06-07 18:51:48 +02:00
Łukasz Magiera
8625da3479 Bump miner/worker api versions 2021-06-07 16:57:24 +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
dc642d0b7b Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-06-01 21:06:58 +02:00
Łukasz Magiera
d69032b2f0
Merge pull request #6367 from filecoin-project/fix/robustify-commit-batcher
Robustify commit batcher
2021-06-01 17:49:46 +02:00
Łukasz Magiera
482e1110c2 precommit batcher: Improve error propagation 2021-06-01 14:35:30 +02:00
Łukasz Magiera
9fcb564bef Make commit batcher more robust 2021-06-01 11:56:19 +02:00
Aayush Rajasekaran
9ceee6028b More tweaking of context handling in the messagepool 2021-05-31 18:13:23 -04:00
Aayush Rajasekaran
ed93d0725f Protect mp.localAddrs and mp.pending behind helper functions 2021-05-31 18:13:23 -04:00
Aayush Rajasekaran
1f03a618f9 Plumb contexts through 2021-05-31 18:13:23 -04:00
Łukasz Magiera
ffa47659a1 Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-05-31 21:38:34 +02:00
Łukasz Magiera
c3e8eddb9b Merge remote-tracking branch 'origin/master' into feat/nv13-1.11 2021-05-31 21:24:56 +02:00
Anton Evangelatov
d195a12565 Merge branch 'master' into nonsense/split-market-miner-processes 2021-05-31 11:26:11 +02:00
Łukasz Magiera
c8d603557b storagefsm: Fix batch deal packing behavior 2021-05-30 17:46:22 +02:00
Aayush Rajasekaran
fba5c65ffd Extend the default deal start epoch delay 2021-05-28 12:35:48 -04:00
hannahhoward
19b6dc8d1e feat(cli): add a list retrievals command
Currently, there is no way to inspect retrievals on a client. This adds said command, allow with
corresponding APIs
2021-05-27 11:48:25 -07:00
Łukasz Magiera
1e4456138e Merge master into feat/nv13 2021-05-27 12:28:20 +02:00
Aayush Rajasekaran
d9e86afa24 Tweak client calcDealExpiration to consider genesis miners 2021-05-26 21:46:37 -04:00
Aayush Rajasekaran
21b4741e30 Fix randomness fetching around null blocks 2021-05-26 21:06:06 -04:00
Dirk McCormick
885564fe24 Revert "chore: update go-libp2p"
This reverts commit f7fbaef361.
2021-05-20 11:22:19 -06:00
Anton Evangelatov
76bb424de0 update StorageMinerAPI 2021-05-20 13:01:14 +02:00
Anton Evangelatov
a989f60e27 add SectorAddPieceToAny and SectorUnsealPiece to StorageMiner iface; model moved to api package - PieceDealInfo, DealSchedule 2021-05-19 13:05:07 +02:00
Łukasz Magiera
c7ba083fa4 Import precommit batcher 2021-05-18 16:51:06 +02:00
Aayush Rajasekaran
9a6e601754
Merge pull request #5961 from filecoin-project/feat/stateless-offline-dealflow
Introduce stateless offline dealflow, bypassing the FSM/deallists
2021-05-17 12:35:39 -04:00
Łukasz Magiera
506f39b294 WIP: Integrate FIP0013 2021-05-11 22:10:29 -04:00
Peter Rabbitson
d54ed1b0c6 Merge remote-tracking branch 'origin/master' into feat/stateless-offline-dealflow 2021-05-11 04:54:22 +02:00
Steven Allen
f7fbaef361 chore: update go-libp2p
From 0.12.0 to 0.14.0.

Headline for lotus: faster yamux.
2021-05-10 19:41:57 -07:00
Peter Rabbitson
6f71eab8ce Adjust lp2p retry params 2021-05-11 04:26:04 +02:00
Jakub Sztandera
18cbdcfc81
Disable checks API on Lotus Lite
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 17:19:17 +02:00
Jakub Sztandera
8d75da1629
Use MessagePrototype for check API
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:05 +02:00
vyzo
e2d0047a2a
introduce message prototypes
This introduces message prototypes to applicable API endpoints, which
allows us to invert control of message sending and give the user a
chance to intervene with an interactive ui.

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:05 +02:00
vyzo
d782250aba
implement MessagePool.CheckReplaceMessages
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:04 +02:00
vyzo
91e774063e
implement MessagePool.CheckMessages
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:04 +02:00
vyzo
ed61642b3a
implement NodeStatus API
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:04 +02:00
Peter Rabbitson
e648b72d8d Merge remote-tracking branch 'origin/master' into feat/stateless-offline-dealflow 2021-05-06 15:57:10 +02:00
Steven Allen
eb10918470
Merge pull request #6107 from filecoin-project/feat/checkpoint-sync
feat: allow checkpointing to forks
2021-04-29 16:30:52 -07:00
Steven Allen
f983fa8cd5
Merge pull request #6134 from filecoin-project/asr/emptytsk
Use EmptyTSK where appropriate
2021-04-29 09:35:43 -07:00
Łukasz Magiera
a456f394ac
Merge pull request #6007 from filecoin-project/asr/state-list-messages
Speed up StateListMessages in some cases
2021-04-29 07:47:26 +02:00
Aayush Rajasekaran
d794b49df3 Use EmptyTSK where appropriate 2021-04-29 01:00:03 -04:00
Steven Allen
69da6a2a29 feat: allow checkpointing to forks
Previously, `lotus sync checkpoint` would only checkpoint on the current
chain. Now, it can switch to a new fork.
2021-04-28 13:54:26 -07:00
Reskorey
58bee65bcb go fmt 2021-04-23 16:10:51 +08:00
Reskorey
7738886936
fix full node painc
fix: full node painc  when calling  RPC  Filecoin.ClientRetrieve without the order.Tatol pecified.
2021-04-23 15:43:41 +08:00
Jakub Sztandera
66c408938b
Fix signature in messagepool, wire in context
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-04-16 18:43:28 +02:00
Łukasz Magiera
e76935147f Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-04-13 14:24:22 +02:00
Aayush Rajasekaran
ff48a70ed9 Speed up StateListMessages in some cases 2021-04-10 02:33:34 -04:00
Peter Rabbitson
25a77d905d Centralize everything on ipfs/go-log/v2
I am not entirely sure this is right, but everything seems to build...
2021-04-06 15:04:32 +02:00
Peter Rabbitson
b79be2a2c2 Merge remote-tracking branch 'origin/master' into feat/stateless-offline-dealflow 2021-04-05 16:06:44 +02:00
Peter Rabbitson
7fddbb528d Introduce stateless offline dealflow, bypassing the FSM/deallists
This is aproposal for an additional flag --manual-stateless-deal and a
corresponding API endpoint ClientStatelessDeal. This allows firing off
an offline-style deal against a miner without keeping further track of
it locally.

Not keeping any local state introduces the limitation of requiring free
storage deals, as there is nothing to tie the payment channel setup to.

Rationale/need for this type of flow is the case of incredibly large
sets of data nd deals, where the client and providers have prearranged
payment ahead of time, and the client has a separate-from-lotus database
of deal inventory. This way the client can use their lotus node merely
as a network gateway, without running into any limitations currently
present in both lotus as a whole and go-fil-markets in particular.

Specific context for this work is filecoin-discover, where the requirement
is to onboard ~ 12,000,000 individual deals against a pool of miners
with whom the client has prearranged a relationship.
2021-04-05 13:11:10 +02:00
Łukasz Magiera
f4e46c9003 implement v1 api with api modules 2021-04-03 13:20:50 +02:00
Łukasz Magiera
1b32d7f52f cli: fix build with v1 api changes 2021-04-03 12:55:29 +02:00
Łukasz Magiera
0103d2f621 v1 api: Cleanup message wait/search apis 2021-04-02 13:52:24 +02:00
Łukasz Magiera
c9866da688 Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-04-02 13:15:33 +02:00
Łukasz Magiera
4538550999 Merge remote-tracking branch 'origin/master' into feat/local-retrieval 2021-04-02 12:36:28 +02:00
Anton Evangelatov
df003d44d2 include Stages and DealStages only on ClientDealInfo, not on ClientListDeals 2021-04-01 17:08:01 +03:00