Łukasz Magiera
06ec571c20
Merge remote-tracking branch 'origin/master' into refactor/net-upgrade
2020-09-14 15:09:52 +02:00
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
vyzo
b78fe0b898
fix deadlock
2020-09-11 21:40:25 +03:00
vyzo
bf1036c78f
rename priority variable to protected
2020-09-11 21:12:11 +03:00
vyzo
cf9820137c
don't prune locally published messages
2020-09-11 20:32:52 +03:00
Łukasz Magiera
4410da98be
Merge pull request #3766 from filecoin-project/fix/mpool-prune
...
refactor getBaseFeeLowerBound, use it to prune less aggressively
2020-09-11 11:40:26 +02:00
vyzo
3dfb3e641b
refactor getBaseFeeLowerBound, use it to prune less aggressively
2020-09-11 12:15:03 +03:00
Jakub Sztandera
2865a0367b
Fix mpool replace --auto
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-11 00:59:57 +02:00
vyzo
72c7d4c886
relax mpool add strictness checks for local pushes
...
So that a node can have more than 1k pending messages for its own local addresses.
2020-09-10 09:55:50 +03:00
vyzo
d369f542c5
warn when optimal selection fails to pack a block and we fall back to random selection
2020-09-09 23:17:09 +03:00
Jakub Sztandera
ef18f93609
Merge pull request #3698 from filecoin-project/fix/mpool-packing-failure
...
fix mpool optimal selection packing failure
2020-09-09 21:38:26 +02:00
vyzo
cf515bc5ca
add selection test with real world messages dumped from a live node mpool
2020-09-09 20:46:26 +03:00
vyzo
97cbfa11b7
fix nasty bug in optimal selection
...
the sort has to account for negative gasPerf and be stable; go figure.
2020-09-09 20:45:24 +03:00
Łukasz Magiera
1d78ffc04d
Merge pull request #3676 from filecoin-project/feat/mpool-replace-auto
...
add an auto flag to mpool replace
2020-09-09 19:31:43 +02:00
whyrusleeping
e9b85f5acb
ensure replaced message can properly RBF
2020-09-09 10:23:41 -07:00
vyzo
194b6eb9d8
fix issue with gasLimit check for trimming (> instead of >=)
2020-09-09 12:58:51 +03:00
vyzo
0b09082450
adjust optimal selection to always try to fill blocks
2020-09-09 12:37:03 +03:00
vyzo
26ff596983
fix very minor bug in repub baseFeeLowerBound
...
messages will not be accepted if the GasFeeCap is less than minimumBaseFee, but it doesn't hurt
to be correct.
2020-09-08 19:02:05 +03:00
Jakub Sztandera
46ee2eeded
Upgrade to correct fork treshold
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 23:07:33 +02:00
Jakub Sztandera
704db225d1
Update the fork point
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 22:45:06 +02:00
Jakub Sztandera
ce0e9594df
Update to go-state-types
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 22:44:12 +02:00
Jakub Sztandera
835b7eb6f7
Make allowNegativeChains a function
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 22:44:12 +02:00
vyzo
172ff846fd
decouple negative chain selection from base fee lower bound validation
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 22:44:12 +02:00
vyzo
97fddc45d9
temporarily allow negative perfoming chains
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-07 22:44:09 +02:00
Aayush Rajasekaran
39755a294a
Update to specs v0.9.6
2020-09-07 15:48:41 -04:00
vyzo
2233751668
use the baseFeeLowerBound for computing repub message chains
2020-09-07 21:53:30 +03:00
vyzo
41222792ed
add docstring for verifyMsgBeforeAdd
2020-09-07 20:26:51 +03:00
vyzo
5659faf7f0
don't immediately publish messages that cannot be included in the next 20 blocks
2020-09-07 20:20:49 +03:00
vyzo
2e75d9c80a
be explicit about republish interval, check against timecache duration
2020-09-07 20:20:49 +03:00
vyzo
0fcf8838cc
improve republish logic to only republish messages that can be included in the next 20 blocks
2020-09-07 20:20:49 +03:00
vyzo
ffb2640736
use faster lookup for base fee
2020-09-06 11:55:43 +03:00
vyzo
f9492691a6
don't check baseFee lower bound for local messages
2020-09-06 11:55:43 +03:00
vyzo
1c0e6d76f0
add defensive check for minimum GasFeeCap for inclusion within the next 20 blocks
2020-09-06 11:55:43 +03:00
Łukasz Magiera
f58cbc2594
Merge pull request #3557 from filecoin-project/fix/mpool-repub-negative
...
republish messages even if the chains have negative performance
2020-09-05 21:48:39 +02:00
Łukasz Magiera
1e190e462a
Merge pull request #3562 from filecoin-project/fix/mpool-log-spam
...
reduce mpool add failure log spam
2020-09-05 21:47:29 +02:00
vyzo
5037282b98
add test for priority selection with negative chains
2020-09-05 22:15:18 +03:00
vyzo
0b3685e529
fix selection bug; priority messages were not included if other's chains were negative
2020-09-05 21:30:02 +03:00
vyzo
275f071b12
reduce mpool add failure log spam
2020-09-05 00:28:13 +03:00
vyzo
ad8d550d73
remove unused ts argument from Trim, replace it with allowNegative specifier
2020-09-04 22:32:30 +03:00
vyzo
6d53862142
republish messages even if the chains have negative performance
2020-09-04 22:16:10 +03:00
Łukasz Magiera
01449e486c
Merge pull request #3528 from filecoin-project/fix/sele-gas-reward
...
Fix calculation of GasReward in messagepool
2020-09-03 20:41:28 +02:00
Jakub Sztandera
8111b227c4
Appease the linter
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-03 20:19:01 +02:00
Jakub Sztandera
8bb471bccd
Add getGasPerf test
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-03 20:19:01 +02:00
Jakub Sztandera
5074b526d0
Fix calculation of GasReward in messagepool
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-03 19:36:03 +02:00
vyzo
d20b6adfd2
refuse to add duplicates in the mpool
2020-09-03 15:28:44 +03:00
vyzo
a4c650316a
fix test
2020-09-03 15:28:44 +03:00
vyzo
28f57667f0
cap MaxNonceGap to 4, add delay between batch messages during republish
2020-09-03 15:28:44 +03:00
vyzo
f53d2e3a46
cap MaxNonceGap to 16
2020-09-03 15:28:44 +03:00
vyzo
7b76aa2078
warn when adding a nonce-gapped message to the mpool
2020-09-03 15:28:44 +03:00
vyzo
da6d384300
fix tests
2020-09-03 15:28:44 +03:00