This repo demonstrates a basic proof aggregator use case. It comes with an aggregator contract and two rollup contracts. Some scripts and test code are provided.
- compile proof-aggregation repo
cargo build --profile release --package proof-aggregation --bin proof-aggregation
cp ./target/release/proof-aggregation .
- compile proof-aggregation-contract repo
npm install
npx hardhat compile
- config
.env
and get some test matic from mumbai faucet
- deploy aggregator
npx hardhat run ./scripts/1_deploy_aggregator.ts --network mumbai
- register rollup1 rollup2
npx hardhat run ./scripts/2_deploy_and_register_rollups.ts --network mumbai
- export verifier
./proof-aggregation export-verifier AggregationVerifier.yul
- set verifier
npx hardhat run ./scripts/3_deploy_verifier.ts --network mumbai
- gen proof
./proof-aggregation gen-circuit1-proof proof1.json
./proof-aggregation gen-circuit2-proof proof2.json
- submit proof1 proof2
npx hardhat run ./scripts/4_submit_proofs.ts --network mumbai
- gen aggregate
./proof-aggregation gen-aggregated-proof proof1.json proof2.json agg.json
- submit proof
npx hardhat run ./scripts/5_submit_batch_proof.ts --network mumbai