Skip to content

Commit

Permalink
polish cli descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucube committed Mar 18, 2024
1 parent f5c7f6c commit 8a81088
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,21 @@ It just requires few line changes on our previous code [...]

### On-chain verification
Having used the `DeciderEth` (see [Onchain Decider](#Onchain-Decider) section), we can now verify it in Ethereum's EVM.
[TODO]

First we need to generate the Solidity contracts that verify the Decider proofs. Use the [solidity-verifiers-cli](cli) tool
```
> solidity-verifier-cli -p nova-cyclefold -d ./folding-verifier-solidity/assets/G16_test_vk_data
```

## License
https://github.com/privacy-scaling-explorations/folding-schemes/blob/main/LICENSE

[TODO: add references to
- Espresso code
- arkworks
- KZG & Groth16 original adapted code
- Espresso code regarding the multilinear 'virtual polynomial' and SumCheck used in HyperNova
- Solidity KZG & Groth16 original adapted code
- Groth16: Jordi Baylina
- KZG10: weijiekoh
- Templating: Han
- People who helped us: Srinath Setty, Lev57, Matej (Lurk), Adrien (Lurk), TODO
]
19 changes: 9 additions & 10 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Solidity Verifier
# Solidity Verifiers CLI
_____ ______ ______ ______ ______ ______ ______
| |__| || |__| || |__| || |__| || |__| || |__| || |__| |
| () || () || () || () || () || () || () |
Expand All @@ -20,9 +20,9 @@
| () || () || () || () || () || () || () |
|______||______||______||______||______||______||______|

Welcome 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.
Welcome 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.

As an open-source project, Solidity Verifier is released under the GPL3 license.
Solidity 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.

## Supported Protocols

Expand All @@ -37,17 +37,17 @@ Solidity Verifier currently supports the generation of Solidity smart contracts
- Example credit: [weijiekoh - KZG10 Verifier Contract](https://github.com/weijiekoh/libkzg/blob/master/sol/KZGVerifier.sol)

- **Nova + CycleFold Decider:**
- Implements the decider circuit verification for the Nova zero-knowledge proof system in conjunction with the CycleFold protocol optimization.
- Implements the decider circuit verification for the Nova proof system in conjunction with the CycleFold protocol optimization.
- Template inspiration and setup credit: [Han - revm/Solidity Contract Testing Functions](https://github.com/privacy-scaling-explorations/halo2-solidity-verifier/tree/main)

## Usage

```bash
solidity-verifier [OPTIONS] -p <PROTOCOL> -pd <PROTOCOL_DATA> -o <OUTPUT_PATH>
solidity-verifiers-cli [OPTIONS] -p <PROTOCOL> -d <PROTOCOL_DATA> -o <OUTPUT_PATH>
```

A real use case (which was used to test the tool itself):
`solidity-verifier -p groth16 -pd ./folding-verifier-solidity/assets/G16_test_vk_data`
`solidity-verifiers-cli -p groth16 -d ./solidity-verifiers/assets/G16_test_vk_data`
This would generate a Groth16 verifier contract for the given G16 data (which consists on the G16_Vkey only) and store this contract in `$pwd`.

### Options:
Expand All @@ -61,12 +61,11 @@ This would generate a Groth16 verifier contract for the given G16 data (which co
-V, --version: Print version

## License
Solidity 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.
For the rest of contracts/protocols and the CLI itself, this tooling is released under MIT/Apache license.
Solidity 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.

## Contributing
Feel free to explore, use, and contribute to Solidity Verifier as we strive to enhance privacy and scalability in the blockchain space!
We 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.
Feel free to explore, use, and contribute to Solidity Verifiers CLI as we strive to enhance privacy and scalability in the blockchain space!
We 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.



9 changes: 4 additions & 5 deletions cli/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Protocol {
}
}

const ABOUT: &str = "A powerful Command-Line Interface (CLI) tool designed to simplify the generation of Solidity smart contracts that verify proofs of Zero Knowledge cryptographic protocols.
const ABOUT: &str = "A Command-Line Interface (CLI) tool designed to simplify the generation of Solidity smart contracts that verify proofs of Zero Knowledge cryptographic protocols.
";

const LONG_ABOUT: &str = "
Expand All @@ -68,10 +68,9 @@ const LONG_ABOUT: &str = "
| () || () || () || () || () || () || () |
|______||______||______||______||______||______||______|
Welcome 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.
for Zero Knowledge protocols. This tool is developed by the collaborative efforts of the PSE (Privacy & Scaling Explorations) and 0XPARC teams.
Welcome 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.
As an open-source project, Solidity Verifier is released under the GPL3 license.
Solidity 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.
Solidity Verifier currently supports the generation of Solidity smart contracts for the verification of proofs in the following Zero Knowledge protocols:
Expand All @@ -82,7 +81,7 @@ Solidity Verifier currently supports the generation of Solidity smart contracts
Uses the Kate-Zaverucha-Goldberg polynomial commitment scheme.
Nova + CycleFold Decider:
Implements the decider circuit verification for the Nova zero-knowledge proof system in conjunction with the CycleFold protocol optimization.
Implements the decider circuit verification for the Nova proof system in conjunction with the CycleFold protocol optimization.
";
#[derive(Debug, Parser)]
#[command(author = "0XPARC & PSE", version, about = ABOUT, long_about = Some(LONG_ABOUT))]
Expand Down
3 changes: 2 additions & 1 deletion solidity-verifiers/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# `solidity-verifiers`

This crate implements templating logic to output verifier contracts for `folding-schemes`-generated decider proofs.
This crate implements templating logic to output verifier contracts for `folding-schemes`-generated decider proofs.
This crate is accompanied with the [cli](cli) crate, which allows to generate the Solidity contracts from the command line.

0 comments on commit 8a81088

Please sign in to comment.