Add a max-fee-per-gas headroom factor to the driver gas config - #4871
Draft
squadgazzz wants to merge 1 commit into
Draft
Add a max-fee-per-gas headroom factor to the driver gas config#4871squadgazzz wants to merge 1 commit into
squadgazzz wants to merge 1 commit into
Conversation
squadgazzz
force-pushed
the
driver-max-fee-headroom
branch
from
September 4, 2026 15:23
bcf4af3 to
4a21620
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When mainnet base fee jumps between the moment a settlement is submitted and the moment it would be included, the transaction can end up stranded below the new base fee and expires unmined. We saw a burst of these during the Sep 4 gas spike (0.7 to ~4.75 gwei in a few minutes): valid solutions that never landed because their
max_fee_per_gaswas set from a pre-spike estimate.Today the driver submits with exactly the estimator's
max_fee_per_gas(only raised to cover the tip, then capped atgas-price-cap), with no headroom. This adds a configurable factor on top of the estimate.max_fee_per_gasis a ceiling, not the amount paid: a settlement always pays the realbase_fee + priority_fee. So extra headroom changes nothing in calm conditions and only bites when base fee rises after submission. Unlike raising the priority fee, it does not add per-settlement cost, and it is a separate lever from the tip aimed at the expiry case.The default is 1.0, so behavior is unchanged until a network opts in via config.
Changes
max-fee-per-gas-factoroption to the driver[submission]config, defaulting to 1.0 (no headroom)max_fee_per_gasbefore the gas-price cap check, in the driver's gas price estimatorHow to test
Existing tests. The default of 1.0 is a no-op; set it above 1.0 for a network and confirm submitted transactions carry a proportionally higher
max_fee_per_gaswhile the effective price paid still tracks base fee plus tip.