Skip to content

0xmozak/zk_evm

 
 

Repository files navigation

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:

  • mpt_trie: A collection of types and functions to work with Ethereum Merkle Patricie Tries.

  • trace_decoder: Flexible protocol designed to process Ethereum clients trace payloads into an IR format that can be understood by the zkEVM prover.

  • evm_arithmetization: Defines all the STARK constraints and recursive circuits to generate succinct proofs of EVM execution. It uses starky and plonky2 as proving backend: https://github.com/0xPolygonZero/plonky2.

  • proof_gen: A convenience library for generating proofs from inputs already in Intermediate Representation (IR) format.

Dependency graph

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

flowchart TD
    subgraph ps [proving systems]
    A1{{plonky2}}
    A2{{starky}}
    end

    subgraph zk_evm [zk_evm]
    B[mpt_trie]
    C[evm_arithmetization]
    D[trace_decoder]
    E[proof_gen]
    A1 --> C
    A1 --> E
    A2 --> C
    B --> C
    B ---> D
    C ---> D
    C --> E
    D --> E
    end

    F{zero-bin}
    A1 --> F
    C --> F
    D --> F
    E --> F
Loading

Documentation

Documentation is still incomplete and will be improved over time, a lot of useful material can be found in the docs section, including:

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 72.2%
  • Assembly 27.7%
  • HTML 0.1%