Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md updated #61

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down