arnaucube
arnaucube/sonobePublic Self-hosted repository
sonobe/cli/README.md
cli/README.mdRaw
 1# Solidity Verifiers CLI
 2                                    _____  ______  ______  ______  ______  ______  ______ 
 3                                    | |__| || |__| || |__| || |__| || |__| || |__| || |__| |
 4                                    |  ()  ||  ()  ||  ()  ||  ()  ||  ()  ||  ()  ||  ()  |
 5                                    |______||______||______||______||______||______||______|
 6                                    ______                                          ______ 
 7                                    | |__| |   ____        _ _     _ _ _            | |__| |
 8                                    |  ()  |  / ___|  ___ | (_) __| (_) |_ _   _    |  ()  |
 9                                    |______|  \___ \ / _ \| | |/ _` | | __| | | |   |______|
10                                    ______    ___) | (_) | | | (_| | | |_| |_| |    ______ 
11                                    | |__| |  |____/ \___/|_|_|\__,_|_|\__|\__, |   | |__| |
12                                    |  ()  |  __     __        _  __ _     |___/    |  ()  |
13                                    |______|  \ \   / /__ _ __(_)/ _(_) ___ _ __    |______|
14                                    ______    \ \ / / _ \ '__| | |_| |/ _ \ '__|    ______ 
15                                    | |__| |    \ V /  __/ |  | |  _| |  __/ |      | |__| |
16                                    |  ()  |     \_/ \___|_|  |_|_| |_|\___|_|      |  ()  |
17                                    |______|                                        |______|
18                                    ______  ______  ______  ______  ______  ______  ______ 
19                                    | |__| || |__| || |__| || |__| || |__| || |__| || |__| |
20                                    |  ()  ||  ()  ||  ()  ||  ()  ||  ()  ||  ()  ||  ()  |
21                                    |______||______||______||______||______||______||______|
22
23Welcome to Solidity Verifiers CLI, a Command-Line Interface (CLI) tool designed to simplify the generation of Solidity smart contracts that verify proofs of Zero Knowledge cryptographic protocols. This tool is developed by the collaborative efforts of the PSE (Privacy & Scaling Explorations) and 0XPARC teams.
24
25Solidity Verifiers CLI is released under the MIT license, but notice that the Solidity template for the Groth16 verification has GPL-3.0 license, hence the generated Solidity verifiers that use the Groth16 template will have that license too.
26
27## Supported Protocols
28
29Solidity Verifier currently supports the generation of Solidity smart contracts for the verification of proofs in the following Zero Knowledge protocols:
30
31- **Groth16:**
32  - Efficient and succinct zero-knowledge proof system.
33  - Template credit: [Jordi Baylina - Groth16 Verifier Template](https://github.com/iden3/snarkjs/blob/master/templates/verifier_groth16.sol.ejs)
34
35- **KZG:**
36  - Uses the Kate-Zaverucha-Goldberg polynomial commitment scheme.
37  - Example credit: [weijiekoh - KZG10 Verifier Contract](https://github.com/weijiekoh/libkzg/blob/master/sol/KZGVerifier.sol)
38
39- **Nova + CycleFold Decider:**
40  - Implements the decider circuit verification for the Nova proof system in conjunction with the CycleFold protocol optimization.
41  - Template inspiration and setup credit: [Han - revm/Solidity Contract Testing Functions](https://github.com/privacy-scaling-explorations/halo2-solidity-verifier/tree/main)
42
43## Usage
44
45```bash
46solidity-verifiers-cli [OPTIONS] -p <PROTOCOL> -d <PROTOCOL_DATA> -o <OUTPUT_PATH>
47```
48
49A real use case (which was used to test the tool itself):
50`solidity-verifiers-cli -p groth16 -d ./solidity-verifiers/assets/G16_test_vk_data`
51This would generate a Groth16 verifier contract for the given G16 data (which consists on the G16_Vkey only) and store this contract in `$pwd`.
52
53### Options:
54    -v, --verbose: Increase logging verbosity
55    -q, --quiet: Decrease logging verbosity
56    -p, --protocol <PROTOCOL>: Selects the protocol for which to generate the Decider circuit Solidity Verifier (possible values: groth16, kzg, nova-cyclefold)
57    -o, --out <OUT>: Sets the output path for all generated artifacts
58    -d, --protocol-data <PROTOCOL_DATA>: Sets the input path for the file containing all the data required by the chosen protocol for verification contract generation
59    --pragma <PRAGMA>: Selects the Solidity compiler version to be set in the Solidity Verifier contract artifact
60    -h, --help: Print help (see a summary with '-h')
61    -V, --version: Print version
62
63## License
64Solidity Verifier CLI is released under the MIT license, but notice that the Solidity template for the Groth16 verification has GPL-3.0 license, hence the generated Solidity verifiers will have that license too.
65
66## Contributing
67Feel free to explore, use, and contribute to Solidity Verifiers CLI as we strive to enhance privacy and scalability in the blockchain space!
68We welcome contributions to Solidity Verifiers CLI! If you encounter any issues, have feature requests, or want to contribute to the codebase, please check out the GitHub repository and follow the guidelines outlined in the contributing documentation.
69
70
71