Skip to content

Integration of trusted setup credentialAtomicQuery circuits#364

Merged
vmidyllic merged 30 commits intomainfrom
trusted-setup-v3
Jan 14, 2026
Merged

Integration of trusted setup credentialAtomicQuery circuits#364
vmidyllic merged 30 commits intomainfrom
trusted-setup-v3

Conversation

@Kolezhniuk
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 AtomicQueryV3UniversalPubSignals class 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.

Comment thread src/proof/verifiers/pub-signals-verifier.ts Outdated
Comment thread src/proof/provers/inputs-generator.ts Outdated
Comment thread src/proof/provers/inputs-generator.ts Outdated
Comment thread src/proof/verifiers/pub-signals-verifier.ts Outdated
Comment thread src/circuits/atomic-query-v3-universal.ts Outdated
Comment thread src/proof/provers/inputs-generator.ts Outdated
Comment thread src/proof/verifiers/pub-signals-verifier.ts Outdated
Comment thread src/proof/provers/inputs-generator.ts Outdated
Comment thread src/proof/provers/inputs-generator.ts Outdated
Comment thread src/proof/verifiers/pub-signals-verifier.ts Outdated
Kolezhniuk and others added 2 commits November 13, 2025 16:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/iden3comm/handlers/auth.ts Outdated
CircuitId.AuthV3_8_32,
CircuitId.AtomicQueryV3Stable,
CircuitId.AtomicQueryV3Stable_16_16_64,
CircuitId.AtomicQueryV3Universal,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove

Comment thread src/circuits/auth-v2.ts Outdated
Comment thread src/circuits/validator.ts Outdated
Comment thread src/iden3comm/packers/zkp.ts
Comment thread src/iden3comm/packers/zkp.ts Outdated

let targetCircuitId = provingMethodAlg.circuitId as CircuitId;

const testHash = Uint8Array.from(new Array(32).fill(0).map((_, index) => index));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what is that?

Copy link
Copy Markdown
Collaborator Author

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

Comment thread src/iden3comm/packers/zkp.ts Outdated
Comment thread src/iden3comm/packers/zkp.ts Outdated
Kolezhniuk and others added 9 commits December 5, 2025 09:38
…ecated packages and update package-lock.json accordingly.
* 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
@vmidyllic vmidyllic merged commit 65e925e into main Jan 14, 2026
2 checks passed
@vmidyllic vmidyllic deleted the trusted-setup-v3 branch January 14, 2026 10:00
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.

4 participants