Integration of trusted setup credentialAtomicQuery circuits#364
Merged
Integration of trusted setup credentialAtomicQuery circuits#364
Conversation
Contributor
There was a problem hiding this comment.
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>
volodymyr-basiuk
previously approved these changes
Nov 13, 2025
vmidyllic
reviewed
Dec 3, 2025
| CircuitId.AuthV3_8_32, | ||
| CircuitId.AtomicQueryV3Stable, | ||
| CircuitId.AtomicQueryV3Stable_16_16_64, | ||
| CircuitId.AtomicQueryV3Universal, |
|
|
||
| let targetCircuitId = provingMethodAlg.circuitId as CircuitId; | ||
|
|
||
| const testHash = Uint8Array.from(new Array(32).fill(0).map((_, index) => index)); |
Collaborator
Author
There was a problem hiding this comment.
dummy bytes to get targetcircuitid
…ecated packages and update package-lock.json accordingly.
…ircuit validation
* chore: update js-jwz dependency to version 1.13.0 refactor: enhance circuit validator type definition for better clarity and maintainability feat: add new error constant for unknown proving parameters refactor: update ZKPPacker to support dynamic proving and verification parameters refactor: modify types for dynamic proving and verification parameters in packer types test: update auth tests to use new proving method structure test: adjust credential proposal tests to align with new proving method implementation test: revise encrypted issuance response tests to utilize updated proving method test: modify fetch tests to incorporate new proving method structure test: update payment request handler tests to reflect changes in proving method test: adjust revocation status tests to use new proving method structure test: refactor helper functions to accommodate dynamic proving and verification parameters test: enhance proving method mock to support new circuit structure test: update zkp tests to reflect changes in protocol message type constants * trigger pipeline
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.
No description provided.