Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThe P256Verify precompile is extended to accept a second generic G: Get for explicit gas; cost accounting, unit tests, benchmark invocation, and three runtime precompile registrations are updated to provide and use the new gas parameter. ChangesP256Verify Dual-Parameter Precompile
🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
P256Verifyat0x0000000000000000000000000000000000000100now charges EVM gas for signature verification. Transactions or contracts that call this precompile with tight gas limits may need to raise their gas limit.Goal of the changes
Fix P256Verify fee undercharging by making the precompile charge the EVM gasometer for its native signature verification work, while keeping the existing external ref-time accounting.
What reviewers need to know
precompiles/p256verify/src/lib.rsnow takes a separate gas provider and callshandle.record_cost(...)beforerecord_external_cost(...).runtime/{moonbeam,moonriver,moonbase}/src/precompiles.rsderives the P256 gas charge from the runtime benchmarked weight viaGasWeightMapping::weight_to_gas(P256VerifyWeight::get()).Testing
cargo test -p pallet-evm-precompile-p256verifycargo check -p moonbeam-runtimecargo check -p moonriver-runtime -p moonbase-runtimeNeed help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.