Commit Graph

2417 Commits

Author SHA1 Message Date
Steven Allen
0b06de2bd3 fix(lotus-sim): unembed Node from Simulation
I wanted to expose the node's _fields_, but this also exposed the
methods. That got rather confusing.

(probably could have used a new type, but eh)

foo
2021-06-22 14:53:06 -07:00
Anton Evangelatov
6720463799 resolve merge conflicts 2021-06-22 11:28:23 +02:00
Steven Allen
b7c36bc02c fix(lotus-sim): make NewNode take a repo
This is primarily for testing, so we can just pass an in-memory repo.
2021-06-21 11:32:19 -07:00
Steven Allen
c532b1b819 fix(lotus-sim): remove unused field and function 2021-06-21 11:25:40 -07:00
Steven Allen
80eba1069a feat(lotus-sim): NewNode to construct a node without a repo 2021-06-21 11:25:40 -07:00
Steven Allen
ffb63a93ff fix(lotus-sim): make 'fund' easier to understand 2021-06-21 11:25:40 -07:00
Raúl Kripalani
83ee345b1c Merge branch 'master' into raulk/itests-refactor-kit 2021-06-21 18:19:26 +01:00
Steven Allen
d6abcff63c
fix(lotus-sim): apply code review from magik6k
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-06-21 09:05:48 -07:00
Raúl Kripalani
7ee184e965 fix lotus-storage-miner tests. 2021-06-21 11:56:10 +01:00
Steven Allen
69a8a6bc0e fix(lotus-sim): lint 2021-06-18 15:44:37 -07:00
Jakub Sztandera
2fdf49e7da Add histogram and quantiles for message sizes
Resolves https://github.com/filecoin-project/lotus/issues/6513

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-06-18 15:44:37 -07:00
Steven Allen
eb2b706156 chore: fix lint errors in simulation 2021-06-18 15:44:37 -07:00
Steven Allen
2aedd82c72 fix(lotus-sim): correct window post batch sizes 2021-06-18 15:44:37 -07:00
Steven Allen
bc2698a988 fix(lotus-sim): simulate using realistic gas numbers
Previously, we assumed the network was "optimal". Now, we're using real
numbers.
2021-06-18 15:44:37 -07:00
Steven Allen
a26cd5a809 fix(lotus-sim): mark provecommit stage initialized 2021-06-18 15:44:37 -07:00
Steven Allen
f0d0b40bd3 fix(lotus-sim): debug log mock 2021-06-18 15:44:37 -07:00
Steven Allen
ce29a0ac17 fix(lotus-sim): initialize commit queue 2021-06-18 15:44:37 -07:00
Steven Allen
28e6fa5923 fix(lotus-sim): remove duplicate error handling 2021-06-18 15:44:37 -07:00
Steven Allen
ec5fab09a1 feat(lotus-sim): log failing proofs 2021-06-18 15:44:37 -07:00
Steven Allen
e41f0842b0 fix(lotus-sim): load prove-commits
(regression from refactor)
2021-06-18 15:44:37 -07:00
Steven Allen
af33d69357 fix(lotus-sim): don't close node on list 2021-06-18 15:44:37 -07:00
Steven Allen
885062f712 fix(lotus-sim): fix info state imports 2021-06-18 15:44:37 -07:00
Steven Allen
73ae1924bc feat(lotus-sim): state size command 2021-06-18 15:44:37 -07:00
Steven Allen
22267eb45d feat(lotus-sim): split info command file 2021-06-18 15:44:36 -07:00
Steven Allen
5d7b7ce5c1 feat(lotus-sim): allow profile info 2021-06-18 15:44:36 -07:00
Steven Allen
95cf577447 fix(lotus-sim): really cancel walk immediately 2021-06-18 15:44:36 -07:00
Steven Allen
8fffaa5c47 fix(lotus-sim): average over 2 days
There's too much noise per day.
2021-06-18 15:44:36 -07:00
Steven Allen
63178ce982 feat(lotus-sim): daily capacity growth 2021-06-18 15:44:36 -07:00
Steven Allen
0af7dcdedb fix(lotus-sim): rename power to capacity 2021-06-18 15:44:36 -07:00
Steven Allen
f9d2a23132 fix(lotus-sim): correctly handle cancellation in walk
1. Select order is not guaranteed, always check if the context has been
canceled explicitly.
2. Never close a work channel unless we're actually done. This can yield
out-of-order results due to buffering.
2021-06-18 15:44:36 -07:00
Steven Allen
ec3f969e9a feat(lotus-sim): allow walking back past the start 2021-06-18 15:44:36 -07:00
Steven Allen
f6043a0250 feat(lotus-sim): measure daily power growth 2021-06-18 15:44:36 -07:00
Steven Allen
52261fb814 refactor(lotus-sim): enterprise grade
While the previous version "worked", this version nicely separates out
the state for the separate stages. Hopefully, we'll be able to use this
to build different pipelines with different configs.
2021-06-18 15:44:36 -07:00
Jakub Sztandera
7dd58efb84 Add quantiles and histogram
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-06-18 15:44:36 -07:00
Steven Allen
2721279e87 fix(lotus-sim): describe info commands 2021-06-18 15:44:36 -07:00
Steven Allen
985994cc0f feat(lotus-sim): add command for analyzing post stats over time 2021-06-18 15:44:36 -07:00
Steven Allen
707b3bf08a fix(lotus-sim): refuse to start simulation with no miners 2021-06-18 15:44:36 -07:00
Steven Allen
d551f2b4bd feat(lotus-sim): print duration info in days 2021-06-18 15:44:36 -07:00
Steven Allen
1df5445ed2 feat(lotus-sim): make walk parallel 2021-06-18 15:44:36 -07:00
Steven Allen
fbaffe86da fix(lotus-sim): return error from walk 2021-06-18 15:44:36 -07:00
Steven Allen
500fae6a52 fix(lotus-sim): less indentation in info 2021-06-18 15:44:36 -07:00
Steven Allen
ab59474c4c fix(lotus-sim): count single prove-commits when computing efficiency 2021-06-18 15:44:36 -07:00
Jakub Sztandera
3d3c26fa0c Add lookback limit
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-06-18 15:44:36 -07:00
Steven Allen
68593ce995 fix(lotus-sim): obey context in walk 2021-06-18 15:44:36 -07:00
Jakub Sztandera
ca9eadd7c7 Add gas info command
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-06-18 15:44:36 -07:00
Steven Allen
16449007ab fix(lotus-sim): fix funding error check 2021-06-18 15:44:35 -07:00
Steven Allen
8d734d81d9 fix(lotus-sim): log failed pre-commits and continue 2021-06-18 15:44:35 -07:00
Steven Allen
783dc5a33d fix(lotus-sim): fund multiple times
Sometimes, a miner is deep in the red.
2021-06-18 15:44:35 -07:00
Steven Allen
be713ec04a fix(lotus-sim): we always fill the block with pre-commits 2021-06-18 15:44:35 -07:00
Steven Allen
c18ca60d28 fix(lotus-sim): specify ErrWriter
Apparently, it defaults to nil...
2021-06-18 15:44:35 -07:00
Steven Allen
977bf1cad9 fix(lotus-sim): write pprof profiles to a directory
We need to know the sizes up-front for tar, and that's not happening.
2021-06-18 15:44:35 -07:00
Steven Allen
7a8bfd8725 doc(lotus-sim): document signals 2021-06-18 15:44:35 -07:00
Steven Allen
a3f64e0768 fix(lotus-sim): profile signal handling 2021-06-18 15:44:35 -07:00
Steven Allen
5766002370 fix(lotus-sim): guard info with dashes 2021-06-18 15:44:35 -07:00
Steven Allen
4a80c83533 fix(lotus-sim): fix spelling 2021-06-18 15:44:35 -07:00
Steven Allen
936659d087 feat(lotus-sim): print info on SIGUSR1 2021-06-18 15:44:35 -07:00
Steven Allen
dcdb0abe27 feat(lotus-sim): profile on SIGUSR2 2021-06-18 15:44:35 -07:00
Steven Allen
2b77c17546 chore(lotus-sim): fix import grouping
I got a bit lazy when developing this.
2021-06-18 15:44:35 -07:00
Steven Allen
1802ae31a6 feat(lotus-sim): record timing information for pre/prove-commit packing 2021-06-18 15:44:35 -07:00
Steven Allen
868231adc7 fix(lotus-sim): don't take from the fund account when funding 2021-06-18 15:44:35 -07:00
Steven Allen
2b4f865665 feat(lotus-sim): fund from a funding account
Instead of funding the simulation from the burnt-funds actor, fund from
a custom account and take a "tax" to fund that account.

