sonobe/cli/README.md
cli/README.mdRaw
1# Solidity Verifier
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 Verifier, a powerful 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
25As an open-source project, Solidity Verifier is released under the GPL3 license.
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 zero-knowledge 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-verifier [OPTIONS] -p <PROTOCOL> -pd <PROTOCOL_DATA> -o <OUTPUT_PATH>
47```
48
49A real use case (which was used to test the tool itself):
50`solidity-verifier -p groth16 -pd ./folding-verifier-solidity/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 (default: /home/kr0/Desktop/HDD/ethereum/folding-schemes/verifier.sol)
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 is released under the GPL3 license for any of the protocols that include `Groth16`. See the LICENSE file in the project repository for more details.
65For the rest of contracts/protocols and the CLI itself, this tooling is released under MIT/Apache license.
66
67## Contributing
68Feel free to explore, use, and contribute to Solidity Verifier as we strive to enhance privacy and scalability in the blockchain space!
69We welcome contributions to Solidity Verifier! 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.
70
71
72