feat: add batch-submitter/txmgr for tx publication and gas bumping#1645
feat: add batch-submitter/txmgr for tx publication and gas bumping#1645tynes merged 3 commits intoethereum-optimism:developfrom
Conversation
The constants are actually defined in the reverse order of their severity. The prior behavior would log everything _but_ log.LvlCrit.
|
Codecov Report
@@ Coverage Diff @@
## develop #1645 +/- ##
===========================================
- Coverage 76.71% 76.52% -0.20%
===========================================
Files 82 82
Lines 3032 3041 +9
Branches 463 466 +3
===========================================
+ Hits 2326 2327 +1
- Misses 706 714 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This commit adds a SimpleTxManager for tracking and bumping fees on txs the batch submitter needs to publish. The bulk of the logic is adapated from the existing tx manager (YNATM) used in the typescript version to minimize any new classes of bugs that are not already considered. The manager is configured via a min and max gas price, as well as an additive gas price step that is applied after each resubmission interval elapses, before signing and broadcasting a new transaction. This corresponds to the LINEAR fee policy available in YNATM. Txs generated from the same call to Send are treated as equivalent, thus the method blocks until the first tx confirms. Care is taken to throughly unit test the interactions and edge cases, as subtle bugs in tx publication can lead to big headaches in prod. To this end, we achieve 100% test coverage in the txmgr package: ``` coverage: 100.0% of statements ok github.com/ethereum-optimism/go/batch-submitter/txmgr 10.311s ```
829e653 to
5097797
Compare
tynes
left a comment
There was a problem hiding this comment.
Looks good to me, well commented and tested 💯
Description
This commit adds a SimpleTxManager for tracking and bumping fees on txs
the batch submitter needs to publish. The bulk of the logic is adapated
from the existing tx manager (YNATM) used in the typescript version to
minimize any new classes of bugs that are not already considered.
The manager is configured via a min and max gas price, as well as an
additive gas price step that is applied after each resubmission interval
elapses, before signing and broadcasting a new transaction. This
corresponds to the LINEAR fee policy available in YNATM.
Txs generated from the same call to Send are treated as equivalent, thus
the method blocks until the first tx confirms. Care is taken to
throughly unit test the interactions and edge cases, as subtle bugs in
tx publication can lead to big headaches in prod. To this end, we
achieve 100% test coverage in the txmgr package:
Additional context
This PR also:
Metadata