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

feat(circuits): unify circuits compilation and zkey generation processes #1018

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

ctrlc03
Copy link
Collaborator

@ctrlc03 ctrlc03 commented Jan 15, 2024

Description

This PR amends how we build circuits with custom parameters and how we generate the zkeys. Previously we used zkey-manager from the cli folder, now given we use circomkit for testing, we can also use it to build custom circuits and generate the zkeys. The goal is to simplify the process to users.

Should a user/developer wish to build the circuits and generate the zkeys for testing, all they would have to do now is to run the following from the root of the monorepo:

pnpm build:circuits-c / build:circuits-wasm
setup:zkeys

To generate custom circuits, this can be done by changing the circuits/circom/circuits.json file.

The documentation and ci workflows have been updated to reflect the changes.

Additional Notes

ps. I had to add big-integer as a dev dependency as it looks like it's needed by optimisedmt (and was shared by some dependency of zkey-manager before)

Confirmation

Copy link

netlify bot commented Jan 15, 2024

Deploy Preview for maci-typedoc ready!

Name Link
🔨 Latest commit d79e9c0
🔍 Latest deploy log https://app.netlify.com/sites/maci-typedoc/deploys/65a559abd5e73400095c3908
😎 Deploy Preview https://deploy-preview-1018--maci-typedoc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch 3 times, most recently from 2fdf055 to b62ab6e Compare January 15, 2024 10:18
@ctrlc03 ctrlc03 changed the title faet(circuits): unify circuits compilation and zkey generation processes feat(circuits): unify circuits compilation and zkey generation processes Jan 15, 2024
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch 8 times, most recently from 23db1cb to 98eb3f0 Compare January 15, 2024 15:08
circuits/ts/compile.ts Outdated Show resolved Hide resolved
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch 2 times, most recently from 96a5239 to 30b34c2 Compare January 15, 2024 15:30
@ctrlc03 ctrlc03 added dependencies Pull requests that update a dependency file devops A DevOps related task testing Issue/PR related to tests documentation Improvements or additions to documentation circuits Related to the Circom circuits labels Jan 15, 2024
@ctrlc03 ctrlc03 requested a review from kittybest January 15, 2024 15:33
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch from 30b34c2 to d1b2345 Compare January 15, 2024 15:45
Copy link
Collaborator

@0xmad 0xmad left a comment

Choose a reason for hiding this comment

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

@ctrlc03 thanks, just some comments.

circuits/.gitignore Outdated Show resolved Hide resolved
contracts/package.json Outdated Show resolved Hide resolved
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch 2 times, most recently from 5085910 to 77411c0 Compare January 15, 2024 15:52
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch from 77411c0 to 95c377d Compare January 15, 2024 15:57
remove zkey-manager and custom scripts in favour of circomkit, to build circuits and generate
testing zkeys. Update docs to reflect the change.
@ctrlc03 ctrlc03 force-pushed the feat/unify-snark-processes branch from 95c377d to d79e9c0 Compare January 15, 2024 16:13
@ctrlc03 ctrlc03 requested a review from 0xmad January 15, 2024 16:24
@ctrlc03 ctrlc03 merged commit 13d879f into dev Jan 15, 2024
17 checks passed
@ctrlc03 ctrlc03 deleted the feat/unify-snark-processes branch January 15, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
circuits Related to the Circom circuits dependencies Pull requests that update a dependency file devops A DevOps related task documentation Improvements or additions to documentation testing Issue/PR related to tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants