-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/runtime/txpool: Limit outstanding transactions per sender #4665
Conversation
742b05a
to
0595a77
Compare
cq.l.Lock() | ||
defer cq.l.Unlock() | ||
|
||
// NOTE: This is meant for retries so it ignores the size limit on purpose. |
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.
Is there something in place to prevent unbounded growth? I guess with the accounting in add, the queue size will be at most 2 *cq.maxSize
?
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.
So this is only used for reinserting previously poped transactions (which are at most "batch size" long). In the worst case this could overflow the queue to be twice the max size (in case of check batches being that big -- which they are not by default) when the queue is full and batch checks are failing while new transactions are being queued.
beb07b6
to
483cd5a
Compare
Codecov Report
@@ Coverage Diff @@
## master #4665 +/- ##
==========================================
- Coverage 67.07% 66.92% -0.16%
==========================================
Files 431 432 +1
Lines 48884 48637 -247
==========================================
- Hits 32790 32551 -239
+ Misses 12071 12068 -3
+ Partials 4023 4018 -5
Continue to review full report at Codecov.
|
c978b03
to
337d8cd
Compare
b0c54d9
to
db90154
Compare
This makes it possible to simplify the transaction pool as it no longer needs to deal with weights.
db90154
to
8381b14
Compare
No description provided.