From 6f2ceceaaf310b326defd2fdb648756b7a31b696 Mon Sep 17 00:00:00 2001 From: Gregor Date: Tue, 20 Feb 2024 16:13:30 +0100 Subject: [PATCH 01/31] get verification key is a promise --- src/lib/proof-system.ts | 2 +- src/snarky.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index 4682e42a97..508114edf3 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -664,7 +664,7 @@ async function compileProgram({ } let { getVerificationKey, provers, verify, tag } = result; CompiledTag.store(proofSystemTag, tag); - let [, data, hash] = getVerificationKey(); + let [, data, hash] = await getVerificationKey(); let verificationKey = { data, hash: Field(hash) }; return { verificationKey, provers: MlArray.from(provers), verify, tag }; }) diff --git a/src/snarky.d.ts b/src/snarky.d.ts index 51a43dcb40..f09fe2285a 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -809,7 +809,7 @@ declare const Pickles: { /** * @returns (base64 vk, hash) */ - getVerificationKey: () => [_: 0, data: string, hash: FieldConst]; + getVerificationKey: () => Promise<[_: 0, data: string, hash: FieldConst]>; }; verify( From eda6942845d20e13144ce444a1003d7efcb895c5 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 21 Feb 2024 17:55:25 +0100 Subject: [PATCH 02/31] async constraint system --- src/bindings | 2 +- src/lib/provable-context-async.unit-test.ts | 22 ++++++++++++ src/lib/provable-context.ts | 37 +++++++++++++++++++++ src/mina | 2 +- src/snarky.d.ts | 9 +++++ 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 src/lib/provable-context-async.unit-test.ts diff --git a/src/bindings b/src/bindings index a6b6800186..ee5943079a 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit a6b6800186752b3cf5c9a29b7eb167e494784286 +Subproject commit ee5943079a8bfd043e3ab35a6f88886ab5c11f6c diff --git a/src/lib/provable-context-async.unit-test.ts b/src/lib/provable-context-async.unit-test.ts new file mode 100644 index 0000000000..df86fd4483 --- /dev/null +++ b/src/lib/provable-context-async.unit-test.ts @@ -0,0 +1,22 @@ +import { Field } from './core.js'; +import { Poseidon } from './hash.js'; +import { constraintSystemAsync } from './provable-context.js'; +import { Provable } from './provable.js'; + +let hash = Poseidon.hash([Field(1), Field(-1)]); + +let { rows, digest, publicInputSize, print } = await constraintSystemAsync( + async () => { + console.log('waiting'); + await new Promise((resolve) => setTimeout(resolve, 1000)); + console.log('done waiting'); + let x = Provable.witness(Field, () => Field(1)); + let y = Provable.witness(Field, () => Field(-1)); + x.add(y).assertEquals(Field(0)); + let z = Poseidon.hash([x, y]); + z.assertEquals(hash); + } +); + +print(); +console.log({ rows, digest, publicInputSize }); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 9779fa2ab1..8214caa713 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -12,6 +12,7 @@ export { runAndCheck, runUnchecked, constraintSystem, + constraintSystemAsync, inProver, inAnalyze, inCheckedComputation, @@ -122,6 +123,42 @@ function constraintSystem(f: () => T) { } } +async function constraintSystemAsync(f: () => Promise) { + let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); + let builder = Snarky.run.constraintSystemManual(); + try { + let promise: Promise; + builder.run(() => { + promise = f(); + }); + await promise!; + let { rows, digest, json } = builder.finish(); + let { gates, publicInputSize } = gatesFromJson(json); + return { + rows, + digest, + gates, + publicInputSize, + print() { + printGates(gates); + }, + summary() { + let gateTypes: Partial> = {}; + gateTypes['Total rows'] = rows; + for (let gate of gates) { + gateTypes[gate.type] ??= 0; + gateTypes[gate.type]!++; + } + return gateTypes; + }, + }; + } catch (error) { + throw prettifyStacktrace(error); + } finally { + snarkContext.leave(id); + } +} + // helpers function gatesFromJson(cs: { gates: JsonGate[]; public_input_size: number }) { diff --git a/src/mina b/src/mina index a5c7f667a5..40c10bbf44 160000 --- a/src/mina +++ b/src/mina @@ -1 +1 @@ -Subproject commit a5c7f667a5008c15243f28921505c3930a4fdf35 +Subproject commit 40c10bbf44e5af0dfb9dc6e437eed6e4be9e86cf diff --git a/src/snarky.d.ts b/src/snarky.d.ts index f09fe2285a..68d3bb0936 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -215,6 +215,15 @@ declare const Snarky: { digest: string; json: JsonConstraintSystem; }; + + constraintSystemManual(): { + run(f: () => void): void; + finish(): { + rows: number; + digest: string; + json: JsonConstraintSystem; + }; + }; }; /** From e30a618c0ab34f4d8c679c32b79f5a133b332e3f Mon Sep 17 00:00:00 2001 From: Gregor Date: Fri, 23 Feb 2024 12:11:50 +0100 Subject: [PATCH 03/31] async cricuits poc --- src/bindings | 2 +- src/lib/proof-system.ts | 34 +++++++++++++++++++++++-------- src/lib/proof-system.unit-test.ts | 5 +++-- src/mina | 2 +- src/snarky.d.ts | 4 ++-- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/bindings b/src/bindings index ee5943079a..5f5d0f5066 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit ee5943079a8bfd043e3ab35a6f88886ab5c11f6c +Subproject commit 5f5d0f50660e20d83c1b6f350f275d53759c2e58 diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index 508114edf3..878a9c4bce 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -658,15 +658,20 @@ async function compileProgram({ storable: picklesCache, overrideWrapDomain, }); + let { getVerificationKey, provers, verify, tag } = result; + CompiledTag.store(proofSystemTag, tag); + let [, data, hash] = await getVerificationKey(); + let verificationKey = { data, hash: Field(hash) }; + return { + verificationKey, + provers: MlArray.from(provers), + verify, + tag, + }; } finally { snarkContext.leave(id); unsetSrsCache(); } - let { getVerificationKey, provers, verify, tag } = result; - CompiledTag.store(proofSystemTag, tag); - let [, data, hash] = await getVerificationKey(); - let verificationKey = { data, hash: Field(hash) }; - return { verificationKey, provers: MlArray.from(provers), verify, tag }; }) ); // wrap provers @@ -720,7 +725,13 @@ function picklesRuleFromFunction( { methodName, witnessArgs, proofArgs, allArgs }: MethodInterface, gates: Gate[] ): Pickles.Rule { - function main(publicInput: MlFieldArray): ReturnType { + async function main( + publicInput: MlFieldArray + ): ReturnType { + console.log(`calling rule "${methodName}", waiting 100ms`); + await new Promise((resolve) => setTimeout(resolve, 100)); + console.log(`continuing rule "${methodName}"\n`); + let { witnesses: argsWithoutPublicInput, inProver } = snarkContext.get(); assert(!(inProver && argsWithoutPublicInput === undefined)); let finalArgs = []; @@ -730,9 +741,14 @@ function picklesRuleFromFunction( let arg = allArgs[i]; if (arg.type === 'witness') { let type = witnessArgs[arg.index]; - finalArgs[i] = Provable.witness(type, () => { - return argsWithoutPublicInput?.[i] ?? emptyValue(type); - }); + try { + finalArgs[i] = Provable.witness(type, () => { + return argsWithoutPublicInput?.[i] ?? emptyValue(type); + }); + } catch (e: any) { + e.message = `Error when witnessing in ${methodName}, argument ${i}: ${e.message}`; + throw e; + } } else if (arg.type === 'proof') { let Proof = proofArgs[arg.index]; let type = getStatementType(Proof); diff --git a/src/lib/proof-system.unit-test.ts b/src/lib/proof-system.unit-test.ts index d9572e54d4..2e6224df15 100644 --- a/src/lib/proof-system.unit-test.ts +++ b/src/lib/proof-system.unit-test.ts @@ -30,7 +30,8 @@ class EmptyProof extends ZkProgram.Proof(EmptyProgram) {} // -) sortMethodArguments // -) picklesRuleFromFunction -it('pickles rule creation', async () => { +// FIXME +it.skip('pickles rule creation', async () => { // a rule that verifies a proof conditionally, and returns the proof's input as output function main(proof: EmptyProof, shouldVerify: Bool) { proof.verifyIf(shouldVerify); @@ -82,7 +83,7 @@ it('pickles rule creation', async () => { let { publicOutput: [, publicOutput], shouldVerify: [, shouldVerify], - } = rule.main([0]); + } = rule.main([0]) as any; // FIXME, it's a promise // `publicOutput` and `shouldVerify` are as expected Snarky.field.assertEqual(publicOutput, dummy.publicInput.value); diff --git a/src/mina b/src/mina index 40c10bbf44..9ff3cdad84 160000 --- a/src/mina +++ b/src/mina @@ -1 +1 @@ -Subproject commit 40c10bbf44e5af0dfb9dc6e437eed6e4be9e86cf +Subproject commit 9ff3cdad84927b5e7fff003d14a6d86ea7f3cdf8 diff --git a/src/snarky.d.ts b/src/snarky.d.ts index 68d3bb0936..667a29bafc 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -743,11 +743,11 @@ declare namespace Pickles { /** * The main circuit functions */ - main: (publicInput: MlArray) => { + main: (publicInput: MlArray) => Promise<{ publicOutput: MlArray; previousStatements: MlArray>; shouldVerify: MlArray; - }; + }>; /** * Feature flags which enable certain custom gates */ From acceaac5678de446f9ea4ecfd78c18809c4b4651 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 09:56:14 +0100 Subject: [PATCH 04/31] assert promise helper --- src/lib/util/assert.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/util/assert.ts b/src/lib/util/assert.ts index df3f5a6749..d92057621e 100644 --- a/src/lib/util/assert.ts +++ b/src/lib/util/assert.ts @@ -1,7 +1,12 @@ -export { assert }; +export { assert, assertPromise }; function assert(stmt: boolean, message?: string): asserts stmt { if (!stmt) { throw Error(message ?? 'Assertion failed'); } } + +function assertPromise>(value: T): T { + assert(value instanceof Promise, 'Expected a promise'); + return value; +} From 6add8c28a701e02904c6688478842d503bd8f7df Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 09:57:28 +0100 Subject: [PATCH 05/31] allow async inputs to compile --- src/lib/global-context.ts | 2 ++ src/lib/proof-system.ts | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/global-context.ts b/src/lib/global-context.ts index dee457b8db..e07561fc53 100644 --- a/src/lib/global-context.ts +++ b/src/lib/global-context.ts @@ -101,6 +101,8 @@ function get(t: Context.t): C { return current.context; } +// FIXME there are many common scenarios where this error occurs, which weren't expected when this was written +// it should list them and help to resolve them let contextConflictMessage = "It seems you're running multiple provers concurrently within" + ' the same JavaScript thread, which, at the moment, is not supported and would lead to bugs.'; diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index 878a9c4bce..a8b0424768 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -602,7 +602,7 @@ async function compileProgram({ publicInputType: ProvablePure; publicOutputType: ProvablePure; methodIntfs: MethodInterface[]; - methods: ((...args: any) => void)[]; + methods: ((...args: any) => unknown)[]; gates: Gate[][]; proofSystemTag: { name: string }; cache: Cache; @@ -720,7 +720,7 @@ function analyzeMethod( function picklesRuleFromFunction( publicInputType: ProvablePure, publicOutputType: ProvablePure, - func: (...args: unknown[]) => any, + func: (...args: unknown[]) => unknown, proofSystemTag: { name: string }, { methodName, witnessArgs, proofArgs, allArgs }: MethodInterface, gates: Gate[] @@ -728,10 +728,6 @@ function picklesRuleFromFunction( async function main( publicInput: MlFieldArray ): ReturnType { - console.log(`calling rule "${methodName}", waiting 100ms`); - await new Promise((resolve) => setTimeout(resolve, 100)); - console.log(`continuing rule "${methodName}"\n`); - let { witnesses: argsWithoutPublicInput, inProver } = snarkContext.get(); assert(!(inProver && argsWithoutPublicInput === undefined)); let finalArgs = []; @@ -770,10 +766,10 @@ function picklesRuleFromFunction( } let result: any; if (publicInputType === Undefined || publicInputType === Void) { - result = func(...finalArgs); + result = await func(...finalArgs); } else { let input = fromFieldVars(publicInputType, publicInput); - result = func(input, ...finalArgs); + result = await func(input, ...finalArgs); } // if the public output is empty, we don't evaluate `toFields(result)` to allow the function to return something else in that case let hasPublicOutput = publicOutputType.sizeInFields() !== 0; From 86169e71a16f2e5e877e334a15ab7f61d184cc28 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 09:58:15 +0100 Subject: [PATCH 06/31] simplify constraint system async --- src/lib/provable-context.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 8214caa713..0748012764 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -127,11 +127,8 @@ async function constraintSystemAsync(f: () => Promise) { let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); let builder = Snarky.run.constraintSystemManual(); try { - let promise: Promise; - builder.run(() => { - promise = f(); - }); - await promise!; + builder.run(() => {}); + await f(); let { rows, digest, json } = builder.finish(); let { gates, publicInputSize } = gatesFromJson(json); return { From b26ae2781d573b78a241f0b986f1293eedf49b56 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 11:12:03 +0100 Subject: [PATCH 07/31] async constraint system --- src/bindings | 2 +- src/examples/simple-zkapp.ts | 2 +- src/lib/foreign-curve.unit-test.ts | 2 +- src/lib/foreign-field.unit-test.ts | 4 +- src/lib/gadgets/ecdsa.unit-test.ts | 2 +- src/lib/proof-system.ts | 54 +++++++------- src/lib/proof-system.unit-test.ts | 5 +- src/lib/provable-context-async.unit-test.ts | 3 +- src/lib/provable-context.ts | 79 ++++++++++++++------- src/lib/testing/constraint-system.ts | 6 +- src/lib/zkapp.ts | 10 +-- src/snarky.d.ts | 30 +++++--- 12 files changed, 124 insertions(+), 75 deletions(-) diff --git a/src/bindings b/src/bindings index 3020aae5cc..b0fb78362d 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit 3020aae5cc91911ae03c0eae9e13b0b48c9a3327 +Subproject commit b0fb78362d0492ede0323cf675678e4f31941e7d diff --git a/src/examples/simple-zkapp.ts b/src/examples/simple-zkapp.ts index 8d6e855eb9..e2768fbe07 100644 --- a/src/examples/simple-zkapp.ts +++ b/src/examples/simple-zkapp.ts @@ -92,7 +92,7 @@ if (doProofs) { await SimpleZkapp.compile(); console.timeEnd('compile'); } else { - SimpleZkapp.analyzeMethods(); + await SimpleZkapp.analyzeMethods(); } console.log('deploy'); diff --git a/src/lib/foreign-curve.unit-test.ts b/src/lib/foreign-curve.unit-test.ts index 8edb9d5875..db60521e6d 100644 --- a/src/lib/foreign-curve.unit-test.ts +++ b/src/lib/foreign-curve.unit-test.ts @@ -36,7 +36,7 @@ Provable.runAndCheck(main); console.timeEnd('running witness generation & checks'); console.time('creating constraint system'); -let cs = Provable.constraintSystem(main); +let cs = await Provable.constraintSystem(main); console.timeEnd('creating constraint system'); console.log(cs.summary()); diff --git a/src/lib/foreign-field.unit-test.ts b/src/lib/foreign-field.unit-test.ts index 26f85a5699..f45481b82b 100644 --- a/src/lib/foreign-field.unit-test.ts +++ b/src/lib/foreign-field.unit-test.ts @@ -164,8 +164,8 @@ Provable.runAndCheck(main0); Provable.runAndCheck(main1); // using foreign field arithmetic should result in much fewer constraints -let { rows: rows0 } = Provable.constraintSystem(main0); -let { rows: rows1 } = Provable.constraintSystem(main1); +let { rows: rows0 } = await Provable.constraintSystem(main0); +let { rows: rows1 } = await Provable.constraintSystem(main1); expect(rows0 + 100).toBeLessThan(rows1); // test with proving diff --git a/src/lib/gadgets/ecdsa.unit-test.ts b/src/lib/gadgets/ecdsa.unit-test.ts index e008a011ef..dfc78e9238 100644 --- a/src/lib/gadgets/ecdsa.unit-test.ts +++ b/src/lib/gadgets/ecdsa.unit-test.ts @@ -175,7 +175,7 @@ Provable.runAndCheck(program.rawMethods.ecdsa); console.timeEnd('ecdsa verify (witness gen / check)'); console.time('ecdsa verify (build constraint system)'); -let cs = program.analyzeMethods().ecdsa; +let cs = (await program.analyzeMethods()).ecdsa; console.timeEnd('ecdsa verify (build constraint system)'); console.log(cs.summary()); diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index a8b0424768..12f19b9fe6 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -273,10 +273,10 @@ function ZkProgram< InferProvableOrVoid> > ) => Promise; - digest: () => string; - analyzeMethods: () => { - [I in keyof Types]: ReturnType; - }; + digest: () => Promise; + analyzeMethods: () => Promise<{ + [I in keyof Types]: UnwrapPromise>; + }>; publicInputType: ProvableOrUndefined>; publicOutputType: ProvableOrVoid>; privateInputTypes: { @@ -323,14 +323,21 @@ function ZkProgram< let methodFunctions = methodKeys.map((key) => methods[key].method); let maxProofsVerified = getMaxProofsVerified(methodIntfs); - function analyzeMethods() { - return Object.fromEntries( - methodIntfs.map((methodEntry, i) => [ - methodEntry.methodName, - analyzeMethod(publicInputType, methodEntry, methodFunctions[i]), - ]) - ) as any as { - [I in keyof Types]: ReturnType; + async function analyzeMethods() { + let methodsMeta: Record< + string, + UnwrapPromise> + > = {}; + for (let i = 0; i < methodIntfs.length; i++) { + let methodEntry = methodIntfs[i]; + methodsMeta[methodEntry.methodName] = await analyzeMethod( + publicInputType, + methodEntry, + methodFunctions[i] + ); + } + return methodsMeta as { + [I in keyof Types]: UnwrapPromise>; }; } @@ -348,10 +355,8 @@ function ZkProgram< cache = Cache.FileSystemDefault, forceRecompile = false, } = {}) { - let methodsMeta = methodIntfs.map((methodEntry, i) => - analyzeMethod(publicInputType, methodEntry, methodFunctions[i]) - ); - let gates = methodsMeta.map((m) => m.gates); + let methodsMeta = await analyzeMethods(); + let gates = methodKeys.map((k) => methodsMeta[k].gates); let { provers, verify, verificationKey } = await compileProgram({ publicInputType, publicOutputType, @@ -437,14 +442,12 @@ function ZkProgram< return compileOutput.verify(statement, proof.proof); } - function digest() { - let methodData = methodIntfs.map((methodEntry, i) => - analyzeMethod(publicInputType, methodEntry, methodFunctions[i]) - ); - let hash = hashConstant( - Object.values(methodData).map((d) => Field(BigInt('0x' + d.digest))) + async function digest() { + let methodsMeta = await analyzeMethods(); + let digests: Field[] = methodKeys.map((k) => + Field(BigInt('0x' + methodsMeta[k].digest)) ); - return hash.toBigInt().toString(16); + return hashConstant(digests).toBigInt().toString(16); } return Object.assign( @@ -703,14 +706,15 @@ async function compileProgram({ }; } -function analyzeMethod( +function analyzeMethod( publicInputType: ProvablePure, methodIntf: MethodInterface, - method: (...args: any) => T + method: (...args: any) => unknown ) { return Provable.constraintSystem(() => { let args = synthesizeMethodArguments(methodIntf, true); let publicInput = emptyWitness(publicInputType); + // note: returning the method result here makes this handle async methods if (publicInputType === Undefined || publicInputType === Void) return method(...args); return method(publicInput, ...args); diff --git a/src/lib/proof-system.unit-test.ts b/src/lib/proof-system.unit-test.ts index 2e6224df15..4eaa6cf251 100644 --- a/src/lib/proof-system.unit-test.ts +++ b/src/lib/proof-system.unit-test.ts @@ -119,7 +119,7 @@ it('can compile program with large input', async () => { }); // regression tests for some zkprograms -const emptyMethodsMetadata = EmptyProgram.analyzeMethods(); +const emptyMethodsMetadata = await EmptyProgram.analyzeMethods(); expect(emptyMethodsMetadata.run).toEqual( expect.objectContaining({ rows: 0, @@ -150,5 +150,6 @@ const CounterProgram = ZkProgram({ }, }); -const incrementMethodMetadata = CounterProgram.analyzeMethods().increment; +const incrementMethodMetadata = (await CounterProgram.analyzeMethods()) + .increment; expect(incrementMethodMetadata).toEqual(expect.objectContaining({ rows: 18 })); diff --git a/src/lib/provable-context-async.unit-test.ts b/src/lib/provable-context-async.unit-test.ts index df86fd4483..d97c6e9c91 100644 --- a/src/lib/provable-context-async.unit-test.ts +++ b/src/lib/provable-context-async.unit-test.ts @@ -1,11 +1,10 @@ import { Field } from './core.js'; import { Poseidon } from './hash.js'; -import { constraintSystemAsync } from './provable-context.js'; import { Provable } from './provable.js'; let hash = Poseidon.hash([Field(1), Field(-1)]); -let { rows, digest, publicInputSize, print } = await constraintSystemAsync( +let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( async () => { console.log('waiting'); await new Promise((resolve) => setTimeout(resolve, 1000)); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 0748012764..9d8a46eb28 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -12,7 +12,7 @@ export { runAndCheck, runUnchecked, constraintSystem, - constraintSystemAsync, + constraintSystemSync, inProver, inAnalyze, inCheckedComputation, @@ -20,6 +20,7 @@ export { inCompileMode, gatesFromJson, printGates, + MlConstraintSystem, }; // global circuit-related context @@ -36,6 +37,10 @@ type SnarkContext = { }; let snarkContext = Context.create({ default: {} }); +class MlConstraintSystem { + // opaque +} + // helpers to read circuit context function inProver() { @@ -89,7 +94,7 @@ function runUnchecked(f: () => void) { } } -function constraintSystem(f: () => T) { +function _constraintSystem(f: () => T) { let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); try { let result: T; @@ -123,32 +128,31 @@ function constraintSystem(f: () => T) { } } -async function constraintSystemAsync(f: () => Promise) { +async function constraintSystem(f: (() => Promise) | (() => void)) { let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); - let builder = Snarky.run.constraintSystemManual(); try { - builder.run(() => {}); + let finish = Snarky.run.enterConstraintSystem(); await f(); - let { rows, digest, json } = builder.finish(); - let { gates, publicInputSize } = gatesFromJson(json); - return { - rows, - digest, - gates, - publicInputSize, - print() { - printGates(gates); - }, - summary() { - let gateTypes: Partial> = {}; - gateTypes['Total rows'] = rows; - for (let gate of gates) { - gateTypes[gate.type] ??= 0; - gateTypes[gate.type]!++; - } - return gateTypes; - }, - }; + let cs = finish(); + return constraintSystemToJS(cs); + } catch (error) { + throw prettifyStacktrace(error); + } finally { + snarkContext.leave(id); + } +} + +/** + * helper to bridge transition to async circuits + * @deprecated we must get rid of this + */ +function constraintSystemSync(f: () => void) { + let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); + try { + let finish = Snarky.run.enterConstraintSystem(); + f(); + let cs = finish(); + return constraintSystemToJS(cs); } catch (error) { throw prettifyStacktrace(error); } finally { @@ -156,6 +160,31 @@ async function constraintSystemAsync(f: () => Promise) { } } +function constraintSystemToJS(cs: MlConstraintSystem) { + let rows = Snarky.constraintSystem.rows(cs); + let digest = Snarky.constraintSystem.digest(cs); + let json = Snarky.constraintSystem.toJson(cs); + let { gates, publicInputSize } = gatesFromJson(json); + return { + rows, + digest, + gates, + publicInputSize, + print() { + printGates(gates); + }, + summary() { + let gateTypes: Partial> = {}; + gateTypes['Total rows'] = rows; + for (let gate of gates) { + gateTypes[gate.type] ??= 0; + gateTypes[gate.type]!++; + } + return gateTypes; + }, + }; +} + // helpers function gatesFromJson(cs: { gates: JsonGate[]; public_input_size: number }) { diff --git a/src/lib/testing/constraint-system.ts b/src/lib/testing/constraint-system.ts index e01fd0627a..90d2839a4b 100644 --- a/src/lib/testing/constraint-system.ts +++ b/src/lib/testing/constraint-system.ts @@ -12,7 +12,7 @@ import { Tuple } from '../util/types.js'; import { Random } from './random.js'; import { test } from './property.js'; import { Undefined, ZkProgram } from '../proof-system.js'; -import { printGates } from '../provable-context.js'; +import { constraintSystemSync, printGates } from '../provable-context.js'; export { constraintSystem, @@ -62,7 +62,7 @@ function constraintSystem>>( let layouts = args.slice(0, -1); // compute the constraint system - let { gates } = Provable.constraintSystem(() => { + let { gates } = constraintSystemSync(() => { // each random input "layout" has to be instantiated into vars in this circuit let values = types.map((type, i) => instantiate(type, layouts[i]) @@ -316,7 +316,7 @@ constraintSystem.gates = function gates>>( main: (...args: CsParams) => void ) { let types = inputs.from.map(provable); - let { gates } = Provable.constraintSystem(() => { + let { gates } = constraintSystemSync(() => { let values = types.map((type) => Provable.witness(type, (): unknown => { throw Error('not needed'); diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index 97530c32f8..ec81a9a44e 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -616,7 +616,7 @@ class SmartContract extends SmartContractBase { }; }); // run methods once to get information that we need already at compile time - let methodsMeta = this.analyzeMethods(); + let methodsMeta = await this.analyzeMethods(); let gates = methodIntfs.map((intf) => methodsMeta[intf.methodName].gates); let { verificationKey, provers, verify } = await compileProgram({ publicInputType: ZkappPublicInput, @@ -1097,7 +1097,7 @@ super.init(); * - `actions` the number of actions the method dispatches * - `gates` the constraint system, represented as an array of gates */ - static analyzeMethods({ printSummary = false } = {}) { + static async analyzeMethods({ printSummary = false } = {}) { let ZkappClass = this as typeof SmartContract; let methodMetadata = (ZkappClass._methodMetadata ??= {}); let methodIntfs = ZkappClass._methods ?? []; @@ -1119,7 +1119,8 @@ super.init(); try { for (let methodIntf of methodIntfs) { let accountUpdate: AccountUpdate; - let { rows, digest, result, gates, summary } = analyzeMethod( + let hasReturn = false; + let { rows, digest, gates, summary } = await analyzeMethod( ZkappPublicInput, methodIntf, (publicInput, publicKey, tokenId, ...args) => { @@ -1128,6 +1129,7 @@ super.init(); publicInput, ...args ); + hasReturn = result !== undefined; accountUpdate = instance.#executionState!.accountUpdate; return result; } @@ -1136,7 +1138,7 @@ super.init(); actions: accountUpdate!.body.actions.data.length, rows, digest, - hasReturn: result !== undefined, + hasReturn, gates, }; if (printSummary) console.log(methodIntf.methodName, summary()); diff --git a/src/snarky.d.ts b/src/snarky.d.ts index b4f248c8d7..d0a0424ae3 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -26,6 +26,7 @@ import type { WasmFqSrs, } from './bindings/compiled/node_bindings/plonk_wasm.cjs'; import type { KimchiGateType } from './lib/gates.ts'; +import type { MlConstraintSystem } from './lib/provable-context.ts'; export { ProvablePure, Provable, Ledger, Pickles, Gate, GateType, getWasm }; @@ -215,15 +216,28 @@ declare const Snarky: { digest: string; json: JsonConstraintSystem; }; + /** + * Starts constraint system runner and returns a function to finish it. + */ + enterConstraintSystem(): () => MlConstraintSystem; + }; - constraintSystemManual(): { - run(f: () => void): void; - finish(): { - rows: number; - digest: string; - json: JsonConstraintSystem; - }; - }; + /** + * APIs to interact with a `Backend.R1CS_constraint_system.t` + */ + constraintSystem: { + /** + * Returns the number of rows of the constraint system. + */ + rows(system: MlConstraintSystem): number; + /** + * Returns an md5 digest of the constraint system. + */ + digest(system: MlConstraintSystem): string; + /** + * Returns a JSON representation of the constraint system. + */ + toJson(system: MlConstraintSystem): JsonConstraintSystem; }; /** From 87d2a34acc216c939a247073b5a796ceaceccbf4 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 11:45:18 +0100 Subject: [PATCH 08/31] expose async run and check --- src/bindings | 2 +- src/lib/provable-context-async.unit-test.ts | 26 +++++++++++++-------- src/lib/provable-context.ts | 14 +++++++++++ src/snarky.d.ts | 13 +++++++++++ 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/bindings b/src/bindings index b0fb78362d..4a01c2c982 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit b0fb78362d0492ede0323cf675678e4f31941e7d +Subproject commit 4a01c2c9829ebf797b38da4d3cceec44866379d7 diff --git a/src/lib/provable-context-async.unit-test.ts b/src/lib/provable-context-async.unit-test.ts index d97c6e9c91..8e0bcc2977 100644 --- a/src/lib/provable-context-async.unit-test.ts +++ b/src/lib/provable-context-async.unit-test.ts @@ -1,21 +1,27 @@ import { Field } from './core.js'; import { Poseidon } from './hash.js'; +import { runAndCheckAsync } from './provable-context.js'; import { Provable } from './provable.js'; let hash = Poseidon.hash([Field(1), Field(-1)]); +async function main() { + console.log('waiting'); + await new Promise((resolve) => setTimeout(resolve, 1000)); + console.log('done waiting'); + let x = Provable.witness(Field, () => Field(1)); + let y = Provable.witness(Field, () => Field(-1)); + x.add(y).assertEquals(Field(0)); + let z = Poseidon.hash([x, y]); + z.assertEquals(hash); +} + let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( - async () => { - console.log('waiting'); - await new Promise((resolve) => setTimeout(resolve, 1000)); - console.log('done waiting'); - let x = Provable.witness(Field, () => Field(1)); - let y = Provable.witness(Field, () => Field(-1)); - x.add(y).assertEquals(Field(0)); - let z = Poseidon.hash([x, y]); - z.assertEquals(hash); - } + main ); print(); console.log({ rows, digest, publicInputSize }); + +let [, , [, ...witness]] = await runAndCheckAsync(main); +console.log('first 5 witnesses', witness.map((x) => x[1]).slice(0, 5)); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 9d8a46eb28..bf681792dd 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -11,6 +11,7 @@ export { asProver, runAndCheck, runUnchecked, + runAndCheckAsync, constraintSystem, constraintSystemSync, inProver, @@ -94,6 +95,19 @@ function runUnchecked(f: () => void) { } } +async function runAndCheckAsync(f: () => Promise) { + let id = snarkContext.enter({ inCheckedComputation: true }); + try { + let finish = Snarky.run.enterGenerateWitness(); + await f(); + return finish(); + } catch (error) { + throw prettifyStacktrace(error); + } finally { + snarkContext.leave(id); + } +} + function _constraintSystem(f: () => T) { let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); try { diff --git a/src/snarky.d.ts b/src/snarky.d.ts index d0a0424ae3..bd48515d7a 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -27,6 +27,7 @@ import type { } from './bindings/compiled/node_bindings/plonk_wasm.cjs'; import type { KimchiGateType } from './lib/gates.ts'; import type { MlConstraintSystem } from './lib/provable-context.ts'; +import type { FieldVector } from './bindings/crypto/bindings/vector.ts'; export { ProvablePure, Provable, Ledger, Pickles, Gate, GateType, getWasm }; @@ -220,6 +221,18 @@ declare const Snarky: { * Starts constraint system runner and returns a function to finish it. */ enterConstraintSystem(): () => MlConstraintSystem; + /** + * Starts witness generation and returns a function to finish it. + */ + enterGenerateWitness(): () => [ + _: 0, + public_inputs: FieldVector, + auxiliary_inputs: FieldVector + ]; + /** + * Setting that controls whether snarky throws an exception on violated constraint. + */ + setEvalConstraints(value: MlBool): void; }; /** From 2dcc12631d59d2bc0024d7b0a96069b937671c4c Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 11:52:43 +0100 Subject: [PATCH 09/31] support not checking constraints --- src/lib/provable-context-async.unit-test.ts | 12 ++++++------ src/lib/provable-context.ts | 10 ++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lib/provable-context-async.unit-test.ts b/src/lib/provable-context-async.unit-test.ts index 8e0bcc2977..a81acae7a5 100644 --- a/src/lib/provable-context-async.unit-test.ts +++ b/src/lib/provable-context-async.unit-test.ts @@ -1,19 +1,17 @@ import { Field } from './core.js'; import { Poseidon } from './hash.js'; -import { runAndCheckAsync } from './provable-context.js'; +import { generateWitness } from './provable-context.js'; import { Provable } from './provable.js'; -let hash = Poseidon.hash([Field(1), Field(-1)]); - async function main() { console.log('waiting'); await new Promise((resolve) => setTimeout(resolve, 1000)); console.log('done waiting'); let x = Provable.witness(Field, () => Field(1)); let y = Provable.witness(Field, () => Field(-1)); - x.add(y).assertEquals(Field(0)); + x.add(y).assertEquals(0); let z = Poseidon.hash([x, y]); - z.assertEquals(hash); + z.assertEquals(0); // unsatisfiable constraint } let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( @@ -23,5 +21,7 @@ let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( print(); console.log({ rows, digest, publicInputSize }); -let [, , [, ...witness]] = await runAndCheckAsync(main); +let [, , [, ...witness]] = await generateWitness(main, { + checkConstraints: false, +}); console.log('first 5 witnesses', witness.map((x) => x[1]).slice(0, 5)); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index bf681792dd..b87e16fbb5 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -3,6 +3,7 @@ import { Gate, GateType, JsonGate, Snarky } from '../snarky.js'; import { parseHexString32 } from '../bindings/crypto/bigint-helpers.js'; import { prettifyStacktrace } from './errors.js'; import { Fp } from '../bindings/crypto/finite-field.js'; +import { MlBool } from './ml/base.js'; // internal API export { @@ -11,7 +12,7 @@ export { asProver, runAndCheck, runUnchecked, - runAndCheckAsync, + generateWitness, constraintSystem, constraintSystemSync, inProver, @@ -95,15 +96,20 @@ function runUnchecked(f: () => void) { } } -async function runAndCheckAsync(f: () => Promise) { +async function generateWitness( + f: () => Promise, + { checkConstraints = true } = {} +) { let id = snarkContext.enter({ inCheckedComputation: true }); try { let finish = Snarky.run.enterGenerateWitness(); + if (!checkConstraints) Snarky.run.setEvalConstraints(MlBool(false)); await f(); return finish(); } catch (error) { throw prettifyStacktrace(error); } finally { + if (!checkConstraints) Snarky.run.setEvalConstraints(MlBool(true)); snarkContext.leave(id); } } From 9b4d2c4935590d7903e0e38adce0f708da2f53ad Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:25:36 +0100 Subject: [PATCH 10/31] async witness generation --- src/examples/benchmarks/foreign-field.ts | 4 +- src/examples/benchmarks/hash-witness.ts | 2 +- src/examples/benchmarks/keccak-witness.ts | 2 +- src/examples/benchmarks/mul-witness.ts | 2 +- src/examples/encryption.ts | 4 +- .../internals/advanced-provable-types.ts | 8 +- src/examples/matrix-mul.ts | 4 +- src/lib/account-update.unit-test.ts | 16 +- src/lib/circuit-value.test.ts | 6 +- src/lib/circuit-value.unit-test.ts | 6 +- src/lib/field.unit-test.ts | 5 +- src/lib/foreign-field.unit-test.ts | 4 +- src/lib/gadgets/ecdsa.unit-test.ts | 2 +- src/lib/group.test.ts | 52 ++-- src/lib/group.unit-test.ts | 2 +- src/lib/int.test.ts | 276 +++++++++--------- src/lib/mina.ts | 7 +- src/lib/mina/local-blockchain.ts | 9 +- src/lib/mina/transaction.ts | 6 +- src/lib/ml/consistency.unit-test.ts | 2 +- src/lib/primitives.test.ts | 46 +-- src/lib/provable-context.ts | 16 +- src/lib/provable.ts | 22 +- src/lib/provable.unit-test.ts | 4 +- src/lib/scalar.test.ts | 20 +- src/lib/string.test.ts | 22 +- src/lib/testing/equivalent.ts | 2 +- 27 files changed, 276 insertions(+), 275 deletions(-) diff --git a/src/examples/benchmarks/foreign-field.ts b/src/examples/benchmarks/foreign-field.ts index fb32439e0f..30190324ef 100644 --- a/src/examples/benchmarks/foreign-field.ts +++ b/src/examples/benchmarks/foreign-field.ts @@ -21,11 +21,11 @@ main(); console.timeEnd('running constant version'); console.time('running witness generation & checks'); -Provable.runAndCheck(main); +await Provable.runAndCheck(main); console.timeEnd('running witness generation & checks'); console.time('creating constraint system'); -let cs = Provable.constraintSystem(main); +let cs = await Provable.constraintSystem(main); console.timeEnd('creating constraint system'); console.log(cs.summary()); diff --git a/src/examples/benchmarks/hash-witness.ts b/src/examples/benchmarks/hash-witness.ts index 08adaf87f7..69f5107a33 100644 --- a/src/examples/benchmarks/hash-witness.ts +++ b/src/examples/benchmarks/hash-witness.ts @@ -19,5 +19,5 @@ function main(nMuls: number) { } tic('run and check'); -Provable.runAndCheck(() => main(nPermutations)); +await Provable.runAndCheck(() => main(nPermutations)); toc(); diff --git a/src/examples/benchmarks/keccak-witness.ts b/src/examples/benchmarks/keccak-witness.ts index cedd6982ca..e4509c5019 100644 --- a/src/examples/benchmarks/keccak-witness.ts +++ b/src/examples/benchmarks/keccak-witness.ts @@ -3,7 +3,7 @@ import { Hash, Bytes, Provable } from 'o1js'; let Bytes32 = Bytes(32); console.time('keccak witness'); -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { let bytes = Provable.witness(Bytes32.provable, () => Bytes32.random()); Hash.Keccak256.hash(bytes); }); diff --git a/src/examples/benchmarks/mul-witness.ts b/src/examples/benchmarks/mul-witness.ts index 17e2165fbd..947360cbd3 100644 --- a/src/examples/benchmarks/mul-witness.ts +++ b/src/examples/benchmarks/mul-witness.ts @@ -19,5 +19,5 @@ function main(nMuls: number) { } tic('run and check'); -Provable.runAndCheck(() => main(nMuls)); +await Provable.runAndCheck(() => main(nMuls)); toc(); diff --git a/src/examples/encryption.ts b/src/examples/encryption.ts index 245bc28708..e6c0b84d7c 100644 --- a/src/examples/encryption.ts +++ b/src/examples/encryption.ts @@ -30,7 +30,7 @@ console.log(`Recovered message: "${decryptedMessage}"`); // the same but in a checked computation -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { // encrypt let cipherText = Encryption.encrypt(messageFields, publicKey); @@ -76,7 +76,7 @@ console.log(`Recovered message: "${decryptedMessage}"`); // the same but in a checked computation -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { // encrypt let cipherText = Encryption.encrypt(messageFields, publicKey); diff --git a/src/examples/internals/advanced-provable-types.ts b/src/examples/internals/advanced-provable-types.ts index dc3b95b530..6f4334a207 100644 --- a/src/examples/internals/advanced-provable-types.ts +++ b/src/examples/internals/advanced-provable-types.ts @@ -61,7 +61,7 @@ expect(accountUpdateRecovered.lazyAuthorization).not.toEqual( * -) witness() and asProver() blocks are executed * -) constraints are checked; failing assertions throw an error */ -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { /** * Provable.witness() is used to introduce all values to the circuit which are not hard-coded constants. * @@ -99,7 +99,7 @@ Provable.runAndCheck(() => { * -) fields don't have actual values attached to them; they're purely abstract variables * -) constraints are not checked */ -let result = Provable.constraintSystem(() => { +let result = await Provable.constraintSystem(() => { /** * In compile mode, witness() returns * - abstract variables without values for fields @@ -140,7 +140,7 @@ console.log( * * This is why we have this custom way of witnessing account updates, with the `skipCheck` option. */ -result = Provable.constraintSystem(() => { +result = await Provable.constraintSystem(() => { let { accountUpdate: accountUpdateWitness } = AccountUpdate.witness( Empty, () => ({ accountUpdate, result: undefined }), @@ -156,7 +156,7 @@ console.log( * To relate an account update to the hash which is the public input, we need to perform the hash in-circuit. * This is takes several 100 constraints, and is basically the minimal size of a zkApp method. */ -result = Provable.constraintSystem(() => { +result = await Provable.constraintSystem(() => { let { accountUpdate: accountUpdateWitness } = AccountUpdate.witness( Empty, () => ({ accountUpdate, result: undefined }), diff --git a/src/examples/matrix-mul.ts b/src/examples/matrix-mul.ts index 63447cc9da..8b9ee39412 100644 --- a/src/examples/matrix-mul.ts +++ b/src/examples/matrix-mul.ts @@ -55,9 +55,9 @@ function circuit(): Field[][] { return matrixMul(x, y); } -let { rows } = Provable.constraintSystem(circuit); +let { rows } = await Provable.constraintSystem(circuit); let result: Field[][]; -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { let result_ = circuit(); Provable.asProver(() => { result = result_.map((x) => x.map((y) => y.toConstant())); diff --git a/src/lib/account-update.unit-test.ts b/src/lib/account-update.unit-test.ts index 2b85457d05..6ad49a903c 100644 --- a/src/lib/account-update.unit-test.ts +++ b/src/lib/account-update.unit-test.ts @@ -53,17 +53,15 @@ function createAccountUpdate() { let accountUpdate = createAccountUpdate(); // TODO remove restriction "This function can't be run outside of a checked computation." - Provable.runAndCheck(() => { - let hash = accountUpdate.hash(); + let hash = accountUpdate.hash(); - // if we clone the accountUpdate, hash should be the same - let accountUpdate2 = AccountUpdate.clone(accountUpdate); - expect(accountUpdate2.hash()).toEqual(hash); + // if we clone the accountUpdate, hash should be the same + let accountUpdate2 = AccountUpdate.clone(accountUpdate); + expect(accountUpdate2.hash()).toEqual(hash); - // if we change something on the cloned accountUpdate, the hash should become different - AccountUpdate.setValue(accountUpdate2.update.appState[0], Field(1)); - expect(accountUpdate2.hash()).not.toEqual(hash); - }); + // if we change something on the cloned accountUpdate, the hash should become different + AccountUpdate.setValue(accountUpdate2.update.appState[0], Field(1)); + expect(accountUpdate2.hash()).not.toEqual(hash); } // converts account update to a public input that's consistent with the ocaml implementation diff --git a/src/lib/circuit-value.test.ts b/src/lib/circuit-value.test.ts index d45c8acf8a..5ee8ceac2a 100644 --- a/src/lib/circuit-value.test.ts +++ b/src/lib/circuit-value.test.ts @@ -15,7 +15,7 @@ describe('circuit', () => { }); it('Provable.if in snark', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let x = Provable.witness(Int64, () => Int64.from(-1)); let y = Provable.witness(Int64, () => Int64.from(-2)); let b = Provable.witness(Bool, () => Bool(true)); @@ -81,7 +81,7 @@ describe('circuit', () => { it('Provable.assertEqual', () => { const FieldAndBool = Struct({ x: Field, b: Bool }); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let x = Provable.witness(Field, () => Field(1)); let b = Provable.witness(Bool, () => Bool(true)); @@ -123,7 +123,7 @@ describe('circuit', () => { }); } - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let x = Provable.witness(Field, () => Field(1)); let b = Provable.witness(Bool, () => Bool(true)); let pk = Provable.witness(PublicKey, () => pk1); diff --git a/src/lib/circuit-value.unit-test.ts b/src/lib/circuit-value.unit-test.ts index 4c7b194f6e..f084c9ffee 100644 --- a/src/lib/circuit-value.unit-test.ts +++ b/src/lib/circuit-value.unit-test.ts @@ -60,12 +60,12 @@ let restored = type.fromFields(fields, aux); expect(JSON.stringify(restored)).toEqual(original); // check -Provable.runAndCheck(() => { +await Provable.runAndCheck(() => { type.check(value); }); // should fail `check` if `check` of subfields doesn't pass -expect(() => +await expect(() => Provable.runAndCheck(() => { let x = Provable.witness(type, () => ({ ...value, @@ -76,7 +76,7 @@ expect(() => ], })); }) -).toThrow(`Constraint unsatisfied`); +).rejects.toThrow(`Constraint unsatisfied`); // class version of `provable` class MyStruct extends Struct({ diff --git a/src/lib/field.unit-test.ts b/src/lib/field.unit-test.ts index 2b955dca85..71607acb14 100644 --- a/src/lib/field.unit-test.ts +++ b/src/lib/field.unit-test.ts @@ -17,6 +17,7 @@ import { bool, Spec, } from './testing/equivalent.js'; +import { runAndCheckSync } from './provable-context.js'; // types Field satisfies Provable; @@ -138,7 +139,7 @@ equivalent({ from: [smallField], to: bool })( // non-constant field vars test(Random.field, (x0, assert) => { - Provable.runAndCheck(() => { + runAndCheckSync(() => { // Var let x = Provable.witness(Field, () => Field(x0)); assert(x.value[0] === FieldType.Var); @@ -177,7 +178,7 @@ test(Random.field, (x0, assert) => { // some provable operations test(Random.field, Random.field, (x0, y0, assert) => { - Provable.runAndCheck(() => { + runAndCheckSync(() => { // equals let x = Provable.witness(Field, () => Field(x0)); let y = Provable.witness(Field, () => Field(y0)); diff --git a/src/lib/foreign-field.unit-test.ts b/src/lib/foreign-field.unit-test.ts index f45481b82b..9c823e2a00 100644 --- a/src/lib/foreign-field.unit-test.ts +++ b/src/lib/foreign-field.unit-test.ts @@ -160,8 +160,8 @@ function main1() { // check provable and non-provable versions are correct main0(); main1(); -Provable.runAndCheck(main0); -Provable.runAndCheck(main1); +await Provable.runAndCheck(main0); +await Provable.runAndCheck(main1); // using foreign field arithmetic should result in much fewer constraints let { rows: rows0 } = await Provable.constraintSystem(main0); diff --git a/src/lib/gadgets/ecdsa.unit-test.ts b/src/lib/gadgets/ecdsa.unit-test.ts index dfc78e9238..c9fac69e9b 100644 --- a/src/lib/gadgets/ecdsa.unit-test.ts +++ b/src/lib/gadgets/ecdsa.unit-test.ts @@ -171,7 +171,7 @@ program.rawMethods.ecdsa(); console.timeEnd('ecdsa verify (constant)'); console.time('ecdsa verify (witness gen / check)'); -Provable.runAndCheck(program.rawMethods.ecdsa); +await Provable.runAndCheck(program.rawMethods.ecdsa); console.timeEnd('ecdsa verify (witness gen / check)'); console.time('ecdsa verify (build constraint system)'); diff --git a/src/lib/group.test.ts b/src/lib/group.test.ts index 1a69cc6e66..e01e736275 100644 --- a/src/lib/group.test.ts +++ b/src/lib/group.test.ts @@ -10,7 +10,7 @@ describe('group', () => { describe('group membership', () => { it('valid element does not throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(Group, () => g); }); }).not.toThrow(); @@ -18,7 +18,7 @@ describe('group', () => { it('valid element does not throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(Group, () => Group.generator); }); }).not.toThrow(); @@ -26,7 +26,7 @@ describe('group', () => { it('Group.zero element does not throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(Group, () => Group.zero); }); }).not.toThrow(); @@ -34,7 +34,7 @@ describe('group', () => { it('invalid group element throws', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(Group, () => Group({ x: 2, y: 2 })); }); }).toThrow(); @@ -44,7 +44,7 @@ describe('group', () => { describe('add', () => { it('g+g does not throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const y = Provable.witness(Group, () => g); x.add(y); @@ -54,7 +54,7 @@ describe('group', () => { it('g+zero = g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); x.add(zero).assertEquals(x); @@ -64,7 +64,7 @@ describe('group', () => { it('zero+g = g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); zero.add(x).assertEquals(x); @@ -74,7 +74,7 @@ describe('group', () => { it('g+(-g) = zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); x.add(x.neg()).assertEquals(zero); @@ -84,7 +84,7 @@ describe('group', () => { it('(-g)+g = zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); x.neg().add(x).assertEquals(zero); @@ -94,7 +94,7 @@ describe('group', () => { it('zero + zero = zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const zero = Provable.witness(Group, () => Group.zero); zero.add(zero).assertEquals(zero); }); @@ -105,8 +105,8 @@ describe('group', () => { describe('sub', () => { it('g-g does not throw', () => { expect(() => { - Provable.runAndCheck(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const y = Provable.witness(Group, () => g); x.sub(y); @@ -117,7 +117,7 @@ describe('group', () => { it('g-zero = g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); x.sub(zero).assertEquals(x); @@ -127,7 +127,7 @@ describe('group', () => { it('zero - g = -g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); const zero = Provable.witness(Group, () => Group.zero); zero.sub(x).assertEquals(x.neg()); @@ -137,7 +137,7 @@ describe('group', () => { it('zero - zero = zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const zero = Provable.witness(Group, () => Group.zero); zero.sub(zero).assertEquals(zero); }); @@ -148,7 +148,7 @@ describe('group', () => { describe('neg', () => { it('neg(g) not to throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); x.neg(); }); @@ -157,7 +157,7 @@ describe('group', () => { it('neg(zero) = zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const zero = Provable.witness(Group, () => Group.zero); zero.neg().assertEquals(zero); }); @@ -168,7 +168,7 @@ describe('group', () => { describe('scale', () => { it('scaling with random Scalar does not throw', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => g); x.scale(Scalar.random()); }); @@ -177,7 +177,7 @@ describe('group', () => { it('x*g+y*g = (x+y)*g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Scalar.from(2); const y = Scalar.from(3); const left = g.scale(x).add(g.scale(y)); @@ -189,7 +189,7 @@ describe('group', () => { it('x*(y*g) = (x*y)*g', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Scalar.from(2); const y = Scalar.from(3); const left = g.scale(y).scale(x); @@ -202,7 +202,7 @@ describe('group', () => { describe('equals', () => { it('should equal true with same group', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => Group.generator); let isEqual = x.equals(Group.generator); Provable.asProver(() => { @@ -212,7 +212,7 @@ describe('group', () => { }); it('should equal false with different group', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => Group.generator); let isEqual = x.equals(g); Provable.asProver(() => { @@ -225,7 +225,7 @@ describe('group', () => { describe('assertEquals', () => { it('should not throw with same group', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => Group.generator); x.assertEquals(Group.generator); }); @@ -234,7 +234,7 @@ describe('group', () => { it('should throw with different group', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Group, () => Group.generator); x.assertEquals(g); }); @@ -244,7 +244,7 @@ describe('group', () => { describe('toJSON', () => { it('fromJSON(g.toJSON) should be the same as g', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( Group, () => Group.fromJSON(Group.generator.toJSON())! @@ -389,7 +389,7 @@ describe('group', () => { describe('Variable/Constant circuit equality ', () => { it('add', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let y = Provable.witness(Group, () => g).add( Provable.witness(Group, () => Group.generator) ); diff --git a/src/lib/group.unit-test.ts b/src/lib/group.unit-test.ts index 5a7102f078..a302814db8 100644 --- a/src/lib/group.unit-test.ts +++ b/src/lib/group.unit-test.ts @@ -54,7 +54,7 @@ function run( ) { let result_out_circuit = f(g1, g2); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let result_in_circuit = f( Provable.witness(Group, () => g1), Provable.witness(Group, () => g2) diff --git a/src/lib/int.test.ts b/src/lib/int.test.ts index 1914a9fede..22e9131f95 100644 --- a/src/lib/int.test.ts +++ b/src/lib/int.test.ts @@ -213,7 +213,7 @@ describe('int', () => { describe('add', () => { it('1+1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.add(y).assertEquals(new UInt64(Field(2))); @@ -223,7 +223,7 @@ describe('int', () => { it('5000+5000=10000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(5000))); const y = Provable.witness(UInt64, () => new UInt64(Field(5000))); x.add(y).assertEquals(new UInt64(Field(10000))); @@ -234,7 +234,7 @@ describe('int', () => { it('(MAXINT/2+MAXINT/2) adds to MAXINT', () => { const n = Field((((1n << 64n) - 2n) / 2n).toString()); expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(n)); const y = Provable.witness(UInt64, () => new UInt64(n)); x.add(y).add(1).assertEquals(UInt64.MAXINT()); @@ -244,7 +244,7 @@ describe('int', () => { it('should throw on overflow addition', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.add(y); @@ -256,7 +256,7 @@ describe('int', () => { describe('sub', () => { it('1-1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.sub(y).assertEquals(new UInt64(Field(0))); @@ -266,7 +266,7 @@ describe('int', () => { it('10000-5000=5000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt64, () => new UInt64(Field(10000)) @@ -279,7 +279,7 @@ describe('int', () => { it('should throw on sub if results in negative number', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(0))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.sub(y); @@ -291,7 +291,7 @@ describe('int', () => { describe('mul', () => { it('1x2=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(2))); x.mul(y).assertEquals(new UInt64(Field(2))); @@ -301,7 +301,7 @@ describe('int', () => { it('1x0=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(0))); x.mul(y).assertEquals(new UInt64(Field(0))); @@ -311,7 +311,7 @@ describe('int', () => { it('1000x1000=1000000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1000))); const y = Provable.witness(UInt64, () => new UInt64(Field(1000))); x.mul(y).assertEquals(new UInt64(Field(1000000))); @@ -321,7 +321,7 @@ describe('int', () => { it('MAXINTx1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.mul(y).assertEquals(UInt64.MAXINT()); @@ -331,7 +331,7 @@ describe('int', () => { it('should throw on overflow multiplication', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(2))); x.mul(y); @@ -343,7 +343,7 @@ describe('int', () => { describe('div', () => { it('2/1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(2))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.div(y).assertEquals(new UInt64(Field(2))); @@ -353,7 +353,7 @@ describe('int', () => { it('0/1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(0))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.div(y).assertEquals(new UInt64(Field(0))); @@ -363,7 +363,7 @@ describe('int', () => { it('2000/1000=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(2000))); const y = Provable.witness(UInt64, () => new UInt64(Field(1000))); x.div(y).assertEquals(new UInt64(Field(2))); @@ -373,7 +373,7 @@ describe('int', () => { it('MAXINT/1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.div(y).assertEquals(UInt64.MAXINT()); @@ -383,7 +383,7 @@ describe('int', () => { it('should throw on division by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(0))); x.div(y); @@ -395,7 +395,7 @@ describe('int', () => { describe('mod', () => { it('1%1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.mod(y).assertEquals(new UInt64(Field(0))); @@ -405,7 +405,7 @@ describe('int', () => { it('500%32=20', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(500))); const y = Provable.witness(UInt64, () => new UInt64(Field(32))); x.mod(y).assertEquals(new UInt64(Field(20))); @@ -415,7 +415,7 @@ describe('int', () => { it('MAXINT%7=1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(7))); x.mod(y).assertEquals(new UInt64(Field(1))); @@ -425,7 +425,7 @@ describe('int', () => { it('should throw on mod by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => new UInt64(Field(0))); x.mod(y).assertEquals(new UInt64(Field(1))); @@ -437,7 +437,7 @@ describe('int', () => { describe('assertLt', () => { it('1<2=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(2))); x.assertLessThan(y); @@ -447,7 +447,7 @@ describe('int', () => { it('1<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertLessThan(y); @@ -457,7 +457,7 @@ describe('int', () => { it('2<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(2))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertLessThan(y); @@ -467,7 +467,7 @@ describe('int', () => { it('1000<100000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1000))); const y = Provable.witness( UInt64, @@ -480,7 +480,7 @@ describe('int', () => { it('100000<1000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt64, () => new UInt64(Field(100000)) @@ -493,7 +493,7 @@ describe('int', () => { it('MAXINT { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => UInt64.MAXINT()); x.assertLessThan(y); @@ -505,7 +505,7 @@ describe('int', () => { describe('assertLte', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertLessThanOrEqual(y); @@ -515,7 +515,7 @@ describe('int', () => { it('2<=1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(2))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertLessThanOrEqual(y); @@ -525,7 +525,7 @@ describe('int', () => { it('1000<=100000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1000))); const y = Provable.witness( UInt64, @@ -538,7 +538,7 @@ describe('int', () => { it('100000<=1000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt64, () => new UInt64(Field(100000)) @@ -551,7 +551,7 @@ describe('int', () => { it('MAXINT<=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => UInt64.MAXINT()); x.assertLessThanOrEqual(y); @@ -563,7 +563,7 @@ describe('int', () => { describe('assertGreaterThan', () => { it('2>1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(2))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertGreaterThan(y); @@ -573,7 +573,7 @@ describe('int', () => { it('1>1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertGreaterThan(y); @@ -583,7 +583,7 @@ describe('int', () => { it('1>2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(2))); x.assertGreaterThan(y); @@ -593,7 +593,7 @@ describe('int', () => { it('100000>1000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt64, () => new UInt64(Field(100000)) @@ -606,7 +606,7 @@ describe('int', () => { it('1000>100000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1000))); const y = Provable.witness( UInt64, @@ -619,7 +619,7 @@ describe('int', () => { it('MAXINT>MAXINT=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => UInt64.MAXINT()); x.assertGreaterThan(y); @@ -631,7 +631,7 @@ describe('int', () => { describe('assertGreaterThanOrEqual', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertGreaterThanOrEqual(y); @@ -641,7 +641,7 @@ describe('int', () => { it('1>=2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1))); const y = Provable.witness(UInt64, () => new UInt64(Field(2))); x.assertGreaterThanOrEqual(y); @@ -651,7 +651,7 @@ describe('int', () => { it('100000>=1000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt64, () => new UInt64(Field(100000)) @@ -664,7 +664,7 @@ describe('int', () => { it('1000>=100000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => new UInt64(Field(1000))); const y = Provable.witness( UInt64, @@ -677,7 +677,7 @@ describe('int', () => { it('MAXINT>=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.MAXINT()); const y = Provable.witness(UInt64, () => UInt64.MAXINT()); x.assertGreaterThanOrEqual(y); @@ -690,7 +690,7 @@ describe('int', () => { describe('fromNumber()', () => { it('should be the same as Field(1)', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.from(1)); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertEquals(y); @@ -700,7 +700,7 @@ describe('int', () => { it('should be the same as 2^53-1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.from(NUMBERMAX) ); @@ -716,7 +716,7 @@ describe('int', () => { describe('fromString()', () => { it('should be the same as Field(1)', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.from('1')); const y = Provable.witness(UInt64, () => new UInt64(Field(1))); x.assertEquals(y); @@ -726,7 +726,7 @@ describe('int', () => { it('should be the same as 2^53-1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt64, () => UInt64.from(String(NUMBERMAX)) ); @@ -1179,7 +1179,7 @@ describe('int', () => { describe('add', () => { it('1+1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.add(y).assertEquals(new UInt32(Field(2))); @@ -1189,7 +1189,7 @@ describe('int', () => { it('5000+5000=10000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(5000))); const y = Provable.witness(UInt32, () => new UInt32(Field(5000))); x.add(y).assertEquals(new UInt32(Field(10000))); @@ -1200,7 +1200,7 @@ describe('int', () => { it('(MAXINT/2+MAXINT/2) adds to MAXINT', () => { const n = Field((((1n << 32n) - 2n) / 2n).toString()); expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(n)); const y = Provable.witness(UInt32, () => new UInt32(n)); x.add(y).add(1).assertEquals(UInt32.MAXINT()); @@ -1210,7 +1210,7 @@ describe('int', () => { it('should throw on overflow addition', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.add(y); @@ -1222,7 +1222,7 @@ describe('int', () => { describe('sub', () => { it('1-1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.sub(y).assertEquals(new UInt32(Field(0))); @@ -1232,7 +1232,7 @@ describe('int', () => { it('10000-5000=5000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt32, () => new UInt32(Field(10000)) @@ -1245,7 +1245,7 @@ describe('int', () => { it('should throw on sub if results in negative number', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(0))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.sub(y); @@ -1257,7 +1257,7 @@ describe('int', () => { describe('mul', () => { it('1x2=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(2))); x.mul(y).assertEquals(new UInt32(Field(2))); @@ -1267,7 +1267,7 @@ describe('int', () => { it('1x0=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(0))); x.mul(y).assertEquals(new UInt32(Field(0))); @@ -1277,7 +1277,7 @@ describe('int', () => { it('1000x1000=1000000', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1000))); const y = Provable.witness(UInt32, () => new UInt32(Field(1000))); x.mul(y).assertEquals(new UInt32(Field(1000000))); @@ -1287,7 +1287,7 @@ describe('int', () => { it('MAXINTx1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.mul(y).assertEquals(UInt32.MAXINT()); @@ -1297,7 +1297,7 @@ describe('int', () => { it('should throw on overflow multiplication', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(2))); x.mul(y); @@ -1309,7 +1309,7 @@ describe('int', () => { describe('div', () => { it('2/1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(2))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.div(y).assertEquals(new UInt32(Field(2))); @@ -1319,7 +1319,7 @@ describe('int', () => { it('0/1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(0))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.div(y).assertEquals(new UInt32(Field(0))); @@ -1329,7 +1329,7 @@ describe('int', () => { it('2000/1000=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(2000))); const y = Provable.witness(UInt32, () => new UInt32(Field(1000))); x.div(y).assertEquals(new UInt32(Field(2))); @@ -1339,7 +1339,7 @@ describe('int', () => { it('MAXINT/1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.div(y).assertEquals(UInt32.MAXINT()); @@ -1349,7 +1349,7 @@ describe('int', () => { it('should throw on division by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(0))); x.div(y); @@ -1361,7 +1361,7 @@ describe('int', () => { describe('mod', () => { it('1%1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.mod(y).assertEquals(new UInt32(Field(0))); @@ -1371,7 +1371,7 @@ describe('int', () => { it('500%32=20', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(500))); const y = Provable.witness(UInt32, () => new UInt32(Field(32))); x.mod(y).assertEquals(new UInt32(Field(20))); @@ -1381,7 +1381,7 @@ describe('int', () => { it('MAXINT%7=3', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(7))); x.mod(y).assertEquals(new UInt32(Field(3))); @@ -1391,7 +1391,7 @@ describe('int', () => { it('should throw on mod by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => new UInt32(Field(0))); x.mod(y).assertEquals(new UInt32(Field(1))); @@ -1403,7 +1403,7 @@ describe('int', () => { describe('assertLt', () => { it('1<2=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(2))); x.assertLessThan(y); @@ -1413,7 +1413,7 @@ describe('int', () => { it('1<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertLessThan(y); @@ -1423,7 +1423,7 @@ describe('int', () => { it('2<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(2))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertLessThan(y); @@ -1433,7 +1433,7 @@ describe('int', () => { it('1000<100000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1000))); const y = Provable.witness( UInt32, @@ -1446,7 +1446,7 @@ describe('int', () => { it('100000<1000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt32, () => new UInt32(Field(100000)) @@ -1459,7 +1459,7 @@ describe('int', () => { it('MAXINT { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => UInt32.MAXINT()); x.assertLessThan(y); @@ -1471,7 +1471,7 @@ describe('int', () => { describe('assertLessThanOrEqual', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertLessThanOrEqual(y); @@ -1481,7 +1481,7 @@ describe('int', () => { it('2<=1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(2))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertLessThanOrEqual(y); @@ -1491,7 +1491,7 @@ describe('int', () => { it('1000<=100000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1000))); const y = Provable.witness( UInt32, @@ -1504,7 +1504,7 @@ describe('int', () => { it('100000<=1000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt32, () => new UInt32(Field(100000)) @@ -1517,7 +1517,7 @@ describe('int', () => { it('MAXINT<=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => UInt32.MAXINT()); x.assertLessThanOrEqual(y); @@ -1529,7 +1529,7 @@ describe('int', () => { describe('assertGreaterThan', () => { it('2>1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(2))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertGreaterThan(y); @@ -1539,7 +1539,7 @@ describe('int', () => { it('1>1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertGreaterThan(y); @@ -1549,7 +1549,7 @@ describe('int', () => { it('1>2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(2))); x.assertGreaterThan(y); @@ -1559,7 +1559,7 @@ describe('int', () => { it('100000>1000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt32, () => new UInt32(Field(100000)) @@ -1572,7 +1572,7 @@ describe('int', () => { it('1000>100000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1000))); const y = Provable.witness( UInt32, @@ -1585,7 +1585,7 @@ describe('int', () => { it('MAXINT>MAXINT=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => UInt32.MAXINT()); x.assertGreaterThan(y); @@ -1597,7 +1597,7 @@ describe('int', () => { describe('assertGreaterThanOrEqual', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertGreaterThanOrEqual(y); @@ -1607,7 +1607,7 @@ describe('int', () => { it('1>=2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1))); const y = Provable.witness(UInt32, () => new UInt32(Field(2))); x.assertGreaterThanOrEqual(y); @@ -1617,7 +1617,7 @@ describe('int', () => { it('100000>=1000=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness( UInt32, () => new UInt32(Field(100000)) @@ -1630,7 +1630,7 @@ describe('int', () => { it('1000>=100000=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => new UInt32(Field(1000))); const y = Provable.witness( UInt32, @@ -1643,7 +1643,7 @@ describe('int', () => { it('MAXINT>=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.MAXINT()); const y = Provable.witness(UInt32, () => UInt32.MAXINT()); x.assertGreaterThanOrEqual(y); @@ -1656,7 +1656,7 @@ describe('int', () => { describe('fromNumber()', () => { it('should be the same as Field(1)', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.from(1)); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertEquals(y); @@ -1666,7 +1666,7 @@ describe('int', () => { it('should be the same as 2^53-1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.from(NUMBERMAX) ); @@ -1682,7 +1682,7 @@ describe('int', () => { describe('fromString()', () => { it('should be the same as Field(1)', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.from('1')); const y = Provable.witness(UInt32, () => new UInt32(Field(1))); x.assertEquals(y); @@ -1692,7 +1692,7 @@ describe('int', () => { it('should be the same as 2^53-1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt32, () => UInt32.from(String(NUMBERMAX)) ); @@ -2145,7 +2145,7 @@ describe('int', () => { describe('add', () => { it('1+1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.add(y).assertEquals(2); @@ -2155,7 +2155,7 @@ describe('int', () => { it('100+100=200', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(100)); x.add(y).assertEquals(new UInt8(200)); @@ -2166,7 +2166,7 @@ describe('int', () => { it('(MAXINT/2+MAXINT/2) adds to MAXINT', () => { const n = ((1n << 8n) - 2n) / 2n; expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(n)); const y = Provable.witness(UInt8, () => new UInt8(n)); x.add(y).add(1).assertEquals(UInt8.MAXINT()); @@ -2176,7 +2176,7 @@ describe('int', () => { it('should throw on overflow addition', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(1)); x.add(y); @@ -2188,7 +2188,7 @@ describe('int', () => { describe('sub', () => { it('1-1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.sub(y).assertEquals(new UInt8(0)); @@ -2198,7 +2198,7 @@ describe('int', () => { it('100-50=50', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(50)); x.sub(y).assertEquals(new UInt8(50)); @@ -2208,7 +2208,7 @@ describe('int', () => { it('should throw on sub if results in negative number', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(0)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.sub(y); @@ -2220,7 +2220,7 @@ describe('int', () => { describe('mul', () => { it('1x2=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(2)); x.mul(y).assertEquals(new UInt8(2)); @@ -2230,7 +2230,7 @@ describe('int', () => { it('1x0=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(0)); x.mul(y).assertEquals(new UInt8(0)); @@ -2240,7 +2240,7 @@ describe('int', () => { it('12x20=240', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(12)); const y = Provable.witness(UInt8, () => new UInt8(20)); x.mul(y).assertEquals(new UInt8(240)); @@ -2250,7 +2250,7 @@ describe('int', () => { it('MAXINTx1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(1)); x.mul(y).assertEquals(UInt8.MAXINT()); @@ -2260,7 +2260,7 @@ describe('int', () => { it('should throw on overflow multiplication', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(2)); x.mul(y); @@ -2272,7 +2272,7 @@ describe('int', () => { describe('div', () => { it('2/1=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(2)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.div(y).assertEquals(new UInt8(2)); @@ -2282,7 +2282,7 @@ describe('int', () => { it('0/1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(0)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.div(y).assertEquals(new UInt8(0)); @@ -2292,7 +2292,7 @@ describe('int', () => { it('20/10=2', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(20)); const y = Provable.witness(UInt8, () => new UInt8(10)); x.div(y).assertEquals(new UInt8(2)); @@ -2302,7 +2302,7 @@ describe('int', () => { it('MAXINT/1=MAXINT', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(1)); x.div(y).assertEquals(UInt8.MAXINT()); @@ -2312,7 +2312,7 @@ describe('int', () => { it('should throw on division by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(0)); x.div(y); @@ -2324,7 +2324,7 @@ describe('int', () => { describe('mod', () => { it('1%1=0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.mod(y).assertEquals(new UInt8(0)); @@ -2334,7 +2334,7 @@ describe('int', () => { it('50%32=18', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(50)); const y = Provable.witness(UInt8, () => new UInt8(32)); x.mod(y).assertEquals(new UInt8(18)); @@ -2344,7 +2344,7 @@ describe('int', () => { it('MAXINT%7=3', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(7)); x.mod(y).assertEquals(new UInt8(3)); @@ -2354,7 +2354,7 @@ describe('int', () => { it('should throw on mod by zero', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => new UInt8(0)); x.mod(y).assertEquals(new UInt8(1)); @@ -2366,7 +2366,7 @@ describe('int', () => { describe('assertLt', () => { it('1<2=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(2)); x.assertLessThan(y); @@ -2376,7 +2376,7 @@ describe('int', () => { it('1<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertLessThan(y); @@ -2386,7 +2386,7 @@ describe('int', () => { it('2<1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(2)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertLessThan(y); @@ -2396,7 +2396,7 @@ describe('int', () => { it('10<100=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(10)); const y = Provable.witness(UInt8, () => new UInt8(100)); x.assertLessThan(y); @@ -2406,7 +2406,7 @@ describe('int', () => { it('100<10=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(10)); x.assertLessThan(y); @@ -2416,7 +2416,7 @@ describe('int', () => { it('MAXINT { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => UInt8.MAXINT()); x.assertLessThan(y); @@ -2428,7 +2428,7 @@ describe('int', () => { describe('assertLessThanOrEqual', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertLessThanOrEqual(y); @@ -2438,7 +2438,7 @@ describe('int', () => { it('2<=1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(2)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertLessThanOrEqual(y); @@ -2448,7 +2448,7 @@ describe('int', () => { it('10<=100=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(10)); const y = Provable.witness(UInt8, () => new UInt8(100)); x.assertLessThanOrEqual(y); @@ -2458,7 +2458,7 @@ describe('int', () => { it('100<=10=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(10)); x.assertLessThanOrEqual(y); @@ -2468,7 +2468,7 @@ describe('int', () => { it('MAXINT<=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => UInt8.MAXINT()); x.assertLessThanOrEqual(y); @@ -2480,7 +2480,7 @@ describe('int', () => { describe('assertGreaterThan', () => { it('2>1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(2)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertGreaterThan(y); @@ -2490,7 +2490,7 @@ describe('int', () => { it('1>1=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertGreaterThan(y); @@ -2500,7 +2500,7 @@ describe('int', () => { it('1>2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(2)); x.assertGreaterThan(y); @@ -2510,7 +2510,7 @@ describe('int', () => { it('100>10=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(10)); x.assertGreaterThan(y); @@ -2520,7 +2520,7 @@ describe('int', () => { it('10>100=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1000)); const y = Provable.witness(UInt8, () => new UInt8(100000)); x.assertGreaterThan(y); @@ -2530,7 +2530,7 @@ describe('int', () => { it('MAXINT>MAXINT=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => UInt8.MAXINT()); x.assertGreaterThan(y); @@ -2542,7 +2542,7 @@ describe('int', () => { describe('assertGreaterThanOrEqual', () => { it('1<=1=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertGreaterThanOrEqual(y); @@ -2552,7 +2552,7 @@ describe('int', () => { it('1>=2=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(1)); const y = Provable.witness(UInt8, () => new UInt8(2)); x.assertGreaterThanOrEqual(y); @@ -2562,7 +2562,7 @@ describe('int', () => { it('100>=10=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(100)); const y = Provable.witness(UInt8, () => new UInt8(10)); x.assertGreaterThanOrEqual(y); @@ -2572,7 +2572,7 @@ describe('int', () => { it('10>=100=false', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => new UInt8(10)); const y = Provable.witness(UInt8, () => new UInt8(100)); x.assertGreaterThanOrEqual(y); @@ -2582,7 +2582,7 @@ describe('int', () => { it('MAXINT>=MAXINT=true', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.MAXINT()); const y = Provable.witness(UInt8, () => UInt8.MAXINT()); x.assertGreaterThanOrEqual(y); @@ -2595,7 +2595,7 @@ describe('int', () => { describe('fromNumber()', () => { it('should be the same as Field(1)', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(UInt8, () => UInt8.from(1)); const y = Provable.witness(UInt8, () => new UInt8(1)); x.assertEquals(y); diff --git a/src/lib/mina.ts b/src/lib/mina.ts index 309fc42e10..68866198e7 100644 --- a/src/lib/mina.ts +++ b/src/lib/mina.ts @@ -88,7 +88,7 @@ export { setActiveInstance({ ...activeInstance, async transaction(sender: DeprecatedFeePayerSpec, f: () => void) { - return createTransaction(sender, f, 0); + return await createTransaction(sender, f, 0); }, }); @@ -375,7 +375,8 @@ function Network( }; }, async transaction(sender: DeprecatedFeePayerSpec, f: () => void) { - let tx = createTransaction(sender, f, 0, { + // TODO we run the transcation twice to be able to fetch data in between + let tx = await createTransaction(sender, f, 0, { fetchMode: 'test', isFinalRunOutsideCircuit: false, }); @@ -383,7 +384,7 @@ function Network( let hasProofs = tx.transaction.accountUpdates.some( Authorization.hasLazyProof ); - return createTransaction(sender, f, 1, { + return await createTransaction(sender, f, 1, { fetchMode: 'cached', isFinalRunOutsideCircuit: !hasProofs, }); diff --git a/src/lib/mina/local-blockchain.ts b/src/lib/mina/local-blockchain.ts index 852abf34ae..c12f96b831 100644 --- a/src/lib/mina/local-blockchain.ts +++ b/src/lib/mina/local-blockchain.ts @@ -301,11 +301,8 @@ function LocalBlockchain({ }; }, async transaction(sender: DeprecatedFeePayerSpec, f: () => void) { - // bad hack: run transaction just to see whether it creates proofs - // if it doesn't, this is the last chance to run SmartContract.runOutsideCircuit, which is supposed to run only once - // TODO: this has obvious holes if multiple zkapps are involved, but not relevant currently because we can't prove with multiple account updates - // and hopefully with upcoming work by Matt we can just run everything in the prover, and nowhere else - let tx = createTransaction(sender, f, 0, { + // TODO we run the transaction twice to match the behaviour of `Network.transaction` + let tx = await createTransaction(sender, f, 0, { isFinalRunOutsideCircuit: false, proofsEnabled: this.proofsEnabled, fetchMode: 'test', @@ -313,7 +310,7 @@ function LocalBlockchain({ let hasProofs = tx.transaction.accountUpdates.some( Authorization.hasLazyProof ); - return createTransaction(sender, f, 1, { + return await createTransaction(sender, f, 1, { isFinalRunOutsideCircuit: !hasProofs, proofsEnabled: this.proofsEnabled, }); diff --git a/src/lib/mina/transaction.ts b/src/lib/mina/transaction.ts index 9d74aa9bb6..4c55ac5f36 100644 --- a/src/lib/mina/transaction.ts +++ b/src/lib/mina/transaction.ts @@ -263,7 +263,7 @@ type RejectedTransaction = Pick< errors: string[]; }; -function createTransaction( +async function createTransaction( feePayer: DeprecatedFeePayerSpec, f: () => unknown, numberOfRuns: 0 | 1 | undefined, @@ -272,7 +272,7 @@ function createTransaction( isFinalRunOutsideCircuit = true, proofsEnabled = true, } = {} -): Transaction { +): Promise { if (currentTransaction.has()) { throw new Error('Cannot start new transaction within another transaction'); } @@ -316,7 +316,7 @@ function createTransaction( if (err !== undefined) err.bootstrap(); try { if (fetchMode === 'test') { - Provable.runUnchecked(() => { + await Provable.runUnchecked(() => { f(); Provable.asProver(() => { let tx = currentTransaction.get(); diff --git a/src/lib/ml/consistency.unit-test.ts b/src/lib/ml/consistency.unit-test.ts index c0c6e8aee9..1cf5f60617 100644 --- a/src/lib/ml/consistency.unit-test.ts +++ b/src/lib/ml/consistency.unit-test.ts @@ -94,7 +94,7 @@ test(Random.publicKey, randomTokenId, (publicKey, field) => { }); let parentTokenId = Field(field); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { tokenOwner = Provable.witness(PublicKey, () => tokenOwner); parentTokenId = Provable.witness(Field, () => parentTokenId); diff --git a/src/lib/primitives.test.ts b/src/lib/primitives.test.ts index 816247d379..ce0b5cd24c 100644 --- a/src/lib/primitives.test.ts +++ b/src/lib/primitives.test.ts @@ -18,7 +18,7 @@ describe('bool', () => { }); it('should convert false to Field element 0', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); xFalse.toField().assertEquals(new Field(0)); @@ -27,7 +27,7 @@ describe('bool', () => { }); it('should throw when false toString is compared to Field element other than 0 ', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); xFalse.toField().assertEquals(new Field(1)); }); @@ -36,7 +36,7 @@ describe('bool', () => { it('should convert true to Field element 1', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); xTrue.toField().assertEquals(new Field(1)); }); @@ -45,7 +45,7 @@ describe('bool', () => { it('should throw when true toField is compared to Field element other than 1 ', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); xTrue.toField().assertEquals(new Field(0)); }); @@ -56,7 +56,7 @@ describe('bool', () => { describe('toFields', () => { it('should return an array of Fields', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Bool, () => new Bool(false)); const fieldArr = x.toFields(); const isArr = Array.isArray(fieldArr); @@ -69,7 +69,7 @@ describe('bool', () => { describe('and', () => { it('true "and" true should return true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -80,7 +80,7 @@ describe('bool', () => { it('should throw if true "and" true is compared to false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -91,7 +91,7 @@ describe('bool', () => { it('false "and" false should return false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yFalse = Provable.witness(Bool, () => new Bool(false)); @@ -102,7 +102,7 @@ describe('bool', () => { it('should throw if false "and" false is compared to true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yFalse = Provable.witness(Bool, () => new Bool(false)); @@ -113,7 +113,7 @@ describe('bool', () => { it('false "and" true should return false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -124,7 +124,7 @@ describe('bool', () => { it('should throw if false "and" true is compared to true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -137,7 +137,7 @@ describe('bool', () => { describe('not', () => { it('should return true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); xTrue.toField().assertEquals(new Field(1)); }); @@ -145,7 +145,7 @@ describe('bool', () => { }); it('should return a new bool that is the negation of the input', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); const yFalse = Provable.witness(Bool, () => new Bool(false)); xTrue.not().assertEquals(new Bool(false)); @@ -156,7 +156,7 @@ describe('bool', () => { it('should throw if input.not() is compared to input', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); xTrue.not().assertEquals(xTrue); }); @@ -167,7 +167,7 @@ describe('bool', () => { describe('or', () => { it('true "or" true should return true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -178,7 +178,7 @@ describe('bool', () => { it('should throw if true "or" true is compared to false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xTrue = Provable.witness(Bool, () => new Bool(true)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -189,7 +189,7 @@ describe('bool', () => { it('false "or" false should return false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yFalse = Provable.witness(Bool, () => new Bool(false)); @@ -200,7 +200,7 @@ describe('bool', () => { it('should throw if false "or" false is compared to true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yFalse = Provable.witness(Bool, () => new Bool(false)); @@ -211,7 +211,7 @@ describe('bool', () => { it('false "or" true should return true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const xFalse = Provable.witness(Bool, () => new Bool(false)); const yTrue = Provable.witness(Bool, () => new Bool(true)); @@ -224,7 +224,7 @@ describe('bool', () => { describe('assertEquals', () => { it('should not throw on true "assertEqual" true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Bool, () => new Bool(true)); x.assertEquals(x); @@ -234,7 +234,7 @@ describe('bool', () => { it('should throw on true "assertEquals" false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Bool, () => new Bool(true)); const y = Provable.witness(Bool, () => new Bool(false)); @@ -246,7 +246,7 @@ describe('bool', () => { describe('equals', () => { it('should not throw on true "equals" true', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Bool, () => new Bool(true)); x.equals(x).assertEquals(true); @@ -255,7 +255,7 @@ describe('bool', () => { }); it('should throw on true "equals" false', async () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Bool, () => new Bool(true)); const y = Provable.witness(Bool, () => new Bool(false)); x.equals(y).assertEquals(true); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index b87e16fbb5..2fa341bdfa 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -10,8 +10,8 @@ export { snarkContext, SnarkContext, asProver, - runAndCheck, - runUnchecked, + runAndCheckSync, + runUncheckedSync, generateWitness, constraintSystem, constraintSystemSync, @@ -74,7 +74,10 @@ function asProver(f: () => void) { } } -function runAndCheck(f: () => void) { +/** + * @deprecated use `generateWitness` instead + */ +function runAndCheckSync(f: () => void) { let id = snarkContext.enter({ inCheckedComputation: true }); try { Snarky.run.runAndCheck(f); @@ -85,7 +88,10 @@ function runAndCheck(f: () => void) { } } -function runUnchecked(f: () => void) { +/** + * @deprecated use `generateWitness` instead + */ +function runUncheckedSync(f: () => void) { let id = snarkContext.enter({ inCheckedComputation: true }); try { Snarky.run.runUnchecked(f); @@ -97,7 +103,7 @@ function runUnchecked(f: () => void) { } async function generateWitness( - f: () => Promise, + f: (() => Promise) | (() => void), { checkConstraints = true } = {} ) { let id = snarkContext.enter({ inCheckedComputation: true }); diff --git a/src/lib/provable.ts b/src/lib/provable.ts index ea532b1c3a..aafc841875 100644 --- a/src/lib/provable.ts +++ b/src/lib/provable.ts @@ -18,9 +18,9 @@ import { inProver, snarkContext, asProver, - runAndCheck, - runUnchecked, constraintSystem, + generateWitness, + runAndCheckSync, } from './provable-context.js'; // external API @@ -151,27 +151,35 @@ const Provable = { * Runs provable code quickly, without creating a proof, but still checking whether constraints are satisfied. * @example * ```ts - * Provable.runAndCheck(() => { + * await Provable.runAndCheck(() => { * // Your code to check here * }); * ``` */ - runAndCheck, + async runAndCheck(f: (() => Promise) | (() => void)) { + await generateWitness(f, { checkConstraints: true }); + }, + /** + * @deprecated use the async `Provable.runAndCheck` instead + */ + runAndCheckSync: runAndCheckSync, /** * Runs provable code quickly, without creating a proof, and not checking whether constraints are satisfied. * @example * ```ts - * Provable.runUnchecked(() => { + * await Provable.runUnchecked(() => { * // Your code to run here * }); * ``` */ - runUnchecked, + async runUnchecked(f: (() => Promise) | (() => void)) { + await generateWitness(f, { checkConstraints: false }); + }, /** * Returns information about the constraints created by the callback function. * @example * ```ts - * const result = Provable.constraintSystem(circuit); + * const result = await Provable.constraintSystem(circuit); * console.log(result); * ``` */ diff --git a/src/lib/provable.unit-test.ts b/src/lib/provable.unit-test.ts index 9c14a0f02c..7484bc91d8 100644 --- a/src/lib/provable.unit-test.ts +++ b/src/lib/provable.unit-test.ts @@ -4,11 +4,11 @@ import { exists } from './gadgets/common.js'; import { Field } from './field.js'; import { expect } from 'expect'; -it('can witness large field array', () => { +await it('can witness large field array', async () => { let N = 100_000; let arr = Array(N).fill(0n); - Provable.runAndCheck(() => { + await Provable.runAndCheck(() => { // with exists let fields = exists(N, () => arr); diff --git a/src/lib/scalar.test.ts b/src/lib/scalar.test.ts index 842ad8e395..f4a0adf212 100644 --- a/src/lib/scalar.test.ts +++ b/src/lib/scalar.test.ts @@ -1,22 +1,12 @@ -import { shutdown, isReady, Field, Bool, Provable, Scalar } from 'o1js'; +import { Field, Provable, Scalar } from 'o1js'; describe('scalar', () => { - beforeAll(async () => { - await isReady; - }); - - afterAll(async () => { - setTimeout(async () => { - await shutdown(); - }, 0); - }); - describe('scalar', () => { describe('Inside circuit', () => { describe('toFields', () => { it('should return an array of Fields', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Scalar, () => Scalar.random()); const fieldArr = x.toFields(); expect(Array.isArray(fieldArr)).toBe(true); @@ -29,7 +19,7 @@ describe('scalar', () => { it('should return the same', () => { expect(() => { let s0 = Scalar.random(); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let s1 = Provable.witness(Scalar, () => s0); Provable.assertEqual(Scalar.fromFields(s1.toFields()), s0); }); @@ -40,7 +30,7 @@ describe('scalar', () => { describe('fromBits', () => { it('should return a Scalar', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(Scalar, () => Scalar.fromBits(Field.random().toBits()) ); @@ -51,7 +41,7 @@ describe('scalar', () => { describe('random', () => { it('two different calls should be different', () => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const x = Provable.witness(Scalar, () => Scalar.random()); const y = Provable.witness(Scalar, () => Scalar.random()); expect(x).not.toEqual(y); diff --git a/src/lib/string.test.ts b/src/lib/string.test.ts index a1c11c1869..9a55e10d84 100644 --- a/src/lib/string.test.ts +++ b/src/lib/string.test.ts @@ -22,7 +22,7 @@ describe('Circuit String', () => { ); expect(str.equals(same_str)).toEqual(Bool(true)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString.fromString( 'Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth' ); @@ -38,7 +38,7 @@ describe('Circuit String', () => { const not_same_str = CircuitString.fromString('size'); expect(str.equals(not_same_str)).toEqual(Bool(false)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = Provable.witness(CircuitString, () => { return CircuitString.fromString('Your size'); }); @@ -62,7 +62,7 @@ describe('Circuit String', () => { ); expect(str.contains(contained_str)).toEqual(new Bool(true)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString.fromString( 'Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth' ); @@ -78,7 +78,7 @@ describe('Circuit String', () => { const not_contained_str = CircuitString.fromString('defhij'); expect(str.contains(not_contained_str)).toEqual(new Bool(false)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString.fromString('abcdefghijklmnop'); const not_contained_str = CircuitString.fromString('defhij'); expect(str.contains(not_contained_str)).toEqual(new Bool(false)); @@ -91,7 +91,7 @@ describe('Circuit String', () => { const contained_str = CircuitString.fromString('ab'); expect(str.contains(contained_str)).toEqual(new Bool(true)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString8.fromString('abcd'); const contained_str = CircuitString.fromString('ab'); expect(str.contains(contained_str)).toEqual(new Bool(true)); @@ -103,7 +103,7 @@ describe('Circuit String', () => { const contained_str = CircuitString8.fromString('ab'); expect(str.contains(contained_str)).toEqual(new Bool(true)); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString.fromString('abcd'); const contained_str = CircuitString8.fromString('ab'); expect(str.contains(contained_str)).toEqual(new Bool(true)); @@ -119,7 +119,7 @@ describe('Circuit String', () => { const str = CircuitString.fromString(js_str); expect(str.toString()).toBe(js_str); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const js_str = 'Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth'; const str = CircuitString.fromString(js_str); @@ -137,7 +137,7 @@ describe('Circuit String', () => { 'Everything we see is a perspective' ); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = CircuitString.fromString( 'Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth' ); @@ -154,7 +154,7 @@ describe('Circuit String', () => { const str2 = CircuitString.fromString('efgh'); expect(str1.append(str2).toString()).toBe('abcdefgh'); - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str1 = CircuitString.fromString('abcd'); const str2 = CircuitString.fromString('efgh'); expect(str1.append(str2).toString()).toBe('abcdefgh'); @@ -165,7 +165,7 @@ describe('Circuit String', () => { /* describe('CircuitString8', () => { test('cannot create more than 8 chars', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { Provable.witness(CircuitString8, () => { return CircuitString8.fromString('More than eight chars'); }); @@ -177,7 +177,7 @@ describe('Circuit String', () => { describe('with invalid input', () => { test.skip('cannot use a character out of range', () => { expect(() => { - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { const str = Provable.witness(CircuitString, () => { return CircuitString.fromCharacters([ new Character(Field(100)), diff --git a/src/lib/testing/equivalent.ts b/src/lib/testing/equivalent.ts index d97b9fbae2..8d1be369aa 100644 --- a/src/lib/testing/equivalent.ts +++ b/src/lib/testing/equivalent.ts @@ -237,7 +237,7 @@ function equivalentProvable< ); // inside provable code - Provable.runAndCheck(() => { + Provable.runAndCheckSync(() => { let inputWitnesses = inputs2.map((x, i) => { let provable = from[i].provable; return provable !== undefined From 0f65c98918efa9dbb52f9dc88315d98aaa3b99f0 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:33:18 +0100 Subject: [PATCH 11/31] digest is async --- src/lib/zkapp.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index ec81a9a44e..fe60edf6de 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -640,9 +640,9 @@ class SmartContract extends SmartContractBase { * a cached verification key can be used. * @returns the digest, as a hex string */ - static digest() { + static async digest() { // TODO: this should use the method digests in a deterministic order! - let methodData = this.analyzeMethods(); + let methodData = await this.analyzeMethods(); let hash = hashConstant( Object.values(methodData).map((d) => Field(BigInt('0x' + d.digest))) ); From d6f8cd657cc319ac2a2908f296cd01e3363427b6 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:40:02 +0100 Subject: [PATCH 12/31] fix: sync analyze methods for reducer --- src/lib/zkapp.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index fe60edf6de..64f559fd97 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -1150,6 +1150,20 @@ super.init(); return methodMetadata; } + /** + * @deprecated use `SmartContract.analyzeMethods()` instead + */ + static analyzeMethodsSync() { + let ZkappClass = this as typeof SmartContract; + let methodMetadata = (ZkappClass._methodMetadata ??= {}); + let methodIntfs = ZkappClass._methods ?? []; + assert( + methodIntfs.every((m) => m.methodName in methodMetadata), + 'analyzeMethodsSync: analyzeMethods() must be called first' + ); + return methodMetadata; + } + /** * @deprecated use `this.account..set()` */ @@ -1296,7 +1310,7 @@ Use the optional \`maxTransactionsWithActions\` argument to increase this number } let methodData = ( contract.constructor as typeof SmartContract - ).analyzeMethods(); + ).analyzeMethodsSync(); let possibleActionsPerTransaction = [ ...new Set(Object.values(methodData).map((o) => o.actions)).add(0), ].sort((x, y) => x - y); From e83b3aef44cd853777595786c54f338979713c43 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:44:33 +0100 Subject: [PATCH 13/31] remove hack around running analyzeMethods from a contract (t wasn't working for a while) --- src/lib/mina/transaction.ts | 36 +++++++++++------------------------- src/lib/provable-context.ts | 1 - src/lib/zkapp.ts | 8 -------- 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/lib/mina/transaction.ts b/src/lib/mina/transaction.ts index 4c55ac5f36..8d62efb624 100644 --- a/src/lib/mina/transaction.ts +++ b/src/lib/mina/transaction.ts @@ -305,32 +305,18 @@ async function createTransaction( }); // run circuit - // we have this while(true) loop because one of the smart contracts we're calling inside `f` might be calling - // SmartContract.analyzeMethods, which would be running its methods again inside `Provable.constraintSystem`, which - // would throw an error when nested inside `Provable.runAndCheck`. So if that happens, we have to run `analyzeMethods` first - // and retry `Provable.runAndCheck(f)`. Since at this point in the function, we don't know which smart contracts are involved, - // we created that hack with a `bootstrap()` function that analyzeMethods sticks on the error, to call itself again. try { - let err: any; - while (true) { - if (err !== undefined) err.bootstrap(); - try { - if (fetchMode === 'test') { - await Provable.runUnchecked(() => { - f(); - Provable.asProver(() => { - let tx = currentTransaction.get(); - tx.layout.toConstantInPlace(); - }); - }); - } else { - f(); - } - break; - } catch (err_) { - if ((err_ as any)?.bootstrap) err = err_; - else throw err_; - } + if (fetchMode === 'test') { + await Provable.runUnchecked(() => { + f(); + Provable.asProver(() => { + let tx = currentTransaction.get(); + tx.layout.toConstantInPlace(); + }); + }); + } else { + // TODO support async + f(); } } catch (err) { currentTransaction.leave(transactionId); diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 2fa341bdfa..3e6fc66a13 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -34,7 +34,6 @@ type SnarkContext = { inCompile?: boolean; inCheckedComputation?: boolean; inAnalyze?: boolean; - inRunAndCheck?: boolean; inWitnessBlock?: boolean; }; let snarkContext = Context.create({ default: {} }); diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index 64f559fd97..6a802d0136 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -1105,14 +1105,6 @@ super.init(); !methodIntfs.every((m) => m.methodName in methodMetadata) && !inAnalyze() ) { - if (snarkContext.get().inRunAndCheck) { - let err = new Error( - 'Can not analyze methods inside Provable.runAndCheck, because this creates a circuit nested in another circuit' - ); - // EXCEPT if the code that calls this knows that it can first run `analyzeMethods` OUTSIDE runAndCheck and try again - (err as any).bootstrap = () => ZkappClass.analyzeMethods(); - throw err; - } let id: number; let insideSmartContract = !!smartContractContext.get(); if (insideSmartContract) id = smartContractContext.enter(null); From ed57417a3522dab6cb52381e9b12e3692c80d7f0 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:44:54 +0100 Subject: [PATCH 14/31] fix examples build --- src/examples/benchmarks/mul-web.ts | 6 ++--- src/examples/benchmarks/mul.ts | 6 ++--- src/examples/constraint-system.ts | 16 ++++++++------ src/examples/crypto/ecdsa/run.ts | 4 ++-- src/examples/crypto/foreign-field.ts | 2 +- src/examples/crypto/sha256/run.ts | 2 +- .../zkapps/dex/happy-path-with-proofs.ts | 6 ++--- src/examples/zkapps/dex/run-live.ts | 6 ++--- src/examples/zkapps/dex/run.ts | 6 ++--- src/examples/zkapps/dex/upgradability.ts | 8 +++---- .../zkapps/reducer/actions-as-merkle-list.ts | 2 +- src/examples/zkapps/reducer/map.ts | 2 +- src/examples/zkapps/reducer/reducer.ts | 2 +- src/examples/zkapps/sudoku/index.ts | 2 +- src/examples/zkprogram/gadgets.ts | 2 +- .../vk-regression/plain-constraint-system.ts | 6 ++--- tests/vk-regression/vk-regression.ts | 22 ++++++++++--------- 17 files changed, 52 insertions(+), 48 deletions(-) diff --git a/src/examples/benchmarks/mul-web.ts b/src/examples/benchmarks/mul-web.ts index 43c977ff74..8f964a47d0 100644 --- a/src/examples/benchmarks/mul-web.ts +++ b/src/examples/benchmarks/mul-web.ts @@ -20,8 +20,8 @@ function main(nMuls: number) { } } -function getRows(nMuls: number) { - let { rows } = Provable.constraintSystem(() => main(nMuls)); +async function getRows(nMuls: number) { + let { rows } = await Provable.constraintSystem(() => main(nMuls)); return rows; } @@ -52,7 +52,7 @@ function picklesCircuit(nMuls: number) { // the script -console.log('circuit size (without pickles overhead)', getRows(nMuls)); +console.log('circuit size (without pickles overhead)', await getRows(nMuls)); if (withPickles) { let circuit = picklesCircuit(nMuls); diff --git a/src/examples/benchmarks/mul.ts b/src/examples/benchmarks/mul.ts index 3f92f8c27c..ebe407a3e6 100644 --- a/src/examples/benchmarks/mul.ts +++ b/src/examples/benchmarks/mul.ts @@ -19,8 +19,8 @@ function main(nMuls: number) { } } -function getRows(nMuls: number) { - let { rows } = Provable.constraintSystem(() => main(nMuls)); +async function getRows(nMuls: number) { + let { rows } = await Provable.constraintSystem(() => main(nMuls)); return rows; } @@ -48,7 +48,7 @@ function picklesCircuit(nMuls: number) { }); } -console.log('circuit size (without pickles overhead)', getRows(nMuls)); +console.log('circuit size (without pickles overhead)', await getRows(nMuls)); if (withPickles) { let circuit = picklesCircuit(nMuls); diff --git a/src/examples/constraint-system.ts b/src/examples/constraint-system.ts index f2da63ad3b..e6755f3ba4 100644 --- a/src/examples/constraint-system.ts +++ b/src/examples/constraint-system.ts @@ -2,13 +2,15 @@ import { Field, Poseidon, Provable } from 'o1js'; let hash = Poseidon.hash([Field(1), Field(-1)]); -let { rows, digest, publicInputSize, print } = Provable.constraintSystem(() => { - let x = Provable.witness(Field, () => Field(1)); - let y = Provable.witness(Field, () => Field(-1)); - x.add(y).assertEquals(Field(0)); - let z = Poseidon.hash([x, y]); - z.assertEquals(hash); -}); +let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( + () => { + let x = Provable.witness(Field, () => Field(1)); + let y = Provable.witness(Field, () => Field(-1)); + x.add(y).assertEquals(Field(0)); + let z = Poseidon.hash([x, y]); + z.assertEquals(hash); + } +); print(); console.log({ rows, digest, publicInputSize }); diff --git a/src/examples/crypto/ecdsa/run.ts b/src/examples/crypto/ecdsa/run.ts index c3acaa19c2..c342a6433d 100644 --- a/src/examples/crypto/ecdsa/run.ts +++ b/src/examples/crypto/ecdsa/run.ts @@ -13,12 +13,12 @@ let signature = Ecdsa.sign(message.toBytes(), privateKey.toBigInt()); // investigate the constraint system generated by ECDSA verify console.time('ecdsa verify only (build constraint system)'); -let csEcdsa = ecdsa.analyzeMethods(); +let csEcdsa = await ecdsa.analyzeMethods(); console.timeEnd('ecdsa verify only (build constraint system)'); console.log(csEcdsa.verifySignedHash.summary()); console.time('keccak + ecdsa verify (build constraint system)'); -let cs = keccakAndEcdsa.analyzeMethods(); +let cs = await keccakAndEcdsa.analyzeMethods(); console.timeEnd('keccak + ecdsa verify (build constraint system)'); console.log(cs.verifyEcdsa.summary()); diff --git a/src/examples/crypto/foreign-field.ts b/src/examples/crypto/foreign-field.ts index bffdae7654..b71af14c6e 100644 --- a/src/examples/crypto/foreign-field.ts +++ b/src/examples/crypto/foreign-field.ts @@ -96,7 +96,7 @@ class MyContract extends SmartContract { this.x.set(x.assertAlmostReduced()); } } -MyContract.analyzeMethods(); // works +await MyContract.analyzeMethods(); // works // btw - we support any finite field up to 259 bits. for example, the seqp256k1 base field: let Fseqp256k1 = createForeignField((1n << 256n) - (1n << 32n) - 0b1111010001n); diff --git a/src/examples/crypto/sha256/run.ts b/src/examples/crypto/sha256/run.ts index b1d72e3fa6..f506f7fe5d 100644 --- a/src/examples/crypto/sha256/run.ts +++ b/src/examples/crypto/sha256/run.ts @@ -6,7 +6,7 @@ console.timeEnd('compile'); let preimage = Bytes12.fromString('hello world!'); -console.log('sha256 rows:', SHA256Program.analyzeMethods().sha256.rows); +console.log('sha256 rows:', (await SHA256Program.analyzeMethods()).sha256.rows); console.time('prove'); let proof = await SHA256Program.sha256(preimage); diff --git a/src/examples/zkapps/dex/happy-path-with-proofs.ts b/src/examples/zkapps/dex/happy-path-with-proofs.ts index 2b6fae11b5..722caf8a69 100644 --- a/src/examples/zkapps/dex/happy-path-with-proofs.ts +++ b/src/examples/zkapps/dex/happy-path-with-proofs.ts @@ -21,9 +21,9 @@ let tx, balances, oldBalances; let { Dex, DexTokenHolder, getTokenBalances } = createDex(); -TokenContract.analyzeMethods(); -DexTokenHolder.analyzeMethods(); -Dex.analyzeMethods(); +await TokenContract.analyzeMethods(); +await DexTokenHolder.analyzeMethods(); +await Dex.analyzeMethods(); if (proofsEnabled) { tic('compile (token)'); diff --git a/src/examples/zkapps/dex/run-live.ts b/src/examples/zkapps/dex/run-live.ts index 554b77b85b..1d766aff83 100644 --- a/src/examples/zkapps/dex/run-live.ts +++ b/src/examples/zkapps/dex/run-live.ts @@ -47,9 +47,9 @@ if (!useCustomLocalNetwork) { await ensureFundedAccount(senderKey.toBase58()); } -TokenContract.analyzeMethods(); -DexTokenHolder.analyzeMethods(); -Dex.analyzeMethods(); +await TokenContract.analyzeMethods(); +await DexTokenHolder.analyzeMethods(); +await Dex.analyzeMethods(); tic('compile (token)'); await TokenContract.compile(); diff --git a/src/examples/zkapps/dex/run.ts b/src/examples/zkapps/dex/run.ts index e053a6463e..7f3b5d46b6 100644 --- a/src/examples/zkapps/dex/run.ts +++ b/src/examples/zkapps/dex/run.ts @@ -24,7 +24,7 @@ console.log('TOKEN X ID\t', TokenId.toBase58(tokenIds.X)); console.log('TOKEN Y ID\t', TokenId.toBase58(tokenIds.Y)); console.log('-------------------------------------------------'); -TokenContract.analyzeMethods(); +await TokenContract.analyzeMethods(); if (proofsEnabled) { console.log('compile (token)...'); await TokenContract.compile(); @@ -57,8 +57,8 @@ async function main({ withVesting }: { withVesting: boolean }) { let { Dex, DexTokenHolder, getTokenBalances } = createDex(options); // analyze methods for quick error feedback - DexTokenHolder.analyzeMethods(); - Dex.analyzeMethods(); + await DexTokenHolder.analyzeMethods(); + await Dex.analyzeMethods(); if (proofsEnabled) { // compile & deploy all zkApps diff --git a/src/examples/zkapps/dex/upgradability.ts b/src/examples/zkapps/dex/upgradability.ts index 70ba253967..61ff9f44b3 100644 --- a/src/examples/zkapps/dex/upgradability.ts +++ b/src/examples/zkapps/dex/upgradability.ts @@ -38,8 +38,8 @@ async function atomicActionsTest({ withVesting }: { withVesting: boolean }) { let { Dex, DexTokenHolder, getTokenBalances } = createDex(options); // analyze methods for quick error feedback - DexTokenHolder.analyzeMethods(); - Dex.analyzeMethods(); + await DexTokenHolder.analyzeMethods(); + await Dex.analyzeMethods(); if (proofsEnabled) { // compile & deploy all zkApps @@ -249,8 +249,8 @@ async function upgradeabilityTests({ withVesting }: { withVesting: boolean }) { } = createDex(options); // analyze methods for quick error feedback - DexTokenHolder.analyzeMethods(); - Dex.analyzeMethods(); + await DexTokenHolder.analyzeMethods(); + await Dex.analyzeMethods(); // compile & deploy all zkApps console.log('compile (token contract)...'); diff --git a/src/examples/zkapps/reducer/actions-as-merkle-list.ts b/src/examples/zkapps/reducer/actions-as-merkle-list.ts index 86c38af844..1740de72b1 100644 --- a/src/examples/zkapps/reducer/actions-as-merkle-list.ts +++ b/src/examples/zkapps/reducer/actions-as-merkle-list.ts @@ -119,7 +119,7 @@ let zkapp = new ActionsContract(zkappAddress); await ActionsContract.compile(); console.log( `rows for ${MAX_UPDATES_WITH_ACTIONS} updates with actions`, - ActionsContract.analyzeMethods().assertContainsAddress.rows + (await ActionsContract.analyzeMethods()).assertContainsAddress.rows ); let deployTx = await Mina.transaction(sender, () => zkapp.deploy()); await deployTx.sign([senderKey, zkappKey]).send(); diff --git a/src/examples/zkapps/reducer/map.ts b/src/examples/zkapps/reducer/map.ts index 890555be92..8619d9c347 100644 --- a/src/examples/zkapps/reducer/map.ts +++ b/src/examples/zkapps/reducer/map.ts @@ -86,7 +86,7 @@ let k = 1 << 4; let Local = Mina.LocalBlockchain(); Mina.setActiveInstance(Local); -let cs = StorageContract.analyzeMethods(); +let cs = await StorageContract.analyzeMethods(); console.log(`method size for a "mapping" contract with ${k} entries`); console.log('get rows:', cs['get'].rows); diff --git a/src/examples/zkapps/reducer/reducer.ts b/src/examples/zkapps/reducer/reducer.ts index a9bbbb063d..d5aed207b4 100644 --- a/src/examples/zkapps/reducer/reducer.ts +++ b/src/examples/zkapps/reducer/reducer.ts @@ -83,7 +83,7 @@ if (doProofs) { // TODO: if we don't do this, then `analyzeMethods()` will be called during `runUnchecked()` in the tx callback below, // which currently fails due to `finalize_is_running` in snarky not resetting internal state, and instead setting is_running unconditionally to false, // so we can't nest different snarky circuit runners - CounterZkapp.analyzeMethods(); + await CounterZkapp.analyzeMethods(); } console.log('deploy'); diff --git a/src/examples/zkapps/sudoku/index.ts b/src/examples/zkapps/sudoku/index.ts index 639d3ab7b2..c626f175c2 100644 --- a/src/examples/zkapps/sudoku/index.ts +++ b/src/examples/zkapps/sudoku/index.ts @@ -13,7 +13,7 @@ const zkAppAddress = zkAppPrivateKey.toPublicKey(); // create an instance of the smart contract const zkApp = new SudokuZkApp(zkAppAddress); -let methods = SudokuZkApp.analyzeMethods(); +let methods = await SudokuZkApp.analyzeMethods(); console.log( 'first 5 gates of submitSolution method:', ...methods.submitSolution.gates.slice(0, 5) diff --git a/src/examples/zkprogram/gadgets.ts b/src/examples/zkprogram/gadgets.ts index 1e2508c804..d1bc8e5d50 100644 --- a/src/examples/zkprogram/gadgets.ts +++ b/src/examples/zkprogram/gadgets.ts @@ -1,6 +1,6 @@ import { Field, Provable, Gadgets, ZkProgram } from 'o1js'; -let cs = Provable.constraintSystem(() => { +let cs = await Provable.constraintSystem(() => { let f = Provable.witness(Field, () => Field(12)); let res1 = Gadgets.rotate64(f, 2, 'left'); diff --git a/tests/vk-regression/plain-constraint-system.ts b/tests/vk-regression/plain-constraint-system.ts index 7165b751c1..809c3742f8 100644 --- a/tests/vk-regression/plain-constraint-system.ts +++ b/tests/vk-regression/plain-constraint-system.ts @@ -132,7 +132,7 @@ function constraintSystem( let methodKeys = Object.keys(obj); return { - analyzeMethods() { + async analyzeMethods() { let cs: Record< string, { @@ -141,7 +141,7 @@ function constraintSystem( } > = {}; for (let key of methodKeys) { - let { rows, digest } = Provable.constraintSystem(obj[key]); + let { rows, digest } = await Provable.constraintSystem(obj[key]); cs[key] = { digest, rows, @@ -155,6 +155,6 @@ function constraintSystem( }; }, name, - digest: () => name, + digest: async () => name, }; } diff --git a/tests/vk-regression/vk-regression.ts b/tests/vk-regression/vk-regression.ts index 65360578b3..40531257ef 100644 --- a/tests/vk-regression/vk-regression.ts +++ b/tests/vk-regression/vk-regression.ts @@ -18,12 +18,14 @@ let dump = process.argv[4] === '--dump'; let jsonPath = process.argv[dump ? 5 : 4]; type MinimumConstraintSystem = { - analyzeMethods(): Record< - string, - { - rows: number; - digest: string; - } + analyzeMethods(): Promise< + Record< + string, + { + rows: number; + digest: string; + } + > >; compile(): Promise<{ verificationKey: { @@ -31,7 +33,7 @@ type MinimumConstraintSystem = { data: string; }; }>; - digest(): string; + digest(): Promise; name: string; }; @@ -86,7 +88,7 @@ async function checkVk(contracts: typeof ConstraintSystems) { verificationKey: { data, hash }, } = await c.compile(); - let methodData = c.analyzeMethods(); + let methodData = await c.analyzeMethods(); for (const methodKey in methodData) { let actualMethod = methodData[methodKey]; @@ -143,8 +145,8 @@ but expected was async function dumpVk(contracts: typeof ConstraintSystems) { let newEntries: typeof RegressionJson = {}; for await (const c of contracts) { - let data = c.analyzeMethods(); - let digest = c.digest(); + let data = await c.analyzeMethods(); + let digest = await c.digest(); let verificationKey: | { data: string; hash: { toString(): string } } | undefined; From 933b133bcad33181a929264590ac915786e5b90b Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 12:46:28 +0100 Subject: [PATCH 15/31] comment for later --- src/lib/proof-system.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index 12f19b9fe6..67f3785c6f 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -316,6 +316,7 @@ function ZkProgram< static tag = () => selfTag; } + // TODO remove sort()! Object.keys() has a deterministic order let methodKeys: (keyof Types & string)[] = Object.keys(methods).sort(); // need to have methods in (any) fixed order let methodIntfs = methodKeys.map((key) => sortMethodArguments('program', key, methods[key].privateInputs, SelfProof) From 6f655558db53bd65d2d1e7f8e3247f72052c30b5 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:02:17 +0100 Subject: [PATCH 16/31] fixup unit tests --- src/lib/foreign-curve.unit-test.ts | 2 +- src/lib/gadgets/sha256.unit-test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/foreign-curve.unit-test.ts b/src/lib/foreign-curve.unit-test.ts index db60521e6d..d31a6dd76e 100644 --- a/src/lib/foreign-curve.unit-test.ts +++ b/src/lib/foreign-curve.unit-test.ts @@ -32,7 +32,7 @@ main(); console.timeEnd('running constant version'); console.time('running witness generation & checks'); -Provable.runAndCheck(main); +await Provable.runAndCheck(main); console.timeEnd('running witness generation & checks'); console.time('creating constraint system'); diff --git a/src/lib/gadgets/sha256.unit-test.ts b/src/lib/gadgets/sha256.unit-test.ts index f6383a7409..f795ec6cb9 100644 --- a/src/lib/gadgets/sha256.unit-test.ts +++ b/src/lib/gadgets/sha256.unit-test.ts @@ -31,7 +31,7 @@ const Sha256Program = ZkProgram({ }, }); -const RUNS = 5; +const RUNS = 2; await Sha256Program.compile(); From 298c4bd8d3550c03fa425d39a3322e1ddbb43c6c Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:14:07 +0100 Subject: [PATCH 17/31] this wasn't working - just accept actions per method as a parameter for now --- src/lib/zkapp.ts | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index 6a802d0136..aaa47652ae 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -1142,20 +1142,6 @@ super.init(); return methodMetadata; } - /** - * @deprecated use `SmartContract.analyzeMethods()` instead - */ - static analyzeMethodsSync() { - let ZkappClass = this as typeof SmartContract; - let methodMetadata = (ZkappClass._methodMetadata ??= {}); - let methodIntfs = ZkappClass._methods ?? []; - assert( - methodIntfs.every((m) => m.methodName in methodMetadata), - 'analyzeMethodsSync: analyzeMethods() must be called first' - ); - return methodMetadata; - } - /** * @deprecated use `this.account..set()` */ @@ -1291,6 +1277,7 @@ class ${contract.constructor.name} extends SmartContract { { state, actionState }: { state: S; actionState: Field }, { maxTransactionsWithActions = 32, + maxActionsPerMethod = 1, skipActionStatePrecondition = false, } = {} ): { state: S; actionState: Field } { @@ -1300,13 +1287,11 @@ class ${contract.constructor.name} extends SmartContract { Use the optional \`maxTransactionsWithActions\` argument to increase this number.` ); } - let methodData = ( - contract.constructor as typeof SmartContract - ).analyzeMethodsSync(); - let possibleActionsPerTransaction = [ - ...new Set(Object.values(methodData).map((o) => o.actions)).add(0), - ].sort((x, y) => x - y); - + // TODO find out max actions per method automatically? + let possibleActionsPerTransaction = Array.from( + { length: maxActionsPerMethod + 1 }, + (_, i) => i + ); let possibleActionTypes = possibleActionsPerTransaction.map((n) => Provable.Array(reducer.actionType, n) ); From 140f7cbbc44cdd390dc0e58a119321fe5483fd7f Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:15:16 +0100 Subject: [PATCH 18/31] bindings --- src/bindings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings b/src/bindings index 4a01c2c982..cd0c65aa43 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit 4a01c2c9829ebf797b38da4d3cceec44866379d7 +Subproject commit cd0c65aa43abad8b7b1db90c79f9a919ef3c0318 From 8df5fc6438c7df43af469b94b5e480213f840d95 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:31:26 +0100 Subject: [PATCH 19/31] tweak --- src/lib/zkapp.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index aaa47652ae..4669c14e29 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -1200,6 +1200,7 @@ type ReducerReturn = { initial: { state: State; actionState: Field }, options?: { maxTransactionsWithActions?: number; + maxActionsPerMethod?: number; skipActionStatePrecondition?: boolean; } ): { state: State; actionState: Field }; @@ -1215,6 +1216,7 @@ type ReducerReturn = { fromActionState: Field, options?: { maxTransactionsWithActions?: number; + maxActionsPerMethod?: number; skipActionStatePrecondition?: boolean; } ): Field; @@ -1289,8 +1291,8 @@ Use the optional \`maxTransactionsWithActions\` argument to increase this number } // TODO find out max actions per method automatically? let possibleActionsPerTransaction = Array.from( - { length: maxActionsPerMethod + 1 }, - (_, i) => i + { length: maxActionsPerMethod }, + (_, i) => i + 1 ); let possibleActionTypes = possibleActionsPerTransaction.map((n) => Provable.Array(reducer.actionType, n) From 74f0e15656e59dafe9ddd7a4239a452eec6ec2ec Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:31:39 +0100 Subject: [PATCH 20/31] this doesn't make sense.. --- tests/vk-regression/vk-regression.json | 80 +++++++++++++------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/tests/vk-regression/vk-regression.json b/tests/vk-regression/vk-regression.json index 691010dc38..671a33d8f1 100644 --- a/tests/vk-regression/vk-regression.json +++ b/tests/vk-regression/vk-regression.json @@ -1,6 +1,6 @@ { "Voting_": { - "digest": "3c75d3509d7717e33cff7e94489d8f60082ac11f7f808e10a64f703a1d096d4a", + "digest": "ea395c2c6925c6a941bb2226e98a6329473d3704083e230b079464cf33f7d38", "methods": { "voterRegistration": { "rows": 1186, @@ -11,7 +11,7 @@ "digest": "8c83b537e3dab168c4aa2c00b90e5f2a" }, "approveRegistrations": { - "rows": 1148, + "rows": 1147, "digest": "08b40e8d2a9ea7369c371afd2e4e1f54" }, "vote": { @@ -19,34 +19,34 @@ "digest": "259e561fb1ade3c15fedcafb7da09c87" }, "countVotes": { - "rows": 5796, - "digest": "49bedc90e4f9004081a7cf4ec1890691" + "rows": 5732, + "digest": "3d596b4040e8a83ff7b2319706240671" } }, "verificationKey": { - "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRjKmnpZwY33yiryBLa9HQWpeZDSJI5y91gKJ9g5atltQApAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9gRyS26SdOohL85UmEc4duqlJOOlXOFuwOT6dvoiUcdQtzuPp1pzA/LHueqm9yQG9mlT0Df8uY/A+rwM4l/ypTP/o0+5GCM9jJf9bl/z0DpGWheCJY+LZbIGeBUOpg0Gx1+KZsD9ivWJ0vxNz8zKcAS1i3FgntjqyfY+62jfTR8PW1Y4wdaFan6jSxaaH6W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B3EyhloZLJJ6ywxt41smXVugxA8LRTO+6lVBOBF14jHQCCUl6u7uiWCe1z4/bC5wQXPwWSljp8NVU8Erp1U9ModNK7W63Pkh0efvgSD5d0nLzbfa0jTdxZ1JkfKsnvYk43Ed+vmXooHZhUeZAIX8ZCizhb1Gfvm02JFwxYXmiYAOp5wkGzweU2I5zo8r5yZFI1r4XibNQs7eAfKGRv3gh8/EuLkX/bdettgPvNsI8ndpQ3kL/V8W2PQN4/hjC9AKCYBeXQG42bRncYZdLe++R2KA1ZdPDxQPF3sxUIKhzmRWqbozrtv310Maorwv6eZJjldlCJwICR9QgcDwDuNj+UFJnX3RWsdIWsUbI1T4wO0sE2sBiMX/OqmiGJEAnBegioistlFyfRvm54h+duNOl/ol1Fva7NoXvsL/wThAWUly7bnc7/Al2bBQlUrmEX46UnKXzYntkZDee7Lx1u1BBkJAj/5BH1YZOPmMCh498rBUiHmc+4uQqebqNSHdOSgC39ESss4u7GNhWj3fi9XXta6UT9wapEMGq0WTg2Kry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", - "hash": "24656492245991446483604357639740051536117166623025096114760294586080473547383" + "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRjKmnpZwY33yiryBLa9HQWpeZDSJI5y91gKJ9g5atltQApAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6O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1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", + "hash": "4228330835326027799423690653688396954103089782388745015615732102634001904345" } }, "Membership_": { - "digest": "3c6c74360f42734aa1d3f76f497ec63a0bc39528b47a00c3be887a0b6ef1f8e1", + "digest": "881ce3501e8891763083e70ad0eda14111fb743c51e187d80db810a5e91cad5", "methods": { "addEntry": { - "rows": 1317, - "digest": "86c4cb3e10764e94741e23cce1342192" + "rows": 5444, + "digest": "4859aa79bfd8de64944cb571bb6e3bab" }, "isMember": { - "rows": 433, + "rows": 432, "digest": "8ac29f5a178a401e243e206c62dfbfaf" }, "publish": { - "rows": 694, - "digest": "5c39ad497d024b86cf7b76b50cf14d6e" + "rows": 690, + "digest": "50c08c4b5ea9b3ea6954fec7c6c7bfd0" } }, "verificationKey": { - "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+9o3eZc3cGQ+jppXoN3zwO91DeT/GYvXqCZTAudLxIwuJU11UBThG5CKKABa9ulQ1bYGXj9Eydy0vPxfojDeFrnKMi9GKSjiSMzmOLbIw7Dt+g9ggjsHM5rPrT7dY1VV4ZT9shjlcX3029xnk3Bjz4Q9PiK+A8o6f7L6aVB07I+QY2iDtwSQWuXYPohrk85I1UbPfY+giWqFXBtHaN45PMWCyBx0TKaozETCmv0kA5KGTzesYQCECPQ8F2DM+oXz8xly+z9/Ypt/Zx9NvF7wute/1s6Q/QuAEn3HRvRYob/rqf780WfKDu+k76Fsg+6v8noW+VgHKEqvQ2wtI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1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", - "hash": "1783504200634090470775115883157449184948497438713557884110780778068634660997" + "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+9o3eZc3cGQ+jppXoN3zwO91DeT/GYvXqCZTAudLxIwuJU11UBThG5CKKABa9ulQ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s6NoRgeAD6SadFDbQmXaftE+Y1MVOtjnaZDUBdwahWiJMlkfZpxW1aubEc/GSX8WzCZ8h9HeakcRc7kcN0CR8kmfER3eiZ2JMbt5cQl/afNjwGGAmeXzTaR34AgFjiw/RlZJkhYm9jyf18M8yP94QGBMxd6Y6wrNvOmJHzEnp8aitJsDlZklm8LKbjumlSbLcbBokpIDhFBBKfwP2qsQX7eHLCZ/3mztoFKoIiYXgrHWG8m2SzIJ/ljn6Rg7AxIsPjzZyEw1eXAOC7A1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", + "hash": "3070293148579525989861686835372338501184806723491293563455859978299236081201" } }, "HelloWorld": { @@ -58,15 +58,15 @@ } }, "verificationKey": { - "data": "AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1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/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=", - "hash": "12073693408844675717690269959590209616934536940765116494766700428390466839" + "data": "AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1ygGxXERl1oQh6DBxf/hDUD0HOeg/JajCp3V6b5wytil2mfx8v2DB5RuNQ7VxJWkha0TSnJJsOl0FxhjldBbOY3tUZzZxHpPhHOKHz/ZAXRYFIsf2x+7boXC0iPurETHN7j5IevHIgf2fSW8WgHZYn83hpVI33LBdN1pIbUc7oWAUQVmmgp04jRqTCYK1oNg+Y9DeIuT4EVbp/yN7eS7Ay8ahic2sSAZvtn08MdRyk/jm2cLlJbeAAad6Xyz/H9l7JrkbVwDMMPxvHVHs27tNoJCzIlrRzB7pg3ju9aQOu4h3thDr+WSgFQWKvcRPeL7f3TFjIr8WZ2457RgMcTwXwORKbqJCcyKVNOE+FlNwVkOKER+WIpC0OlgGuayPFwQQkbb91jaRlJvahfwkbF2+AJmDnavmNpop9T+/Xak1adXIrsRPeOjC+qIKxIbGimoMOoYzYlevKA80LnJ7HC0IxR+yNLvoSYxDDPNRD+OCCxk5lM2h8IDUiCNWH4FZNJ+doiigKjyZlu/xZ7jHcX7qibu/32KFTX85DPSkQM8dAPwtWrOmtKxrwXN+mZ2qSIPEKA/keGVelezo1AZrBs09Gb7Si2kRV8TUQb24V0P9WO2Vq8S86xUXJoXShdoylR4KR89XcqLS/NP7lwCEej/L8q8R7sKGMCXmgFYluWH4JBSPDgvMxScfjFS33oBNb7po8cLnAORzohXoYTSgztklD0mKn6EegLbkLtwwr9ObsLz3m7fp/3wkNWFRkY5xzSZN1VybbQbmpyQNCpxd/kdDsvlszqlowkyC8HnKbhn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+vA2KmJngWTx+ol4rVFimGm76VT0xCFDsu2K0YX0yoLNH4u2XfmT9NR8gGfkVRCnnNjlbgHQmEwC75+GmEJ5DjD3d+s6IXTQ60MHvxbTHHlnfmPbgKn2SAI0uVoewKC9GyK6dSaboLw3C48jl0E2kyc+7umhCk3kEeWmt//GSjRNhoq+B+mynXiOtgFs/Am2v1TBjSb+6tcijsf5tFJmeGxlCjJnTdNWBkSHpMoo6OFkkpA6/FBAUHLSM7Yv8oYyd0GtwF5cCwQ6aRTbl9oG/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=", + "hash": "23008763500271176260093590948902949903512851062443953107046635216420090246820" } }, "TokenContract": { "digest": "1680d3e1357a466f906621af00d830f99b6128c5f51cf0373202620d4f6cd00d", "methods": { "init": { - "rows": 655, + "rows": 654, "digest": "d535a589774b32cd36e2d6c3707afd30" }, "init2": { @@ -79,8 +79,8 @@ } }, "verificationKey": { - "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+9o3eZc3cGQ+jppXoN3zwO91DeT/GYvXqCZTAudLxIwuJU11UBThG5CKKABa9ulQ1bYGXj9Eydy0vPxfojDeFrnKMi9GKSjiSMzmOLbIw7Dt+g9gg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MlkfZpxW1aubEc/GSX8WzCZ8h9HeakcRc7kcN0CR8kmfER3eiZ2JMbt5cQl/afNjwGGAmeXzTaR34AgFjiw/RlZJkhYm9jyf18M8yP94QGBMxd6Y6wrNvOmJHzEnp8aitJsDlZklm8LKbjumlSbLcbBokpIDhFBBKfwP2qsQX7eHLCZ/3mztoFKoIiYXgrHWG8m2SzIJ/ljn6Rg7AxIsPjzZyEw1eXAOC7A1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", - "hash": "8925803295369202411953053433348085915894172555008342243993322619248448379055" + "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bC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Q9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", + "hash": "28746489416588124021057379110164718862651399658896369619264365039730168400693" } }, "Dex": { @@ -95,11 +95,11 @@ "digest": "69358bfab9d197e2f3ea1d658cb7fa20" }, "swapX": { - "rows": 1513, + "rows": 1512, "digest": "a080a34bacf8c4a843d7355f9b69304c" }, "swapY": { - "rows": 1513, + "rows": 1512, "digest": "4100b3543afd76189c879487c4b4f4a4" }, "burnLiquidity": { @@ -108,15 +108,15 @@ } }, "verificationKey": { - "data": "AADgDFCYyznG8hH/Z695+WW86B544SmJFzz5ObrizTJ4KMqy+pfsOR2Mt2yGViXSJPpAR76RNHNga83UB8/9OPQIB+uHOnxXH7vN8sUeDQi50gWdXzRlzSS1jsT9t+XsQwHNWgMQp04pKmF+0clYz1zwOO95BwHGcQ/olrSYW4tbJN6KW0hN2eESQfUJcwfB6uUzwvGtkFs+aiUykn7KUgUgXQkKgdHHdyFioNHNPmkpiAre/Ts8BKwwvf5hCa1MtBF6ax6ymlATB4YBL0ETiEPTE/Qk1zGWUSL2UB6aY45/LlfTLCKlyLq7cR3HOucFfBncVfzI7D8j5n4wVqY+vAI4cf+Yv7iVRLbeFcycXtsuPQntgBzKa/mcqcWuVM7p2SYRrtKdX8EKvOO6NhfLx4x0atAi8pKf+vZR76LSP4iOA8hwXvk6MNvPt1fxCS96ZAKuAzZnAcK+MH1OcKeLj+EHtZmf40WRb3AEG5TWRKuD6DT5noDclZsE8ROZKUSOKAUGIBvt7MpzOWPPchmnromWEevmXo3GoPUZCKnWX6ZLAtJwAszLUgiVS8rx3JnLXuXrtcVFto5FFQhwSHZyzuYZAEBkuWYjTIQUNC0a9ZAwUm/EpDeXI6P1JZDO4pZvQZYepRjEbJrD2vmlsUClGTraMq89p5noJMY5v5Cyhy/pSic8Tji/Xbt9HCJ2octSzicWSWK/UuEGaciNget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+AgEbUCL/wrp6/GX8pui5YJGWx3XmIFj/RnYS2Je5FZ7w74JclD3XhLUo5Dhpq5RznHplpLB9mNdZdm5269US/XCgC/ZKyUxW3+0ajdBY1cLzF6qglitaYTp3MVUENVOkACM2RyKw6jIK2Leq3qLp6AUz21VXj4WznZcdI8MXqT9v8HxjXbAI9dtbhLRZRpJmu/129vrVmwSTHvsVoA7vXyYh/iO3ZMcy+D1x+HZU6Q/oDYCicqOPHxpSc9QGehmNyeGzI//524Gz3RudkU7s6MPdLWqZrieRTnWsTIrCDieu4ValfP8BFz7asYUv0t9jMWpv3yjbY7c5h8N/m7IUXwTQCzFpjPV7HC72BjVwPaYqh5/oAQsSNcv5I3c2GsCGj5C4hFFoT7eWfVtu/6ibQl0COhRDsegnOBtZ7NGfybI8IIO/4yrgel92bypb3eSxeMvdE5wzURluGDkBVVIACD8C5W1MzqrejUiiTfc3mkLhQ0xKRRhT0qqkmYWlbGN5hmMOA9YaYx8OFTgMys1WbzdidWgEkyvvdkWctGlges6eg/lJE61tJ8wGxvJfKtpyDW/2MRvsnO1+2EXIQ2eV3hkxg=", - "hash": "25039693596333908117154819221126656892469551802975690923144441585724891963362" + "data": "AADgDFCYyznG8hH/Z695+WW86B544SmJFzz5ObrizTJ4KMqy+pfsOR2Mt2yGViXSJPpAR76RNHNga83UB8/9OPQIB+uHOnxXH7vN8sUeDQi50gWdXzRlzSS1jsT9t+XsQwHNWgMQp04pKmF+0clYz1zwOO95BwHGcQ/olrSYW4tbJN6KW0hN2eESQfUJcwfB6uUzwvGtkFs+aiUykn7KUgUgXQkKgdHHdyFioNHNPmkpiAre/Ts8BKwwvf5hCa1MtBF6ax6ymlATB4YBL0ETiEPTE/Qk1zGWUSL2UB6aY45/LlfTLCKlyLq7cR3HOucFfBncVfzI7D8j5n4wVqY+vAI4cf+Yv7iVRLbeFcycXtsuPQntgBzKa/mcqcWuVM7p2SYRrtKdX8EKvOO6NhfLx4x0atAi8pKf+vZR76LSP4iOA8hwXvk6M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T0mAFqR8lwZrj6lbQtNS0QQboG5fzoyYGi8YnSXhC2T5fFDpGJ319GHUsna58o5wk8LMwKWNTxq+FN6XiRgu0BFOrtG6MtT1OxYE9Dti6WatGDsWv+KMLDHjxUK1bhiSRnvkWYNcnuDJ0Ry+PRGHNUijVU0SbchntC2JHdhwKbwIofwKHE8HhvlK8FgQ1VOLDioA26UFzr23LpCTqwSJ7/sAqttNGcPR8MSeeR9TQvXNYQPKrA7Gh720X+7LD6BuHdy4vkcr9EKBU0ccUJ2ABBiyPdji+AgEbUCL/wrp6/GX8pui5YJGWx3XmIFj/RnYS2Je5FZ7w74JclD3XhLUo5Dhpq5RznHplpLB9mNdZdm5269US/XCgC/ZKyUxW3+0ajdBY1cLzF6qglitaYTp3MVUENVOkACM2RyKw6jIK2Leq3qLp6AUz21VXj4WznZcdI8MXqT9v8HxjXbAI9dtbhLRZRpJmu/129vrVmwSTHvsVoA7vXyYh/iO3ZMcy+D1x+HZU6Q/oDYCicqOPHxpSc9QGehmNyeGzI//524Gz3RudkU7s6MPdLWqZrieRTnWsTIrCDieu4ValfP8BFz7asYUv0t9jMWpv3yjbY7c5h8N/m7IUXwTQCzFpjPV7HC72BjVwPaYqh5/oAQsSNcv5I3c2GsCGj5C4hFFoT7eWfVtu/6ibQl0COhRDsegnOBtZ7NGfybI8IIO/4yrgel92bypb3eSxeMvdE5wzURluGDkBVVIACD8C5W1MzqrejUiiTfc3mkLhQ0xKRRhT0qqkmYWlbGN5hmMOA9YaYx8OFTgMys1WbzdidWgEkyvvdkWctGlges6eg/lJE61tJ8wGxvJfKtpyDW/2MRvsnO1+2EXIQ2eV3hkxg=", + "hash": "18671077004572533866328734050385144986204131880023727479641996554106327100538" } }, "Group Primitive": { "digest": "Group Primitive", "methods": { "add": { - "rows": 30, + "rows": 29, "digest": "8179f9497cc9b6624912033324c27b6d" }, "sub": { @@ -132,7 +132,7 @@ "digest": "59cd8f24e1e0f3ba721f9c5380801335" }, "assertions": { - "rows": 19, + "rows": 18, "digest": "7d87f453433117a306b19e50a5061443" } }, @@ -149,11 +149,11 @@ "digest": "3e39e3f7bfdef1c546700c0294407fc2" }, "rot64": { - "rows": 10, + "rows": 9, "digest": "c38703de755b10edf77bf24269089274" }, "xor": { - "rows": 15, + "rows": 14, "digest": "b3595a9cc9562d4f4a3a397b6de44971" }, "notUnchecked": { @@ -161,19 +161,19 @@ "digest": "bc6dd8d1aa3f7fe3718289fe4a07f81d" }, "notChecked": { - "rows": 17, + "rows": 16, "digest": "b12ad7e8a3fd28b765e059357dbe9e44" }, "leftShift": { - "rows": 5, + "rows": 4, "digest": "451f550bf73fecf53c9be82367572cb8" }, "rightShift": { - "rows": 5, + "rows": 4, "digest": "d0793d4a326d480eaa015902dc34bc39" }, "and": { - "rows": 19, + "rows": 18, "digest": "647e6fd1852873d1c326ba1cd269cff2" } }, @@ -202,7 +202,7 @@ "digest": "1ab08bd64002a0dd0a82f74df445de05" }, "Poseidon": { - "rows": 208, + "rows": 207, "digest": "afa1f9920f1f657ab015c02f9b2f6c52" } }, @@ -215,26 +215,26 @@ "digest": "2a2beadf929015559514abb88dd77694dbe62a6a5904e5a9d05ab21a3f293c0c", "methods": { "verifySignedHash": { - "rows": 28186, + "rows": 28185, "digest": "dd43cd30a8277b5af02fd85a4762a488" } }, "verificationKey": { - "data": "AAAdmtvKeZvyx7UyPW6rIhb96GnTZEEywf8pGpbkt+QXNIm7oWxIDWYa4EWTiadEqzk8WXg3wiZmbXWcqBQU+uIoTiBnYTRcd7RsaAjbdbIbQJ9EuopFRFewZRx9qeQeEibNeMRcRMP4LdfS3AQRxhFZzN4HFa4MbtGs+Aja820cI9VFULH2/7BvD6JjpVWjVLvvo6zhO3S5axqfDh7QqtkPo3TLpand9OVvMHhTVlz/AV7rus5E/+0cv50MaEJ/wBfUh5XNLAlGgVi7FfWR6p9P72AAymyD3lUdecJyZmCREiVgPrTdFppkp45TefJWNTySkV9c5YzpNxQoXedZDvYP/5s4KBkfIeK+zB2yJC9eZ1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POaoKNXNm1jOl8HpdFOG7vpQavC600YgzS2YGtY7K2WQ5GtN5ZTZBHPsUSir2yKSo9Le9CWXbDtn3SBDepWypwDa3YWKtNog+y10VmpL1N+RG3u1DXSuY7y9WZgkQ7tdvyx/Gjr91kjF0s3bt7vHIAZCtzNlRlWDBz3og0cSnEucCEuKR6dL2Mz+RuF1GmLoXZXapUjVG/82BjdAMAOxPlE67lEs+JWgnrVrA5NLJoL4DZ6+fhQKpNfk0uOrEfZIWR9Sau0IBwBxu6IYVm5/XAB19dt8MAuVcRdN/JGGzo0Hr3WVJuKzbAhuFwJZzcd1J1n4xO09ECT5NQdFSFXGsy8kIFjRNEOkLl+bAExePtGCt0w6cYqB0uCeX3lTI7ugIEgdStMtHFiWngJ218l8CuVrkwTJ7ZqHLtuJDiNqlLptkHWChDfw+IgDwz85dZrfBBzQrMRWranxQmisM+wx3vC+pLURRQHZJEasGCAElj0lTColrqQ/cXS7cBaqs1tBsQDGzKYMCMwsqL53fyxGCljVvljBa99+FpYfoUK+Fi0z6uEbem+luXRScr2yPB5I08lnBY23RmBb/pfSyBfbcmnmF5BkRlJTJKY7fQL/t9bFfywoquQe9e7OQvIjppA/FO7HmZS6hoOU+eS8+W94fEF2gvrowpTeqQHM6hLN9Qzl8niwZWUIyRCfyuzQnuSz/VP1K2sMFBKnZZNDcuBh1/xSFymOH6LfNKostvc6qHTIxrTjlH6952bo1bQl+mVvBUaJuRkYh12QbcyIyzcBFUYwaFazzkHXMof0O30oL3Q6wegTvJxTSZD5VCr5D26Myzoa0JBpqL0st9/MNGZe5a/+HW1qan/VtGA5nYkJcUzwKVqqlmZeuOZekFLGxlfp0lv9IQUQWtiU5uvd5HVoolEc/teUnx/IxYe01IDxX9cbmPMJnLYXJGSY=", - "hash": "16626558875595050675741741208497473516532634598762284173771479275503819571624" + "data": "AAAdmtvKeZvyx7UyPW6rIhb96GnTZEEywf8pGpbkt+QXNIm7oWxIDWYa4EWTiadEqzk8WXg3wiZmbXWcqBQU+u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oL3Q6wegTvJxTSZD5VCr5D26Myzoa0JBpqL0st9/MNGZe5a/+HW1qan/VtGA5nYkJcUzwKVqqlmZeuOZekFLGxlfp0lv9IQUQWtiU5uvd5HVoolEc/teUnx/IxYe01IDxX9cbmPMJnLYXJGSY=", + "hash": "25271286642747974031983353211461491451908613205953665636468664200927112191702" } }, "ecdsa": { "digest": "2f78a9c0307e6f9c6872499c3ca7c412f5771a7ac7e7e88c351ed1b62d6ac408", "methods": { "verifyEcdsa": { - "rows": 42684, + "rows": 42683, "digest": "2bb042b0fa7bbbb32f7e77d392f43d2c" } }, "verificationKey": { - "data": "AACzYt9qtBkn6y40KDH0lkzRSMBh3W41urWE6j0PSP2KB9GxsBAHAI3uzay1Vqyc+LMXeANSzNcoYSYnZts9Pk0nFNjCZ84EnGkie609NhFB8tU9k5Vkoqw3jihdsoJEUy6GK0H30dl/7H1rGxsx6Ec05aaFhiPw6t0jLxF1kj4uIeipqOScf8snKuzywk02FqvRxSHlk9pkEsUOvpNIwywxzhvHjWgXEQzROQF8v6q5R/1aJk3swpM1iRct9URLIjdin4GWyDB9279EZ6D6avFW2l7WuMJG++xBqGsNKZUgNM4WkUGNfCd+m42hJgt46eOy89db672su0n24IZG9tAsgQl8vPsVKfsTvTWlMj6/jISm7Dcctr1rZpSb8hRPsQstlfqMw3q6qijtTkFiMsdGRwJ6LNukSFUxOarhVsfREQngJufm4IxFpJJMR5F1DFSDPiOPuylEqXzke+j078Y4vr+QRo07YRlsoEv4a6ChcxMd3uu5Oami+D747/YVaS8kLd/3bO+WFpubID5fv4F7/JO4Fy/O7n1waPpNnzi/PZRlHVlwzNVAs09OmTmgzNM4/jAJBO9lRgCFA1SW0BADAEpKzWIdD67NW6DITBu81HFi90ZKqH/tTyg8BRgemaMcXAVfF3/CHvPHdZUINwyjjUZgwtny5dXgmckibPYQMC/PFNzYqZw3swyXzQ3nvZqWU2ARuzo1BgMrvnDgW1H+AMbKbNGU7IYXIYaLfTR9S7qrUbHESHac4wo9J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ac9fUCf3RHMq34onrr2nLHc038GYedmlFjoUZStujGwA8tSwLWyuWZTDVV+ZaW92qkhmrACog6NwhR6SEjQgsMRCVBQZzYirZxyulYmcNWH6BUmnLLFsn3GbS40xUr70gujEPnjZUK/ExGRfUPOfrYYb8mAciE9nP8OeK/UI+zjJy6Qp8mMroFw7gVHCfDtKTeQFt4JV3zubGsD7jypquHKCqPewhgn9tZ1UIsKIQB7+hBwDHzhlOZ2FfR4eLwQkO8sz275tpjHDAqX/TBWWRVg/yBDii0CWN4bP8UuX36jZKZboJUxIkM1xThiGZM2/oMbe5cZyjgrBR3P21wiDHAAlsHkaMfJgkVLqvZOw8hflKRIMa2dEYo5voD6aV30sATHQLoV0o+MlV3WA38RA+23Jqt1g+UZ7ReAuDP88jXhqWFcIvWHrJG0oy+rpAPQU/38vhIxbl//lirsirdVK2LrU47CC1f9/pRi07vTnvAm+n02dhwriqpwOmI2o2OU4mO0q96pCueKjAttkXgz+NSIJzcwprvNyE9UtKWswmIQg=", - "hash": "13907522711254991952405567976395529829664716172124500348498751038796408381729" + "data": "AACzYt9qtBkn6y40KDH0lkzRSMBh3W41urWE6j0PSP2KB9GxsBAHAI3uzay1Vqyc+LMXeANSzNcoYSYnZts9Pk0nFNjCZ84EnGkie609NhFB8tU9k5Vkoqw3jihdsoJEUy6GK0H30dl/7H1rGxsx6Ec05aaFhiPw6t0jLxF1kj4uIeipqOScf8snKuzywk02FqvRxSHlk9pkEsUOvpNIwywxzhvHjWgXEQzROQF8v6q5R/1aJk3swpM1iRct9URLIjdin4GWyDB9279EZ6D6avFW2l7WuMJG++xBqGsNKZUgNM4WkUGNfCd+m42hJgt46eOy89db672su0n24IZG9tAsgQl8vPsVKfsTvTWlMj6/jISm7Dcctr1rZpSb8hRPsQstlfqMw3q6qijtTkFiMsdGRwJ6LNukSFUxOarhVsfREQngJufm4IxFpJJMR5F1DFSDPiOPuylEqXzke+j078Y4vr+QRo07YRlsoEv4a6ChcxMd3uu5Oami+D747/YVaS8k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99i93uptU8syL/8Tr8xU3atxITlSqHqG+rVGWdLO9i3iq38zXgXbvZacrc3CMF5QBIM8yZXNslXH5k39D5SqubSHBWTqAJ1I0heOjaIHQGLROBYLn178tckBxfKQ2UpyfkvMw1Waw+fp5f64Ce+5bmYyZr6Dhmw/xcoAihjUsEqoecrLuGPp6qI4hQt9qOnVrAxHzwwtJGxcqoiCbe1mgz0fxMCt/i0z3ygdqAn20DKPHuBdqgVUFwx2T7Ac9fUCf3RHMq34onrr2nLHc038GYedmlFjoUZStujGwA8tSwLWyuWZTDVV+ZaW92qkhmrACog6NwhR6SEjQgsMRCVBQZzYirZxyulYmcNWH6BUmnLLFsn3GbS40xUr70gujEPnjZUK/ExGRfUPOfrYYb8mAciE9nP8OeK/UI+zjJy6Qp8mMroFw7gVHCfDtKTeQFt4JV3zubGsD7jypquHKCqPewhgn9tZ1UIsKIQB7+hBwDHzhlOZ2FfR4eLwQkO8sz275tpjHDAqX/TBWWRVg/yBDii0CWN4bP8UuX36jZKZboJUxIkM1xThiGZM2/oMbe5cZyjgrBR3P21wiDHAAlsHkaMfJgkVLqvZOw8hflKRIMa2dEYo5voD6aV30sATHQLoV0o+MlV3WA38RA+23Jqt1g+UZ7ReAuDP88jXhqWFcIvWHrJG0oy+rpAPQU/38vhIxbl//lirsirdVK2LrU47CC1f9/pRi07vTnvAm+n02dhwriqpwOmI2o2OU4mO0q96pCueKjAttkXgz+NSIJzcwprvNyE9UtKWswmIQg=", + "hash": "28329813042739019865303373981542714975096121311268477893114462508676857180819" } }, "sha256": { @@ -246,8 +246,8 @@ } }, "verificationKey": { - "data": "AACa0OPxg0UDEf5DBLZf/TtdB4TzIAMNQC467+/R1yGnL1tRXJnn0BDcLG0fGWdqFcWK1q2zKdAYfORKVOHgvKEwxtxZYv4CjM7SwlG09G52oNZmOgGCilD0ntmby4rzJTaoyCimx5ynQ/oYjslJgSM/1DTAkpW6IIdFjjkmjlOSHqRNRAMtNtl44D9lbhci4blHbDvzQnlYynwRh58j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AwEGb9KLEP9u7/Rp5uPi0S3tuTw67yg=", - "hash": "22296391645667701199385692837408020819294441951376164803693884547686842878882" + "data": "AACa0OPxg0UDEf5DBLZf/TtdB4TzIAMNQC467+/R1yGnL1tRXJnn0BDcLG0fGWdqFcWK1q2zKdAYfORKVOHgvKEwxtxZYv4CjM7SwlG09G52oNZmOgGCilD0ntmby4rzJTaoyCimx5ynQ/oYjslJgSM/1DTAkpW6IIdFjjkmjlOSHqRNRAMtNtl44D9lbhci4blHbDvzQnlYynwRh58jAzoDj3bCkPsByviAyFBoPhUx2M13h0/VPK1ND/69djzZgi9lQKaON74XvbnvJdSAYLQSIBbOE0yo7tS1vGTPqDqJGzc1f0+2QhZttE2UEUV4PPEGB6LUFEuQPXK8lXyXHVQTOU+omjpvKHLLs/dQZLTSvvZ3UFqxUvxjSEG9eTPo3Cyt4wXcPEi1b993ePSSxP6njj1SoPBA4BvLCCcvaxz5DegUu7nZDKkC8tuaoNbqYcayaf/8+oZ+dA+Ek1Xe08og1Hz9gB9cfPvgI9EiL2Na2cgiOF2klHHEAj3fORN8UQVzs0ioqLcQeq2tH2UMMtZS4JNcohHUah1T0jKmS3eZDqe+aMuf5qzKA5oKRF2ejRwmsxI161YlgXXpmHs+kCQGAPItDiewtjjsNF6H3MxJgzwvcw28UYd8GGK3EtTUVvMwyy+8fp0VeDOKSRFRRiVuWwBJKWRDX0ePVinR+yH1IQ34U20AHCGYSahuSFbBO6dDhRCPGRCJJgxktY+CSO+3B9mLtCe2X23FeFsUnaAFlzmsWeKR1tMyPupNsUXPFugubYZYd1EwxUDeBIOLeahcqX78yDDMOdsr0QHNG8XteyXcRXGFUSzTTKNEXdD+BOMY6FfMroKO4y3FffyrZef1PRsu/kVwaZb4UthvhBwet8DBcMa26kISlsI1ItcvsdwST5x1+iLCM4hBcFB0ly3N18uR7+MLHU0AdV13INFo8indyz1XEZCHlm+tKF3LX8Z7G0v68uRmjKRgy/S9NjKPA+M3rbj4pDU+jS4EKN++nKYxXjw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hhFGpJRAbU0bXbjOpeceg7vaV7RykTzBoIzAe5aUVAdKNM6fzGlPw16xx7QeOW+LFlOm6HJyxYAZfbpB/BLza4ZhoqmVx+ALUXHFIztgGQK9rzm+jBwiuwuLqdD2W00cbTZcbgKTo48XD6NJ+8T4J9B3rPzht3qbgpN//TyYkfrzAercAa/HCvFeBNXl1slCj8cF/EO6iX/NnIxBkuqmXfQnGUfcFK0LZPsvd7RInaLEYTeA4ZDfChiuw+5nTmrJFOywwOYdIA+NiMfCh24dPYAAwEGb9KLEP9u7/Rp5uPi0S3tuTw67yg=", + "hash": "16300587121626758287799507210144584597991991079389272313290346700569896683417" } } } \ No newline at end of file From 0788d77a25af627b6121c02c25793fe65b9b36af Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 13:58:49 +0100 Subject: [PATCH 21/31] ok no it needs to be this --- src/examples/zkapps/reducer/reducer-composite.ts | 3 --- src/lib/zkapp.ts | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/examples/zkapps/reducer/reducer-composite.ts b/src/examples/zkapps/reducer/reducer-composite.ts index 20495848fe..1ecdc26ef7 100644 --- a/src/examples/zkapps/reducer/reducer-composite.ts +++ b/src/examples/zkapps/reducer/reducer-composite.ts @@ -7,7 +7,6 @@ import { SmartContract, Mina, AccountUpdate, - isReady, Bool, Struct, Reducer, @@ -16,8 +15,6 @@ import { import assert from 'node:assert/strict'; import { getProfiler } from '../../utils/profiler.js'; -await isReady; - class MaybeIncrement extends Struct({ isIncrement: Bool, otherData: Field, diff --git a/src/lib/zkapp.ts b/src/lib/zkapp.ts index 4669c14e29..b20c25045a 100644 --- a/src/lib/zkapp.ts +++ b/src/lib/zkapp.ts @@ -1291,8 +1291,8 @@ Use the optional \`maxTransactionsWithActions\` argument to increase this number } // TODO find out max actions per method automatically? let possibleActionsPerTransaction = Array.from( - { length: maxActionsPerMethod }, - (_, i) => i + 1 + { length: maxActionsPerMethod + 1 }, + (_, i) => i ); let possibleActionTypes = possibleActionsPerTransaction.map((n) => Provable.Array(reducer.actionType, n) @@ -1339,7 +1339,7 @@ Use the optional \`maxTransactionsWithActions\` argument to increase this number state = Provable.switch(lengths, stateType, newStates); } if (!skipActionStatePrecondition) { - contract.account.actionState.assertEquals(actionState); + contract.account.actionState.requireEquals(actionState); } return { state, actionState }; }, From b708ec1a9e462dc9b7d76d2b4109ed025578d657 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:00:55 +0100 Subject: [PATCH 22/31] vks --- tests/vk-regression/vk-regression.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/vk-regression/vk-regression.json b/tests/vk-regression/vk-regression.json index 671a33d8f1..5a62a420be 100644 --- a/tests/vk-regression/vk-regression.json +++ b/tests/vk-regression/vk-regression.json @@ -1,6 +1,6 @@ { "Voting_": { - "digest": "ea395c2c6925c6a941bb2226e98a6329473d3704083e230b079464cf33f7d38", + "digest": "3c75d3509d7717e33cff7e94489d8f60082ac11f7f808e10a64f703a1d096d4a", "methods": { "voterRegistration": { "rows": 1186, @@ -19,34 +19,34 @@ "digest": "259e561fb1ade3c15fedcafb7da09c87" }, "countVotes": { - "rows": 5732, - "digest": "3d596b4040e8a83ff7b2319706240671" + "rows": 5796, + "digest": "49bedc90e4f9004081a7cf4ec1890691" } }, "verificationKey": { - "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRjKmnpZwY33yiryBLa9HQWpeZDSJI5y91gKJ9g5atltQApAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9gRyS26SdOohL85UmEc4duqlJOOlXOFuwOT6dvo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yuIW3rCiq8DeLD0OHjqOBZ+IEv9zEkb5fHTJvxoxnZlArtZSBpD6iIDPVDymuK+BsOggZav3K+TytjeD2Gcld5NfyRISFWUIMkZNFQRL8AQpET6RJnG1HSW0CaRfNeomtjCBWIr85wFCrp06j/D1J8B3EyhloZLJJ6ywxt41smXVugxA8LRTO+6lVBOBF14jHQCCUl6u7uiWCe1z4/bC5wQXPwWSljp8NVU8Erp1U9ModNK7W63Pkh0efvgSD5d0nLzbfa0jTdxZ1JkfKsnvYk43Ed+vmXooHZhUeZAIX8ZCizhb1Gfvm02JFwxYXmiYAOp5wkGzweU2I5zo8r5yZFI1r4XibNQs7eAfKGRv3gh8/EuLkX/bdettgPvNsI8ndpQ3kL/V8W2PQN4/hjC9AKCYBeXQG42bRncYZdLe++R2KA1ZdPDxQPF3sxUIKhzmRWqbozrtv310Maorwv6eZJjldlCJwICR9QgcDwDuNj+UFJnX3RWsdIWsUbI1T4wO0sE2sBiMX/OqmiGJEAnBegioistlFyfRvm54h+duNOl/ol1Fva7NoXvsL/wThAWUly7bnc7/Al2bBQlUrmEX46UnKXzYntkZDee7Lx1u1BBkJAj/5BH1YZOPmMCh498rBUiHmc+4uQqebqNSHdOSgC39ESss4u7GNhWj3fi9XXta6UT9wapEMGq0WTg2Kry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", - "hash": "4228330835326027799423690653688396954103089782388745015615732102634001904345" + "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRj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yNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", + "hash": "23872947239636506088532550415753750049547129075506316366963308049217376120968" } }, "Membership_": { - "digest": "881ce3501e8891763083e70ad0eda14111fb743c51e187d80db810a5e91cad5", + "digest": "39966549192610ffae8df962a0f868c4079b75133664ffc710c03669724e0b8d", "methods": { "addEntry": { - "rows": 5444, - "digest": "4859aa79bfd8de64944cb571bb6e3bab" + "rows": 5530, + "digest": "db5487ca29e8e519022e1caa25fd4bcf" }, "isMember": { "rows": 432, "digest": "8ac29f5a178a401e243e206c62dfbfaf" }, "publish": { - "rows": 690, - "digest": "50c08c4b5ea9b3ea6954fec7c6c7bfd0" + "rows": 694, + "digest": "5c39ad497d024b86cf7b76b50cf14d6e" } }, "verificationKey": { - "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+9o3eZc3cGQ+jppXoN3zwO91DeT/GYvXqCZTAudLxIwuJU11UBThG5CKKABa9ulQ1bYGXj9Eydy0vPxfojDeFrnKMi9GKSjiSMzmOLbIw7Dt+g9ggjsHM5rPrT7dY1VV4ZT9shjlcX3029xnk3Bjz4Q9PiK+A8o6f7L6aVB07I+QY2iDtwSQWuXYPohrk85I1UbPfY+giW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f18M8yP94QGBMxd6Y6wrNvOmJHzEnp8aitJsDlZklm8LKbjumlSbLcbBokpIDhFBBKfwP2qsQX7eHLCZ/3mztoFKoIiYXgrHWG8m2SzIJ/ljn6Rg7AxIsPjzZyEw1eXAOC7A1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", - "hash": "3070293148579525989861686835372338501184806723491293563455859978299236081201" + "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0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ORo=", + "hash": "16868963972800736425441072759450205964976360513330470468369343131639911132902" } }, "HelloWorld": { From ed310ed5987da1c26db2408203ef879fd15b200c Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:03:37 +0100 Subject: [PATCH 23/31] minor --- src/lib/account-update.unit-test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/account-update.unit-test.ts b/src/lib/account-update.unit-test.ts index 6ad49a903c..6c32d16382 100644 --- a/src/lib/account-update.unit-test.ts +++ b/src/lib/account-update.unit-test.ts @@ -6,7 +6,6 @@ import { Mina, Int64, Types, - Provable, } from '../index.js'; import { Test } from '../snarky.js'; import { expect } from 'expect'; @@ -52,7 +51,6 @@ function createAccountUpdate() { { let accountUpdate = createAccountUpdate(); - // TODO remove restriction "This function can't be run outside of a checked computation." let hash = accountUpdate.hash(); // if we clone the accountUpdate, hash should be the same From ee8cb904f2c6f55eb6120701a0c9d87e21b096f5 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:13:33 +0100 Subject: [PATCH 24/31] remove unused snarky apis --- src/bindings | 2 +- src/lib/provable-context.ts | 63 +++++-------------------------------- src/snarky.d.ts | 20 ++---------- 3 files changed, 11 insertions(+), 74 deletions(-) diff --git a/src/bindings b/src/bindings index cd0c65aa43..2df95c622d 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit cd0c65aa43abad8b7b1db90c79f9a919ef3c0318 +Subproject commit 2df95c622df71f0696491179aa7db8b7c07e9883 diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 3e6fc66a13..1023d616a7 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -11,7 +11,6 @@ export { SnarkContext, asProver, runAndCheckSync, - runUncheckedSync, generateWitness, constraintSystem, constraintSystemSync, @@ -73,34 +72,6 @@ function asProver(f: () => void) { } } -/** - * @deprecated use `generateWitness` instead - */ -function runAndCheckSync(f: () => void) { - let id = snarkContext.enter({ inCheckedComputation: true }); - try { - Snarky.run.runAndCheck(f); - } catch (error) { - throw prettifyStacktrace(error); - } finally { - snarkContext.leave(id); - } -} - -/** - * @deprecated use `generateWitness` instead - */ -function runUncheckedSync(f: () => void) { - let id = snarkContext.enter({ inCheckedComputation: true }); - try { - Snarky.run.runUnchecked(f); - } catch (error) { - throw prettifyStacktrace(error); - } finally { - snarkContext.leave(id); - } -} - async function generateWitness( f: (() => Promise) | (() => void), { checkConstraints = true } = {} @@ -119,33 +90,15 @@ async function generateWitness( } } -function _constraintSystem(f: () => T) { - let id = snarkContext.enter({ inAnalyze: true, inCheckedComputation: true }); +/** + * @deprecated use `generateWitness` instead + */ +function runAndCheckSync(f: () => void) { + let id = snarkContext.enter({ inCheckedComputation: true }); try { - let result: T; - let { rows, digest, json } = Snarky.run.constraintSystem(() => { - result = f(); - }); - let { gates, publicInputSize } = gatesFromJson(json); - return { - rows, - digest, - result: result! as T, - gates, - publicInputSize, - print() { - printGates(gates); - }, - summary() { - let gateTypes: Partial> = {}; - gateTypes['Total rows'] = rows; - for (let gate of gates) { - gateTypes[gate.type] ??= 0; - gateTypes[gate.type]!++; - } - return gateTypes; - }, - }; + let finish = Snarky.run.enterGenerateWitness(); + f(); + return finish(); } catch (error) { throw prettifyStacktrace(error); } finally { diff --git a/src/snarky.d.ts b/src/snarky.d.ts index bd48515d7a..2c10d27f8d 100644 --- a/src/snarky.d.ts +++ b/src/snarky.d.ts @@ -202,21 +202,9 @@ declare const Snarky: { */ inProverBlock(): boolean; /** - * Runs code and checks its correctness. - */ - runAndCheck(f: () => void): void; - /** - * Runs code in prover mode, without checking correctness. - */ - runUnchecked(f: () => void): void; - /** - * Returns information about the constraint system in the callback function. + * Setting that controls whether snarky throws an exception on violated constraint. */ - constraintSystem(f: () => void): { - rows: number; - digest: string; - json: JsonConstraintSystem; - }; + setEvalConstraints(value: MlBool): void; /** * Starts constraint system runner and returns a function to finish it. */ @@ -229,10 +217,6 @@ declare const Snarky: { public_inputs: FieldVector, auxiliary_inputs: FieldVector ]; - /** - * Setting that controls whether snarky throws an exception on violated constraint. - */ - setEvalConstraints(value: MlBool): void; }; /** From 9c63fca7f3a025a02e094cbb7aa4c19b049355d8 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:15:24 +0100 Subject: [PATCH 25/31] remove tmp test --- src/lib/provable-context-async.unit-test.ts | 27 --------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/lib/provable-context-async.unit-test.ts diff --git a/src/lib/provable-context-async.unit-test.ts b/src/lib/provable-context-async.unit-test.ts deleted file mode 100644 index a81acae7a5..0000000000 --- a/src/lib/provable-context-async.unit-test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Field } from './core.js'; -import { Poseidon } from './hash.js'; -import { generateWitness } from './provable-context.js'; -import { Provable } from './provable.js'; - -async function main() { - console.log('waiting'); - await new Promise((resolve) => setTimeout(resolve, 1000)); - console.log('done waiting'); - let x = Provable.witness(Field, () => Field(1)); - let y = Provable.witness(Field, () => Field(-1)); - x.add(y).assertEquals(0); - let z = Poseidon.hash([x, y]); - z.assertEquals(0); // unsatisfiable constraint -} - -let { rows, digest, publicInputSize, print } = await Provable.constraintSystem( - main -); - -print(); -console.log({ rows, digest, publicInputSize }); - -let [, , [, ...witness]] = await generateWitness(main, { - checkConstraints: false, -}); -console.log('first 5 witnesses', witness.map((x) => x[1]).slice(0, 5)); From ac3bb5a6313c8071aa166c4032341a726855e0b2 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:19:53 +0100 Subject: [PATCH 26/31] remove deprecated experimental.zkprogram --- src/index.ts | 7 +------ src/lib/proof-system.ts | 29 ----------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6445ab3706..aff4570bca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,8 +110,7 @@ export { MerkleMap, MerkleMapWitness } from './lib/merkle-map.js'; export { Nullifier } from './lib/nullifier.js'; -import { ExperimentalZkProgram, ZkProgram } from './lib/proof-system.js'; -export { ZkProgram }; +export { ZkProgram } from './lib/proof-system.js'; export { Crypto } from './lib/crypto.js'; @@ -132,10 +131,6 @@ const Experimental_ = { * (Not unstable in the sense that they are less functional or tested than other parts.) */ namespace Experimental { - /** @deprecated `ZkProgram` has moved out of the Experimental namespace and is now directly available as a top-level import `ZkProgram`. - * The old `Experimental.ZkProgram` API has been deprecated in favor of the new `ZkProgram` top-level import. - */ - export let ZkProgram = ExperimentalZkProgram; export let memoizeWitness = Experimental_.memoizeWitness; } diff --git a/src/lib/proof-system.ts b/src/lib/proof-system.ts index 67f3785c6f..e7af194a0a 100644 --- a/src/lib/proof-system.ts +++ b/src/lib/proof-system.ts @@ -44,7 +44,6 @@ export { SelfProof, JsonProof, ZkProgram, - ExperimentalZkProgram, verify, Empty, Undefined, @@ -959,7 +958,6 @@ ZkProgram.Proof = function < static tag = () => program; }; }; -ExperimentalZkProgram.Proof = ZkProgram.Proof; function dummyProof(maxProofsVerified: 0 | 1 | 2, domainLog2: number) { return withThreadPool( @@ -1103,30 +1101,3 @@ type UnwrapPromise

