From 560dcee7e90114d92697bcb7adb72a9c4221c413 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 17 Aug 2023 05:48:00 +0000 Subject: [PATCH] README.md updated. --- README.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2b4afd4..311eb8c 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,6 @@ npm i npx hardhat compile ``` -## Test -``` -npx hardhat test #Execute tests -REPORT_GAS=true npx hardhat test # Test with gas reporting -``` - ## Deploy Launch a local-network using the following @@ -49,34 +43,47 @@ npx hardhat deploy --network localhost Hardhat re-uses old deployments, to force re-deploy add the `--reset` flag above -## ZKLLVM output check +## Verification of zkLLVM circtuit compiler output + +zkLLVM compiler prepares circuits in form of instantiated contracts, which have to be deployed to the blockchain. -Place folder with ZKLLVM circuit transpilation output to `contracts/zkllvm` directory. +Once you got zkLLVM output - put a circuit directory it under `contracts/zkllvm`. The folder should contain following files: -ZKLLVM circuit transpilation output folder format ``` * proof.bin -- placeholder proof file -* circuit_params.json -- parameters JSON file -* public_input.json -- public input JSON file +* circuit_params.json -- parameters file in JSON format +* public_input.json -- public input file in JSON format * linked_libs_list.json -- list of external libraries, have to be deployed for gate argument computation. * gate_argument.sol, gate0.sol, ... gateN.sol -- solidity files with gate argument computation ``` +If all the files are in place - you can deploy the circuit verifier to the blockchain and verify the proofs. +You only need to deploy the verifier once, and then you can verify as many proofs as you want. + Deploy contracts ``` npx hardhat deploy ``` -Verify one folder from `contracts/zkllvm` directory +If you've put the circuit under, let's say, `contracts/zkllvm/circuit-name` directory, you can verify the proofs with the following command: ``` -npx hardhat verify-circuit-proof --test folder-name +npx hardhat verify-circuit-proof --test circuit-name ``` -Verify all folders from `contracts/zkllvm` director +To verify all circuits from `contracts/zkllvm` directory: ``` npx hardhat verify-circuit-proof-all ``` +## Testing + +Tests are located in `test` directory. To run tests: + +``` +npx hardhat test #Execute tests +REPORT_GAS=true npx hardhat test # Test with gas reporting +``` + ## Community Issue reports are preferred to be done with Github Issues in here: https://github.com/NilFoundation/evm-placeholder-verification/issues.