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

Add NUMBER_OF_INPUTS to poseidon-proof #124

Merged
merged 5 commits into from
Jan 16, 2024
Merged

Add NUMBER_OF_INPUTS to poseidon-proof #124

merged 5 commits into from
Jan 16, 2024

Conversation

0xjei
Copy link
Member

@0xjei 0xjei commented Jan 12, 2024

Related Issue

Closes #116

Does this introduce a breaking change?

  • Yes
  • No

Other Information

This PR introduces the use of digest to compute the nullifier output signal instead of the preimage as specified in the #116.

Note that the number of constraints for NUMBER_OF_INPUTS = 1 is the same as in the previous implementation. As this number increases, the complexity of the circuit increases.

The @zk-kit/poseidon-proof package will be updated accordingly.

Todos

  • Update the 'getArtifacts' methods based on the number
    of inputs.
  • Update the 'circomkit' configuration to support 'scope'
    as a public signal.
  • Bug: In the 'poseidon-proof' package, 'digest' and 'nullifier' are inverted in the return of the 'generate' method.
  • Generate artifacts for a different number of inputs (1 <= noi
    <= 16).
  • Make 'verification-keys.json' support the corresponding key per input (matrix for 'vk_delta_2' and
    'IC').
  • Add missing tests.
  • Update remote artifacts @cedoor

@0xjei 0xjei requested a review from cedoor January 12, 2024 11:18
Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

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

Great job, just a few corrections in the comments!

packages/circuits/README.md Outdated Show resolved Hide resolved
packages/circuits/circom/poseidon-proof.circom Outdated Show resolved Hide resolved
packages/circuits/circom/poseidon-proof.circom Outdated Show resolved Hide resolved
@0xjei 0xjei marked this pull request as draft January 12, 2024 18:04
@0xjei
Copy link
Member Author

0xjei commented Jan 12, 2024

Converted to draft to make changes to @zk-kit/poseidon-proof before merging this feature.

@0xjei 0xjei requested a review from cedoor January 16, 2024 11:08
@0xjei 0xjei marked this pull request as ready for review January 16, 2024 13:36
@0xjei
Copy link
Member Author

0xjei commented Jan 16, 2024

Ready for review @cedoor

Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

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

Great job @0xjei! Just a small fix for a bug that was already there before your PR.

@cedoor cedoor self-requested a review January 16, 2024 16:07
@cedoor cedoor merged commit 6f17255 into main Jan 16, 2024
2 checks passed
@cedoor cedoor deleted the poseidon-proof/inputs branch January 16, 2024 16:20
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.

Add numberOfInputs parameter to PoseidonProof circuit
2 participants