Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add Verifier Contract section to README #290

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ sh scripts/gen_full_chunk_proofs.sh BATCH_INDEX
- `docker/chunk-prover` is used to build and run GPU chunk-prover.
- `docker/mock-testnet` is used to build and run GPU mock-testnet (inner-prove or chunk-prove).

### Verifier Contract

Both YUL and bytecode of verifier contract could be generated when running aggregation tests (`make test-agg-prove`). After running aggregation tests, a new folder is created in `integration` folder of scroll-prover and named as `agg_tests_output_multi_DATE_TIME`. 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](https://github.com/scroll-tech/snark-verifier/blob/develop/snark-verifier-sdk/src/evm_api.rs#L121) 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](https://github.com/scroll-tech/snark-verifier/blob/develop/snark-verifier/src/loader/evm/util.rs#L107) in snark-verifier.

## License

Licensed under either of
Expand Down