fix(core/vm): trace before memory expansion #31074#2294
fix(core/vm): trace before memory expansion #31074#2294gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
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
This PR adjusts the EVM interpreter loop in core/vm to make tracer hook invocation flow match upstream more closely by moving opcode tracing out of the dynamicGas branch while keeping memory resizing centralized.
Changes:
- Hoists
memorySizecalculation state outside thedynamicGasblock. - Invokes
OnGasChange/OnOpcodetracing in a single unified location. - Performs
mem.Resize(memorySize)in one place after tracing, preserving “trace before expansion” ordering.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move opcode tracing out of the dynamic gas branch so tracing always runs before memory expansion. Keep memory resizing in one place to match the upstream interpreter flow.
f029f16 to
fa830e3
Compare
Proposed changes
Move opcode tracing out of the dynamic gas branch so tracing always runs before memory expansion. Keep memory resizing in one place to match the upstream interpreter flow.
Ref: ethereum#31074
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