feat(gas-oracle): make L1 base/blob fee caps configurable via env#1017
feat(gas-oracle): make L1 base/blob fee caps configurable via env#1017curryxbo wants to merge 1 commit into
Conversation
The upper caps applied to the fetched L1 base fee and blob base fee were hardcoded (1000 Gwei / 100 Gwei). During sustained L1 fee spikes this silently clamps the value pushed on-chain with no way to tune it without a rebuild. Move both into Config, read from GAS_ORACLE_MAX_L1_BASE_FEE / GAS_ORACLE_MAX_L1_BLOB_BASE_FEE with defaults equal to the previous constants, so behavior is unchanged unless explicitly overridden. Context: morph-l2/morph-ideas idea #5. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe gas price oracle now reads configurable L1 base fee and blob base fee caps from environment variables, passes them to ChangesConfigurable L1 fee caps
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Environment
participant Config
participant prepare_updater
participant BaseFeeUpdater
Environment->>Config: Provide L1 fee cap values
Config->>prepare_updater: Expose configured caps
prepare_updater->>BaseFeeUpdater: Pass cap parameters
BaseFeeUpdater->>BaseFeeUpdater: Clamp computed fees
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The upper caps applied to the fetched L1 base fee and blob base fee in
gas-oraclewere hardcoded:During sustained L1 fee spikes these caps silently clamp the value pushed on-chain, and there is no way to tune them without a rebuild/redeploy.
Change
Config, read from envGAS_ORACLE_MAX_L1_BASE_FEE/GAS_ORACLE_MAX_L1_BLOB_BASE_FEE.BaseFeeUpdater::new, mirroring the existinggas_threshold/*_bufferconfig pattern.Two files, no public API change beyond the internal constructor (its only caller is updated).
Context
Surfaced by morph-l2/morph-ideas idea #5 (hardcoded fee-cap tech debt): https://github.com/morph-l2/morph-ideas/blob/main/idea-005.html
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes