fix(core/vm): remove EIP-7702 extcode overrides #31089#2293
fix(core/vm): remove EIP-7702 extcode overrides #31089#2293gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
Remove the custom EIP-7702 handlers for EXTCODECOPY, EXTCODESIZE, and EXTCODEHASH so the jump table keeps the default opcode behavior. This also drops the now-unused imports tied to delegation-specific code paths.
|
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
This PR removes the EIP-7702-specific overrides for EXTCODESIZE, EXTCODEHASH, and EXTCODECOPY so that these opcodes retain the default EVM behavior even when EIP-7702 is enabled (i.e., they operate on the account’s actual stored code bytes, including delegation designators).
Changes:
- Removed the custom EIP-7702
EXTCODE*opcode handlers fromcore/vm/eips.go(and the now-unused imports they required). - Added a runtime test asserting
EXTCODESIZE,EXTCODEHASH, andEXTCODECOPYreturn results based on the delegation designator bytes stored at the delegated account. - Added required test imports (
bytes,crypto) to support the new assertions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/vm/eips.go | Stops overriding EXTCODE* opcode execution under EIP-7702; keeps only the EIP-7702 call-related gas adjustments. |
| core/vm/runtime/runtime_test.go | Adds a regression test verifying default EXTCODE* behavior for delegation-designator code bytes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
Remove the custom EIP-7702 handlers for EXTCODECOPY, EXTCODESIZE, and EXTCODEHASH so the jump table keeps the default opcode behavior. This also drops the now-unused imports tied to delegation-specific code paths.
Ref: 31089
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