fix: add gas estimation bounds to prevent out-of-gas reverts #92
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.
Summary
Stale RPC providers can return low gas estimates when simulating transactions against outdated blockchain state. This caused out-of-gas reverts during oracle startup, as seen in transactions:
0x1cf2be67736df8f55a5af2d3fa6f6b94cca3e68655a406954a35f5e4be29cdf1(nonce 450, reverted)0xe64a0a0371730551ffe8a4e80cfc197c0e9ab2d45b66d905756d6f6dc85b6b8f(nonce 452, reverted)Both failed transactions had gas limit of 268,150 while the successful transaction used 630,655.
Changes
Gas Estimation Logic
🤖 Generated with Claude Code