evm-placeholder-verification 1.1.1
Install from the command line:
Learn more about npm packages
$ npm install @nilfoundation/evm-placeholder-verification@1.1.1
Install via package.json:
"@nilfoundation/evm-placeholder-verification": "1.1.1"
About this version
This repository contains the smart contracts for validating zero knowledge proofs generated in placeholder proof system in EVM.
git clone git@github.com:NilFoundation/evm-placeholder-verification.git
cd evm-placeholder-verification
npm i
npx hardhat compile
Launch a local-network using the following
npx hardhat node
To deploy to test environment (ex: Ganache)
npx hardhat deploy --network localhost
Hardhat re-uses old deployments, to force re-deploy add the --reset
flag above
zkLLVM compiler prepares circuits in form of instantiated contracts, which have to be deployed to the blockchain.
Once you got zkLLVM output - put a circuit directory it under contracts/zkllvm
. The folder should contain following files:
* proof.bin -- placeholder proof 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
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 circuit-name
To verify all circuits from contracts/zkllvm
directory:
npx hardhat verify-circuit-proof-all
Tests are located in test
directory. To run tests:
npx hardhat test #Execute tests
REPORT_GAS=true npx hardhat test # Test with gas reporting
Issue reports are preferred to be done with Github Issues in here: https://github.com/NilFoundation/evm-placeholder-verification/issues.
Usage and development questions are preferred to be asked in a Telegram chat: https://t.me/nilfoundation or in Discord (https://discord.gg/KmTAEjbmM3)