Commit Graph

207 Commits

Author SHA1 Message Date
vyzo
7bbf1c7db2
don't mix negative performing chains with their parent, add some comments
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-13 14:08:10 +02:00
Jakub Sztandera
f35555964d
Better "optimal selection
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-13 14:08:10 +02:00
vyzo
d25f386bb5
mixin the previous chain's effective performance to capture effect of dependencies
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-13 14:08:10 +02:00
Steven Allen
3ef3f570fb Fix lint errors an broken tests 2020-08-12 23:16:44 +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
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
vyzo
f2ac17845b relinquish the lock while signing in PushWithNonce 2020-08-12 20:26:58 +03:00
vyzo
7be18df6ea add semaphore in push and friends to reduce lock contention 2020-08-12 10:38:40 +03:00
vyzo
472e502218 fix republishing chain selection to account for edge case of inordinately long chains 2020-08-12 09:41:02 +03:00
vyzo
7b16fe3792 hold ts lock longer 2020-08-12 09:18:04 +03:00
vyzo
47f81f1ad6 increase repub message limit to 30 2020-08-12 09:13:57 +03:00
vyzo
cf34fe5cc3 extend the republish interval to something more reasonable
pubsub timecache duration + 5 blocks + propagation delay
2020-08-12 09:13:57 +03:00
vyzo
7396212c89 slightly increase the replublish interval to include the propagation delay as well 2020-08-12 09:13:57 +03:00
vyzo
e876617c82 new message republishing logic 2020-08-12 09:13:57 +03:00
vyzo
42951d05a5 refactor messagepool provider out of the main messagepool implementation 2020-08-12 09:13:57 +03:00
Jakub Sztandera
2efb18f677
Small fixes to mpool Trim
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 23:55:06 +02:00
vyzo
9032163c5a turn probability eyeballing into an actual test 2020-08-11 20:47:50 +03:00
vyzo
a467deede6 fix typos in comment 2020-08-11 20:20:59 +03:00
vyzo
2aaf14b558 mute timing logs if they are under 1ms 2020-08-11 20:00:51 +03:00
vyzo
d3baf2b9eb fix edge case in chain creation 2020-08-11 19:32:28 +03:00
Jakub Sztandera
56e3f7da7d
Fix getGasReward and Trim
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 17:18:46 +02:00
Jakub Sztandera
4da3aedacb
Work on competitve test a bit
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
vyzo
0091f3a9ce
add competitive selection test
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
vyzo
268d435ce0
add some optimal selection tests
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
Jakub Sztandera
2057433f48
Add needed files
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
Jakub Sztandera
d3c8f295c2
Use real blockProbabilities function
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
vyzo
080614098d
fix edge case of effective performance for chains that dont fit in any partition
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:27 +02:00
vyzo
8eff3a25f9
use BlockGasLimit instead of residual for partitioning
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:26 +02:00
vyzo
ca803d99fe
nearly optimal message selection for a given ticket quality
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-11 16:14:20 +02:00
Łukasz Magiera
0d1174cb81
Merge pull request #2924 from filecoin-project/feat/mpool-cfg-overesitm
Add GasLimitOverestimation to mpool config
2020-08-10 11:33:05 +02:00
Jakub Sztandera
3710f33e14
Don't reject messages that don't pass RBF, ignore them
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-09 03:17:40 +02:00
Jakub Sztandera
5ea9df1824
Use 25% overesitm
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-09 02:22:37 +02:00
Jakub Sztandera
a826877ee3
Reduce overesitm to 10%, remove pledgeSectors test rate limit
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-09 00:37:24 +02:00
Jakub Sztandera
46fd9d5e80
Quiet down pending messages, fix GasLimit estimation, reduce fee cap
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-09 00:29:59 +02:00
vyzo
bcb33d75d0
Merge pull request #2918 from filecoin-project/feat/mpool-tests
Some more mpool tests
2020-08-08 22:03:07 +03:00
Jakub Sztandera
5f157affdd
Add GasLimitOverestimation to mpool config
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-08 17:09:47 +02:00
vyzo
9bc5d9489d also log chain creation timings 2020-08-08 17:07:37 +03:00
vyzo
b469277046 use structured logging for timings 2020-08-08 16:59:08 +03:00
vyzo
809e7d5390 add timings to various components of message selection 2020-08-08 16:51:30 +03:00
vyzo
4cdb5f7b81 add unit test for priority message selection 2020-08-08 11:22:47 +03:00
vyzo
2d9f2c7e72 add unit test for message skipping in chain creation 2020-08-08 11:16:50 +03:00
Łukasz Magiera
e65db33d77
Merge pull request #2909 from filecoin-project/fix/mpool-bug
fix mpool bugs
2020-08-08 01:32:28 +02:00
vyzo
4c8c8f48f1 skip messages with nonce before the current nonce in chain creation 2020-08-08 02:16:56 +03:00
vyzo
01b8a6de94 remove bug line 2020-08-08 01:45:34 +03:00
Łukasz Magiera
af15273f71 gas: Corruntly do float math 2020-08-08 00:41:57 +02:00
vyzo
7e16e3e220 satisfy linter 2020-08-07 20:20:22 +03:00
vyzo
f6e8f02fd2 add persistence for mpool config 2020-08-07 20:10:09 +03:00
vyzo
1b56b88132 add cooldown to message pruning 2020-08-07 19:51:49 +03:00
vyzo
c735d0da0e fix test compilation issue 2020-08-07 19:51:49 +03:00
vyzo
b40346e1ea never prune priority actor messages 2020-08-07 19:51:49 +03:00
vyzo
56c2894c80 add priority actor message selection 2020-08-07 19:51:49 +03:00
vyzo
42e1338ffe mpool config 2020-08-07 19:51:49 +03:00
Łukasz Magiera
60545e6722 mempool: Allow 0 gasPerf chains 2020-08-07 14:43:32 +02:00
Łukasz Magiera
5a50d293b9
Merge pull request #2891 from filecoin-project/feat/mpool-negative-chain-pruning
some small improvements in the handling of non-performing chains
2020-08-07 10:14:09 +02:00
vyzo
b31b322e77 also check for 0 in early gasPerf check 2020-08-07 10:55:43 +03:00
vyzo
26f025bc96 some small improvements in the handling of non-performing chains
1. We break the message accumulation the first time we see a chain with gasPerf <= 0
   as it is not profitable to include them in the block