Otherwise, we run out of funds...
2021-06-18 15:44:35 -07:00
Steven Allen
86e459f585 feat(lotus-sim): return receipt
Instead of returning a "full" boolean and an error, return a receipt and
an error. We now use the error to indicate if the block is "full".
2021-06-18 15:44:35 -07:00
Steven Allen
88af350774 fix(lotus-sim): use global base-fee value 2021-06-18 15:44:35 -07:00
Steven Allen
747b3d3e57 fix(lotus-sim): skip miners without power when loading 2021-06-18 15:44:35 -07:00
Steven Allen
ba65a1ba9b chore(lotus-sim): rename stat to info 2021-06-18 15:44:35 -07:00
Steven Allen
e097ba8640 feat(lotus-sim): wire up signal handler 2021-06-18 15:44:35 -07:00
Steven Allen
4578e0dd8d chore(lotus-sim): remove dead code 2021-06-18 15:44:35 -07:00
Steven Allen
77f0fee58e chore(lotus-sim): fix comment about simulation block miner 2021-06-18 15:44:35 -07:00
Steven Allen
bb4753ffbf feat(lotus-sim): add commands to rename and copy 2021-06-18 15:44:35 -07:00
Steven Allen
4f0b9eefc1 fix(lotus-sim): check for slash in names on copy 2021-06-18 15:44:35 -07:00
Steven Allen
8410b0f79f feat(lotus-sim): add a feature to copy/rename simulation.
Useful to backup old simulations before creating a new one.
2021-06-18 15:44:35 -07:00
Steven Allen
c5dc67ccd8 feat(lotus-sim): add a walk function
This way, we can easily walk the chain and:

