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

Snarkjs #48

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions zkp/circuits/gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ const processCircuit = async (circuit, ptau, skipSolidityGenaration) => {

log(circuit, `Generating test proving key with ${ptau}`);
await execAsync(
`snarkjs groth16 setup ${path.join(
`npx snarkjs groth16 setup ${path.join(
provingKeysRoot,
`${circuit}.r1cs`
)} ${ptauFile} ${zkeyOutput}`
);

log(circuit, `Generating verification key`);
await execAsync(
`snarkjs zkey export verificationkey ${zkeyOutput} ${path.join(
`npx snarkjs zkey export verificationkey ${zkeyOutput} ${path.join(
provingKeysRoot,
`${circuit}-vkey.json`
)}`
Expand All @@ -141,7 +141,7 @@ const processCircuit = async (circuit, ptau, skipSolidityGenaration) => {
`verifier_${circuit}.sol`
);
await execAsync(
`snarkjs zkey export solidityverifier ${zkeyOutput} ${solidityFile}`
`npx snarkjs zkey export solidityverifier ${zkeyOutput} ${solidityFile}`
);

log(circuit, `Modifying the contract name in the Solidity file`);
Expand Down
1 change: 1 addition & 0 deletions zkp/circuits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"devDependencies": {
"axios": "^1.7.3",
"p-limit": "^6.1.0",
"snarkjs": "^0.7.4",
"yargs": "^17.7.2"
}
}
Loading