Commit Graph

385 Commits

Author SHA1 Message Date
vyzo
12f6119739 don't include messages that drop the balance below zero 2020-10-30 20:56:33 +02:00
Jakub Sztandera
8afceee7a9
Fix messagepool accounting
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-30 19:21:25 +01:00
Łukasz Magiera
ae7889f830 Config for default max gas fee 2020-10-29 20:50:11 +01:00
Łukasz Magiera
660236b224 Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-10-23 23:25:35 +02:00
Łukasz Magiera
88ac85b6ae
Merge pull request #4500 from filecoin-project/fix/mpool-push-atomicity
make push and addLocal atomic
2020-10-22 19:43:52 +02: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
vyzo
580980d149 make push and addLocal atomic 2020-10-20 19:13:17 +03:00
Łukasz Magiera
7ac5dc55d0 Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-10-17 13:45:11 +02:00
Łukasz Magiera
3fb5334959 mpool: Don't block node startup loading messages 2020-10-15 03:36:55 +02:00
Łukasz Magiera
698b49b7ef Improve gas defaults 2020-10-15 02:46:47 +02:00
Steven Allen
b61281ba4b fix a panic on startup when we fail to load the tipset
There may be a deeper issue here, but we need to handle this more gracefully
somehow. See #4358.
2020-10-13 15:06:47 -07:00
Łukasz Magiera
71b3b9075d Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-10-13 21:33:21 +02:00
Jakub Sztandera
df7ee610cd
Re-enable repub
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-12 01:29:19 +02:00
Jakub Sztandera
2b21fdef33
Refactor from crypto.SigType to types.KeyType
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-12 00:07:53 +02:00
whyrusleeping
b35f9b56b4
WIP: adding in ledger support
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-12 00:07:40 +02:00
Łukasz Magiera
a6d9b302fa
Merge pull request #3583 from filecoin-project/feat/signing-backends
Remote wallet backends
2020-10-10 02:58:02 +02:00
Steven Allen
748d2e82a7 unshare the journal
Motivation:

* Run lotus with the race detector enabled (primary motivation).
* Allow multiple lotus nodes in a process (not a high priority).

Previously, the journal was shared between all lotus instances, but it was
initialized for every new node. This caused safety problems in tests (at a
minimum).

This patch explicitly passes the journal to all services that need it.
2020-10-09 13:23:07 -07:00
Łukasz Magiera
7d2f06cfbd Fix WalletSign in tests 2020-10-09 01:34:48 +02:00
Łukasz Magiera
8783c7434e Merge remote-tracking branch 'origin/master' into feat/signing-backends 2020-10-09 00:50:41 +02:00
Łukasz Magiera
82bd7bd2ec
Merge pull request #4224 from filecoin-project/fix/repub-journal
Fix Messages field in MessagePoolEvtMessage journal entry
2020-10-08 23:33:57 +02:00
Łukasz Magiera
0de3051821 Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-10-08 13:10:41 +02:00
Jakub Sztandera
6f4a762664
Fix Messages field in MessagePoolEvtMessage journal entry
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-07 21:13:04 +02:00
Aayush Rajasekaran
6d25f3d2ae Add some comments 2020-10-05 18:39:39 -04:00
Łukasz Magiera
921d78f820 Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-10-04 10:39:55 +02:00
Steven Allen
8292d60196 Merge branch 'master' into asr/spec-v1 2020-10-02 18:03:03 -07:00
Łukasz Magiera
0591bac768
Compare more accurately
Co-authored-by: dirkmc <dirkmdev@gmail.com>
2020-10-02 23:18:37 +02:00
Łukasz Magiera
3bebdb3882 Merge remote-tracking branch 'origin/master' into feat/mpool-gateway-api 2020-10-02 23:09:55 +02:00
Łukasz Magiera
2cfe22d4e5 Merge remote-tracking branch 'origin/master' into feat/async-restartable-workers 2020-09-30 20:48:16 +02:00
Łukasz Magiera
e3ee4e4718 Fix lint errors 2020-09-30 20:24:03 +02:00
Steven Allen
4989b1cc90 Merge branch 'master' into asr/spec-v1 2020-09-30 09:19:12 -07:00
Steven Allen
52e064dabb add gas numbers for v2 2020-09-28 14:09:46 -07:00
Dirk McCormick
3c524ac0e0 refactor: move nonce generation from mpool to wallet 2020-09-24 14:09:42 +02:00
Łukasz Magiera
70faa36b7f Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-18 19:29:06 +02:00
vyzo
3c72461969 MpoolPushUntrusted API for gateway 2020-09-18 09:40:43 +03:00
Łukasz Magiera
6eda53565f Most tests passing 2020-09-17 17:30:24 +02:00
Steven Allen
4cd92d8576 remove final WithStateTree 2020-09-15 10:57:32 -07:00
Steven Allen
02dcb5e182 Merge branch 'master' into refactor/net-upgrade 2020-09-14 14:53:57 -07:00
vyzo
172bfacae0 compute baseFee for check even in null rounds 2020-09-14 22:20:26 +03:00
vyzo
0a5494dd79 use the factor in getBaseFeeLowerBound 2020-09-14 22:13:37 +03:00
vyzo
044202b37f use conservative base fee lower bound factor for strict checks 2020-09-14 22:13:37 +03:00
vyzo
d68ec37942 reenable baseFee lower bound check 2020-09-14 22:13:37 +03:00
Łukasz Magiera
06ec571c20 Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-14 15:09:52 +02:00
Raúl Kripalani
6d29d75724 Merge branch 'master' into inmem-journal 2020-09-14 12:17:45 +01: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
Łukasz Magiera
f90cfda2e6 wallet: Add interface layer 2020-09-04 22:18:03 +02: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
Raúl Kripalani
1ec534d607 Merge branch 'master' into inmem-journal 2020-09-04 10:55:40 +01:00
Raúl Kripalani
905168e72e fix lint errors. 2020-09-04 10:54:56 +01: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
vyzo
4c489d18a2 track expected nonce in mpool, refuse messages with large gaps 2020-09-03 15:28:44 +03:00
Raúl Kripalani
3206f92063 Merge branch 'master' into inmem-journal 2020-09-02 19:50:52 +01:00
Aayush Rajasekaran
93814cc85a
Merge pull request #3392 from filecoin-project/fix/mpool-priority-selection
Tweak priority selection to not select negative perfoming chains
2020-08-31 19:22:12 -04:00
刘林欣
0926f95979 remove the unnecessary err check 2020-08-31 15:11:45 +08:00