[codex] add dynamic custom precompile gas meter#3644
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## codex/evmonly-staking-precompile #3644 +/- ##
====================================================================
- Coverage 58.09% 58.09% -0.01%
====================================================================
Files 2186 2184 -2
Lines 178307 178410 +103
====================================================================
+ Hits 103588 103643 +55
- Misses 65443 65473 +30
- Partials 9276 9294 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
PR SummaryMedium Risk Overview
The staking precompile drops separate read/write gas constants and uses Tests assert store writes consume more than intrinsic gas, OOG on a tight gas limit leaves no storage changes, and staking flows use 8M gas limits. Reviewed by Cursor Bugbot for commit 56bf186. Bugbot is set up for automated code reviews on this repo. Configure here. |
Summary
Adds dynamic gas accounting for evm-only custom precompiles, with the staking precompile using the shared meter through the existing store, balance-transfer, and log boundaries.
Changes
storageBackedStore,nativeBalanceTransfer, and log emission in the custom precompile adapter so gas is charged based on the actual execution path.RequiredGasto only base/input gas, avoiding double charging now that state access is dynamically metered.Validation
go test ./giga/evmonly/...golangci-lint v2.8.0 run ./giga/evmonly/...