Skip to content

Commit

Permalink
Merge pull request #1107 from privacy-scaling-explorations/deps/circo…
Browse files Browse the repository at this point in the history
…mkit

chore(deps): update circomkit to latest version and add console logs
  • Loading branch information
0xmad authored Jan 26, 2024
2 parents f870e89 + 9f7ec50 commit 0b8f13c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion circuits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@zk-kit/circuits": "^0.3.0",
"circomkit": "^0.0.20",
"circomkit": "^0.0.21",
"circomlib": "^2.0.5",
"maci-core": "^1.1.2",
"maci-crypto": "^1.1.2",
Expand Down
3 changes: 3 additions & 0 deletions circuits/ts/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const compileCircuits = async (cWitness?: boolean, outputPath?: string):
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < circuitsConfigs.length; i += 1) {
const circuit = circuitsConfigs[i];
// eslint-disable-next-line no-console
console.log(`Compiling ${circuit.name}...`);

// eslint-disable-next-line no-await-in-loop
const outPath = await circomkitInstance.compile(circuit.name, circuit);

Expand Down
5 changes: 4 additions & 1 deletion circuits/ts/genZkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ export const generateZkeys = async (outputPath?: string): Promise<void> => {
for (let i = 0; i < circuitsConfigs.length; i += 1) {
const circuit = circuitsConfigs[i];

// eslint-disable-next-line no-console
console.log(`Generating zKey for ${circuit.name}...`);

// eslint-disable-next-line no-await-in-loop
const { proverKeyPath } = await circomkitInstance.setup(circuit.name);
// rename to zkey as circomkit changes to pkey
// rename the zkey
const zkeyPath = path.resolve(circomKitConfig.dirBuild, circuit.name, `${circuit.name}.0.zkey`);
fs.renameSync(proverKeyPath, zkeyPath);
}
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b8f13c

Please sign in to comment.