-
Conner Fromknecht authored
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 ```
5097797e
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
cmd/batch-submitter | ||
flags | ||
txmgr | ||
.gitignore | ||
Makefile | ||
batch_submitter.go | ||
config.go | ||
config_test.go | ||
crypto.go | ||
crypto_test.go | ||
go.mod | ||
go.sum | ||
package.json | ||
sentry_log.go |