• Stars
    star
    511
  • Rank 86,409 (Top 2 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scroll's zkEVM rust crates

📜 scroll-prover 📜

Unit Test issues

Usage

Prerequisite

Fetch git-submodule of test traces

git submodule init
git submodule update --checkout

Download all setup params, degree 20 and 25 are used in config.rs. Could only download params of degree 25, but it may affect performance (when dowsizing to 20).

make download-setup -e degree=20
make download-setup -e degree=25

Or specify other degree and target directory to download.

# As default `degree=25` and `params_dir=./prover/test_params`.
make download-setup -e degree=DEGREE params_dir=PARAMS_DIR

Testing

make test-chunk-prove and make test-agg-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.

Besides it, make test-inner-prove could be used to test the first-level circuit.

Binaries

This repository is designed to be used as a Rust crate, rather than a standalone running process. However, you can still use the following command to run binaries locally.

If you run into linking issues you may need to run

cp `find ./target/release/ | grep libzktrie.so` /usr/local/lib/

To move the zktrielib into a path where your linker could locate it.

Run zkevm prover to generate chunk proof (the word-dir is ./prover)

cargo build --release --bin zkevm_prove

./target/release/zkevm_prove --help

Could specify arguments as

# Proof data will be saved to `./prover/proof_data`.
export OUTPUT_DIR="proof_data"

# Params file should be located in `./prover/test_params`.
cargo run --release --bin zkevm_prove -- --params=test_params --trace=tests/traces/erc20/10_transfer.json

Run zkevm verifier to verify chunk proof (the word-dir is ./prover)

cargo build --release --bin zkevm_verify

./target/release/zkevm_verify --help

Could specify arguments as

cargo run --release --bin zkevm_verify -- --params=test_params --proof=proof_data

License

Licensed under either of

at your option.