Skip to content
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

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

0xKrishna
Copy link
Contributor

@0xKrishna 0xKrishna commented Apr 13, 2022

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.

@linear
Copy link

linear bot commented Apr 13, 2022

POS-282 Change TaskDelayBetweenEachVal in bridge based on mempool

Basically determine how filled is mempool and change the value of delay accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2022

Codecov Report

Merging #816 (0e80cbf) into krishna/mempool-test (4751fc2) will not change coverage.
The diff coverage is n/a.

@@                  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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4751fc2...0e80cbf. Read the comment docs.

@0xKrishna 0xKrishna requested review from 0xsharma and ssandeep April 18, 2022 09:48
Copy link
Contributor

@0xsharma 0xsharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

Copy link
Contributor

@manav2401 manav2401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manav2401 manav2401 merged commit 8d20ca3 into krishna/mempool-test Apr 27, 2022
manav2401 added a commit that referenced this pull request Apr 27, 2022
* 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>
@temaniarpit27 temaniarpit27 deleted the 0xkrishna/pos-282 branch June 8, 2022 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants