-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change TaskDelayBetweenEachVal in bridge based on mempool #816
Conversation
POS-282 Change TaskDelayBetweenEachVal in bridge based on mempool
Basically determine how filled is mempool and change the value of delay accordingly. |
Codecov Report
@@ Coverage Diff @@
## krishna/mempool-test #816 +/- ##
=====================================================
Coverage 72.73% 72.73%
=====================================================
Files 49 49
Lines 3517 3517
=====================================================
Hits 2558 2558
Misses 730 730
Partials 229 229 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* mempool check test * add: check state-sync tx in mempool before broadcast, generalise old tx function for all processors * add: unit test for state-sync tx broadcast by checking against mempool * fix: typo * Revert "mempool check test" This reverts commit 3d93d20. * fix: minor fixes * fix: invalid checkpoint message * fix: handle error, update error message * fix: consider event type in isOldTx generic function * update retry delay for state sync events * add: modularise bridge event types * bridge/setu: change TaskDelayBetweenEachVal in bridge based on mempool (#816) * add: calculate task delay bases on mempool count * minor refactor Co-authored-by: Krishna Upadhyaya <krishnau1604@gmail.com>
This PR adds additional delay by bridge in sending txs to heimdall based on the state of the mempool.
It will increase the delay factor for every 1000 unconfirmed txns in mempool.
For example if the current default delay is 12 Seconds
Then for upto 1000 txns it will stay as 12 sec
For 1000-2000 It will be 24 seconds
For 2000-3000 it will be 36 seconds
Basically for every 1000 txns it will increase the factor by 1.