Respect EVM version when importing assembly JSON#16778
Open
0xjc65eth wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
EVMAssemblyStackalready stores theevmVersionparsed from Standard JSON settings, but the imported assembly JSON path dropped it when constructingAssemblyobjects.Assembly::fromJSON()therefore used the defaultEVMVersion{}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: =pariskeepsPUSH 0encoded asPUSH1 0x0/6000.EVMVersion: =shanghaistill encodesPUSH 0asPUSH0/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.asmjsongit diff --checkI could not run
isoltestlocally because this checkout had no configured build directory, andcmake -S . -B build -DCMAKE_BUILD_TYPE=Releasestopped at missing Boost 1.83.0.AI Disclosure
AI assistance was used while preparing this contribution. I reviewed the resulting diff and ran the local checks listed above.