zksync-era
zksync-era copied to clipboard
feat: EVM Equivalence in Yul
What ❔
This PR adds an EVM Yul Interpreter on top of the already existing Solidity EVM Interpreter effort, along with units tests for it.
Because there is A LOT of duplicated code between the initCode and the runtime code of the contract, we split it up into different files and used a preprocessor tool to build the final interpreter file.
To preprocess and then compile the interpreter, first install the preprocess tool with
npm install -g preprocess-cli-tool
then run
./recompile_interpreter.sh
on the root of this repo. The resulting binary file will be on
contracts/system-contracts/contracts-preprocessed/artifacts/EvmInterpreterPreprocessed.yul.zbin
Why ❔
Checklist
- [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via
zk fmt
andzk lint
. - [ ] Spellcheck has been run via
zk spellcheck
. - [ ] Linkcheck has been run via
zk linkcheck
.