Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 0ca7eda

Browse files
authored
Update readme.md #3
1 parent d1eb36c commit 0ca7eda

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,32 @@ To actually include this library in a project it is required to:
1111
2. Add all the internal dependencies using [CMake Modules](https://github.com/BoostCMake/cmake_modules.git) as submodules to target project repository.
1212
3. Initialize parent project with [CMake Modules](https://github.com/BoostCMake/cmake_modules.git) (Look at [crypto3](https://github.com/nilfoundation/crypto3.git) for the example)
1313

14+
## Run examples
15+
This library is used in [ZKLLVM]{https://github.com/NilFoundation/zkllvm} transpiler binary.
16+
It produces gate argument for EVM from zkllvm-assigner which consists of circuit.crct and assignment.tbl file.
17+
It can also create test proof to check gate argument by [evm-placeholder-verification]{https://github.com/NilFoundation/zkllvm}
18+
To build transpiler app follow ZKLLVM instructions to prepare evironment and input data. Use this branch [ZKLLVM](https://github.com/NilFoundation/zkllvm/tree/64-add-optimize-option-to-transpiler-app).
19+
20+
1. Build transpiler binary file
21+
```bash
22+
make -C ${ZKLLVM_BUILD:-build} transpiler -j$(nproc)
23+
```
24+
2. Let `input_folder` is a folder contains transpiler input(`circuit.crct` and `assignment.tbl` file). Let `output_folder` is a folder for transpiler output. Run to generate gate argument files:
25+
```bash
26+
${ZKLLVM_BUILD:-build}/bin/transpiler/transpiler -m gen-gate-argument -i input_folder -o output_folder
27+
```
28+
Use --optimize-gates option to place small sequental gates to one .sol file
29+
Run to generate test proof:
30+
```bash
31+
${ZKLLVM_BUILD:-build}/bin/transpiler/transpiler -m gen-test-proof -i input_folder -o output_folder
32+
```
33+
3. Copy `output_folder` to `evm-placeholder-verification/examples`. Use this branch [evm-placholder-verification](https://github.com/NilFoundation/evm-placeholder-verification/tree/37-merge-33-and-17)
34+
35+
4. Run python scripts from the folder `evm-placeholder-verification/test` to verify test proof
36+
```bash
37+
python3 web3_deploy_gate_argument.py examples/output_folder
38+
python3 web3_placeholder_verify_deployed_test.py examples/output_folder
39+
```
1440
## Dependencies
1541

1642
### Internal

0 commit comments

Comments
 (0)