2. When trimming, we remove also trim negative performing messages to make the trimmed
   chain profitable.
2020-08-07 10:33:00 +03:00
vyzo
e977649f29 add regression test for selection trimming 2020-08-07 10:10:54 +03:00
Łukasz Magiera
0612c2eab9 Merge remote-tracking branch 'origin/next' into feat/dyn-base-fee 2020-08-07 04:15:42 +02:00
Jakub Sztandera
884d03f7f1
address feedback
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-07 04:09:01 +02:00
Jakub Sztandera
05c527b681
Hold tipset lock while selecting messages
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-07 02:48:53 +02:00
Łukasz Magiera
402b4b6c70 mpool: Fix SelectMessages hanging 2020-08-07 01:01:45 +02:00
Jakub Sztandera
f45970a0d5
Fix FeeCap estimation
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-07 00:54:58 +02:00
Jakub Sztandera
2b2b632cd6
Make mpool select only profitable messages
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-07 00:40:25 +02:00
Jakub Sztandera
94a38cd97d
Fix mpool test
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 23:14:09 +02:00
Jakub Sztandera
ab08858b45
Delete GasPrice from this world
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 23:08:42 +02:00
Jakub Sztandera
d6765847df
Fix some messagepool tests
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 21:25:30 +02:00
vyzo
2166e9a0ff account for message Value in balance calculation 2020-08-06 20:54:27 +03:00
vyzo
e87d8f9543 add basic selection tests 2020-08-06 20:15:15 +03:00
vyzo
1e80e3ae65 create maximal chains
Merge chains when gasPerf is non-descreasing (instead of increasing) to create maximal chains.
This also obviates the need for stable sort, as the chains are guaranteed to be in decreasing
order for the same actor.
2020-08-06 18:37:28 +03:00
vyzo
7a8c74fee8 use stable sort for chain sorting
the default non-stable sort may reorder chains with the same gasPerf, which might change the order
of messages per nonce; facepalm.
2020-08-06 17:40:22 +03:00
vyzo
16a1f9b682 message chain creation tests 2020-08-06 17:08:02 +03:00
vyzo
61d027db2a use supplied tipset when looking up actor state 2020-08-06 17:07:37 +03:00
vyzo
30ec4e7524 import cosmetics 2020-08-06 11:17:11 +03:00
vyzo
a08d780bef enhance SelectMessages method to take a target message 2020-08-05 23:16:09 +03:00
vyzo
5f599dcaf5 remove duplicate time log 2020-08-05 21:48:29 +03:00
vyzo
829c7953d5 fix dereference bug 2020-08-05 18:28:04 +03:00
vyzo
a8b0db91e8 implement pruning using the chain selection logic 2020-08-05 13:28:14 +03:00
vyzo
b4be1472c0 use RequiredFunds in chain inclusion balance sanity check 2020-08-05 13:08:07 +03:00
vyzo
06a13681ae satisfy stupid linter 2020-08-05 10:43:49 +03:00
vyzo
50e1650344 fix Trim bug 2020-08-05 10:31:42 +03:00
vyzo
23003c4d55 fix Before bug 2020-08-05 10:28:12 +03:00
vyzo
9b6d822b3e avoid repeatedly reallocating a big for block gas limit, more conservative failed gas estimation 2020-08-05 10:22:40 +03:00
vyzo
9f7deff512 better handling of gas guess errors
don't swallow them, the failed gas guess is too high.
2020-08-05 10:19:32 +03:00
vyzo
6e1bfaffd7 make it compile! 2020-08-05 09:46:48 +03:00
vyzo
b4ff9ba220 better minGas sanity check 2020-08-04 23:18:51 +03:00
vyzo
89d42b5958 message chain construction 2020-08-04 23:18:51 +03:00
vyzo
e323fa7a8c message chain trimming 2020-08-04 23:18:51 +03:00
vyzo
c7eec94d95 message selection preliminaries 2020-08-04 23:18:51 +03:00
Whyrusleeping
43491cb7ed
Merge pull request #2768 from filecoin-project/fix/add-explanation
Fix/add explanation
2020-08-01 16:59:20 -07:00
lanzafame
f2d1fbdfa5 Add explanation to channel magic 2020-08-02 09:57:34 +10:00
whyrusleeping
9c51b48754 update some numbers 2020-08-01 16:56:38 -07:00
Whyrusleeping
113fcac476
Update chain/messagepool/pruning.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2020-08-01 16:39:16 -07:00
Whyrusleeping
31296e6cdc
Update chain/messagepool/pruning.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2020-08-01 16:39:02 -07:00
whyrusleeping
8260184abc more debug message cleanup 2020-08-01 16:35:02 -07:00
whyrusleeping
f71957bcec aayush is too picky 2020-08-01 16:31:56 -07:00
whyrusleeping
78564e8c54 fix mr test 2020-08-01 16:29:26 -07:00
whyrusleeping
2e04dc908c clean up after review 2020-08-01 16:25:13 -07:00
whyrusleeping
255777a4a9 implement dumb pruning 2020-08-01 15:54:21 -07:00
whyrusleeping
f2a3d23798 implement first pruning method, pruning of 'future' messages 2020-08-01 14:57:35 -07:00
whyrusleeping
fe80f4b830 WIP: message pool pruning 2020-08-01 14:57:34 -07:00