[DX-2127] add support for auto priority to Seth #2199
Draft
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.
This pull request introduces support for an "auto" priority mode for gas price estimation in the Seth Ethereum client, allowing the RPC node to automatically determine appropriate gas prices and fees. The changes improve flexibility and reliability of transaction fee estimation, clarify configuration validation, and enhance test coverage for new features. Additionally, error handling and logging around gas estimation are improved for better debugging and transparency.
Gas Estimation Logic and Auto Priority Support
Priority_Auto
mode to allow the RPC node to auto-estimate gas prices and fees; when selected, all gas price fields are set to nil and the estimation logic defers to the node. [1] [2] [3]auto
priority and skip manual calculations when enabled. [1] [2] [3]Configuration and Validation
auto
as a valid priority and prevent incompatible settings, such as gas bumping with auto priority. Improved error messages for invalid combinations.API and Data Structure Updates
GasEstimations
andGasSuggestions
structs to clarify field usage and ensure correct handling of nil values when auto-estimation is enabled. [1] [2]Logging and Error Handling
Testing Enhancements
These changes collectively make gas estimation more robust, configurable, and easier to debug, while providing safer defaults for transaction fee selection.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes introduce dynamic and context-aware adjustments to gas price estimations for both legacy and EIP-1559 transactions, optimizing transaction fee calculations based on network conditions and transaction priority. It also enhances the client's ability to work with simulated networks by allowing auto priority for gas price estimations and handling no historical fee data scenarios. Additionally, it ensures the reliability of transactions under varying network conditions by implementing retry mechanisms with adjusted gas prices.
What