Skip to content

Commit

Permalink
doc: add Verifier Contract section to README (#290)
Browse files Browse the repository at this point in the history
* Add `Verifier Contract` section to README.

* Add generated file descriptions when running aggregation tests.
  • Loading branch information
silathdiir authored Dec 13, 2023
1 parent 20d366a commit 17feecc
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 17feecc

Please sign in to comment.