Commit Graph

120 Commits

Author SHA1 Message Date
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
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
vyzo
275f071b12 reduce mpool add failure log spam 2020-09-05 00:28:13 +03:00
vyzo
d20b6adfd2 refuse to add duplicates in the mpool 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
4c489d18a2 track expected nonce in mpool, refuse messages with large gaps 2020-09-03 15:28:44 +03:00
刘林欣
0926f95979 remove the unnecessary err check 2020-08-31 15:11:45 +08:00
vyzo
708a8b6543 flag to allow add to skip limit check
essential for correctness in the revert case
2020-08-28 00:04:21 +03:00
vyzo
038e83b647 log error if we trip over too many pending messages for actor 2020-08-26 22:55:39 +03:00
vyzo
82ef0529d8 named error for too many pending messages 2020-08-26 22:48:03 +03:00
vyzo
ad889a7240 rate limit messages per actor by enforcing maximum pending message limit 2020-08-26 22:40:10 +03:00
vyzo
d3e95d6b77 cast min base fee to uint64 2020-08-26 21:37:32 +03:00
vyzo
8db262c941 check gas fee cap for minimum value 2020-08-26 21:23:28 +03:00
vyzo
793eda986b comment out Value inclusion for required funds tracking
we are not sure whether we want it yet.
2020-08-26 21:10:46 +03:00
vyzo
8848c549a0 move msg serialization outside of lock, consistently use curTs 2020-08-26 19:42:56 +03:00
vyzo
4919a005d3 always verify message min gas 2020-08-26 19:37:27 +03:00
vyzo
7a7066896e better code for getRequiredFunds 2020-08-26 15:37:42 +03:00
vyzo
a2c0c10d2a correctly account for message replacement in required funds tracking 2020-08-26 15:27:09 +03:00
vyzo
c473d3c682 rename ErrValidationFailure to ErrSoftValidationFailure
to make it clear to readers that this failure is soft; we might be out of sync.
2020-08-26 15:16:04 +03:00
vyzo
87e6c0973a include message Value only in soft validation failures 2020-08-26 15:13:50 +03:00
vyzo
78876947a4 ErrBroadcastAnyway is now ErrValidationFailure 2020-08-26 15:03:13 +03:00
vyzo
4adb83eaae check aggregate pending message required funds against balance 2020-08-26 14:58:26 +03:00
vyzo
4ac9828b0c track required funds in message set 2020-08-26 14:38:26 +03:00
vyzo
77f6e0d4f8 refactor balance check, apply it in PushWithNonce 2020-08-26 14:23:34 +03:00
vyzo
835dbfe001 check message before adding in PushWithNonce 2020-08-26 14:13:46 +03:00
vyzo
da9630c561 remove duplicate check
gas limit is checked against block gas limit in ValidForBlockInclusion
2020-08-26 14:02:34 +03:00
vyzo
62b15ecc12 remove bug line 2020-08-25 13:41:20 +03:00
vyzo
9c68123ede add test for Updates, fix behaviour for closed mpool 2020-08-25 13:29:09 +03:00
vyzo
a01fa11a26 exercise debug code, fix deadlock 2020-08-25 13:03:50 +03:00
vyzo
7e81081899 initialize mpool ts _before_ loading local messages 2020-08-25 08:49:15 +03:00
Jakub Sztandera
33b12782e4
Take into account messages in current tispet by executing it
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-25 04:02:06 +02:00
Jakub Sztandera
b2ff231c48
Fix error fmt string
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-25 03:14:52 +02:00
Jakub Sztandera
d921791c55
Add comment
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-25 03:13:43 +02:00
whyrusleeping
cf3298cd04 more correctly handle discrepancies between mempools head and the mining base 2020-08-24 17:21:03 -07:00
Jakub Sztandera
aacfcba400
Check ValidForBlockInclusion in mpool
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-25 01:01:16 +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
e33d398c33 remove pending local messages from the datastore when clearing the mpool 2020-08-21 23:32:41 +03:00
vyzo
3027283756 add MpoolClear api 2020-08-21 23:32:41 +03:00
vyzo
161cb32078 recover from errors in head change 2020-08-21 23:32:41 +03:00
vyzo
4287f76ed4 fix deadlock in mpool.Push 2020-08-18 10:19:46 +03:00
vyzo
3b6e2bdb7b trigger early republish from head changes 2020-08-17 10:03:39 +03: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
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