feat(core/vm): implement EIP-7823 - Set upper bounds for MODEXP #31818 #32363#2119
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 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 the EIP-7823 changes for the modexp (big modular exponentiation) precompile by introducing an Osaka fork precompile set and enforcing an input-size cap when Osaka rules are active.
Changes:
- Adds an Osaka precompile set (
PrecompiledContractsOsaka) and selects it whenrules.IsOsakais active. - Extends the
bigModExpprecompile with aneip7823toggle and enforces a 1024-byte cap on base/exponent/modulus lengths inRun. - Updates existing precompile sets to include the new
eip7823field inbigModExpliterals.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c00cadc to
b38874d
Compare
Proposed changes
https://eips.ethereum.org/EIPS/eip-7823
Ref:
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