zksync-era icon indicating copy to clipboard operation
zksync-era copied to clipboard

feat: EVM Equivalence in Yul

Open jrchatruc opened this issue 10 months ago • 0 comments

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 and zk lint.
  • [ ] Spellcheck has been run via zk spellcheck.
  • [ ] Linkcheck has been run via zk linkcheck.

jrchatruc avatar Apr 08 '24 20:04 jrchatruc