-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
have batcher submit appropriate cancellation transactions when mempool is blocked #10941
have batcher submit appropriate cancellation transactions when mempool is blocked #10941
Conversation
7615aa6
to
8f75ba1
Compare
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.
This solution manages an enumerated State of the Transaction Pool, specifically whether it is unblocked, blocked, or pending(cancel). It does this by detecting a specific error type which sets the state to Blocked. When blocked it sends and empty batch with a special ID, and progresses to Pending. When in Pending, it optimistically advances back to Unblocked.
I left some comments to better understand the behavior and suggest some potential simplifications. This solution seems reasonable given the scope of changes, though it'd be nice to have a more comprehensive handling as part of the architecture at some point down the road.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #10941 +/- ##
========================================
Coverage 62.58% 62.58%
========================================
Files 21 21
Lines 1935 1935
Branches 71 71
========================================
Hits 1211 1211
Misses 687 687
Partials 37 37
Flags with carried forward coverage won't be shown. Click here to find out more. |
8f75ba1
to
c0baefd
Compare
I have rebased the PR to clear the conflicts. |
a4c1835
to
5e2918c
Compare
05e797b
to
e40069f
Compare
e40069f
to
4a7e7cf
Compare
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 good! Some minor improvement suggestions.
4b00a48
to
2ab3e00
Compare
2ab3e00
to
dcfc6c3
Compare
b7f8188
Description
Extend batcher to submit appropriate cancellation transactions when the mempool is blocked by a transaction of incompatible type.
Also makes the txmgr use the geth-defined AlreadyReservedErr instead of redefining it, now that op-geth has caught up to the commit that exposes it.
Tests
Extended the E2E tests to submit incompatible pending transactions to the txpool to confirm the new functionality appropriately clears them.
Metadata