This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake). To actually include this library in a project it is required to:
- Add CMake Modules to target project repository.
- Add all the internal dependencies using CMake Modules to target project repository.
- Initialize parent project with CMake Modules (Look at crypto3 for the example).
This library is used in the proof-producer binary.
It produces gate argument for EVM from fill-assignment stage, which generates circuit.crct and assignment.tbl file.
It can also create test proof to check gate argument by evm-placeholder-verification.
- Build proof-producer binary file Follow build instruction for proof-producer
nix build .#proof-producer -L- Generate circuit and assignemnt table
./result/bin/proof-producer \
--stage "preset" \
--circuit-name "zkevm" \
--circuit="circuit.crct"./result/bin/proof-producer \
--stage "fill-assignment" \
--circuit-name "zkevm" \
--trace "trace.pb" \
--assignment-table="assignment.tbl"- Let
output_folderis a folder for transpiler output. Run to generate gate argument files:
./result/bin/proof-producer \
--circuit="circuit.crct" \
--assignment-table="assignment.tbl" \
--evm-verifier "output_folder" \
--proof="proof.bin" -q 10-
Copy
output_foldertoevm-placeholder-verification/contracts/zkllvm. -
Run hardhat to verify proof:
npx hardhat deploy
npx hardhat verify-circuit-proof --test output_folderCrypto3 suite:
- Algebra.
- Math.
- Multiprecision.
- Zk.
- Blueprint.
- Boost (>= 1.76)