feat(core/vm): implement EIP-7883 - ModExp Gas Cost Increase #31606 #32015#2123
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Pull request overview
Implements EIP-7883-related changes to the bigModExp precompile, wiring the updated behavior into fork-based precompile selection (including a new Osaka precompile set) and adding test vectors/benchmarks.
Changes:
- Added an Osaka fork precompile set and updated active precompile selection to account for
rules.IsOsaka. - Extended
bigModExpwith new feature flags and updated its gas calculation / input handling accordingly. - Added JSON test vectors and new unit test/benchmark coverage for the EIP-7883 modexp variant.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/vm/testdata/precompiles/modexp_eip7883.json | Adds modexp EIP-7883 test vectors used by JSON-driven precompile tests/benchmarks. |
| core/vm/contracts_test.go | Registers a new modexp variant address for tests and adds JSON-based test + benchmark entrypoints for EIP-7883. |
| core/vm/contracts.go | Introduces Osaka precompile set selection and updates bigModExp behavior/configuration for EIP-7883. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e3bfd1b to
3dc6f06
Compare
…#31606 ethereum#32015 https://eips.ethereum.org/EIPS/eip-7883 --------- Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de> Co-authored-by: Felix Lange <fjl@twurst.com>
Proposed changes
implement EIP 7883:
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that