Skip to content

feat(txmgr / batcher): Rebroadcast transactions without bumping fees #16310

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

Merged
merged 4 commits into from
Jun 17, 2025

Conversation

BrianBland
Copy link
Contributor

Description

This change enables the TxMgr to rebroadcast signed transactions without bumping the gas fees. This is particularly relevant to batcher-submitted blob transactions, which empirically may be initially accepted by a mempool node but then silently dropped or fail to propagate throughput the network - this is likely due to restrictive mempool rules, such as geth forbidding blob transactions with gapped nonces.

RebroadcastInterval defaults to 12 seconds for both the batcher and challenger, as this matches the receipt polling interval as well as the L1 slot time. This should allow the senders to resubmit the same transaction once per L1 block, and only fall back to the fee-bumping logic after surpassing the existing ResubmissionTimeout (still 48s and 24s respectively).

This also updates the handling of the txpool.AlreadyKnown error to be treated equivalently to a successful transaction broadcast, as the error signals that the exact transaction is in the mempool with no nonce gaps or fee-related errors.

Tests

Adds TestTxMgrRebroadcastsWithoutGasPriceIncrease, which only confirms a transaction after it has been submitted 3 times with no modifications / gas bumps.

Additional context

This follows up #15952, as Base is still encountering delays whenever submitting a large volume of blob transactions. Once a transaction is silently dropped from the mempool, the TxMgr only recovers by applying the (typically-unnecessary) gas bump logic. This forces us to either wait an extended period before bumping gas prices, or perform excess bumps - which in turn causes more churn in the mempool as net-new transactions replace the existing ones.

Metadata

@BrianBland BrianBland requested a review from a team as a code owner June 6, 2025 00:26
@BrianBland BrianBland requested a review from serpixel June 6, 2025 00:26
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.88%. Comparing base (9727a76) to head (ac90304).
Report is 58 commits behind head on develop.

Files with missing lines Patch % Lines
op-deployer/pkg/deployer/broadcaster/keyed.go 0.00% 1 Missing ⚠️
op-service/txmgr/cli.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #16310      +/-   ##
===========================================
- Coverage    47.05%   43.88%   -3.17%     
===========================================
  Files         1390     1232     -158     
  Lines       112444   103930    -8514     
===========================================
- Hits         52910    45611    -7299     
+ Misses       55805    54729    -1076     
+ Partials      3729     3590     -139     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
op-service/txmgr/rpc.go 100.00% <100.00%> (ø)
op-service/txmgr/send_state.go 97.14% <100.00%> (ø)
op-service/txmgr/txmgr.go 84.50% <100.00%> (+0.87%) ⬆️
op-deployer/pkg/deployer/broadcaster/keyed.go 16.66% <0.00%> (-0.10%) ⬇️
op-service/txmgr/cli.go 57.86% <88.88%> (+0.90%) ⬆️

... and 174 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BrianBland BrianBland requested a review from a team as a code owner June 6, 2025 16:42
@BrianBland BrianBland requested a review from bitwiseguy June 6, 2025 16:42
@BrianBland BrianBland force-pushed the brianbland/txmgr-rebroadcasts-txs branch from c3206bc to a201318 Compare June 6, 2025 18:33
@BrianBland BrianBland force-pushed the brianbland/txmgr-rebroadcasts-txs branch from a201318 to ac90304 Compare June 14, 2025 00:36
@BrianBland BrianBland requested a review from geoknee June 16, 2025 17:36
@geoknee geoknee added this pull request to the merge queue Jun 17, 2025
Merged via the queue into develop with commit 7eedfce Jun 17, 2025
62 checks passed
@geoknee geoknee deleted the brianbland/txmgr-rebroadcasts-txs branch June 17, 2025 10:29
@geoknee geoknee added A-op-batcher Area: op-batcher C-feature Category: features labels Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-batcher Area: op-batcher C-feature Category: features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants