-
Notifications
You must be signed in to change notification settings - Fork 193
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(precompile): consume gas before returning error #2152
Conversation
WalkthroughThis pull request focuses on improving gas consumption tracking for precompile calls in the Nibiru EVM. The changes span multiple precompile files (funtoken, oracle, and wasm) to ensure consistent gas metering. The modifications involve explicitly recording gas consumption after contract method execution, regardless of whether an error occurs. The changelog is updated to reflect these changes, with a new entry added for pull request #2152 addressing the gas consumption fix. Changes
Sequence DiagramsequenceDiagram
participant Contract
participant EVMRuntime
participant GasMeter
Contract->>EVMRuntime: Execute Precompile Method
EVMRuntime->>GasMeter: Record Gas Consumed
EVMRuntime->>Contract: Return Execution Result
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used📓 Learnings (1)x/evm/precompile/funtoken.go (1)
🔇 Additional comments (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2152 +/- ##
==========================================
- Coverage 65.20% 65.19% -0.01%
==========================================
Files 277 277
Lines 22202 22203 +1
==========================================
- Hits 14476 14475 -1
- Misses 6736 6739 +3
+ Partials 990 989 -1
|
Purpose / Abstract
Summary by CodeRabbit
Bug Fixes
Documentation