Skip to content

Conversation

@rikysya
Copy link
Contributor

@rikysya rikysya commented Aug 22, 2023

Adds a command solidity verifier to generate snarkjs like solidity verifier contract which calls groth16 precompile under the hood.

@rikysya rikysya requested review from akorchyn and xcthulhu August 22, 2023 12:06
@rikysya rikysya self-assigned this Aug 22, 2023
@rikysya rikysya force-pushed the yv/zkutils/solidity-verifier branch 3 times, most recently from 7554a1d to d0e3bf4 Compare August 22, 2023 12:17
@rikysya rikysya changed the title zkutils: cli tool to work with zero knowledge on GGX zkutils: add generate solidity groth16 verifier command Aug 22, 2023
@rikysya rikysya changed the title zkutils: add generate solidity groth16 verifier command zkutils: add generate groth16 solidity verifier command Aug 22, 2023
curve: String,
#[serde(rename = "nPublic")]
n_public: i128,
vk_alpha_1: [String; 3],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why vk_alpha_1 is 3 element vector if stpl defines it as 2 element vector. (same for vk_beta, vk_gamma, vk_delta)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because when u export a verification key o json in snarkjs it has 3 elements in the array, so it is parsed as 3 element vector. However, that third element is not needed in the template

Adds a command `solidity verifier` to  generate snarkjs like solidity
verifier contract which calls groth16 precompile under the hood.
@rikysya rikysya force-pushed the yv/zkutils/solidity-verifier branch from 793b340 to 681d073 Compare September 19, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants