From a4fc38ee7cf2c15328cf902654d710c80bd7300c Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Wed, 13 Dec 2023 14:14:54 +0800 Subject: [PATCH 1/2] Add `Verifier Contract` section to README. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b43dc1b15..1a7d7f712 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,14 @@ 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`), and named as `evm_verifier.yul` and `evm_verifier.bin` files. + +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 From deba20ed019183c8fc25adc2fd2b0fceff1063c7 Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Wed, 13 Dec 2023 15:10:58 +0800 Subject: [PATCH 2/2] Add generated file descriptions when running aggregation tests. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a7d7f712..8de574a3b 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,13 @@ sh scripts/gen_full_chunk_proofs.sh BATCH_INDEX ### Verifier Contract -Both YUL and bytecode of verifier contract could be generated when running aggregation tests (`make test-agg-prove`), and named as `evm_verifier.yul` and `evm_verifier.bin` files. +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.