1. Inspect messages and their results.
2. Inspect tipset state.
2021-06-18 15:44:35 -07:00
Steven Allen
ccdd660f0d feat(lotus-sim): more stats 2021-06-18 15:44:35 -07:00
Steven Allen
5f6733fe44 feat(lotus-sim): expose StateManager from Simulation 2021-06-18 15:44:35 -07:00
Steven Allen
0faacbe154 feat(lotus-sim): store start tipset 2021-06-18 15:44:35 -07:00
Steven Allen
a57c509e1e fix(lotus-sim): cleanup and document pre-commit filtering 2021-06-18 15:44:35 -07:00
Steven Allen
f9ebe3017d test(lotus-sim): test commit-queue rollover 2021-06-18 15:44:35 -07:00
Steven Allen
0725019bdb feat(lotus-sim): completely pack block
Instead of packing till we see "full". Prove-commits are large, we may
have room for some more pre-commits.
2021-06-18 15:44:34 -07:00
Steven Allen
dfdafa3c15 fix(lotus-sim): pretend all messages are BLS
It doesn't really matter, and it ensures they all get executed in-order.
2021-06-18 15:44:34 -07:00
Steven Allen
5b31ae39ea fix: test commit queue 2021-06-18 15:44:34 -07:00
Steven Allen
82019ce474 fix(lotus-sim): correctly merge forward commit queue. 2021-06-18 15:44:34 -07:00
Steven Allen
2e4f526375 fix(lotus-sim): skip (and log) missing/expired pre-commits 2021-06-18 15:44:34 -07:00
Steven Allen
0ccf716989 fix(lotus-sim): refactor miner state loading
Add a helper function so we don't need to constantly repeat ourselves.
2021-06-18 15:44:34 -07:00
Steven Allen
7925b69573 doc(lotus-sim): document block generation logic 2021-06-18 15:44:34 -07:00
Steven Allen
2f7d7aed31 feat(lotus-sim): refactor and document
Hopefully, this'll make this code a bit easier to approach.
2021-06-18 15:44:34 -07:00
Steven Allen
b7bfc06ebe feat(lotus-sim): add an info command 2021-06-18 15:44:34 -07:00
Steven Allen
be9e30e39d fix(lotus-sim): rename step to run
And make it run forever by default.
2021-06-18 15:44:34 -07:00
Steven Allen
8000decac6 feat(lotus-sim): add command to list pending upgrades 2021-06-18 15:44:34 -07:00
Steven Allen
e2f5c494b0 feat: implement lotus-sim 2021-06-18 15:44:34 -07:00
Łukasz Magiera
44de67cf7d
Merge pull request #6175 from filecoin-project/feat/dynamic-retreival-pricing
Dynamic Retrieval pricing
2021-06-17 10:25:48 +02:00
Aayush Rajasekaran
35f76f58df
Merge pull request #6309 from filecoin-project/feat/better_mining_projection_and_accuracy
Adjust various CLI display ratios to arbitrary precision
2021-06-16 17:48:23 -04:00
Anton Evangelatov
d45bb14015 Merge branch 'master' into nonsense/split-market-miner-processes 2021-06-16 18:49:15 +02:00
Aayush Rajasekaran
bee548face Add utils to use multisigs as miner owners 2021-06-15 16:57:52 -04:00
Anton Evangelatov
323c78ef44 comment for checkV1ApiSupport 2021-06-15 14:47:11 +02:00
Peter Rabbitson
ae2b089a5c Be even more precise - properly account for multi-win Poisson 2021-06-14 23:57:17 +02:00
Peter Rabbitson
4d1fccd290
Better wolfram link 2021-06-14 17:54:38 +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
31e6fb154e resolve conflicts 2021-06-14 11:27:54 +02:00
aarshkshah1992
3d086dfb43 changes as per review 2021-06-14 09:40:34 +05:30
Łukasz Magiera
ec06f086ef sealing: Early finalization option 2021-06-11 11:41:28 +02:00
aarshkshah1992
fed5afa704 merge master 2021-06-11 09:35:20 +05:30
Łukasz Magiera
6f80d9f3c2
Merge pull request #6311 from filecoin-project/raulk/itests
consolidate integration tests into `itests` package; create test kit; cleanup
2021-06-10 12:33:29 +02:00
Raúl Kripalani
6d46be53bd make tests no longer create auth tokens. 2021-06-10 00:15:29 +01:00
Steven Allen
a64a059780 implement a command to export a car 2021-06-09 15:52:32 -07: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
aarshkshah1992
16166504f4 merged master 2021-06-08 09:17:40 +05:30
Raúl Kripalani
40ea660cdd fix TestWorkerKeyChange. 2021-06-07 23:56:59 +01:00
Raúl Kripalani
a274fcc533 Merge branch 'master' into raulk/itests 2021-06-07 23:44:22 +01:00
Raúl Kripalani
db1a61852d Merge branch 'master' into raulk/itests 2021-06-07 23:17:44 +01:00
aarshkshah1992
4efaa8d688 unit tests for the remote store Reader 2021-06-07 15:02:52 +05:30
aarshkshah1992
759d8f090b test http handler 2021-06-07 15:02:52 +05:30
aarshkshah1992
65eb610ec3 docs, logs and green ci 2021-06-07 15:02:49 +05:30
Anton Evangelatov
8bd09e39ca resolve merge conflicts 2021-06-04 16:17:00 +02:00
Łukasz Magiera
6d9779ecae Merge remote-tracking branch 'origin/master' into feat/nv13-1.11 2021-06-02 15:07:13 +02:00
Łukasz Magiera
ae90d7c3b5 Fix lint 2021-06-02 12:00:39 +02:00
Travis Person
07102ec686 lotus-gateway: add check command
The check command provides a quick way to try out different transports
and verify that a connection can be made to a running gateway.
2021-06-02 11:59:11 +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
482e1110c2 precommit batcher: Improve error propagation 2021-06-01 14:35:30 +02:00
Łukasz Magiera
5c3ebd424c miner: Improve batching CLI UX 2021-06-01 12:33:24 +02:00
Łukasz Magiera
cd0a1c97fa Improve cli for flushing commit batches 2021-06-01 12:25:19 +02:00
Łukasz Magiera
3671f2a6ff fix 2k build 2021-05-31 21:52:23 +02:00
Łukasz Magiera
c3e8eddb9b Merge remote-tracking branch 'origin/master' into feat/nv13-1.11 2021-05-31 21:24:56 +02:00
Aayush Rajasekaran
92f544d96c Add verifreg utils to CLI 2021-05-31 15:01:55 -04:00
Łukasz Magiera
937366f04a lotus-wallet: Describe setup with auth 2021-05-31 14:33:54 +02:00
Łukasz Magiera
7d1ae7daf5 lotus-wallet: Support permissioned api 2021-05-31 13:56:35 +02:00
Łukasz Magiera
47608c1937 wallet: Handle jwt headers 2021-05-31 13:38:14 +02:00
Anton Evangelatov
d195a12565 Merge branch 'master' into nonsense/split-market-miner-processes 2021-05-31 11:26:11 +02:00
Anton Evangelatov
46a368d2b9 bump api ver 2021-05-27 13:35:54 +02:00
Łukasz Magiera
1e4456138e Merge master into feat/nv13 2021-05-27 12:28:20 +02:00
Aayush Rajasekaran
1ad2c4dab0 Make devnets work again 2021-05-26 12:48:19 -04:00
Aayush Rajasekaran
7714537239 Allow starting networks from arbitrary actor versions 2021-05-26 12:48:14 -04:00
Łukasz Magiera
43c62f4406
Revert "Allow starting networks from arbitrary actor versions" 2021-05-26 12:33:08 +02:00
Aayush Rajasekaran
cf574ca9a1 Allow starting networks from arbitrary actor versions 2021-05-25 19:30:20 -04:00
Łukasz Magiera
f5409845b5 Some review addressing 2021-05-25 16:07:45 +02:00
Peter Rabbitson
c2e5a837e6 Adjust various CLI display ratios to arbitrary precision
Originally the deviations from using float64 were insignificant, but at
exabyte scale they start to show up. Cleanup all displays, and clarify
the expectation text, adding an extra 99.9% probability calculator to
`lotus-miner info`
2021-05-25 14:09:01 +02:00
Łukasz Magiera
05082e262a
Merge pull request #6316 from Aloxaf/fix_completion
Fix shell completions
2021-05-24 13:44:02 +02:00
Aloxaf
559c76a214
Fix shell completions 2021-05-24 15:00:47 +08:00
Raúl Kripalani
f6a7f21def Merge branch 'raulk/refactor-rpc' into raulk/itests 2021-05-23 22:00:49 +01:00
Raúl Kripalani
57dab5b71c remove previously redundant context. 2021-05-23 19:12:13 +01:00
Raúl Kripalani
d8d48953d9 Merge branch 'raulk/refactor-rpc' into raulk/itests 2021-05-23 18:47:55 +01:00
Raúl Kripalani
188688c9ce refactor gateway rpc. 2021-05-23 18:37:53 +01:00
Raúl Kripalani
c3f45cc836 Merge branch 'raulk/refactor-rpc' into raulk/itests 2021-05-23 14:56:54 +01:00
Raúl Kripalani
2337248aa5 rpc: separate handlers/server; refactor miner rpc. 2021-05-23 14:48:42 +01:00
Raúl Kripalani
627248d610 Merge branch 'raulk/refactor-rpc' into raulk/itests 2021-05-23 12:41:25 +01:00
aarshkshah1992
dc6dbc9a11 dpr changes and test based on new unsealing PR 2021-05-22 22:40:21 +05:30
Raúl Kripalani
5b77dbd06f decouple rpc server and shutdown logic from cmd. 2021-05-21 21:34:17 +01:00
Raúl Kripalani
2e9b0f0895 adapt cmd/lotus-storage-miner tests. 2021-05-21 14:52:30 +01:00
Łukasz Magiera
807c670184
Merge pull request #6135 from filecoin-project/asr/verifreg
Move verifreg shed utils to CLI
2021-05-21 11:21:38 +02:00
aarshkshah1992
bd9959070e unit tests for the remote store Reader 2021-05-20 15:25:46 -06:00
aarshkshah1992
dd9c9fd4fd test http handler 2021-05-20 15:25:46 -06:00
aarshkshah1992
73613ee883 docs, logs and green ci 2021-05-20 15:25:46 -06:00
Anton Evangelatov
8d3d3c88d4 introduce init service, refactor restore service 2021-05-20 13:25:54 +02:00
Raúl Kripalani
06b8ee5b95 Merge branch 'master' into raulk/itests 2021-05-20 11:56:43 +01:00
Anton Evangelatov
2562f2e9a6 add ReaderParamDecoder to json rpc server to lotus-miner run 2021-05-20 12:36:24 +02:00
Anton Evangelatov
2aad7b6979 update sectorstorage.New (Manager) interface 2021-05-20 12:32:29 +02:00
Łukasz Magiera
678812f35b gofmt, lint 2021-05-20 12:05:04 +02:00
Łukasz Magiera
e0a520cb65
Merge pull request #6294 from filecoin-project/raulk/refactor-gateway
gateway: spin off from cmd to package
2021-05-19 20:59:37 +02:00
Raúl Kripalani
ac4f3ab684 remove duplicated vars. 2021-05-19 18:17:38 +01:00
Raúl Kripalani
2a70ff96bf move the gateway test to itests package. 2021-05-19 17:34:48 +01:00
Raúl Kripalani
625b18771d remove duplicated vars. 2021-05-19 17:30:06 +01:00
Łukasz Magiera
a5677d1b7a ffiwrapper: Separate Prover interface 2021-05-19 15:20:23 +02:00
Raúl Kripalani
88c6642330 restructure gateway.
Move the gateway implementation to the `gateway` top-level
package. cmd/lotus-gateway now contains only the entrypoint.

