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

New package for general-purpose zero-knowledge circuits #76

Merged
merged 17 commits into from
Nov 29, 2023
Merged

Conversation

cedoor
Copy link
Member

@cedoor cedoor commented Nov 22, 2023

Description

A new package for providing general-purpose zero-knowledge circuits has been added. As other projects/protocols become modularized, reusable circuits could be managed in this package, tested, and documented.

@zk-kit/circuits can be installed with NPM (or Yarn) and its circuits accessed from node_modules/@zk-kit/circuits.

Related Issue

Closes #73

Does this introduce a breaking change?

  • Yes
  • No

@cedoor cedoor changed the title New package for general-purpose Circom circuits New package for general-purpose zero-knowledge circuits Nov 28, 2023
@cedoor cedoor requested a review from 0xjei November 28, 2023 18:32
Copy link
Member

@0xjei 0xjei left a comment

Choose a reason for hiding this comment

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

Partial-review: great configs but the npm scripts are not working right now (both circom 2.1.5 and 2.1.6). Left some nits and comments but great work so far 👍

yarn circom:compile poseidon-proof

===| Compiling the circuit |===
Error: Compiler error:
Error: Command failed: circom --sym --wasm --r1cs -p bn128 -o ./build/poseidon-proof -l ../../node_modules/circomlib/circuits --verbose --inspect --O1 ./circuits/main/poseidon-proof.circom
error[P1014]:  The file ../poseidon-proof.circom to be included has not been found
 = Consider using compilation option -l to indicate include paths

packages/circuits/README.md Outdated Show resolved Hide resolved
packages/circuits/noir/.gitkeep Outdated Show resolved Hide resolved
@cedoor
Copy link
Member Author

cedoor commented Nov 29, 2023

yarn circom:compile poseidon-proof

===| Compiling the circuit |===
Error: Compiler error:
Error: Command failed: circom --sym --wasm --r1cs -p bn128 -o ./build/poseidon-proof -l ../../node_modules/circomlib/circuits --verbose --inspect --O1 ./circuits/main/poseidon-proof.circom
error[P1014]:  The file ../poseidon-proof.circom to be included has not been found
 = Consider using compilation option -l to indicate include paths

It's a circomkit bug: erhant/circomkit#33. I'll update it as soon as it's solved.

@cedoor cedoor marked this pull request as ready for review November 29, 2023 13:36
@cedoor cedoor requested a review from 0xjei November 29, 2023 13:37
Copy link
Member

@0xjei 0xjei left a comment

Choose a reason for hiding this comment

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

Great! This is going to be a masterpiece for circuit development not only for PSE. Just left some comments and nits but ready to be merged :)

.github/workflows/pull-requests.yml Show resolved Hide resolved
package.json Show resolved Hide resolved
packages/circuits/README.md Show resolved Hide resolved
@cedoor cedoor merged commit 913eda6 into main Nov 29, 2023
2 checks passed
@cedoor cedoor deleted the feat/circuits branch November 29, 2023 17:12
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.

Create a package for Circom circuits
2 participants