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 Semaphore v4 circuits #467

Merged
merged 3 commits into from
Dec 15, 2023
Merged

New Semaphore v4 circuits #467

merged 3 commits into from
Dec 15, 2023

Conversation

cedoor
Copy link
Member

@cedoor cedoor commented Dec 5, 2023

Description

This PR updates the Semaphore circuit based on the findings from the analysis and research period described in the research repository. The main changes include:

  • The identity trapdoor and identity nullifier have been replaced with a single value, the private key, from which an EdDSA public key is derived. The Poseidon hash of the public key is the new identity commitment.
  • Some input and output names in the circuits have been changed.
    • External Nullifier → Scope
    • SignalHash → Message
    • NullifierHash → Nullifier
    • Siblings → Tree Siblings
    • Path Indices → Tree Indices
  • The new circuit uses Anonymous Components to make the code clearer and more concise (24 lines of code without comments, rather than 90).
  • The circuit used to calculate the Merkle tree root is now part of an external package (@zk-kit/circuits - BinaryMerkleRoot) and supports dynamic depths.

Related Issue

#357

Does this introduce a breaking change?

  • Yes
  • No

@cedoor cedoor linked an issue Dec 5, 2023 that may be closed by this pull request
@cedoor cedoor marked this pull request as ready for review December 15, 2023 13:45
@cedoor cedoor merged commit baefb71 into feat/semaphore-v4 Dec 15, 2023
3 checks passed
@cedoor cedoor deleted the feat/v4-circuit branch December 19, 2023 15:54
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.

Integrate Semaphore v4 changes into the protocol
1 participant