= P extends Promise ? T : never; type Get = T extends { [K in Key]: infer Value } ? Value : undefined; - -// deprecated experimental API - -function ExperimentalZkProgram< - StatementType extends { - publicInput?: FlexibleProvablePure; - publicOutput?: FlexibleProvablePure; - }, - Types extends { - [I in string]: Tuple; - } ->( - config: StatementType & { - name?: string; - methods: { - [I in keyof Types]: Method< - InferProvableOrUndefined>, - InferProvableOrVoid>, - Types[I] - >; - }; - overrideWrapDomain?: 0 | 1 | 2; - } -) { - let config_ = { ...config, name: config.name ?? `Program${i++}` }; - return ZkProgram(config_); -} From d31f4882a8001966f47b4c7ead20d52ce37f7061 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:29:20 +0100 Subject: [PATCH 27/31] fix proof systems unit test --- src/lib/proof-system.unit-test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/proof-system.unit-test.ts b/src/lib/proof-system.unit-test.ts index 4eaa6cf251..fef3c3735e 100644 --- a/src/lib/proof-system.unit-test.ts +++ b/src/lib/proof-system.unit-test.ts @@ -30,8 +30,7 @@ class EmptyProof extends ZkProgram.Proof(EmptyProgram) {} // -) sortMethodArguments // -) picklesRuleFromFunction -// FIXME -it.skip('pickles rule creation', async () => { +it('pickles rule creation', async () => { // a rule that verifies a proof conditionally, and returns the proof's input as output function main(proof: EmptyProof, shouldVerify: Bool) { proof.verifyIf(shouldVerify); @@ -75,7 +74,7 @@ it.skip('pickles rule creation', async () => { let field_: FieldConst = [0, 0n]; let bool_: FieldConst = [0, 0n]; - Provable.runAndCheck(() => { + await Provable.runAndCheck(async () => { // put witnesses in snark context snarkContext.get().witnesses = [dummy, bool]; @@ -83,7 +82,7 @@ it.skip('pickles rule creation', async () => { let { publicOutput: [, publicOutput], shouldVerify: [, shouldVerify], - } = rule.main([0]) as any; // FIXME, it's a promise + } = await rule.main([0]); // `publicOutput` and `shouldVerify` are as expected Snarky.field.assertEqual(publicOutput, dummy.publicInput.value); From 183bff4ffe600aee50670b302c78c8005fb7e3d8 Mon Sep 17 00:00:00 2001 From: Gregor Mitscha-Baude Date: Tue, 27 Feb 2024 14:35:48 +0100 Subject: [PATCH 28/31] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b04d1ea09e..3301f51639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `transaction.send()` no longer throws an error if the transaction was not successful for `Mina.LocalBlockchain` and `Mina.Network`. Instead, it returns a `PendingTransaction` object that contains the error. Use `transaction.sendOrThrowIfError` to throw the error if the transaction was not successful. - `transaction.wait()` no longer throws an error if the transaction was not successful for `Mina.LocalBlockchain` and `Mina.Network`. Instead, it returns either a `IncludedTransaction` or `RejectedTransaction`. Use `transaction.waitOrThrowIfError` to throw the error if the transaction was not successful. - `transaction.hash()` is no longer a function, it is now a property that returns the hash of the transaction. +- Change `{SmartContract,ZkProgram}.analyzeMethods()` to be async https://github.com/o1-labs/o1js/pull/1450 + - `Provable.runAndCheck()`, `Provable.constraintSystem()` and `{SmartContract,ZkProgram}.digest()` are also async now + - These changes were made to add internal support for async circuits + - `Provable.runAndCheckSync()` added and immediately deprecated for a smoother upgrade path for tests +- `Reducer.reduce()` requires the maximum number of actions per method as an explicit (optional) argument https://github.com/o1-labs/o1js/pull/1450 + - The default value is 1 and should work for most existing contracts - Improved efficiency of computing `AccountUpdate.callData` by packing field elements into as few field elements as possible https://github.com/o1-labs/o1js/pull/1458 - This leads to a large reduction in the number of constraints used when inputs to a zkApp method are many field elements (e.g. a long list of `Bool`s) - Return events in the `LocalBlockchain` in reverse chronological order (latest events at the beginning) to match the behavior of the `Network` https://github.com/o1-labs/o1js/pull/1460 From b47224fda6ce7a10763d7d675d1f99787809cb72 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 28 Feb 2024 14:41:44 +0100 Subject: [PATCH 29/31] finalize, then count rows --- src/lib/provable-context.ts | 4 +++- tests/vk-regression/vk-regression.json | 32 +++++++++++++------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/lib/provable-context.ts b/src/lib/provable-context.ts index 1023d616a7..fa0286b24a 100644 --- a/src/lib/provable-context.ts +++ b/src/lib/provable-context.ts @@ -139,9 +139,11 @@ function constraintSystemSync(f: () => void) { } function constraintSystemToJS(cs: MlConstraintSystem) { + // toJson also "finalizes" the constraint system, which means + // locking in a potential pending single generic gate + let json = Snarky.constraintSystem.toJson(cs); let rows = Snarky.constraintSystem.rows(cs); let digest = Snarky.constraintSystem.digest(cs); - let json = Snarky.constraintSystem.toJson(cs); let { gates, publicInputSize } = gatesFromJson(json); return { rows, diff --git a/tests/vk-regression/vk-regression.json b/tests/vk-regression/vk-regression.json index 5a62a420be..e32e449f6c 100644 --- a/tests/vk-regression/vk-regression.json +++ b/tests/vk-regression/vk-regression.json @@ -11,7 +11,7 @@ "digest": "8c83b537e3dab168c4aa2c00b90e5f2a" }, "approveRegistrations": { - "rows": 1147, + "rows": 1148, "digest": "08b40e8d2a9ea7369c371afd2e4e1f54" }, "vote": { @@ -36,7 +36,7 @@ "digest": "db5487ca29e8e519022e1caa25fd4bcf" }, "isMember": { - "rows": 432, + "rows": 433, "digest": "8ac29f5a178a401e243e206c62dfbfaf" }, "publish": { @@ -66,7 +66,7 @@ "digest": "1680d3e1357a466f906621af00d830f99b6128c5f51cf0373202620d4f6cd00d", "methods": { "init": { - "rows": 654, + "rows": 655, "digest": "d535a589774b32cd36e2d6c3707afd30" }, "init2": { @@ -95,11 +95,11 @@ "digest": "69358bfab9d197e2f3ea1d658cb7fa20" }, "swapX": { - "rows": 1512, + "rows": 1513, "digest": "a080a34bacf8c4a843d7355f9b69304c" }, "swapY": { - "rows": 1512, + "rows": 1513, "digest": "4100b3543afd76189c879487c4b4f4a4" }, "burnLiquidity": { @@ -116,7 +116,7 @@ "digest": "Group Primitive", "methods": { "add": { - "rows": 29, + "rows": 30, "digest": "8179f9497cc9b6624912033324c27b6d" }, "sub": { @@ -132,7 +132,7 @@ "digest": "59cd8f24e1e0f3ba721f9c5380801335" }, "assertions": { - "rows": 18, + "rows": 19, "digest": "7d87f453433117a306b19e50a5061443" } }, @@ -149,11 +149,11 @@ "digest": "3e39e3f7bfdef1c546700c0294407fc2" }, "rot64": { - "rows": 9, + "rows": 10, "digest": "c38703de755b10edf77bf24269089274" }, "xor": { - "rows": 14, + "rows": 15, "digest": "b3595a9cc9562d4f4a3a397b6de44971" }, "notUnchecked": { @@ -161,19 +161,19 @@ "digest": "bc6dd8d1aa3f7fe3718289fe4a07f81d" }, "notChecked": { - "rows": 16, + "rows": 17, "digest": "b12ad7e8a3fd28b765e059357dbe9e44" }, "leftShift": { - "rows": 4, + "rows": 5, "digest": "451f550bf73fecf53c9be82367572cb8" }, "rightShift": { - "rows": 4, + "rows": 5, "digest": "d0793d4a326d480eaa015902dc34bc39" }, "and": { - "rows": 18, + "rows": 19, "digest": "647e6fd1852873d1c326ba1cd269cff2" } }, @@ -202,7 +202,7 @@ "digest": "1ab08bd64002a0dd0a82f74df445de05" }, "Poseidon": { - "rows": 207, + "rows": 208, "digest": "afa1f9920f1f657ab015c02f9b2f6c52" } }, @@ -215,7 +215,7 @@ "digest": "2a2beadf929015559514abb88dd77694dbe62a6a5904e5a9d05ab21a3f293c0c", "methods": { "verifySignedHash": { - "rows": 28185, + "rows": 28186, "digest": "dd43cd30a8277b5af02fd85a4762a488" } }, @@ -228,7 +228,7 @@ "digest": "2f78a9c0307e6f9c6872499c3ca7c412f5771a7ac7e7e88c351ed1b62d6ac408", "methods": { "verifyEcdsa": { - "rows": 42683, + "rows": 42684, "digest": "2bb042b0fa7bbbb32f7e77d392f43d2c" } }, From 147b60721e52ec3f1c077051e62f47a47f5197f7 Mon Sep 17 00:00:00 2001 From: Gregor Date: Thu, 7 Mar 2024 08:04:23 +0100 Subject: [PATCH 30/31] submodules and revert vk regression --- src/bindings | 2 +- src/mina | 2 +- tests/vk-regression/vk-regression.json | 32 +++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bindings b/src/bindings index dee3b47541..9ef2916c93 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit dee3b47541da2470551854ed9fda81bf855b3f31 +Subproject commit 9ef2916c93ac93c7a64f80934178d6ab542b47b0 diff --git a/src/mina b/src/mina index b031a18ad6..0ddc4b90f5 160000 --- a/src/mina +++ b/src/mina @@ -1 +1 @@ -Subproject commit b031a18ad6ac381712b49e7438747e8d85bf10c5 +Subproject commit 0ddc4b90f54b73bb5279db690e74b4b7a0bd8495 diff --git a/tests/vk-regression/vk-regression.json b/tests/vk-regression/vk-regression.json index 5af4c94df0..b9070412fa 100644 --- a/tests/vk-regression/vk-regression.json +++ b/tests/vk-regression/vk-regression.json @@ -24,8 +24,8 @@ } }, "verificationKey": { - "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRjKmnpZwY33yiryBLa9HQWpeZDSJI5y91gKJ9g5atltQApAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9gRyS26SdOohL85UmEc4duqlJOOlXOFuwOT6dvoiUcdQtzuPp1pzA/LHueqm9yQG9mlT0Df8uY/A+rwM4l/ypTP/o0+5GCM9jJf9bl/z0DpGWheCJY+LZbIGeBUOpg0Gx1+KZsD9ivWJ0vxNz8zKcAS1i3FgntjqyfY+62jfTR8PW1Y4wdaFan6jSxaaH6WYnvccAo2QHxEAFL91CfnZB1pwF8NAT395N/rXr5XhMHFPoCkSHd2+5u+b62pkvFqqZZ9r24SMQOe9Bl2ZfMew2DyFLMPzwTowHw8onMEXcVKabFs9zQVp66AMf/wlipirNztdguABqQ6dCl+tvMb3/je+I9JWDg9CsgZfBaeuoWG/ADmpEhIKeoMw+e69sSkeZqS60BJ9mEd0xcdXrYocwhpQKOzBcc4d5ts+btlepIrTet7yJK5rlsFQfJGzaeTz9BN+g+C2ZK8B+2a2Qrz386FvB+elJAkJ2/Agn35oBHB2HobDkF6sRfrXOdH5l+QV7vR2v385RKRtfnmcJeUQcpq5/JTgVwagDJ/FarTN5jFsrBBRTeW3yZ5/CfVNA7NNWxoKhjBaHVIhn/fLT5sFLYzYdCx/uTsusyZmE2d6iqnLS+j1IXNJX/zR0ZD3aGuoUc4MaFZQnN5om4dfpbloe4Roob3BuDhBHTKoYC+nVsyEvDRyiYLEOjJ45/bSwTCfwngYKtNmo3sVTvQ9mqBf0cLd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ry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", - "hash": "23872947239636506088532550415753750049547129075506316366963308049217376120968" + "data": "AACd9tWcrEA7+0z2zM4uOSwj5GdeIBIROoVsS/yRuSRjKmnpZwY33yiryBLa9HQWpeZDSJI5y91gKJ9g5atltQApAhMdOuU5+NrHN3RCJtswX+WPvwaHJnihtSy2FcJPyghvBVTi2i7dtWIPQLVDIzC5ARu8f8H9JWjzjVVYE/rQLruuq2qUsCrqdVsdRaw+6OjIFeAXS6mzvrVv5iYGslg5CV5mgLBg3xC408jZJ0pe8ua2mcIEDMGEdSR/+VuhPQaqxZTJPBVhazVc1P9gRyS26SdOohL85UmEc4duqlJOOlXOFuwOT6dvoiUcdQtzuPp1pzA/LHueqm9yQG9mlT0Df8uY/A+rwM4l/ypTP/o0+5GCM9jJf9bl/z0DpGWheCJY+LZbIGeBUOpg0Gx1+KZsD9ivWJ0vxNz8zKcAS1i3FgntjqyfY+62jfTR8PW1Y4wdaFan6jSxaaH6WYnvccAo2QHxEAFL91CfnZB1pwF8NAT395N/rXr5XhMHFPoCkSHd2+5u+b62pkvFqqZZ9r24SMQOe9Bl2ZfMew2DyFLMPzwTowHw8onMEXcVKabFs9zQVp66AMf/wlipirNztdguAI7iT9WGBbWTD1UybimI0+tNSp8mX6Pk0xgukJ2JRooqC8lktQCulpgce7hzfV5+qb/FJorn5aqnS2zL68rtlw8c4d5ts+btlepIrTet7yJK5rlsFQfJGzaeTz9BN+g+C2ZK8B+2a2Qr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RncYZdLe++R2KA1ZdPDxQPF3sxUIKhzmRWqbozrtv310Maorwv6eZJjldlCJwICR9QgcDwDuNj+UFJnX3RWsdIWsUbI1T4wO0sE2sBiMX/OqmiGJEAnBegioistlFyfRvm54h+duNOl/ol1Fva7NoXvsL/wThAWUly7bnc7/Al2bBQlUrmEX46UnKXzYntkZDee7Lx1u1BBkJAj/5BH1YZOPmMCh498rBUiHmc+4uQqebqNSHdOSgC39ESss4u7GNhWj3fi9XXta6UT9wapEMGq0WTg2Kry6xNP2YZ5X8eaapRQc/KzYgz9XjQL6TKpqNuGEbRlmfYvIuoFbnOkZI7RYoGp3YheMs1pQErwOxLzZa9W3Okwx16TSDwPLR0xMdAyogMrOdKN4JSMyNnmOaoVf6PkN+K9fz7RuHtvgjKpuz4vsK5Z2wRneqPrnfu6PkgHcRQrd0SxqCbN23Z/yp8qOcN6XU49iCNEBjztT00tolQ9hCPMSE/eTZ+ioez7m3pJFVks3T5Rk/e+6MeowJWIOv20x6CPS9mhpr1JPwdNFrWdgs19VsobntCpF/rWxksdrYyk=", + "hash": "24656492245991446483604357639740051536117166623025096114760294586080473547383" } }, "Membership_": { @@ -45,8 +45,8 @@ } }, "verificationKey": { - "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+9o3eZc3cGQ+jppXoN3zwO91DeT/GYvXqCZTAudLxIwuJU11UBThG5CKKABa9ulQ1bYGXj9Eydy0vPxfojDeFrnKMi9GKSjiSMzmOLbIw7Dt+g9ggjs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aubEc/GSX8WzCZ8h9HeakcRc7kcN0CR8kmfER3eiZ2JMbt5cQl/afNjwGGAmeXzTaR34AgFjiw/RlZJkhYm9jyf18M8yP94QGBMxd6Y6wrNvOmJHzEnp8aitJsDlZklm8LKbjumlSbLcbBokpIDhFBBKfwP2qsQX7eHLCZ/3mztoFKoIiYXgrHWG8m2SzIJ/ljn6Rg7AxIsPjzZyEw1eXAOC7A1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", - "hash": "16868963972800736425441072759450205964976360513330470468369343131639911132902" + "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya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iCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", + "hash": "1783504200634090470775115883157449184948497438713557884110780778068634660997" } }, "HelloWorld": { @@ -58,8 +58,8 @@ } }, "verificationKey": { - "data": "AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1ygGxXERl1oQh6DBxf/hDUD0HOeg/JajCp3V6b5wytil2mfx8v2DB5RuNQ7VxJWkha0TSnJJsOl0FxhjldBbOY3tUZzZxHpPhHOKHz/ZAXRYFIsf2x+7boXC0iPurETHN7j5IevHIgf2fSW8WgHZYn83hpVI33LBdN1pIbUc7oWAUQVmmgp04jRqTCYK1oNg+Y9DeIuT4EVbp/yN7eS7Ay8ahic2sSAZvtn08MdRyk/jm2cLlJbeAAad6Xyz/H9l7JrkbVwDMMPxvHVHs27tNoJCzIlrRzB7pg3ju9aQOu4h3thDr+WSgFQWKvcRPeL7f3TFjIr8WZ2457RgMcTwXwORKbqJCcyKVNOE+FlNwVkOKER+WIpC0OlgGuayPFwQQkbb91jaRlJvahfwkbF2+AJmDnavmNpop9T+/Xak1adXIrsRPeOjC+qIKxIbGimoMOoYzYlevKA80LnJ7HC0IxR+yNLvoSYxDDPNRD+OCCxk5lM2h8IDUiCNWH4FZNJ+doiigKjyZlu/xZ7jHcX7qibu/32KFTX85DPSkQM8dAPwtWrOmtKxrwXN+mZ2qSIPEKA/keGVelezo1AZrBs09Gb7Si2kRV8TUQb24V0P9WO2Vq8S86xUXJoXShdoylR4KR89XcqLS/NP7lwCEej/L8q8R7sKGMCXmgFYluWH4JBSPDgvMxScfjFS33oBNb7po8cLnAORzohXoYTSgztklD0mKn6EegLbkLtwwr9ObsLz3m7fp/3wkNWFRkY5xzSZN1VybbQbmpyQNCpxd/kdDsvlszqlowkyC8HnKbhnvE0Mrz3ZIk4vSs/UGBSXAoESFCFCPcTq11TCOhE5rumMJErv5LusDHJ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8gGfkVRCnnNjlbgHQmEwC75+GmEJ5DjD3d+s6IXTQ60MHvxbTHHlnfmPbgKn2SAI0uVoewKC9GyK6dSaboLw3C48jl0E2kyc+7umhCk3kEeWmt//GSjRNhoq+B+mynXiOtgFs/Am2v1TBjSb+6tcijsf5tFJmeGxlCjJnTdNWBkSHpMoo6OFkkpA6/FBAUHLSM7Yv8oYyd0GtwF5cCwQ6aRTbl9oG/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=", - "hash": "23008763500271176260093590948902949903512851062443953107046635216420090246820" + "data": "AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1ygGxXERl1oQh6DBxf/hDUD0HOeg/JajCp3V6b5wytil2mfx8v2DB5RuNQ7VxJWkha0TSnJJsOl0FxhjldBbOY3tUZzZxHpPhHOKHz/ZAXRYFIsf2x+7boXC0iPurETHN7j5IevHIgf2fSW8WgHZYn83hpVI33LBdN1pIbUc7oWAUQVmmgp04jRqTCYK1oNg+Y9DeIuT4EVbp/yN7eS7Ay8ahic2sSAZvtn08MdRyk/jm2cLlJbeAAad6Xyz/H9l7JrkbVwDMMPxvHVHs27tNoJCzIlrRzB7pg3ju9aQOu4h3thDr+WSgFQWKvcRPeL7f3TFjIr8WZ2457RgMcTwXwORKbqJCcyKVNOE+FlNwVkOKER+WIpC0OlgGuayPFwQQkbb91jaRlJvahfwkbF2+AJmDnavmNpop9T+/Xak1adXIrsRPeOjC+qIKxIbGimoMOoYzYlevKA80LnJ7HC0IxR+yNLvoSYxDDPNRD+OCCxk5lM2h8IDUiCNWH4FZNJ+doiigKjyZlu/xZ7jHcX7qibu/32KFTX85DPSkQM8dAGJWqN70atf4Xx5+1igJJ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oTEJmR5MaqOkPfap+OsD1lGScY6+X4WW/HqCWrmA3ZTqDGngQMTGXLCtl6IS/cQpihS1NRbNqOtKTaCB9COQu0oz6RivBlywuaj3MKUdmbQ2gVDj+SGQItCNaXawyPSBjB9VT+68SoJVySQsYPCuEZCb0V/40n/a7RAbyrnNjP+2HwD7p27Pl1RSzqq35xiPdnycD1UeEPLpx/ON65mYCkn+KLQZmkqPio+vA2KmJngWTx+ol4rVFimGm76VT0xCFDsu2K0YX0yoLNH4u2XfmT9NR8gGfkVRCnnNjlbgHQmEwC75+GmEJ5DjD3d+s6IXTQ60MHvxbTHHlnfmPbgKn2SAI0uVoewKC9GyK6dSaboLw3C48jl0E2kyc+7umhCk3kEeWmt//GSjRNhoq+B+mynXiOtgFs/Am2v1TBjSb+6tcijsf5tFJmeGxlCjJnTdNWBkSHpMoo6OFkkpA6/FBAUHLSM7Yv8oYyd0GtwF5cCwQ6aRTbl9oG/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=", + "hash": "12073693408844675717690269959590209616934536940765116494766700428390466839" } }, "TokenContract": { @@ -79,8 +79,8 @@ } }, "verificationKey": { - "data": "AACwuS3vTWCwpRIX/QlJQqJcmPO9nPm4+sCfcrqiY1NUMiV9k6Pc8kFkMsbGLst78T8uAnYwc1Ql49kq0I2GizwshS9xkBcfxRTAAMBHXhf8KDkK39AalVocKIrfWMV0MSShinj0bCxPCc10K0cya4Voy8fud4+hktDOuwjaAstpEJSbKRHMIki77xHmJWlFUYdkgPg30MU4Ta3ev/h+mcMWmofyhLSQqUbaV6hM95n3Y0Wcn2LRNxJP8TRwHndIcylleqPsGMh3P+A+N9c32N4kl29nreMJJdcUrCXK90GLPAFOB9mHIjKk9+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pDE2Kl9QdpZpQYDEBQgCCkegsZszQ+2mjxU9pLXzz5GSoqz8jABW5Qo3abBAhvYKKaAs6NoRgeAD6SadFDbQmXaftE+Y1MVOtjnaZDUBdwahWiJMlkfZpxW1aubEc/GSX8WzCZ8h9HeakcRc7kcN0CR8kmfER3eiZ2JMbt5cQl/afNjwGGAmeXzTaR34AgFjiw/RlZJkhYm9jyf18M8yP94QGBMxd6Y6wrNvOmJHzEnp8aitJsDlZklm8LKbjumlSbLcbBokpIDhFBBKfwP2qsQX7eHLCZ/3mztoFKoIiYXgrHWG8m2SzIJ/ljn6Rg7AxIsPjzZyEw1eXAOC7A1FCT/757ygMsnk+rLlpDTBYLmhJtQdt61MQFDi5BuCmQ/PY9C/74/k4APl5htiNcCZty/1JElFwjuCQFjvAiMPUMyqp7/ALFapsTZqhSs1g6jd8uhuJoTNEqLDvKUUbs0kMvGy8BOG0YXNxmNccabGwBzxmijv6LF/Xinecl4aD8FCh6opY98TJnOHd3XSYL1DbLqmmc6CXEM+g5iDGnXr/CkI2Jy37OkF8X03jz4AH0Yj0+J63yH4IS+PrNpKZEXKh7PvXNaLGGKsFcKEi63/xKPKH0G4RzvFKbkp+IWqtIYjMiwIJMwzmfS1NLLXqqpFiD364eFcXINR2rrDKcoTUp1JkVZVfXfKwaRUPWSGFYIYMtwPh2w8ZfubAmXZFpyzstORhFyg9rtVAAy0lcDhQwWVlhFFkR2qbdoy0EFLBrfKqUIkd1N6vDQQYL1RGaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", - "hash": "28746489416588124021057379110164718862651399658896369619264365039730168400693" + "data": "AACwuS3vTWCwpRIX/QlJQq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GaTAv/ybregrJsFo+VP3ZatlR6LnKYWp1m7vPkGm3I6Pus/mvp1k10QGk8nhFuR31DjsG3lzZ4gXSs1oSv0qbxD2S6g5+Y6cPbITEGX3uQjsunXnQ9PHd22Mk+fqbDakTiCJh6aFqqPNShiAXkGSuC1oXJHX3zqnbn75dWO0UVhBNAbjYkSnQeyka1wnZb12sR+PlRMvWQVcd93t5L/FiE0ORo=", + "hash": "8925803295369202411953053433348085915894172555008342243993322619248448379055" } }, "Dex": { @@ -108,8 +108,8 @@ } }, "verificationKey": { - "data": "AADgDFCYyznG8hH/Z695+WW86B544SmJFzz5ObrizTJ4KMqy+pfsOR2Mt2yGViXSJPpAR76RNHNga83UB8/9OPQIB+uHOnxXH7vN8sUeDQi50gWdXzRlzSS1jsT9t+XsQwHNWgMQp04pKmF+0clYz1zwOO95BwHGcQ/olrSYW4tbJN6KW0hN2eESQfUJcwfB6uUzwvGtkFs+aiUykn7KUgUgXQkKgdHHdyFioNHNPmkpiAre/Ts8BKwwvf5hCa1MtBF6ax6ymlATB4YBL0ETiEPTE/Qk1zGWUSL2UB6aY45/LlfTLCKlyLq7cR3HOucFfBncVfzI7D8j5n4wVqY+vAI4cf+Yv7iVRLbeFcycXtsuPQntgBzKa/mcqcWuVM7p2SYRrtKdX8EKvOO6NhfLx4x0atAi8pKf+vZR76LSP4iOA8hwXvk6MNvPt1fxCS96ZAKuAzZnAcK+MH1OcKeLj+EHtZmf40WRb3AEG5TWRKuD6DT5noDclZsE8ROZKUSOKAUGIBvt7MpzOWPPchmnromWEevmXo3GoPUZCKnWX6ZLAtJwAszLUgiVS8rx3JnLXuXrtcVFto5FFQhwSHZyzuYZACqZ6dZHCgR1814YPH9GrvNlO34KdpYSAmjgIvhBU/0UAHvDBmiyofbZG9pYOW7DpqBtCCivFpilx3f/ZL3SiwhTuncBaabPvIuOXS6eVTX3aETmNXI4mUolgwFBupvoFy5qSQfqGaGUqJueIf8+iyUV4vuQhLsBwFKc6QSI6bAhJ5M/Kjf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XhLUo5Dhpq5RznHplpLB9mNdZdm5269US/XCgC/ZKyUxW3+0ajdBY1cLzF6qglitaYTp3MVUENVOkACM2RyKw6jIK2Leq3qLp6AUz21VXj4WznZcdI8MXqT9v8HxjXbAI9dtbhLRZRpJmu/129vrVmwSTHvsVoA7vXyYh/iO3ZMcy+D1x+HZU6Q/oDYCicqOPHxpSc9QGehmNyeGzI//524Gz3RudkU7s6MPdLWqZrieRTnWsTIrCDieu4ValfP8BFz7asYUv0t9jMWpv3yjbY7c5h8N/m7IUXwTQCzFpjPV7HC72BjVwPaYqh5/oAQsSNcv5I3c2GsCGj5C4hFFoT7eWfVtu/6ibQl0COhRDsegnOBtZ7NGfybI8IIO/4yrgel92bypb3eSxeMvdE5wzURluGDkBVVIACD8C5W1MzqrejUiiTfc3mkLhQ0xKRRhT0qqkmYWlbGN5hmMOA9YaYx8OFTgMys1WbzdidWgEkyvvdkWctGlges6eg/lJE61tJ8wGxvJfKtpyDW/2MRvsnO1+2EXIQ2eV3hkxg=", - "hash": "18671077004572533866328734050385144986204131880023727479641996554106327100538" + "data": "AADgDFCYyznG8hH/Z695+WW86B544SmJFzz5ObrizTJ4KMqy+pfsOR2Mt2yGViXSJPpAR76RNHNga83UB8/9OPQIB+uHOnxXH7vN8sUeDQi50gWdXzRlzSS1jsT9t+XsQwHNWgMQp04pKmF+0clYz1zwOO95BwHGcQ/olrSYW4tbJN6KW0hN2eESQfUJcwfB6uUzwvGtkFs+aiUykn7KUgUgXQkKgdHHdyFioNHNPmkpiAre/Ts8BKwwvf5hCa1MtBF6ax6ymlATB4YBL0ETiEPTE/Qk1zGWUSL2UB6aY45/LlfTLCKlyLq7cR3HOucFfBncVfzI7D8j5n4wVqY+vAI4cf+Yv7iVRLbeFcycXtsuPQntgBzKa/mcqcWuVM7p2SYRrtKdX8EKvOO6NhfLx4x0atAi8pKf+vZR76LSP4iOA8hwXvk6MNvPt1fxCS96ZAKuAzZnAcK+MH1OcKeLj+EHtZmf40WRb3AEG5TW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sna58o5wk8LMwKWNTxq+FN6XiRgu0BFOrtG6MtT1OxYE9Dti6WatGDsWv+KMLDHjxUK1bhiSRnvkWYNcnuDJ0Ry+PRGHNUijVU0SbchntC2JHdhwKbwIofwKHE8HhvlK8FgQ1VOLDioA26UFzr23LpCTqwSJ7/sAqttNGcPR8MSeeR9TQvXNYQPKrA7Gh720X+7LD6BuHdy4vkcr9EKBU0ccUJ2ABBiyPdji+AgEbUCL/wrp6/GX8pui5YJGWx3XmIFj/RnYS2Je5FZ7w74JclD3XhLUo5Dhpq5RznHplpLB9mNdZdm5269US/XCgC/ZKyUxW3+0ajdBY1cLzF6qglitaYTp3MVUENVOkACM2RyKw6jIK2Leq3qLp6AUz21VXj4WznZcdI8MXqT9v8HxjXbAI9dtbhLRZRpJmu/129vrVmwSTHvsVoA7vXyYh/iO3ZMcy+D1x+HZU6Q/oDYCicqOPHxpSc9QGehmNyeGzI//524Gz3RudkU7s6MPdLWqZrieRTnWsTIrCDieu4ValfP8BFz7asYUv0t9jMWpv3yjbY7c5h8N/m7IUXwTQCzFpjPV7HC72BjVwPaYqh5/oAQsSNcv5I3c2GsCGj5C4hFFoT7eWfVtu/6ibQl0COhRDsegnOBtZ7NGfybI8IIO/4yrgel92bypb3eSxeMvdE5wzURluGDkBVVIACD8C5W1MzqrejUiiTfc3mkLhQ0xKRRhT0qqkmYWlbGN5hmMOA9YaYx8OFTgMys1WbzdidWgEkyvvdkWctGlges6eg/lJE61tJ8wGxvJfKtpyDW/2MRvsnO1+2EXIQ2eV3hkxg=", + "hash": "25039693596333908117154819221126656892469551802975690923144441585724891963362" } }, "Group Primitive": { @@ -220,8 +220,8 @@ } }, "verificationKey": { - "data": "AAAdmtvKeZvyx7UyPW6rIhb96GnTZEEywf8pGpbkt+QXNIm7oWxIDWYa4EWTiadEqzk8WXg3wiZmbXWcqBQU+uIoTiBnYTRcd7RsaAjbdbIbQJ9EuopFRFewZRx9qeQeEibNeMRcRMP4LdfS3AQRxhFZzN4HFa4Mb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euOZekFLGxlfp0lv9IQUQWtiU5uvd5HVoolEc/teUnx/IxYe01IDxX9cbmPMJnLYXJGSY=", - "hash": "25271286642747974031983353211461491451908613205953665636468664200927112191702" + "data": "AAAdmtvKeZvyx7UyPW6rIhb96GnTZEEywf8pGpbkt+QXNIm7oWxIDWYa4EWTiadEqzk8WXg3wiZmbXWcqBQU+uIoTiBnYTRcd7RsaAjbdbIbQJ9EuopFRFewZRx9qeQeEibNeMRcRMP4LdfS3AQRxhFZzN4HFa4MbtGs+Aja820cI9VFULH2/7BvD6JjpVWjVLvvo6zhO3S5axqfDh7QqtkPo3TLpand9OVvMHhTVlz/AV7rus5E/+0cv50MaEJ/wBfUh5XNLAlGgVi7FfWR6p9P72AAymyD3lUdecJyZmCREiVgPrTdFppkp45TefJWNTySkV9c5YzpNxQoXedZDvYP/5s4KBkfIeK+zB2yJC9eZ1ZDYfM88shGDYxmBtur9AkQ49QGquR+kYUI0lpXtuNMG+ZRy0FRJ8ci/TE+PIPIFnSiGcSOA3YM2G171LYf89abU2QUoQRHSP3PmmAOy/8CoRLVro7Nl6z/Ou0oZzX7RjOEo//LBqcSWa2S9X8TQz0R3uivbovTdq0rrba56SbEnK6LWItmBc6CubYWL7UzDbD3RZM6iRz1hqTHDzDz7UIWOzHgLqW9rjnZllQCyfsSAITXlARJtm/92FNCv1l4OZpkgNzYxgdZMklGYREU5jkPDDcmMS3d5m3Wy2QseEfGxs5WZMy2vCs/R54QgV/gCBkgKzcNZhhPW5VfbcSYDpx5nVaU5pTEFl+2+RlcuhBpG1ksAWbD64AUKDjdyTWIC5Wn68AagPtG65V13eFS5LgkSfVtNXxGodg7SdP4AJmXpBgZfzMg4RW6Qje5ZFfrwRzoHPo0y7nO1hkaNLGV3Wvd3/pYiebXvyo+DdTZmaMbJpJaGSCysnovOrVUIpcn4h1hvA12jztQFQcbNHoVeZgslPxA54y9ynjhN7VZfT8lNXXIrRCpmPaxZW6Bw6Op/g6FGIs8TlruzZJRhz1lOLvl2FP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BkRlJTJKY7fQL/t9bFfywoquQe9e7OQvIjppA/FO7HmZS6hoOU+eS8+W94fEF2gvrowpTeqQHM6hLN9Qzl8niwZWUIyRCfyuzQnuSz/VP1K2sMFBKnZZNDcuBh1/xSFymOH6LfNKostvc6qHTIxrTjlH6952bo1bQl+mVvBUaJuRkYh12QbcyIyzcBFUYwaFazzkHXMof0O30oL3Q6wegTvJxTSZD5VCr5D26Myzoa0JBpqL0st9/MNGZe5a/+HW1qan/VtGA5nYkJcUzwKVqqlmZeuOZekFLGxlfp0lv9IQUQWtiU5uvd5HVoolEc/teUnx/IxYe01IDxX9cbmPMJnLYXJGSY=", + "hash": "16626558875595050675741741208497473516532634598762284173771479275503819571624" } }, "ecdsa": { @@ -233,8 +233,8 @@ } }, "verificationKey": { - "data": "AACzYt9qtBkn6y40KDH0lkzRSMBh3W41urWE6j0PSP2KB9GxsBAHAI3uzay1Vqyc+LMXeANSzNcoYSYnZts9Pk0nFNjCZ84EnGkie609NhFB8tU9k5Vkoqw3jihdsoJEUy6GK0H30dl/7H1rGxsx6Ec05aaFhiPw6t0jLxF1kj4uIeipqOScf8snKuzywk02FqvRxSHlk9pkEsUOvpNIwywxzhvHjWgXEQzROQF8v6q5R/1aJk3swpM1iRct9URLIjdin4GWyDB9279EZ6D6avFW2l7WuMJG++xBqGsNKZUgNM4WkUGNfCd+m42hJgt46eOy89db672su0n24IZG9tAsgQl8vPsVKfsTvTWlMj6/jISm7Dcctr1rZpSb8hRPsQstlfqMw3q6qijtTkFiMsdGRwJ6LNukSFUxOarhVsfREQngJufm4IxFpJJMR5F1DFSDPiOPuylEqXzke+j078Y4vr+QRo07YRlsoEv4a6ChcxMd3uu5Oami+D747/YVaS8kLd/3bO+WFpubID5fv4F7/JO4Fy/O7n1waPpNnzi/PZRlHVlwzNVAs09OmTmgzNM4/jAJBO9lRgCFA1SW0BADAC/RYa/DFzzgI0SJF+gmV5rEMuG1fR/Lckf1HmfylBUHNAS/bvycGfRfVQEJm8AiPA+N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w/xcoAihjUsEqoecrLuGPp6qI4hQt9qOnVrAxHzwwtJGxcqoiCbe1mgz0fxMCt/i0z3ygdqAn20DKPHuBdqgVUFwx2T7Ac9fUCf3RHMq34onrr2nLHc038GYedmlFjoUZStujGwA8tSwLWyuWZTDVV+ZaW92qkhmrACog6NwhR6SEjQgsMRCVBQZzYirZxyulYmcNWH6BUmnLLFsn3GbS40xUr70gujEPnjZUK/ExGRfUPOfrYYb8mAciE9nP8OeK/UI+zjJy6Qp8mMroFw7gVHCfDtKTeQFt4JV3zubGsD7jypquHKCqPewhgn9tZ1UIsKIQB7+hBwDHzhlOZ2FfR4eLwQkO8sz275tpjHDAqX/TBWWRVg/yBDii0CWN4bP8UuX36jZKZboJUxIkM1xThiGZM2/oMbe5cZyjgrBR3P21wiDHAAlsHkaMfJgkVLqvZOw8hflKRIMa2dEYo5voD6aV30sATHQLoV0o+MlV3WA38RA+23Jqt1g+UZ7ReAuDP88jXhqWFcIvWHrJG0oy+rpAPQU/38vhIxbl//lirsirdVK2LrU47CC1f9/pRi07vTnvAm+n02dhwriqpwOmI2o2OU4mO0q96pCueKjAttkXgz+NSIJzcwprvNyE9UtKWswmIQg=", - "hash": "28329813042739019865303373981542714975096121311268477893114462508676857180819" + "data": "AACzYt9qtBkn6y40KDH0lkzRSMBh3W41urWE6j0PSP2KB9GxsBAHAI3uzay1Vqyc+LMXeANSzNcoYSYnZts9Pk0nFNjCZ84EnGkie609NhFB8tU9k5Vkoqw3jihdsoJEUy6GK0H30dl/7H1rGxsx6Ec05aaFhiPw6t0jLxF1kj4uIeipqOScf8snKuzywk02FqvRxSHlk9pkEsUOvpNIwywxzhvHjWgXEQzROQF8v6q5R/1aJk3swpM1iRct9URLIjdin4GWyDB9279EZ6D6avFW2l7WuMJG++xBqGsNKZUgNM4WkUGNfCd+m42hJgt46eOy89db672su0n24IZG9tAsgQl8vPsVKfsTvTWlMj6/jISm7Dcctr1rZpSb8hRPsQstlfqMw3q6qijtTkFiMsdGRwJ6L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bCm/z2vGlRbXDGZF6yTbLTdjzviuPhVtb7bzsZW2AYC+TlZqb4qm9MAVsH5rX3OZmvvmw5oRKeSj+FFD7uSRwfutDGC99i93uptU8syL/8Tr8xU3atxITlSqHqG+rVGWdLO9i3iq38zXgXbvZacrc3CMF5QBIM8yZXNslXH5k39D5SqubSHBWTqAJ1I0heOjaIHQGLROBYLn178tckBxfKQ2UpyfkvMw1Waw+fp5f64Ce+5bmYyZr6Dhmw/xcoAihjUsEqoecrLuGPp6qI4hQt9qOnVrAxHzwwtJGxcqoiCbe1mgz0fxMCt/i0z3ygdqAn20DKPHuBdqgVUFwx2T7Ac9fUCf3RHMq34onrr2nLHc038GYedmlFjoUZStujGwA8tSwLWyuWZTDVV+ZaW92qkhmrACog6NwhR6SEjQgsMRCVBQZzYirZxyulYmcNWH6BUmnLLFsn3GbS40xUr70gujEPnjZUK/ExGRfUPOfrYYb8mAciE9nP8OeK/UI+zjJy6Qp8mMroFw7gVHCfDtKTeQFt4JV3zubGsD7jypquHKCqPewhgn9tZ1UIsKIQB7+hBwDHzhlOZ2FfR4eLwQkO8sz275tpjHDAqX/TBWWRVg/yBDii0CWN4bP8UuX36jZKZboJUxIkM1xThiGZM2/oMbe5cZyjgrBR3P21wiDHAAlsHkaMfJgkVLqvZOw8hflKRIMa2dEYo5voD6aV30sATHQLoV0o+MlV3WA38RA+23Jqt1g+UZ7ReAuDP88jXhqWFcIvWHrJG0oy+rpAPQU/38vhIxbl//lirsirdVK2LrU47CC1f9/pRi07vTnvAm+n02dhwriqpwOmI2o2OU4mO0q96pCueKjAttkXgz+NSIJzcwprvNyE9UtKWswmIQg=", + "hash": "13907522711254991952405567976395529829664716172124500348498751038796408381729" } }, "sha256": { @@ -246,8 +246,8 @@ } }, "verificationKey": { - "data": "AACa0OPxg0UDEf5DBLZf/TtdB4TzIAMNQC467+/R1yGnL1tRXJnn0BDcLG0fGWdqFcWK1q2zKdAYfORKVOHgvKEwxtxZYv4CjM7SwlG09G52oNZmOgG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slCj8cF/EO6iX/NnIxBkuqmXfQnGUfcFK0LZPsvd7RInaLEYTeA4ZDfChiuw+5nTmrJFOywwOYdIA+NiMfCh24dPYAAwEGb9KLEP9u7/Rp5uPi0S3tuTw67yg=", - "hash": "16300587121626758287799507210144584597991991079389272313290346700569896683417" + "data": "AACa0OPxg0UDEf5DBLZf/TtdB4TzIAMNQC467+/R1yGnL1tRXJnn0BDcLG0fGWdqFcWK1q2zKdAYfORKVOHgvKEwxtxZYv4CjM7SwlG09G52oNZmOgGCilD0ntmby4rzJTaoyCimx5ynQ/oYjslJgSM/1DTAkpW6IIdFjjkmjlOSHqRNRAMtNtl44D9lbhci4blHbDvzQnlYynwRh58jAzoDj3bCkPsByviAyFBoPhUx2M13h0/VPK1ND/69djzZgi9lQKaON74XvbnvJdSAYLQSIBbOE0yo7tS1vGTPqDqJGzc1f0+2QhZttE2UEUV4PPEGB6LUFEuQPXK8lXyXHVQTOU+omjpvKHLLs/dQZLTSvvZ3UFqxUvxjSEG9eTPo3Cyt4wXcPEi1b993ePSSxP6njj1SoPBA4BvLCCcvaxz5DegUu7nZDKkC8tuaoNbqYcayaf/8+oZ+dA+Ek1Xe08og1Hz9gB9cfPvgI9EiL2Na2cgiOF2klHHEAj3fORN8UQVzs0ioqLcQeq2tH2UMMtZS4JNcohHUah1T0jKmS3eZDqe+aMuf5qzKA5oKRF2ejRwmsxI161YlgXXpmHs+kCQGAPvX5+/WvgVyy1uIX6426oQoB+0Ni/lWEhFNY+MvNVUGIgPAyvpEafTl8DMfPQkUf0yQCPxRg7d/lRCRfYqHRT74U20AHCGYSahuSFbBO6dDhRCPGRCJJgxktY+CSO+3B9mLtCe2X23FeFsUnaAFlzmsWeKR1tMyPupNsUXPFugubYZYd1EwxUDeBIOLeahcqX78yDDMOdsr0QHNG8XteyXcRXGFUSzTTKNEXdD+BOMY6FfMroKO4y3FffyrZef1PRsu/kVwaZb4UthvhBwet8DBcMa26kISlsI1ItcvsdwST5x1+iLCM4hBcFB0ly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8U6aZxVTMFvKQ2JLtwVGVnMDuSkNC+iN711acwssgbTpsgHLdVbtFR1oYcbpJHe6a9SFquG+q9qfzT15IzKpBzxn6BVXfhhFGpJRAbU0bXbjOpeceg7vaV7RykTzBoIzAe5aUVAdKNM6fzGlPw16xx7QeOW+LFlOm6HJyxYAZfbpB/BLza4ZhoqmVx+ALUXHFIztgGQK9rzm+jBwiuwuLqdD2W00cbTZcbgKTo48XD6NJ+8T4J9B3rPzht3qbgpN//TyYkfrzAercAa/HCvFeBNXl1slCj8cF/EO6iX/NnIxBkuqmXfQnGUfcFK0LZPsvd7RInaLEYTeA4ZDfChiuw+5nTmrJFOywwOYdIA+NiMfCh24dPYAAwEGb9KLEP9u7/Rp5uPi0S3tuTw67yg=", + "hash": "22296391645667701199385692837408020819294441951376164803693884547686842878882" } }, "diverse": { From 3cbc4b57fc268fc691a6f41dd830d40d66d92f11 Mon Sep 17 00:00:00 2001 From: Gregor Date: Thu, 7 Mar 2024 08:18:01 +0100 Subject: [PATCH 31/31] fixup benchmarks and type check them in ci --- benchmarks/ecdsa.ts | 4 ++-- benchmarks/tsconfig.json | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/benchmarks/ecdsa.ts b/benchmarks/ecdsa.ts index 18b8db3666..5bc29a9a87 100644 --- a/benchmarks/ecdsa.ts +++ b/benchmarks/ecdsa.ts @@ -24,11 +24,11 @@ const EcdsaBenchmark = benchmark( 'ecdsa', async (tic, toc) => { tic('build constraint system'); - keccakAndEcdsa.analyzeMethods(); + await keccakAndEcdsa.analyzeMethods(); toc(); tic('witness generation'); - Provable.runAndCheck(() => { + await Provable.runAndCheck(() => { let message_ = Provable.witness(Bytes32.provable, () => message); let signature_ = Provable.witness(Ecdsa.provable, () => signature); let publicKey_ = Provable.witness(Secp256k1.provable, () => publicKey); diff --git a/benchmarks/tsconfig.json b/benchmarks/tsconfig.json index 3d5c7b6534..98fbc7dcbe 100644 --- a/benchmarks/tsconfig.json +++ b/benchmarks/tsconfig.json @@ -3,6 +3,7 @@ "include": ["."], "exclude": [], "compilerOptions": { + "noEmit": true, // no build output, we just want type checking "rootDir": "..", "baseUrl": "..", "paths": { diff --git a/package.json b/package.json index 0c862c3ff5..18c56fa056 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "build:update-bindings": "./src/bindings/scripts/update-o1js-bindings.sh", "build:wasm": "./src/bindings/scripts/update-wasm-and-types.sh", "build:web": "rimraf ./dist/web && node src/build/build-web.js", - "build:examples": "npm run build && rimraf ./dist/examples && npx tsc -p tsconfig.examples.json", + "build:examples": "npm run build && rimraf ./dist/examples && npx tsc -p tsconfig.examples.json && npx tsc -p benchmarks/tsconfig.json", "build:docs": "npx typedoc --tsconfig ./tsconfig.web.json", "prepublish:web": "NODE_ENV=production node src/build/build-web.js", "prepublish:node": "node src/build/copy-artifacts.js && rimraf ./dist/node && npx tsc -p tsconfig.node.json && node src/build/copy-to-dist.js && NODE_ENV=production node src/build/build-node.js",