Dynamic Target Gas for stable prices#2085
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2085 +/- ##
===========================================
+ Coverage 51.25% 51.32% +0.06%
===========================================
Files 878 878
Lines 152551 152660 +109
===========================================
+ Hits 78185 78346 +161
+ Misses 69268 69225 -43
+ Partials 5098 5089 -9
... and 16 files with indirect coverage changes
🚀 New features to boost your workflow:
|
marcello33
reviewed
Mar 4, 2026
Member
|
This adds new flags, once you're done with the PR, can you merge develop and run make docs? |
marcello33
approved these changes
Mar 4, 2026
|
kamuikatsurgi
approved these changes
Mar 4, 2026
lucca30
added a commit
that referenced
this pull request
Mar 5, 2026
* dynamic target gas for fee spikes * set default values * address lint * increase coverage * address comments * make docs * address reports (cherry picked from commit e220fcf)
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
This PR introduces dynamic EIP-1559 target gas percentage adjustment (post-Lisovo) to reduce artificial scarcity and mitigate priority fee spikes during short demand bursts, while keeping base fee behavior predictable.
Why
Priority fee is pure market bidding and can spike aggressively when blocks are full. Our current “dynamic gas limit” approach reduces real capacity even when we could safely provide more, increasing the chance of 100% utilization and triggering sharp priority-fee bidding. Instead, we keep capacity and adjust gas target directly (since target is currently derived from gas limit) to reduce priority fee spike frequency/severity.
New CLI flags (Sealer)
--miner.enableDynamicTargetGasEnables dynamic target gas adjustment based on the parent block base fee (post-Lisovo). Mutually exclusive with
enableDynamicGasLimit.--miner.targetGasMinMinimum target gas percentage (1–100) used when base fee is below the configured lower bound.
--miner.targetGasMaxMaximum target gas percentage (1–100) used when base fee is above the configured upper bound.
Behavior
Adds
BorConfig.GetDynamicTargetGasPercentage(parentBaseFee, number):parentBaseFee == nil), or config incomplete (TargetBaseFee == nil) → fallback to existingGetTargetGasPercentage(number).TargetBaseFeeusing optionalBaseFeeBuffer:upper = desired + bufferlower = max(desired - buffer, 0)(underflow-safe)parentBaseFee > upper→ returnTargetGasMax(valid 1–100), otherwise fallback to static.parentBaseFee < lower→ returnTargetGasMin(valid 1–100), otherwise fallback to static.GetTargetGasPercentage(number)(no change).Changes
Breaking changes
No breaking changes, is compatible with post-Lisovo blocks.