Commit Graph

56 Commits

Author SHA1 Message Date
Mikers
5e5a81bf23
add go linter - "unused" (#11235)
* add go linter - "unused"

* use _ to name unused but needed padding variable

* remove unused code

* add queue test to appease unused linter

* remove unused code in test

* remove unused func

* remove unused struct identified by linter

* remove unused variable

* remove unused code

* remove unused file

* remove unused struct

* remove unused function

* remove unused observe peers function in raft

* remove unused declareFaults function

* annotate nolint:unused on needed methods
2023-09-05 12:19:43 -10:00
Ian Davis
9f85d3dca7 Address simple linter issues 2022-11-24 16:32:27 +00:00
Geoff Stuart
b4c04ad927 update markets 2022-10-06 11:06:21 -04:00
Łukasz Magiera
08b22edd89 fix make gen 2022-08-29 16:25:30 +02:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Aayush
8cca9b1970 Use new go-state-types accessors 2022-05-17 15:21:27 -04:00
Darko Brdareski
79453663b3
feat: Add additional test annotations (#8272)
* Annotate api,proxy_util,blockstore_badger, policy tests

* Annotate splitstore: bsbadger / markset

* Annotate splitstore feature

* Annotate union/timed blockstore tests

* Annotate openrpc, diff_adt tests

* Annotate error,drand,events tests

* Annotate predicates_test

* Fix annotations

* Annotate tscache, gen tests

* Annotate fundmanager test

* Annotate repub and selection tests

* Annotate statetree_test

* Annotate forks_test

* Annotate searchwait_test.go

* Fix duplicated @@ symbols

* Annotate chain stmgr/store tests

* Annotate more (types) tests

* More tests annotated

* Annotate conformance chaos actor tests

* Annotate more integration tests

* Annotate journal system tests

* Annotate more tests.

* Annotate gas,head buffer behaviors

* Fix markset annotations

* doc: test annotations for the markets dagstore wrapper

* Annotate miner_api test in dagstore

* Annotate more test files

* Remove bad annotations from fsrepo

* Annotate wdpost system

* Remove bad annotations

* Renamce "conformance" to "chaos_actor" tests

* doc: stm annotations for blockheader & election proof tests

* Annotate remaining "A" tests

* annotate: stm for error_test

* memrepo_test.go

* Annotate "b" file tests

* message_test.go

* doc: stm annotate for fsrepo_test

* Annotate "c" file tests

* Annotate "D" test files

* message_test.go

* doc: stm annotate for chain, node/config & client

* docs: stm annotate node_test

* Annotate u,v,wl tests

* doc: stm annotations for various test files

* Annotate "T" test files

* doc: stm annotate for proxy_util_test & policy_test

* doc: stm annotate for various tests

* doc: final few stm annotations

* Add mempool unit tests

* Add two more memPool Add tests

* Update submodules

* Add check function tests

* Add stm annotations, refactor test helper

* Annotate api,proxy_util,blockstore_badger, policy tests

* Annotate splitstore: bsbadger / markset

solving merge conflicts

* Annotate splitstore feature

* Annotate union/timed blockstore tests

* Annotate openrpc, diff_adt tests

* Annotate error,drand,events tests

* Annotate predicates_test

* Fix annotations

* Annotate tscache, gen tests

* Annotate fundmanager test

* Annotate statetree_test

* Annotate forks_test

* Annotate searchwait_test.go

* Fix duplicated @@ symbols

* Annotate chain stmgr/store tests

* Annotate more (types) tests

* More tests annotated

* Annotate conformance chaos actor tests

* Annotate more integration tests

* Annotate journal system tests

* Annotate more tests.

* Annotate gas,head buffer behaviors

solve merge conflict

* Fix markset annotations

* Annotate miner_api test in dagstore

* Annotate more test files

* doc: test annotations for the markets dagstore wrapper

* Annotate wdpost system

* Renamce "conformance" to "chaos_actor" tests

* Annotate remaining "A" tests

* doc: stm annotations for blockheader & election proof tests

* annotate: stm for error_test

* Annotate "b" file tests

* memrepo_test.go

* Annotate "c" file tests

* message_test.go

* Annotate "D" test files

* doc: stm annotate for fsrepo_test

* Annotate u,v,wl tests

* message_test.go

* doc: stm annotate for chain, node/config & client

* docs: stm annotate node_test

* Annotate "T" test files

* doc: stm annotations for various test files

* Add mempool unit tests

solve merge conflict

* doc: stm annotate for proxy_util_test & policy_test

* doc: stm annotate for various tests

* doc: final few stm annotations

* Add two more memPool Add tests

* Update submodules

* Add check function tests

solve conflict

* Add stm annotations, refactor test helper

solve merge conflict

* Change CLI test kinds to "unit"

* Fix double merged test

* Fix ccupgrade_test merge

* Fix lint issues

* Add stm annotation to types_Test

* Test vectors submodule

* Add file annotation to burn_test

Co-authored-by: Nikola Divic <divicnikola@gmail.com>
Co-authored-by: TheMenko <themenkoprojects@gmail.com>
2022-03-16 18:37:34 +01:00
Aayush Rajasekaran
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05: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
Łukasz Magiera
e76935147f Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-04-13 14:24:22 +02: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
Łukasz Magiera
e8f28d7b9f Fix tests 2021-04-06 12:24:58 +02:00
Łukasz Magiera
deb2b90b6a Fix lotus/miner build 2021-04-05 13:23:46 +02:00
Łukasz Magiera
26399dba70 Update markets, cbor-gen with soft map decoding 2021-02-19 20:11:43 +01:00
Łukasz Magiera
0c6aef221d Fix error logging format strings 2021-02-11 12:00:26 +01:00
Łukasz Magiera
32dcfb4842
Merge pull request #5303 from filecoin-project/feat/wallet-market-info
Better CLI for wallet market withdraw and client info
2021-01-08 22:54:12 +01:00
Dirk McCormick
c58086ee27 feat: better CLI for wallet market withdraw and client info 2021-01-07 10:18:29 +01:00
Dirk McCormick
e8e4b559e9 fix: format fund manager message fil amounts 2021-01-06 09:23:54 +01:00
Dirk McCormick
3287c621ad fix: better withdrawal error message 2021-01-05 16:58:12 +01:00
Dirk McCormick
f3922e7485 test: for FundManager panic to ensure it is fixed 2020-11-12 15:35:43 +01:00
Dirk McCormick
6184d228c1 fix: panic in FundManager 2020-11-11 20:32:26 +01:00
hannahhoward
9f7204ee26 feat(builder): finish new FundManager setup
Finish setup of new FundManager and provide a migration for previously reserved funds
2020-11-10 21:11:05 -08:00
Dirk McCormick
0d243bb824 refactor: integrate new FundManager 2020-11-10 21:11:05 -08:00
Dirk McCormick
0101436933 fix: flaky TestFundManagerWithdrawalLimit test 2020-11-10 19:44:26 -08:00
Dirk McCormick
0e0ffc9c10 refactor: remove FundManager.Wait 2020-11-10 19:44:26 -08:00
Dirk McCormick
a51a62cb42 fix: batch withdrawal requests by wallet 2020-11-10 19:44:26 -08:00
Dirk McCormick
86c204d8a8 refactor: improve FundManager naming and docs 2020-11-10 19:44:26 -08:00
Dirk McCormick
1182927fe5 refactor: add wallet param to FundManager methods 2020-11-10 19:44:26 -08:00
Dirk McCormick
4d3cd7dcb8 refactor: FundManager 2020-11-10 19:44:26 -08:00
Steven Allen
bcabe7b3b5 migrate methods to abstracted methods
Method numbers never change anyways. At worst, we'll deprecate old methods and
have to explicitly import them from the correct actors version to use them.
2020-10-21 12:18:37 -07:00
Steven Allen
4e730b5ec8 port to v2 imports 2020-10-21 12:16:23 -07:00
Ingar Shu
d80e7eda93
Revert cached "available" amount if the AddFunds message send fails 2020-10-09 13:18:43 -07:00
Aayush Rajasekaran
a876a0ba44 Use actor state addresses 2020-09-23 02:32:40 -04:00
Aayush Rajasekaran
39755a294a Update to specs v0.9.6 2020-09-07 15:48:41 -04:00
Steven Allen
5733c71c50 Lint everything
We were ignoring quite a few error cases, and had one case where we weren't
actually updating state where we wanted to. Unfortunately, if the linter doesn't
pass, nobody has any reason to actually check lint failures in CI.

There are three remaining XXXs marked in the code for lint.
2020-08-20 20:46:36 -07:00
hannahhoward
aa419155f6 feat(fundmgr): temp fix for funding issues 2020-08-14 19:37:20 -07:00
Łukasz Magiera
12f7e2d9bf Use a struct for send metadata in MpoolPushMessage 2020-08-12 22:17:29 +02:00
Łukasz Magiera
6fe743f3a9 Fix tests 2020-08-12 20:03:07 +02:00
Łukasz Magiera
d0147aa50f Add maxFee param to MpoolPushMessage 2020-08-12 19:06:16 +02:00
hannahhoward
9babf34a0c fix(fundmgr): switch to id addresses
in order to observe the balance table correctly, convert to tracking funds by id address
2020-08-05 18:33:11 -07:00
hannahhoward
b2a114a808 test(fundmgr): add FundMgr test 2020-08-04 18:16:25 -07:00
hannahhoward
b4d1b628be feat(fundmgr): add monitoring to FundMgr 2020-08-04 17:29:52 -07:00
Aayush Rajasekaran
74dd01a8db Fundmanager shouldn't try to add zero 2020-07-29 20:27:22 -04:00
Jakub Sztandera
7da629d03b
Update gas prices
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-20 21:31:05 +02:00
Jakub Sztandera
7b14d445b4
Update message gas limits
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-15 20:01:57 +02:00
hannahhoward
a9866c757e feat(deps): update go-fil-markets
Update to latest 0.2.0 release of go-fil-markets with less-blocking node io
2020-05-04 18:36:51 -07:00
whyrusleeping
ddf1beac6c change gas limit to be a normal int64 2020-03-18 13:45:37 -07:00
whyrusleeping
c7508a0512 self review fixes 2020-02-28 18:02:40 -08:00
whyrusleeping
0945d8725e fixing miner logic to make more tests pass 2020-02-28 11:31:28 -08:00
Łukasz Magiera
ae634ef7df actors: Remove addrass aliases 2020-02-25 21:54:58 +01:00