This separation is important for the testing refactors.
2021-05-19 12:45:55 +01: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
Aayush Rajasekaran
fc7ea8dfa3 Useful tool 2021-05-18 21:13:12 -04:00
Łukasz Magiera
0419c64a06 CLI for precommit batching 2021-05-18 20:35:35 +02:00
Łukasz Magiera
f66b9c5663 Maybe working precommit batching 2021-05-18 17:21:16 +02:00
Łukasz Magiera
6278bdc69a Make things build 2021-05-17 20:47:41 +02:00
whyrusleeping
b4b38788ef add flags to control gateway lookback parameters 2021-05-13 11:00:42 -07:00
chenliang
3b7a5c70c3
Merge branch 'master' into lotus-shed-actor 2021-05-12 11:03:49 +08:00
Łukasz Magiera
506f39b294 WIP: Integrate FIP0013 2021-05-11 22:10:29 -04:00
Aayush Rajasekaran
bf10b051ff
Merge pull request #6108 from filecoin-project/feat/actors-codegen
wip actor wrapper codegen
2021-05-10 20:12:57 -04:00
Aayush Rajasekaran
8465a97c4b
Merge pull request #5822 from filecoin-project/epic/robust-message-management
Robust message management
2021-05-10 19:58:33 -04:00
Łukasz Magiera
a80259d986 Actor upgrade checklist 2021-05-10 19:46:44 -04:00
Aayush Rajasekaran
9977cb2604
Merge pull request #6169 from filecoin-project/asr/shed-minertypes
Add a shed util to count miners by post type
2021-05-10 19:45:52 -04:00
Aayush Rajasekaran
b5da2655dc Introduce v5 actors 2021-05-10 19:44:28 -04:00
Łukasz Magiera
63189cd81d Generate wrappers for new actor versions 2021-05-09 21:04:50 -04: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
61dbd443b8
Fix tests and verifreg
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-07 15:30:05 +02:00
Jakub Sztandera
7535c5bb53
Add mpool manage command
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
ZenGround0
5351db9da7 Lint 2021-05-06 10:17:25 -04:00
ZenGround0
e1185dd5b5 cron-wc 2021-05-06 09:53:29 -04:00
Aayush Rajasekaran
f6360c34dd Add verifreg utils to CLI 2021-05-03 22:16:12 -04:00
Aayush Rajasekaran
edc6a63e93 Add a shed util to count miners by post type 2021-05-01 00:24:14 -04:00
Aayush Rajasekaran
e6779b0b6f Add a command to get the fees of a deal 2021-04-29 13:29:17 -04: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
Steven Allen
2857f6c0ed fix: use a consistent tipset in commands
It's very easy to write an incorrect command that operates over
different heads by using the "empty" tipset. This change makes the
`LoadTipSet` command helper get the latest head from the lotus daemon if
its unset.

