Conversation
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>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| 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"), | ||
| }, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.