Conversation
- Add generic AuthInputsFromJson[T] supporting AuthV2, AuthV3, and AuthV3_8_32 circuits with configurable BaseConfig - Deprecate AuthV2InputsFromJson in favor of the generic version - Migrate to Go 1.25 synctest.Test API (was synctest.Run) - Update CI to Go 1.25.5 and latest action versions
Use GenericInputsFromJson which routes to the generic AuthInputsFromJson[T] based on circuit ID.
Verify that the signature in auth inputs matches the challenge signed by the public key stored in the AuthClaim.
- Add CircuitID field to AtomicQueryInputsResponse to track selected circuit - Update marshalInputsResponse to include circuitId in JSON response - Modify AuthInputsFromJson to use AdjustInputsForMinCircuit for AuthV3Inputs - Refactor AtomicQueryV3InputsFromJson and AtomicQueryV3OnChainInputsFromJson to support adjustable circuit selection via internal functions - Add support for AtomicQueryV3StableCircuitID and AtomicQueryV3OnChainStableCircuitID with min circuit adjustment - Combine AuthV3CircuitID and AuthV3_8_32CircuitID cases in GenericInputsFromJson
- Add GenericInputsFromJson tests for AtomicQueryV3Stable and AtomicQueryV3OnChainStable circuits in inputs_sig_test.go - Add test for atomic_query_v3_on_chain_stable_mtp_inputs in cmd/polygonid/polygonid_test.go - Add test input/output fixtures for stable V3 circuits
Add wantCircuitID parameter to doTest function to verify that circuits return the expected CircuitID in their response. This ensures that AdjustInputsForMinCircuit is being called correctly for stable circuits.
Without these entries, selective disclosure queries and empty credentialSubject queries targeting V3 stable circuits would fail with "circuit not supported for selective disclosure."
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.
Summary
AdjustInputsForMinCircuitfunction from go-circuits to automatically select the minimum required circuit variantcircuitIdfield to JSON response for circuits using adjustmentAtomicQueryV3StableCircuitIDandAtomicQueryV3OnChainStableCircuitIDAtomicQueryV3InputsFromJsonandAtomicQueryV3OnChainInputsFromJsonto support both old and stable circuit IDsinputsCfgparameter fromAuthInputsFromJsonChanges
inputs_sig.go: Add internal functions for V3 input handling with configurable circuit IDs and adjustment, integrateAdjustInputsForMinCircuitfor AuthV3 and stable circuitscmd/polygonid/polygonid.go: AddcircuitIdfield to response JSONCircuitIDverification to test helperCircuits affected
AuthV3CircuitID/AuthV3_8_32CircuitID→ returnscircuitId: "authV3-8-32"AtomicQueryV3StableCircuitID→ returnscircuitId: "credentialAtomicQueryV3-16-16-64"AtomicQueryV3OnChainStableCircuitID→ returnscircuitId: "credentialAtomicQueryV3OnChain-16-16-64-16-32"Backward compatibility
AtomicQueryV3CircuitID,AtomicQueryV3OnChainCircuitID,AuthV2CircuitID) remain unchanged and do not returncircuitIdfield