Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Official ethereum/tests StateTests execution (final)#748

Merged
adria0 merged 75 commits into
privacy-ethereum:mainfrom
adria0:evm-testvectors3
Sep 14, 2022
Merged

Official ethereum/tests StateTests execution (final)#748
adria0 merged 75 commits into
privacy-ethereum:mainfrom
adria0:evm-testvectors3

Conversation

@adria0
Copy link
Copy Markdown
Contributor

@adria0 adria0 commented Sep 8, 2022

this PR supersedes #382

Note for reviewers

You will find in this PR:

  • A binary in evm-testvectors/src/main.rs that

    • scans all the tests from the evm-testvectors/test folder that is a git submodule
      • there are two types of files to scan: json and .yaml
    • compiles the code inside the tests if not found in the code.cache file
      • this is executed via docker (see docker folder)
    • runs the test if not found in the results.cache file, but skips some tests
      • which ones contains unimplemented opcodes (defined in the OPCODES_UNIMPLEMENTED const) via scanning the geth trace
      • which ones uses too much gas or a maximum of steps (see StateTestConfig)
      • which ones the geth trace is too big ; I had to modify geth-utils/lib/lib.go to skip very big traces (geth crashed)
      • others ( see FILE_IGNORE_LIST)
    • writes the result in the results.cache file
  • Enrich Bytecode by adding a disasm() -> String method as also an iter() that generates an iterator over the bytecode Opcodes. From my previous experience running those tests there are is a lot of cases that you have to analyze and test the code, and I created a small command line tool for generating on-the-fly tests using assembly/bytecode as also to parse bytecode (see --raw option in main.rs)

  • note that this is a first version, probally this is going to change, and eventually we have to move this into a specific repo, but for the moment I prefer to merge this to not having code far from origin/main

  • note2 this code is not critical at this point, so a light review could be done IMO

@adria0 adria0 requested a review from CPerezz as a code owner September 13, 2022 10:46
@github-actions github-actions Bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-mock Issues related to the mock workspace member T-bench Type: benchmark improvements labels Sep 13, 2022
@github-actions github-actions Bot removed crate-mock Issues related to the mock workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-bus-mapping Issues related to the bus-mapping workspace member T-bench Type: benchmark improvements crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member labels Sep 13, 2022
Comment thread CODEOWNERS Outdated
Copy link
Copy Markdown
Contributor

@ed255 ed255 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Awesome work @adria0 ! 💪
This tool will be very useful to track the progress of the zkEVM and detect bugs :D

Copy link
Copy Markdown
Collaborator

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too! Awesome work @adria0

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

Labels

crate-eth-types Issues related to the eth-types workspace member crate-geth-utils Issues related to the geth-utils workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants