refunder: Make gas price parameters configurable #3897
Merged
+52
−15
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.
Problem
The refunder was experiencing issues with hardcoded gas price parameters that were too low for current network conditions:
Errors observed:
Refunding txs are likely not mined in time, as the current gas price 826120518137.4663 is higher than MAX_GAS_PRICE specified 800000000000transaction gas price below minimum: gas tip cap 5773015156, minimum needed 25000000000Root cause:
MAX_GAS_PRICEwas hardcoded to 800 Gwei (current gas prices ~826 Gwei)START_PRIORITY_FEE_TIPwas hardcoded to 2 Gwei (node requires minimum 25 Gwei)Solution
This PR makes both gas price parameters configurable via CLI arguments or environment variables:
--max-gas-price/MAX_GAS_PRICE(default: 2000 Gwei / 2,000,000,000,000 wei)--start-priority-fee-tip/START_PRIORITY_FEE_TIP(default: 30 Gwei / 30,000,000,000 wei)The new defaults are set higher to accommodate current network conditions while still being configurable for future adjustments.
Changes
SubmitterandRefundServiceto accept configurable parametersTesting
cargo check -p refunder)