Commit Graph

363 Commits

Author SHA1 Message Date
Steven Allen
d3594835c4 [WIP] Network upgrade support
This patch starts adding support for network upgrades.

* It adds an actors abstraction layer for loading abstract (cross-version) actors.
* It starts switching over to a shared deadline type.
* It adds an abstraction for ADTs (hamt/amt).
* It removes the callback-based API in the StateManager (difficult to abstract
across actor versions).
* It _does not_ actually add support for actors v2. We can do that in a followup
patch but that should be relatively easy.

This patch is heavily WIP and does not compile. Feel free to push changes
directly to this branch.

Notes:

* State tree access now needs a network version, because the HAMT type will change.
* I haven't figured out a nice way to abstract over changes to the _message_
types. However, many of them will be type aliased to actors v0 in actors v2 so
we can likely continue using the v0 versions (or use the v2 versions
everywhere). I've been renaming imports to `v0*` to make it clear that we're
importing types from a _specific_ actors version.

TODO:

* Consider merging incremental improvements? We'd have to get this compiling
again first but we could merge in the new abstractions, and slowly switch over.
* Finish migrating to the new abstractions.
* Remove all actor state types from the public API. See `miner.State.Info()` for
the planned approach here.
* Fix the tests. This is likely going to be a massive pain.
2020-09-11 20:16:29 -07:00
Łukasz Magiera
e91ee9f62a Fix lint 2020-09-09 12:18:02 +02:00
Łukasz Magiera
f695c0c164 gas: Add tests to median premium math 2020-09-09 12:14:46 +02:00
Łukasz Magiera
2aba16e2c9 gas: Fix median calc 2020-09-09 11:41:02 +02:00
Aayush Rajasekaran
6eea5dd109 Update to specs 0.9.7 and markets 0.6.0 2020-09-07 17:11:32 -04:00
Aayush Rajasekaran
39755a294a Update to specs v0.9.6 2020-09-07 15:48:41 -04:00
Jakub Sztandera
2adb80729b
Add additional info about gas premium
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-05 15:17:55 +02:00
Jakub Sztandera
114c0ea85c
Fix GasPremium capping logic
Cap it just to FeeCap, there is no reason to cap it proportionally

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-04 15:42:12 +02:00
Łukasz Magiera
86cb865fdd Make chain export ~1000x times faster 2020-09-03 21:56:35 +02:00
Jakub Sztandera
d35b273dbf
Cap fees to reasonable level by default
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-03 13:49:50 +02:00
Łukasz Magiera
5aeabe39b5
Merge pull request #3456 from filecoin-project/misc/account-for-premium
Account for GasPremium in GasEstimateFeeCap
2020-09-02 18:20:32 +02:00
whyrusleeping
09ebd1a557 allow exporting a number of recent chain state trees 2020-09-02 17:15:10 +02:00
Jakub Sztandera
72fb6afae2
Account for GasPremium in GasEstimateFeeCap
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-01 20:35:29 +02:00
Aayush Rajasekaran
cfe5134375 Use Sign() to check zero-equality 2020-08-31 18:53:14 -04:00
Jakub Sztandera
56235aee90
Fix GasEstimateGasPremium when there is only one message on chain
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-31 18:12:06 +02:00
Łukasz Magiera
ae19b8ebfd
Merge pull request #3146 from filecoin-project/feat/paych-cli-voucher-tests
paych: modify `lotus paych voucher best-spendable` to output _all_ best vouchers
2020-08-24 22:59:20 +02:00
Łukasz Magiera
0806fd651a
Merge pull request #3183 from filecoin-project/steb/lint-all
Lint everything
2020-08-22 21:47:41 +02:00
vyzo
817358f1bb better semantics for mpool clear local argument
local messages should be kept unless the parameter is true
2020-08-21 23:48:35 +03:00
vyzo
087955e927 add localonly option to MpoolClear 2020-08-21 23:32:41 +03:00
vyzo
3027283756 add MpoolClear api 2020-08-21 23:32:41 +03: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
Jakub Sztandera
d08458a03c
s/From/To
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-21 00:16:48 +02:00
Jakub Sztandera
0ada762971
Compensate for DestoryActor in gas limit estimation
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-20 21:14:12 +02:00
Łukasz Magiera
71cf358ee3 Fix windowpost test 2020-08-20 01:18:01 +02:00
whyrusleeping
621d675938 fixup tests 2020-08-19 13:32:53 -07:00
whyrusleeping
2ab202a03d fixup ID allocation and a few other things 2020-08-19 12:54:33 -07:00
Sami Mäkelä
74f35c88ad checking verifreg handling 2020-08-19 15:27:50 +03:00
whyrusleeping
13e5b72cdb proper genesis block history
Commit hash originally stamped into the ethereum blockchain:
https://etherscan.io/tx/0xe8f51c9eefb682cd866f059462577b6dd3d2685ff4b6437f6c940ff4f4aaf067
2020-08-17 21:13:43 -07:00
Raúl Kripalani
efdc428d5d keep storage-fsm (renamed to storage-sealing) and sector-storage in extern. 2020-08-17 14:26:18 +01:00
Raúl Kripalani
3c17cd655e integrate extern/sector-storage into lotus proper. 2020-08-16 11:09:58 +01:00
Aayush Rajasekaran
0359a458e4 Include more info in StateCirculatingSupply 2020-08-14 16:53:30 -04:00
Jakub Sztandera
a6d79b26e4
Add comments
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-13 19:27:31 +02:00
Jakub Sztandera
ff7e441c82
Add noise to GasPremium calculation to help out message selection
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-13 18:57:06 +02:00
Jakub Sztandera
91b5ec1aba
Merge pull request #3032 from filecoin-project/feat/mpool-fix-capmaxfee
mpool: Fix capGasFee math again
2020-08-13 14:47:46 +02:00
Łukasz Magiera
47582c0bb3 mpool: Fix capGasFee math again 2020-08-13 14:16:29 +02:00
Łukasz Magiera
9a39bb4e78 api: Remove unused StatePledgeCollateral 2020-08-13 14:03:59 +02:00
Aayush Rajasekaran
c73d597d87
Merge pull request #2961 from filecoin-project/asr/genesis-premined
Revise TotalCircSupply
2020-08-12 17:12:54 -04:00
Łukasz Magiera
12f7e2d9bf Use a struct for send metadata in MpoolPushMessage 2020-08-12 22:17:29 +02:00
Łukasz Magiera
fd4d2067a9 mpool: Fix capGasFee math 2020-08-12 22:01:31 +02:00
Łukasz Magiera
e1a1b325bc Merge remote-tracking branch 'origin/next' into feat/max-msg-fee-config 2020-08-12 21:55:03 +02:00
Łukasz Magiera
43586ed9a1
Merge pull request #3000 from filecoin-project/feat/mpool-add-semaphore
Add semaphore in push and friends to reduce lock contention
2020-08-12 21:53:59 +02:00
Aayush Rajasekaran
48ab706691 Subtract out genesis pledge and market funds when calculating circ supply 2020-08-12 15:32:11 -04:00
Aayush Rajasekaran
fe2da35a45 Move GetCircSupply out of the vm, and into stmgr 2020-08-12 15:32:07 -04:00
Łukasz Magiera
bfa0ae16b0
Merge pull request #2965 from filecoin-project/steb/update-actors
Update specs-actors & cbor-gen
2020-08-12 21:18:05 +02:00
Jakub Sztandera
f7c222e42e
Validate message pool config, validate GasPremium < GasFeeCap
don't use configured RBF for mpool

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-12 20:31:34 +02:00
Steven Allen
e18904bff5 [WIP] fix post submission 2020-08-12 10:33:18 -07:00
vyzo
43b30a80c1 retry PushWithNonce if it fails with ErrTryAgain 2020-08-12 20:32:41 +03:00
Whyrusleeping
ed72aa1307 implement randomness distinction 2020-08-12 10:32:39 -07:00
Steven Allen
9248e5a572 Update specs-actors, cbor-gen, and go-address 2020-08-12 10:32:39 -07:00
Steven Allen
9135a5d048 Pass bitfields by-value
This ensures we can't end up decoding nil bitfields from clients when not
expecting them.

Part of https://github.com/filecoin-project/specs-actors/issues/895. Please see
this issue for details and leave any comments there.
2020-08-12 10:32:39 -07:00