GithubHelp home page GithubHelp logo

xyq-c-cpp / scroll-prover Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scroll-tech/scroll-prover

0.0 0.0 0.0 69.62 MB

Scroll zkEVM Playground

Home Page: https://scroll.io

License: Apache License 2.0

Shell 2.38% Python 2.66% Rust 34.74% Makefile 1.33% Dockerfile 1.91% Yul 56.98%

scroll-prover's Introduction

๐Ÿ“œ scroll-prover ๐Ÿ“œ

Unit Test issues

Usage

Latest Release

v0.10.3 is used in Scroll Mainnet currently. Branch main HEAD is used for development.

Prerequisite

Install Solidity compiler solc of version 0.8.19 via svm-rs:

cargo install svm-rs
svm install 0.8.19

Download all setup params, degree 20, 24 and 26 are used in config. Could only download params of degree 26, but it may affect performance (when downsizing params).

make download-setup -e degree=20
make download-setup -e degree=24
make download-setup -e degree=26

Or specify other degree and target directory to download.

# As default `degree=26` and `params_dir=./integration/params`.
make download-setup -e degree=DEGREE params_dir=PARAMS_DIR

Testing

make test-chunk-prove and make test-e2e-prove are the main testing entries for multi-level circuit constraint system of scroll-prover. Developers could understand how the system works by reading the codes of these tests.

And there are other tests:

  • make test-inner-prove could be used to test the first-level circuit.
  • make test-batch-prove could be used to test the final two levels.

Binaries

Could use the following command to run binaries locally.

Run zkevm prover to generate chunk proof (work directory is ./integration)

# Params file should be located in `./integration/params`.
cargo run --release --bin trace_prover -- --params=params --trace=tests/extra_traces/batch_34700/chunk_1236462/block_4176564.json

Verifier Contract

Both YUL and bytecode of verifier contract could be generated when running aggregation tests (make test-e2e-prove). After running aggregation tests, a new folder is created in integration folder of scroll-prover and named like integration/outputs/e2e_tests_*. It contains below files:

  • Chunk protocol: chunk_chunk_0.protocol
  • Chunk VK: vk_chunk_0.vkey
  • Batch VK: vk_batch_agg.vkey
  • Verifier YUL source code: evm_verifier.yul
  • Verifier bytecode: evm_verifier.bin

The YUL source code is generated by params, VK and num instance of proof, could reference gen_evm_verifier function in snark-verifier.

The verifier bytecode is compiled from YUL source code, it invokes Solidity compiler (0.8.19 as mentioned above) command line with specified parameters, could reference compile_yul function in snark-verifier.

License

Licensed under either of

at your option.

scroll-prover's People

Contributors

silathdiir avatar lispc avatar haoyuathz avatar lawliet-chan avatar noel2004 avatar kunxian-xia avatar icemelon avatar controlcpluscontrolv avatar 29988122 avatar scroll-dev avatar mask-pp avatar omahs avatar tranhoaison avatar zhenfeizhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.