This is the zkEVM circuits used in Scroll Mainnet. It was forked from PSE zkevm-circuits and added a lot of new features later:
- SHA256 / MODEXP / EC precompiles
- RLP circuit / MPT circuit / Poseidon circuit
- multi block chunking
- proof aggregation
- >99.5% compatiblity with official EVM test vector
- Many optimizations like read/write memory in word instead of byte
High level design: https://docs.scroll.io/en/technology/zkevm/zkevm-overview/
Detailed circuit docs: https://github.com/scroll-tech/zkevm-circuits/tree/develop/docs
We recommend developers to go to our circuit playground repo for a detailed step-by-step guide on how to run proving.
This repository contains several Rust packages that implement the zkevm. The high-level structure of the repository is as follows:
- a crate designed to parse EVM execution traces and manipulate all of the data they provide in order to obtain structured witness inputs for circuits.
- (Deprecated) Measures performance of each circuit based on proving and verifying time and execution trace parsing and generation for each subcircuit
- Different types helpful for various components of the EVM
- Generates traces by connecting to an locally linked Geth EVM tracer
- Custom circuits that abstracts away low-level circuit detail.
- What are gadgets?
- Provides output from geth tracing APIs as circuit inputs
- Integration tests for all circuits
- (Deprecated) Modules for Keccak hash circuit
- Testing module. Mock definitions and methods that are used to test circuits or opcodes
- Parser and driver of official Ethereum Execution Tests
- Main package that contains all circuit logic
- Wrapper of scroll binary poseidon trie