-
Notifications
You must be signed in to change notification settings - Fork 504
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
[TxPool] Introduce limit on enqueued transactions #687
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #687 +/- ##
===========================================
- Coverage 48.77% 48.61% -0.16%
===========================================
Files 112 112
Lines 15382 15390 +8
===========================================
- Hits 7502 7482 -20
- Misses 7249 7274 +25
- Partials 631 634 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Looks great 💯
Tested this out with Pandora's box, works like a charm 👏
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.
We need to add doc for this command MaxAccountEnqueued.
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.
Just a small comment
Description
This PR introduces a configurable limit on the amount of transactions any account in the TxPool can hold at any given time.
--max-enqueued [DEFAULT= 128]
As the
enqueued
part of an account just represents future transactions (higher nonce than expected), there are no particular benefits to keeping a large number of them in this queue as much as there are vulnerability risks that all result in an eventually bricked pool full of enqueued transactions.The limit also enforces a rate limiting on transaction acquisition for any account - in effect, an incoming transaction would be rejected if there is no space for it in its respective
enqueued
queue. What this means is that aggressive spams are greatly mitigated, delaying the point of pool overflow.Changes include
Checklist
Testing
Documentation update
Please link the documentation update PR in this section if it's present, otherwise delete it
Additional comments
Fixes EDGE-732