This library uses Boost CMake build modules (https://github.com/BoostCMake/cmake_modules.git). To actually include this library in a project it is required to:
- Add CMake Modules as submodule to target project repository.
- Add all the internal dependencies using CMake Modules as submodules to target project repository.
- Initialize parent project with CMake Modules (Look at crypto3 for the example)
This library is used in the zkLLVM transpiler binary.
It produces gate argument for EVM from zkllvm-assigner which consists of circuit.crct
and assignment.tbl
file.
It can also create test proof to check gate argument by evm-placeholder-verification
To build transpiler app follow zkLLVM instructions to prepare evironment and input data. Use this branch zkLLVM.
- Build transpiler binary file
make -C ${ZKLLVM_BUILD:-build} transpiler -j$(nproc)
- Let
input_folder
is a folder contains transpiler input (circuit.crct
andassignment.tbl
file). Letoutput_folder
is a folder for transpiler output. Run to generate gate argument files:
${ZKLLVM_BUILD:-build}/bin/transpiler/transpiler -m gen-gate-argument -i input_folder -o output_folder
Use --optimize-gates
option to place small sequental gates to one .sol
file
Let public_input_file
is a file with public input. Run to generate test proof:
${ZKLLVM_BUILD:-build}/bin/transpiler/transpiler -m gen-test-proof -i input_folder -o output_folder -p public_input_file
-
Copy
output_folder
toevm-placeholder-verification/contracts/zkllvm
. -
Run hardhat to verify proof:
npx hardhat deploy
npx hardhat verify-circuit-proof --test output_folder
Crypto3 suite:
zkLLVM compiler ecosystem:
- Boost (>= 1.76)