The cost is an extra call to get the head. That should be trivial in
most cases.
2021-04-29 08:50:08 -07:00
Aayush Rajasekaran
d794b49df3 Use EmptyTSK where appropriate 2021-04-29 01:00:03 -04:00
Steven Allen
bcfad6b2bb fix(lotus-shed): sanity check start height for dup check 2021-04-28 17:51:25 -07:00
Steven Allen
701682c98a feat(lotus-shed): make it possible to filter by to/from when checking dups 2021-04-28 17:43:07 -07:00
lotus
77eefcd6d8 feat(lotus-shed): improve duplicate-messages audit command
- Allow a start/end epoch.
- Print one line per duplicate set.
- Allow filtering duplicate messages by method number.
- Make the number of threads configurable.
2021-04-28 17:03:37 -07:00
Łukasz Magiera
c8fcab5d22 shed: Command to list duplicate messages in tipsets 2021-04-28 16:23:35 -07:00
Łukasz Magiera
a24a73bb52 Merge tag 'v1.8.0' into release/v1.9.0 2021-04-27 10:30:33 +02:00
Łukasz Magiera
c4137a438d Merge commit 'f1ded63d608e1b191d79c780b8065f8cff367c98' into feat/nv12-1.11 2021-04-27 08:22:55 +02:00
Aayush Rajasekaran
f1ded63d60 v4 specs-actors integration, nv12 migration 2021-04-27 02:02:44 -04:00
Łukasz Magiera
86d4f5f738
Merge pull request #6075 from filecoin-project/feat/gateway-walletbalance
implement WalletBalance on gateway
2021-04-23 16:00:54 +02:00
Aayush Rajasekaran
448b5cb2a3 Shed util to sanity-check total balance is FilBase 2021-04-22 19:45:35 -04:00
Cory Schwartz
39e49f1700 implement WalletBalance on gateway 2021-04-20 21:55:47 -07:00
chadwick2143
2cb3c89570 Fix bugs in sectors extend --v1-sectors 2021-04-20 14:00:01 +08:00
Łukasz Magiera
4436c184ed Fix v0/v1 API versions 2021-04-16 00:20:13 +02:00
chadwick2143
cba911ab5e Add actorControlList command 2021-04-14 16:37:59 +08:00
chadwick2143
8972152eb1 Set MaxFee for lotus-shed actor withdraw to 0.1FIL 2021-04-14 16:34:57 +08:00
Łukasz Magiera
e76935147f Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-04-13 14:24:22 +02:00
Aayush Rajasekaran
c1e4eb3b20 Add a whitelisted block 2021-04-10 02:12:38 -04:00
Aayush Rajasekaran
470bd307c3 add a shed util to verify BLS signatures 2021-04-10 01:40:24 -04:00
Łukasz Magiera
1e6bba5388
Merge pull request #5943 from filcloud/4857-set-addrs
fix 4857: show help for set-addrs
2021-04-10 02:00:34 +02:00
Frank
2dbd597f82
Update cmd/lotus-storage-miner/actor.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-04-08 11:14:53 +08:00
zgfzgf
640d6fa474 optimize code 2021-04-06 22:40:05 +08: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
cf96ad4fdb fix lint 2021-04-06 14:30:49 +02:00
Łukasz Magiera
c3736f40fe gateway: use correct path in serveRpc 2021-04-06 12:29:11 +02:00
Łukasz Magiera
e8f28d7b9f Fix tests 2021-04-06 12:24:58 +02:00
Frank
4403158680 add unset for set-addrs 2021-04-06 11:24:32 +08:00
Aayush Rajasekaran
37ca23d9e2 Merge branch 'releases' into asr/release-master 2021-04-05 17:29:19 -04:00
Łukasz Magiera
eee50caaf1 Fix buildall 2021-04-05 20:12:47 +02:00
Łukasz Magiera
81bd27911f Propagate StateMsg api changes 2021-04-05 19:56:53 +02:00
Łukasz Magiera
49f8b8df00
Merge pull request #5900 from filecoin-project/mg/chore/move-mpool-clear
chore: Move lotus mpool clear to lotus-shed
2021-04-05 18:43:57 +02:00
Łukasz Magiera
d8bff4d19f Make gateway work with v1 api 2021-04-05 13:47:10 +02:00
Łukasz Magiera
deb2b90b6a Fix lotus/miner build 2021-04-05 13:23:46 +02:00
Aayush Rajasekaran
72c410cd8f Address review on v1 sector extension tool 2021-04-03 22:19:36 -04:00
Aayush Rajasekaran
01bf3a89f4 Add checks to v1 extension util 2021-04-03 16:54:16 -04:00
Aayush Rajasekaran
b734e5a232 Miner CLI: If performing read-only operations on a foreign miner, miner API isn't needed 2021-04-03 16:54:16 -04:00
Aayush Rajasekaran
ded4ff43f4 Allow miners to extend all v1 sectors 2021-04-03 16:54:16 -04:00
zgfzgf
ef08bd48b5 add election backtest 2021-04-03 11:52:30 +08:00
Frank
0fe705605e fix 4857: show help for set-addrs 2021-04-02 19:25:36 +08:00
Łukasz Magiera
c9866da688 Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-04-02 13:15:33 +02:00
Łukasz Magiera
0cfc76c078
Merge pull request #5891 from filecoin-project/feat/backupds-trunc-log-handling
backupds: Improve truncated log handling
2021-04-02 13:04:11 +02:00
Łukasz Magiera
cf4128fc78
Merge pull request #5092 from zgfzgf/feat-shed-election
add shed election estimate command
2021-04-01 17:05:09 +02:00
Mike Greenberg
c800211fbb chore: Move lotus mpool clear to lotus-shed 2021-03-29 12:54:08 -04:00
chadwick2143
4395f27143 Transplant some useful commands to lotus-shed actor
Transplant some useful commands from lotus-miner actor to lotus-shed actor,
so that you can excute them without miner api.
2021-03-29 12:27:08 +08:00
Łukasz Magiera
411f561db6 backupds: Improve truncated log handling 2021-03-27 10:05:12 +01:00
Łukasz Magiera
e003977559 apiclient: Version client funcs 2021-03-25 15:39:48 +01:00
Łukasz Magiera
7a23b411ae Merge apistruct with the api package 2021-03-25 15:10:08 +01:00
Łukasz Magiera
759ea5b14f Merge remote-tracking branch 'origin/master' into feat/v1-api 2021-03-25 14:13:21 +01:00
Łukasz Magiera
6d9ae1e28e
Merge pull request #5819 from chadwick2143/lotus-shed
Add --actor flag in lotus-shed sectors terminate
2021-03-25 14:02:37 +01:00
Łukasz Magiera
8f78066d4f
Merge pull request #5875 from filecoin-project/feat/log-compact-restart
backupds: Compact log on restart
2021-03-25 10:42:39 +01:00
Łukasz Magiera
924c419e61 backupds: handle log bool in shed 2021-03-24 21:26:24 +01:00
Aayush Rajasekaran
dac171a99b Add a util to validate FILPoll votes 2021-03-24 00:00:11 -04:00
Aayush Rajasekaran
fdb69fdd71 Add a util to decode base64 inputs 2021-03-23 23:32:56 -04:00
Łukasz Magiera
eed5840de3 fix lotus-shed 2021-03-23 19:37:30 +01:00
Łukasz Magiera
65dcec0ebc api client: Use versioned api packages 2021-03-23 19:15:53 +01:00
Łukasz Magiera
d198cf456e make docsgen work with versioned api 2021-03-23 17:20:56 +01:00
Łukasz Magiera
571114bc44 Scaffolding for API versioning 2021-03-23 16:40:22 +01:00
Łukasz Magiera
c41777dcd2
API proxy struct codegen (#5854)
* mostly working api proxy gen

* api: Consistent api names

* fix docsgen

* regenerate api struct

* api: expand external interfaces

* Add missing gen files

* apigen: fix perm detection

* api: Move perm tags to the interface

* gofmt

* worker perms

* docsgen

* docsgen: ignore tag comments

* apigen: add codegen warning

* gofmt

* missing actor type

* docsgen

* make linter happy

* fix lint

* apigen: use directives for tags

* docsgen

* regen openrpc docs
2021-03-23 13:42:56 +01:00
Łukasz Magiera
43d9cc36a4
OpenRPC Support (#5843)
* main: init implement rpc.Discover RPC method

This implement the basic functionality for the method
over HTTP RPC.

Signed-off-by: meows <b5c6@protonmail.com>

* main,go.mod,go.sum: init example with go-openrpc-reflect lib

Signed-off-by: meows <b5c6@protonmail.com>

 Conflicts:
	go.mod
	go.sum

* main: make variable name human-friendly

Signed-off-by: meows <b5c6@protonmail.com>

* main,go.mod,go.sum: init impl of go-openrp-reflect printing document

Signed-off-by: meows <b5c6@protonmail.com>

 Conflicts:
	go.mod
	go.sum

* go.mod,go.sum: use go-openrpc-reflect and open-rpc/meta-schema hackforks

This is for development only.
Versions need to be bumped when they're ready for use
as canonical remotes.

Signed-off-by: meows <b5c6@protonmail.com>

* main,openrpc,main: refactor openrpc supporting code to own package

This eliminates code duplication.

Signed-off-by: meows <b5c6@protonmail.com>

* main: add rpc.Discover to openrpc document

Signed-off-by: meows <b5c6@protonmail.com>

* openrpc: fix rpc.discover method name casing

Also fixes casing stuff for the rest of Filecoin.
methods.

Signed-off-by: meows <b5c6@protonmail.com>

* Revert "main: add rpc.Discover to openrpc document"

This reverts commit 116898efb10f33e405ac74acb1aa6daefcd46a62.

* main: fix document creation method name

This fixes an issue caused with the latest reverting
commit.

Signed-off-by: meows <b5c6@protonmail.com>

* main,docgen,openrpc: refactor to share api parsing, etc as docgen exported stuff

Signed-off-by: meows <b5c6@protonmail.com>

Makefile: fix docgen refactoring for makefile use of command

Signed-off-by: meows <b5c6@protonmail.com>

* openrpc: add schema.examples to app reflector

There are quite of few of these already registered
for the docgen command, so it makes sense to use
those!

Signed-off-by: meows <b5c6@protonmail.com>

* openrpc: init method pairing examples

Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: bump go.mod to use latest meta-schema and openrpc-reflect versions

Signed-off-by: meows <b5c6@protonmail.com>

* openrpc: init SchemaType mapper function

This function will handle the manual configurations
for app-specific data types w/r/t their json schema
representation.

This is useful for cases where the reflect library
is unable to provide a sufficient representation
automatically.

Provided in this commit is an initial implementation
for the integerD type (assuming number are represented
in the API as hexs), and a commonly used cid.Cid type.

Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: tame dependencies by bumping etclabscore/go-openrpc-reflect

This removes a problematic dependency
on github.com/ethereum/go-ethereum, which was
imported as a dependency for a couple github.com/etclabscore/go-openrpc-reflect
tests.

etclabscore/go-openrpc-reflect v0.0.36 has removed this
dependency, so this commit is the result of bumping
that version and then running 'go mod tidy'

This is in response to a review at
https://github.com/filecoin-project/lotus/pull/4711#pullrequestreview-535686205

Date: 2020-11-21 06:52:48-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* main: add 'miner' arg to openrpc gen cmd

This allows the command to EITHER
generate the doc for Full or Miner APIs.

See comment for usage.

Date: 2020-11-21 07:48:05-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* docgen: add missing examples for Miner API

Generating the Miner API OpenRPC doc
(via 'go run ./api/openrpc/cmd miner') caused
the example logic to panic because some types
were missing.

This commit adds those missing types, although
I'm not an expert in the API so I can't
suggest that the example values provided are
ideal or well representative.

Date: 2020-11-21 07:50:21-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build/openrpc/full.json,build/openrpc/miner.json: add build/openrpc/[full/miner].json docs

These will be used as static documents
provided by the rpc.discover method.

Date: 2020-11-21 07:51:39-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build: init go-rice openrpc static assets

Date: 2020-11-21 08:23:06-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* main: remove rpc.discover implementation from runtime plugin

Instead of generating the doc on the fly,
we're going to serve a static asset.
Rel https://github.com/filecoin-project/lotus/pull/4711#pullrequestreview-535686205
This removes the runtime implementation from the
RPC server construction.

Date: 2020-11-21 08:41:20-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api,apistruct,common: add Discover(ctx) method to CommonAPI interface and structs

Date: 2020-11-21 08:41:56-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* main: use rpc server method aliasing for rpc.discover

This depends on a currently-forked change at
filecoin-project/go-jsonrpc 8350f9463ee451b187d35c492e32f1b999e80210
which establishes this new method RPCServer.AliasMethod.

This solves the problem that the OpenRPC
spec says that the document should be served
at the system extension-prefixed endpoing
rpc.discover (not Filecoin.Discover).

In fact, the document will be available at BOTH
endpoints, but that duplicity is harmless.

Date: 2020-11-21 09:18:26-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api,apistruct,build,common: rpc.discover: return json object instead of string

Instead of casting the JSON asset from bytes to string,
unmarshal it to a map[string]interface{} so the
server will provide it as a JSON object.

Date: 2020-11-21 09:27:11-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* Makefile: merge resolve: docsgen command path

Date: 2020-11-22 07:19:36-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* apistruct,main,docgen,openrpc: merge resolve: fix func exporteds, signatures

Date: 2020-11-22 07:31:03-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: 'get get' auto-bumps version

Date: 2020-11-22 07:31:44-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* Makefile,docgen,main,build/openrpc: refactor openrpc documentation generation

This creates Makefile command docsgen-openrpc-json,
and refactors the docsgen command to generate both
the markdown and openrpc json documents, redirecting
the output of the openrpc json documentation to
the build/openrpc/ directory, where those json
files will be compiled as static assets via go-rice
boxes.

The api/openrpc/cmd now uses usage argumentation
congruent to that of the docgen command (switching
on API context).

Date: 2020-11-22 08:01:18-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* main,docgen_openrpc: rename api/openrpc -> api/docgen-openrpc

Renames the package as well.

This is intended to parallel the
existing docgen package and command
namespacing.

Date: 2020-11-22 10:34:46-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api,apistruct,docgen,build,build/openrpc: use typed Discover response

Instead of using a map[string]interface{}, use
a typed response for the Discover method implementation.

This avoids having to set a docgen Example for
the generic map[string]interface{} (as an openrpc document)
which both pollutes the generic type and lacks
useful information for the Discover method example.

Date: 2020-11-22 08:31:16-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* apistruct,build,main,impl: implement Discover method for Worker and StorageMiner APIs

Methods return static compiled assets respective
to the APIs.

Date: 2020-11-22 08:57:18-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* docgen_openrpc,build/openrpc: remove timestamping from openrpc doc info

This should allow openrpc docs generated at different
times to be equal. This is important because the CI
(Circle) runs the docgen command and tests that
the output and the source are unchanged (via git diff).

Date: 2020-11-22 10:47:07-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* main,docgen_openrpc,main,build: fix lint issues

Fixes goimports, staticcheck, golint issues.

Date: 2020-11-22 11:06:46-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* docgenopenrpc: fix: don't use an underscore in package name (golint)

Date: 2020-11-22 11:07:53-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.sum: fix: mod-tidy-check (run 'go mod tidy')

Date: 2020-11-22 11:09:48-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: bump filecoin-project/go-jsonrpc dep to latest

This version includes the necessary RPCServer.AliasMethod
method.

Date: 2020-11-23 12:16:15-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* Makefile,main,build,build/openrpc: init gzipped openrpc static docs

Date: 2020-11-24 06:15:06-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build: refactor gzip reading

Date: 2020-11-24 06:18:34-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build: add basic test for openrpc doc from static assets

Date: 2020-11-24 06:30:23-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build: handle reader Close error

This keeps the errcheck linter happy.

Date: 2020-11-24 06:33:14-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.sum: run 'go mod tidy'

Date: 2020-11-24 06:36:07-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: go mod tidy

Tidying up after resolving the merge conflicts
with master at go.mod

Date: 2020-11-24 06:40:45-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* go.mod,go.sum: bump filecoin-project/go-jsonrpc to latest

This is a repeat of 76e6fd2, since the latest merge
to master seems to have reverted this.

Date: 2020-11-24 06:42:30-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* docgenopenrpc,build/openrpc: remove method example pairings, improve schema examples

Removing method example pairings since they were
redundant to schema examples and were not
implemented well.

Improved schema examples by using the ExampleValue
method instead of the map lookup.
Made a note in the comment here that this is
not ideal, since we have to make a shortcut assumption
/workaround by using 'unknown' as the method name
and the typea as its own parent.

Luckily these values aren't heavily used by the
method logic.

Date: 2020-11-27 12:57:36-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* docgenopenrpc: use generic number jsonschema for number types

Previously used an integer schema assuming
hex encoding. It appears, based on review some
of the examples, that this may not be the case.

Obvioussly this schema could be more descriptive,
but just shooting for mostly likely to be
not wrong at this point.

Date: 2020-12-15 14:44:37-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* cmd/lotus,go.mod,go.sum: maybe fix straggling merge resolution conflicts

Date: 2021-01-19 12:30:42-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* build/openrpc/full.json.gz,build/openrpc/miner.json.gz,build/openrpc/worker.json.gz: run 'make docsgen'

Date: 2021-01-19 12:33:55-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api/apistruct,node/impl: (lint) gofmt

Date: 2021-01-19 12:39:48-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api/docgen: maybe fix parse error:  open ./api: no such file or directory

Date: 2021-01-19 12:52:04-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api/docgen,build/openrpc: maybe fix no such file error and run 'make docsgen'

Date: 2021-01-19 12:55:52-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api/docgen: return if AST comment/groupdoc parsing encounters any error

This will returns empty comments/docs maps.
This should fix issues like:
https://app.circleci.com/pipelines/github/filecoin-project/lotus/12445/workflows/4ebadce9-a298-4ad1-939b-f19ef4c0a5bf/jobs/107218

where the environment makes file lookups hard or
impossible.

Date: 2021-01-19 13:04:58-06:00
Signed-off-by: meows <b5c6@protonmail.com>

* api: Don't depend on build/

* make: support parallel docsgen

* openrpc gen: Use simple build version

* methodgen

* goimports

Co-authored-by: meows <b5c6@protonmail.com>
2021-03-19 19:22:46 +01:00
Peter Rabbitson
c340750672 Nerpa reset backport/cherry-pick from 73eabc310f 2021-03-18 20:55:15 +01:00
Aayush Rajasekaran
80ff0b0564 Improve setting of VRK multisigs 2021-03-17 00:18:50 -04:00
chadwick2143
7417a13be3 Add --actor flag in lotus-shed sectors terminate
Can specify miner actor address when terminate sectors,
so that you can terminate sectors without miner api.
2021-03-16 14:09:46 +08:00
Łukasz Magiera
58213760b7 gofmt 2021-03-12 15:56:10 +01:00