Repository navigation
Conversation
Add detailed FAQ explanation on how and when to use multiple scopes in Semaphore proofs, addressing issue semaphore-protocol#516. Covers nullifier uniqueness and unlinkability derivation, practical scenarios such as multi-vote polling systems, a complete TypeScript code example, and verifier state tracking guidance.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
Adds a comprehensive FAQ entry in the Semaphore v4 documentation (
apps/docs/versioned_docs/version-V4/faq.md) detailing how and when to use multiple scopes in Semaphore proofs.Problem
As reported in #516, the documentation previously only described single-scope setups (e.g. using group ID as scope). Developers building applications where a user must generate multiple proofs in related contexts (such as multi-question polling ballots, round-based signaling, or multi-action interactions) lacked guidance on how nullifier derivation behaves across scopes, how unlinkability is preserved, and how to structure multiple scopes with the TypeScript SDK.
Implementation
## How and when can multiple scopes be used in Semaphore proofs?toapps/docs/versioned_docs/version-V4/faq.md.nullifier = Poseidon(scope, secretScalar)from the Semaphore circuit.@semaphore-protocol/proof,@semaphore-protocol/group, and@semaphore-protocol/identity.Testing
Executed local verification suite:
npx prettier -c apps/docs/versioned_docs/version-V4/faq.md: All files conform to Prettier code style.yarn workspace semaphore-docs build: Production Docusaurus build generated static files for bothenandeslocales with 0 build errors.yarn test:library proof: 11/11 unit tests passed for@semaphore-protocol/proof(Groth16 proof generation and verification).npx commitlint: Passed conventional commit validation fordocs(docs): ....Scope
This PR focuses exclusively on documentation and developer guidance for Semaphore v4. It does not alter cryptographic circuits, contract logic, or package interfaces.
Related Issue(s)
Closes #516
Checklist
yarn formatandyarn lintwithout getting any errors