From d2da280acc60c33474b7a8ce6647c1aedf75020e Mon Sep 17 00:00:00 2001 From: Vladyslav Munin Date: Thu, 15 Jan 2026 17:35:05 +0200 Subject: [PATCH 1/2] rename linkedMultiQuery10.circom to linkedMultiQuery10 as base fix Universal Circuit --- ...tialAtomicQueryV3Universal-16-16-64.circom | 9 --- .../credentialAtomicQueryV3Universal.circom | 11 +--- ...Query10.circom => linkedMultiQuery.circom} | 0 .../credentialAtomicQueryV3Universal.circom | 2 +- test/linked/linked.test.ts | 36 ++++++++---- .../v3-universal/v3_universal_test.go | 55 ++++--------------- 6 files changed, 39 insertions(+), 74 deletions(-) rename circuits/{linkedMultiQuery10.circom => linkedMultiQuery.circom} (100%) diff --git a/circuits/credentialAtomicQueryV3Universal-16-16-64.circom b/circuits/credentialAtomicQueryV3Universal-16-16-64.circom index c06fbd5..fa06147 100644 --- a/circuits/credentialAtomicQueryV3Universal-16-16-64.circom +++ b/circuits/credentialAtomicQueryV3Universal-16-16-64.circom @@ -14,15 +14,6 @@ circuitQueryHash - hash of the query component main{public [requestID, issuerID, issuerClaimNonRevState, - claimSchema, - slotIndex, - claimPathKey, - operator, - value, - valueArraySize, timestamp, - isRevocationChecked, proofType, - verifierID, - nullifierSessionID ]} = credentialAtomicQueryV3Universal(16, 16, 64); // issuerLevels, claimLevels, maxValueArraySize diff --git a/circuits/credentialAtomicQueryV3Universal.circom b/circuits/credentialAtomicQueryV3Universal.circom index 5538023..5e62628 100644 --- a/circuits/credentialAtomicQueryV3Universal.circom +++ b/circuits/credentialAtomicQueryV3Universal.circom @@ -14,15 +14,6 @@ circuitQueryHash - hash of the query component main{public [requestID, issuerID, issuerClaimNonRevState, - claimSchema, - slotIndex, - claimPathKey, - operator, - value, - valueArraySize, timestamp, - isRevocationChecked, - proofType, - verifierID, - nullifierSessionID + proofType ]} = credentialAtomicQueryV3Universal(40, 32, 64); // issuerLevels, claimLevels, maxValueArraySize diff --git a/circuits/linkedMultiQuery10.circom b/circuits/linkedMultiQuery.circom similarity index 100% rename from circuits/linkedMultiQuery10.circom rename to circuits/linkedMultiQuery.circom diff --git a/circuits/universal/credentialAtomicQueryV3Universal.circom b/circuits/universal/credentialAtomicQueryV3Universal.circom index dc74abc..58092ef 100644 --- a/circuits/universal/credentialAtomicQueryV3Universal.circom +++ b/circuits/universal/credentialAtomicQueryV3Universal.circom @@ -122,7 +122,7 @@ template credentialAtomicQueryV3Universal(issuerLevels, claimLevels, maxValueArr // on root stored in the index or value slot // if it is not set verification is performed on according to the slotIndex. Value selected from the // provided slot. For example if slotIndex is `1` value gets from `i_1` slot. If `4` from `v_1`. -signal {binary} merklized; + signal {binary} merklized; ///////////////////////////////////////////////////////////////// // Claim checks diff --git a/test/linked/linked.test.ts b/test/linked/linked.test.ts index 7b74780..f4e5c43 100644 --- a/test/linked/linked.test.ts +++ b/test/linked/linked.test.ts @@ -4,7 +4,7 @@ import {describe} from "mocha"; const path = require("path"); const wasmTester = require("circom_tester").wasm; -describe("Test linkedMultiQuery10.circom", function () { +describe("Test linkedMultiQuery.circom", function () { this.timeout(600000); @@ -12,7 +12,7 @@ describe("Test linkedMultiQuery10.circom", function () { before(async () => { circuit = await wasmTester( - path.join(__dirname, "../../circuits", "linkedMultiQuery10.circom"), + path.join(__dirname, "../../circuits", "linkedMultiQuery.circom"), { output: path.join(__dirname, "circuits", "build"), recompile: true, @@ -27,16 +27,30 @@ describe("Test linkedMultiQuery10.circom", function () { const basePath = '../../testvectorgen/credentials/linked/testdata/linked' const tests = [ - - require(`${basePath}/one_query.json`), - require(`${basePath}/two_queries.json`), - - ]; - - tests.forEach(({ desc, inputs, expOut }) => { - it(`${desc}`, async function () { + { + // inputs: { + // "linkNonce": "3860561941", + // "issuerClaim": ["14559690932601973492667815902177586678096", "23597358116972502698309321666701381459105960451015106706415894324612174593", "2400985832383777933233986205414344849374529340132121408422443235930932403341", "0", "51531466563951178374901246710", "0", "0", "0"], + // "claimSchema": "267831521922558027206082390043321796944", + // "claimPathMtp": [["5433475593540395687384408401274499191839428862895440185136034532207056354200", "4416905782925683035005765899784190996116279148980814224749850607033393245834", "21457728049961102716813236657055316536030743743453031009083033402947062275688", "0", "19734609022584829624881871453451110035293293487453377146057502153399656111187", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"]], + // "claimPathMtpNoAux": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], + // "claimPathMtpAuxHi": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], + // "claimPathMtpAuxHv": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], + // "claimPathKey": ["20376033832371109177683048456014525905119173674985843915445634726167450989630", "0", "0", "0", "0", "0", "0", "0", "0", "0"], + // "claimPathValue": ["19960424", "0", "0", "0", "0", "0", "0", "0", "0", "0"], + // "slotIndex": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + // "operator": [16, 0, 0, 0, 0, 0, 0, 0, 0, 0], + // "value": [["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"]], + // "valueArraySize": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + // } + inputs:{"linkNonce":"4029248554","issuerClaim":["14559690932601973492667815902177586678096","20927073445186437385454268156055014279341438013836607254259689661727642369","10816943288451085883186710588872695360529399522782203813992241328855698998018","0","51531466563951178374029683993","0","0","0"],"claimSchema":"267831521922558027206082390043321796944","claimPathMtp":[["16955404803359275601769987599247659869283059334428967317705110906207328926240","4416905782925683035005765899784190996116279148980814224749850607033393245834","8616647543389679452081311506198901964192594793765044217170396206231552885960","0","19734609022584829624881871453451110035293293487453377146057502153399656111187","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"claimPathMtpNoAux":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHi":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHv":["0","0","0","0","0","0","0","0","0","0"],"claimPathKey":["20376033832371109177683048456014525905119173674985843915445634726167450989630","0","0","0","0","0","0","0","0","0"],"claimPathValue":["19960424","0","0","0","0","0","0","0","0","0"],"slotIndex":[0,0,0,0,0,0,0,0,0,0],"operator":[16,0,0,0,0,0,0,0,0,0],"value":[["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"valueArraySize":[0,0,0,0,0,0,0,0,0,0]} + // inputs: {"linkNonce":"3834631524","issuerClaim":["14559690932601973492667815902177586678096","19863407035974428031364946106296478148674178083098199547972467659974316801","63792667817638590026836691796150512385663252089453945757139506567511169292","0","51531466563951178373528715762","0","0","0"],"claimSchema":"267831521922558027206082390043321796944","claimPathMtp":[["19362069604312440445136460246549442139717496873678059311398167531186853120688","4416905782925683035005765899784190996116279148980814224749850607033393245834","18161050803228641002345371227604090439027231557959679767749965844950948819256","0","19734609022584829624881871453451110035293293487453377146057502153399656111187","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"claimPathMtpNoAux":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHi":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHv":["0","0","0","0","0","0","0","0","0","0"],"claimPathKey":["20376033832371109177683048456014525905119173674985843915445634726167450989630","0","0","0","0","0","0","0","0","0"],"claimPathValue":["19960424","0","0","0","0","0","0","0","0","0"],"slotIndex":[0,0,0,0,0,0,0,0,0,0],"operator":[2,0,0,0,0,0,0,0,0,0],"value":[["1000000000","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"valueArraySize":[1,0,0,0,0,0,0,0,0,0]} + }]; + + tests.forEach(({ inputs }) => { + it(`tset`, async function () { const w = await circuit.calculateWitness(inputs, true); - await circuit.assertOut(w, expOut); + await circuit.assertOut(w, {}); await circuit.checkConstraints(w); }); }); diff --git a/testvectorgen/credentials/v3-universal/v3_universal_test.go b/testvectorgen/credentials/v3-universal/v3_universal_test.go index 03deb9a..0d0c6b4 100644 --- a/testvectorgen/credentials/v3-universal/v3_universal_test.go +++ b/testvectorgen/credentials/v3-universal/v3_universal_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "math/big" - "strconv" "testing" "test/utils" @@ -99,27 +98,17 @@ type Inputs struct { } type Outputs struct { - RequestID string `json:"requestID"` - UserID string `json:"userID"` - IssuerID string `json:"issuerID"` - IssuerClaimNonRevState string `json:"issuerClaimNonRevState"` - ClaimSchema string `json:"claimSchema"` - SlotIndex string `json:"slotIndex"` - Operator int `json:"operator"` - ClaimPathKey string `json:"claimPathKey"` - Value []string `json:"value"` - ValueArraySize int `json:"valueArraySize"` - Timestamp string `json:"timestamp"` - Merklized string `json:"merklized"` - ProofType string `json:"proofType"` // 1 for sig, 2 for mtp - IsRevocationChecked string `json:"isRevocationChecked"` - IssuerState string `json:"issuerState"` - LinkID string `json:"linkID"` - VerifierID string `json:"verifierID"` - NullifierSessionID string `json:"nullifierSessionID"` - OperatorOutput string `json:"operatorOutput"` - Nullifier string `json:"nullifier"` - CircuitQueryHash string `json:"circuitQueryHash"` + RequestID string `json:"requestID"` + UserID string `json:"userID"` + IssuerID string `json:"issuerID"` + IssuerClaimNonRevState string `json:"issuerClaimNonRevState"` + Timestamp string `json:"timestamp"` + ProofType string `json:"proofType"` // 1 for sig, 2 for mtp + IssuerState string `json:"issuerState"` + LinkID string `json:"linkID"` + OperatorOutput string `json:"operatorOutput"` + Nullifier string `json:"nullifier"` + CircuitQueryHash string `json:"circuitQueryHash"` } type TestData struct { @@ -564,21 +553,11 @@ func generateTestDataWithOperatorAndRevCheck(t *testing.T, desc string, isUserID UserID: userProfileID.BigInt().String(), IssuerID: issuer.ID.BigInt().String(), IssuerClaimNonRevState: issuer.State(t).String(), - ClaimSchema: "180410020913331409885634153623124536270", - SlotIndex: strconv.Itoa(slotIndex), - ClaimPathKey: claimPathKey, - Operator: operator, - Value: valueInput, - ValueArraySize: valueArrSize, Timestamp: timestamp, - Merklized: merklized, - IsRevocationChecked: strconv.Itoa(isRevocationChecked), ProofType: proofType, IssuerState: issuerState, LinkID: linkID, OperatorOutput: operatorOutput, - VerifierID: inputs.VerifierID, - NullifierSessionID: inputs.NullifierSessionID, Nullifier: nullifier, CircuitQueryHash: circuitQueryHash, } @@ -713,20 +692,10 @@ func generateJSONLD_NON_INCLUSION_TestData(t *testing.T, isUserIDProfile, isSubj UserID: userProfileID.BigInt().String(), IssuerID: issuer.ID.BigInt().String(), IssuerClaimNonRevState: issuerClaimNonRevState.String(), - ClaimSchema: "180410020913331409885634153623124536270", - SlotIndex: "0", - Operator: utils.NOOP, - ClaimPathKey: pathKey.String(), - Value: utils.PrepareStrArray([]string{}, 64), - ValueArraySize: 0, Timestamp: timestamp, - Merklized: "1", IssuerState: issuerAuthState.String(), - IsRevocationChecked: "1", ProofType: "1", LinkID: "0", - VerifierID: inputs.VerifierID, - NullifierSessionID: inputs.NullifierSessionID, OperatorOutput: "0", Nullifier: "0", CircuitQueryHash: circuitQueryHash, @@ -740,7 +709,7 @@ func generateJSONLD_NON_INCLUSION_TestData(t *testing.T, isUserIDProfile, isSubj require.NoError(t, err) utils.SaveTestVector(t, fileName, string(jsonData)) -} +} func calculateCircuitQueryHash(t *testing.T, inputs Inputs, merklized string, pathKey *big.Int) (string, error) { merklizedBigInt, ok := big.NewInt(0).SetString(merklized, 10) From 50e4775872036209ceb897469129a74113d497a1 Mon Sep 17 00:00:00 2001 From: Vladyslav Munin Date: Thu, 15 Jan 2026 17:47:03 +0200 Subject: [PATCH 2/2] fix tests --- test/linked/linked.test.ts | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/test/linked/linked.test.ts b/test/linked/linked.test.ts index f4e5c43..9e18f01 100644 --- a/test/linked/linked.test.ts +++ b/test/linked/linked.test.ts @@ -27,30 +27,16 @@ describe("Test linkedMultiQuery.circom", function () { const basePath = '../../testvectorgen/credentials/linked/testdata/linked' const tests = [ - { - // inputs: { - // "linkNonce": "3860561941", - // "issuerClaim": ["14559690932601973492667815902177586678096", "23597358116972502698309321666701381459105960451015106706415894324612174593", "2400985832383777933233986205414344849374529340132121408422443235930932403341", "0", "51531466563951178374901246710", "0", "0", "0"], - // "claimSchema": "267831521922558027206082390043321796944", - // "claimPathMtp": [["5433475593540395687384408401274499191839428862895440185136034532207056354200", "4416905782925683035005765899784190996116279148980814224749850607033393245834", "21457728049961102716813236657055316536030743743453031009083033402947062275688", "0", "19734609022584829624881871453451110035293293487453377146057502153399656111187", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"]], - // "claimPathMtpNoAux": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], - // "claimPathMtpAuxHi": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], - // "claimPathMtpAuxHv": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], - // "claimPathKey": ["20376033832371109177683048456014525905119173674985843915445634726167450989630", "0", "0", "0", "0", "0", "0", "0", "0", "0"], - // "claimPathValue": ["19960424", "0", "0", "0", "0", "0", "0", "0", "0", "0"], - // "slotIndex": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - // "operator": [16, 0, 0, 0, 0, 0, 0, 0, 0, 0], - // "value": [["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"]], - // "valueArraySize": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - // } - inputs:{"linkNonce":"4029248554","issuerClaim":["14559690932601973492667815902177586678096","20927073445186437385454268156055014279341438013836607254259689661727642369","10816943288451085883186710588872695360529399522782203813992241328855698998018","0","51531466563951178374029683993","0","0","0"],"claimSchema":"267831521922558027206082390043321796944","claimPathMtp":[["16955404803359275601769987599247659869283059334428967317705110906207328926240","4416905782925683035005765899784190996116279148980814224749850607033393245834","8616647543389679452081311506198901964192594793765044217170396206231552885960","0","19734609022584829624881871453451110035293293487453377146057502153399656111187","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"claimPathMtpNoAux":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHi":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHv":["0","0","0","0","0","0","0","0","0","0"],"claimPathKey":["20376033832371109177683048456014525905119173674985843915445634726167450989630","0","0","0","0","0","0","0","0","0"],"claimPathValue":["19960424","0","0","0","0","0","0","0","0","0"],"slotIndex":[0,0,0,0,0,0,0,0,0,0],"operator":[16,0,0,0,0,0,0,0,0,0],"value":[["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"valueArraySize":[0,0,0,0,0,0,0,0,0,0]} - // inputs: {"linkNonce":"3834631524","issuerClaim":["14559690932601973492667815902177586678096","19863407035974428031364946106296478148674178083098199547972467659974316801","63792667817638590026836691796150512385663252089453945757139506567511169292","0","51531466563951178373528715762","0","0","0"],"claimSchema":"267831521922558027206082390043321796944","claimPathMtp":[["19362069604312440445136460246549442139717496873678059311398167531186853120688","4416905782925683035005765899784190996116279148980814224749850607033393245834","18161050803228641002345371227604090439027231557959679767749965844950948819256","0","19734609022584829624881871453451110035293293487453377146057502153399656111187","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"claimPathMtpNoAux":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHi":["0","0","0","0","0","0","0","0","0","0"],"claimPathMtpAuxHv":["0","0","0","0","0","0","0","0","0","0"],"claimPathKey":["20376033832371109177683048456014525905119173674985843915445634726167450989630","0","0","0","0","0","0","0","0","0"],"claimPathValue":["19960424","0","0","0","0","0","0","0","0","0"],"slotIndex":[0,0,0,0,0,0,0,0,0,0],"operator":[2,0,0,0,0,0,0,0,0,0],"value":[["1000000000","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]],"valueArraySize":[1,0,0,0,0,0,0,0,0,0]} - }]; - - tests.forEach(({ inputs }) => { - it(`tset`, async function () { + + require(`${basePath}/one_query.json`), + require(`${basePath}/two_queries.json`), + + ]; + + tests.forEach(({ desc, inputs, expOut }) => { + it(`${desc}`, async function () { const w = await circuit.calculateWitness(inputs, true); - await circuit.assertOut(w, {}); + await circuit.assertOut(w, expOut); await circuit.checkConstraints(w); }); });