-
Notifications
You must be signed in to change notification settings - Fork 41
Integration of trusted setup credentialAtomicQuery circuits #364
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates trusted setup credentialAtomicQuery circuits, adding support for multiple new circuit variants including stable versions, universal versions, and versions with different Merkle tree level configurations. It also refactors the LinkedMultiQuery implementation to support multiple query counts (3, 5, and 10).
Key Changes
- Added 10 new circuit IDs for stable, universal, and parameterized versions of AtomicQueryV3 circuits
- Refactored LinkedMultiQuery classes to accept dynamic query counts instead of hardcoding to 10
- Updated circuit validators, handlers, and verifiers to support new circuit types
- Added new
AtomicQueryV3UniversalPubSignalsclass for universal circuit variants - Enhanced BaseConfig with setter methods for MT levels and value array size
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| src/circuits/models.ts | Added 10 new CircuitId enum values for stable and universal circuit variants |
| src/circuits/linked-multi-query.ts | Refactored to support dynamic query counts via constructor parameter |
| src/circuits/atomic-query-v3.ts | Added constructor with optional MT level parameters and renamed variables for clarity |
| src/circuits/atomic-query-v3-universal.ts | New file implementing universal circuit variant pub signals handling |
| src/circuits/atomic-query-v3-on-chain.ts | Added constructor with optional MT level parameters including onchain levels |
| src/circuits/common.ts | Added setter methods for MT levels and max value array size configuration |
| src/circuits/index.ts | Exported new atomic-query-v3-universal module |
| src/storage/blockchain/onchain-zkp-verifier.ts | Extended support for new circuit IDs with proper MT level configuration |
| src/proof/verifiers/pub-signals-verifier.ts | Added verification methods for new circuit variants with dynamic naming |
| src/proof/provers/inputs-generator.ts | Added input generation methods for new circuits with MT level parameters |
| src/iden3comm/handlers/contract-request.ts | Added new circuit IDs to supported circuits list |
| src/iden3comm/handlers/auth.ts | Added new circuit IDs to supported circuits list |
| tests/circuits/linked-multi-query.test.ts | Refactored tests to validate multiple query counts (3, 5, 10) |
| tests/handlers/contract-request.test.ts | Updated tests to use new stable circuit IDs |
| tests/handlers/auth.test.ts | Updated tests to use new stable and universal circuit IDs |
| .github/workflows/ci.yaml | Added download and extraction of new credentialAtomicV3 circuits |
| package.json | Version bumped to 1.38.0 |
| package-lock.json | Updated lock file to reflect new version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| CircuitId.AuthV3_8_32, | ||
| CircuitId.AtomicQueryV3Stable, | ||
| CircuitId.AtomicQueryV3Stable_16_16_64, | ||
| CircuitId.AtomicQueryV3Universal, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
src/iden3comm/packers/zkp.ts
Outdated
|
|
||
| let targetCircuitId = provingMethodAlg.circuitId as CircuitId; | ||
|
|
||
| const testHash = Uint8Array.from(new Array(32).fill(0).map((_, index) => index)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dummy bytes to get targetcircuitid
…ecated packages and update package-lock.json accordingly.
…ircuit validation
No description provided.