-
Notifications
You must be signed in to change notification settings - Fork 626
fix(gas-oracle): nil pointer error and allow update gas price when no diff #1657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gas-oracle): nil pointer error and allow update gas price when no diff #1657
Conversation
""" WalkthroughThe version tag was incremented from "v4.5.8" to "v4.5.9". In the relayer logic, the calculation for the expected base fee delta in gas oracle updates was refined to only add 1 when the gas price difference is positive. A nil check was introduced to prevent dereferencing a nil commit timestamp during batch timeout checks. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant L1Relayer
participant GasOracle
User->>L1Relayer: Trigger gas oracle update
L1Relayer->>L1Relayer: Calculate gasPriceDiff
alt gasPriceDiff > 0
L1Relayer->>L1Relayer: expectedBaseFeeDelta += 1
else
L1Relayer->>L1Relayer: expectedBaseFeeDelta unchanged
end
L1Relayer->>GasOracle: Update if threshold exceeded
User->>L1Relayer: Check batch commit timeout
alt batches[0].CommittedAt != nil
L1Relayer->>L1Relayer: Compute timeout duration
else
L1Relayer->>L1Relayer: Skip timeout check
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1657 +/- ##
===========================================
- Coverage 40.68% 40.68% -0.01%
===========================================
Files 225 225
Lines 18415 18419 +4
===========================================
Hits 7493 7493
- Misses 10191 10195 +4
Partials 731 731
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Purpose or design rationale of this PR
finalizing
/finalized
status is updated beforecommitted
status, skip the timeout check of this round. Becausebatches[0].CommittedAt
isnil
in this case, this will only continue for a short time window.0
wei if the gas price diff config is0
, this will be used to let the gas oracle send transactions continuously.PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
Chores