Skip to content

Respect EVM version when importing assembly JSON#16778

Open
0xjc65eth wants to merge 1 commit into
argotorg:developfrom
0xjc65eth:fix-evmassembly-json-evm-version
Open

Respect EVM version when importing assembly JSON#16778
0xjc65eth wants to merge 1 commit into
argotorg:developfrom
0xjc65eth:fix-evmassembly-json-evm-version

Conversation

@0xjc65eth

@0xjc65eth 0xjc65eth commented May 28, 2026

Copy link
Copy Markdown
Contributor

Description

EVMAssemblyStack already stores the evmVersion parsed from Standard JSON settings, but the imported assembly JSON path dropped it when constructing Assembly objects. Assembly::fromJSON() therefore used the default EVMVersion{} for both root assemblies and subassemblies.

This PR plumbs the selected EVM version through Assembly::fromJSON() and uses it when constructing imported assemblies. This keeps imported EVM assembly output consistent with the requested target EVM version.

Regression coverage:

  • EVMVersion: =paris keeps PUSH 0 encoded as PUSH1 0x0 / 6000.
  • EVMVersion: =shanghai still encodes PUSH 0 as PUSH0 / 5f.

Closes #16759.

Checklist

Testing

  • scripts/check_style.sh libevmasm/Assembly.h libevmasm/Assembly.cpp libevmasm/EVMAssemblyStack.cpp test/libevmasm/evmAssemblyTests/isoltestTesting/evm_version_push0_paris.asmjson test/libevmasm/evmAssemblyTests/isoltestTesting/evm_version_push0_shanghai.asmjson
  • git diff --check

I could not run isoltest locally because this checkout had no configured build directory, and cmake -S . -B build -DCMAKE_BUILD_TYPE=Release stopped at missing Boost 1.83.0.

AI Disclosure

  • No AI tools were used
  • AI tools were used (details below)

AI assistance was used while preparing this contribution. I reviewed the resulting diff and ran the local checks listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EVMAssembly import silently ignores evmVersion (emits PUSH0 on Paris)

1 participant