You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refunder: Make gas price parameters configurable (#3897)
## Problem
The refunder was experiencing issues with hardcoded gas price parameters
that were too low for current network conditions:
### Errors observed:
1. `Refunding txs are likely not mined in time, as the current gas price
826120518137.4663 is higher than MAX_GAS_PRICE specified 800000000000`
2. `transaction gas price below minimum: gas tip cap 5773015156, minimum
needed 25000000000`
### Root cause:
- `MAX_GAS_PRICE` was hardcoded to 800 Gwei (current gas prices ~826
Gwei)
- `START_PRIORITY_FEE_TIP` was 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
- Added two new CLI arguments with environment variable support
- Refactored `Submitter` and `RefundService` to accept configurable
parameters
- Updated tests to use test-specific constants
- Updated argument display formatting to show new parameters
## Testing
- [x] Code compiles successfully (`cargo check -p refunder`)
- [x] No linter errors
- [x] Unit tests updated and passing
---------
Co-authored-by: ilya <[email protected]>
0 commit comments