Skip to content

feat: trusted setup v3 without auth#96

Merged
vmidyllic merged 17 commits intomainfrom
feat/trusted-setup-v3-without-auth
Jan 20, 2026
Merged

feat: trusted setup v3 without auth#96
vmidyllic merged 17 commits intomainfrom
feat/trusted-setup-v3-without-auth

Conversation

@volodymyr-basiuk
Copy link
Contributor

No description provided.

Kolezhniuk and others added 10 commits November 17, 2025 10:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 trusted setup v3 circuits without authentication requirements. It adds a new validation framework for circuit management with support for circuit subversions and parameterized query lengths.

Changes:

  • Added validator infrastructure with CircuitValidator map defining validation rules and subversions for all circuit types
  • Enhanced LinkedMultiQuery circuits to support configurable query lengths (3, 5, 10) instead of hardcoded value
  • Registered new stable circuit IDs for AtomicQueryV3, AtomicQueryV3OnChain, and LinkedMultiQuery10

Reviewed changes

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

Show a summary per file
File Description
validator.go New validation framework with circuit rules, operations lists, and helper functions for managing circuit IDs and their subversions
validator_test.go Comprehensive test coverage for validator functions including filtering, grouping, and subversion lookup
linkedMultiQuery.go Added QueryLength field to support variable query counts; updated InputsMarshal and PubSignalsUnmarshal to use configurable lengths; added missing strconv import
linkedMultiQuery_test.go Updated tests to validate QueryLength functionality with test cases for 3, 5, and 10 queries
circuits.go Added stable circuit ID constants and registered LinkedMultiQuery circuits with QueryLength configuration

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

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

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


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

Comment on lines 92 to 128
SubVersions: []CircuitSubversion{
{
MTLevel: intPtr(16),
MTLevelClaim: intPtr(16),
TargetCircuitId: CircuitID(string(AtomicQueryV3StableCircuitID) + "-16-16-64"),
},
},
},

AtomicQueryV3OnChainStableCircuitID: {
Validation: credentialAtomicQueryV3Validation.Validation,
SubVersions: []CircuitSubversion{
{
MTLevel: intPtr(16),
MTLevelClaim: intPtr(16),
MTLevelOnChain: intPtr(32),
TargetCircuitId: CircuitID(string(AtomicQueryV3OnChainStableCircuitID) + "-16-16-64-16-32"),
},
},
},

LinkedMultiQuery10StableCircuitID: {
Validation: Validation{
MaxQueriesCount: 10,
SupportedOperations: AllOperations,
},
SubVersions: []CircuitSubversion{
{
QueryCount: intPtr(3),
TargetCircuitId: CircuitID(string(LinkedMultiQuery10StableCircuitID[:len(LinkedMultiQuery10StableCircuitID)-2]) + "3"),
},
{
QueryCount: intPtr(5),
TargetCircuitId: CircuitID(string(LinkedMultiQuery10StableCircuitID[:len(LinkedMultiQuery10StableCircuitID)-2]) + "5"),
},
},
},
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The subversion circuit IDs (e.g., "credentialAtomicQueryV3-16-16-64", "linkedMultiQuery3", etc.) defined in the SubVersions arrays are not registered in the circuit registry via RegisterCircuit(). Functions like GetCircuitIdsWithSubVersions return these IDs, but if a consumer attempts to use them with GetCircuit or UnmarshalCircuitOutput, they will receive ErrorCircuitIDNotFound. If these subversion IDs represent distinct circuit implementations that should be usable independently, they need to be registered. If they are only metadata for validation/grouping purposes, consider adding documentation clarifying their intended use and limitations.

Copilot uses AI. Check for mistakes.
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


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

vmidyllic
vmidyllic previously approved these changes Jan 19, 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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


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

@vmidyllic vmidyllic merged commit f575cd6 into main Jan 20, 2026
4 checks passed
@vmidyllic vmidyllic deleted the feat/trusted-setup-v3-without-auth branch January 20, 2026 13:17
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.

3 participants