Skip to content

Conversation

@Kolezhniuk
Copy link
Collaborator

Introduce support for dynamic circuits and improve circuit validation. Update dependencies and fix various tests. Refactor code for better maintainability and clarity.

Kolezhniuk and others added 30 commits November 6, 2025 19:33
…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
…reparation

- Cred V3 circuits without authV3 dynamic choose
- Updated `mergeObjects` utility to handle undefined inputs gracefully.
@Kolezhniuk Kolezhniuk changed the title Refactor and enhance support for AuthV3 and AtomicQueryV3 Refactor and enhance support and AtomicQueryV3 Jan 7, 2026
Copy link
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 pull request introduces support for dynamic circuits and enhances circuit validation in the JavaScript SDK. The changes enable the system to dynamically select appropriate circuit versions based on Merkle tree proof depths and query counts, improving flexibility and maintainability.

Changes:

  • Added new stable circuit IDs (AtomicQueryV3Stable, AtomicQueryV3OnChainStable, LinkedMultiQuery10Stable) with support for dynamic sub-versions
  • Refactored circuit validation logic into a dedicated validator.ts module with support for circuit sub-versions
  • Updated input generators and proof services to dynamically select optimal circuit versions based on proof characteristics
  • Enhanced test coverage with new validation tests and parameterized linked multi-query tests
  • Updated dependencies (vitest 3.2.4 → 4.0.15) and improved CI workflow

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Updated vitest dependency to version 4.0.15
tests/storage/eth-state-storage.test.ts Refactored mocks using vi.hoisted for proper mock hoisting
tests/iden3comm/zkp.test.ts Reorganized imports and updated to use PROTOCOL_CONSTANTS
tests/iden3comm/mock/proving.ts Added supportedCircuits getter method
tests/handlers/*.test.ts Fixed variable declarations and added type annotations
tests/circuits/validator.test.ts New comprehensive test suite for circuit validation
tests/circuits/linked-multi-query.test.ts Parameterized tests for different query counts (3, 5, 10)
src/circuits/validator.ts New module implementing circuit validation with sub-version support
src/circuits/models.ts Added stable circuit ID enums
src/circuits/*.ts Added constructors with options for dynamic MT level configuration
src/proof/provers/inputs-generator.ts Implemented dynamic circuit selection based on proof depths
src/proof/verifiers/*.ts Updated to handle circuit sub-versions
src/storage/blockchain/onchain-zkp-verifier.ts Extended support for AuthV3 and stable circuit variants
src/iden3comm/handlers/*.ts Added support for stable circuit IDs
src/utils/object.ts Improved null safety with default parameters
.github/workflows/ci.yaml Added credentialAtomicV3 circuit download step

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vmidyllic vmidyllic merged commit 4184815 into main Jan 14, 2026
2 checks passed
@vmidyllic vmidyllic deleted the feat/trusted-setup-v3-without-auth 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