Home

Awesome

zk_evm

A collection of libraries to prove Ethereum blocks with Polygon Zero Type 1 zkEVM, powered by starky and plonky2 proving systems.

Directory structure

This repository contains the following Rust crates:

Dependency graph

Below is a simplified view of the dependency graph, including the proving system backends and the application layer defined within zero-bin.

<!--- TODO: Update mermaid chart with `smt_trie` once type-2 is plugged in. -->
%%{init: {'theme':'dark'}}%%
flowchart LR
    subgraph ps [proving systems]
    A1{{plonky2}}
    A2{{starky}}
    end

    ps --> zk_evm

    subgraph zk_evm [zk_evm]
    B[mpt_trie]
    C[evm_arithmetization]
    D[trace_decoder]

    B --> C
    B ---> D
    C ---> D

    F{zero-bin}
    C --> F
    D --> F
    end

Documentation

Documentation is still incomplete and will be improved over time. You can look at the sequence diagrams for the proof generation flow, or go through the zkEVM book for explanations on the zkEVM design and architecture.

Branches

The default branch for the repo is the develop branch which is not stable but under active development. Most PRs should target develop. If you need a stable branch then a tagged version of main is what you're after. It should be assumed that develop will break and should only be used for development.

Building

The zkEVM stack currently requires the nightly toolchain, although we may transition to stable in the future. Note that the prover uses the Jemalloc memory allocator due to its superior performance.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.