From 78a6e8e0ad78fac0a3e3c3d921cef5785f566432 Mon Sep 17 00:00:00 2001 From: Ivan Chub Date: Wed, 28 Aug 2024 15:06:56 -0700 Subject: [PATCH 1/3] chore: add 'options' parameter to 'groth16FullProve', and pass it through to 'wtns_calculate' --- src/groth16_fullprove.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groth16_fullprove.js b/src/groth16_fullprove.js index 4c582773..320b404f 100644 --- a/src/groth16_fullprove.js +++ b/src/groth16_fullprove.js @@ -22,12 +22,12 @@ import wtns_calculate from "./wtns_calculate.js"; import {utils} from "ffjavascript"; const {unstringifyBigInts} = utils; -export default async function groth16FullProve(_input, wasmFile, zkeyFileName, logger) { +export default async function groth16FullProve(_input, wasmFile, zkeyFileName, logger, options) { const input = unstringifyBigInts(_input); const wtns= { type: "mem" }; - await wtns_calculate(input, wasmFile, wtns); + await wtns_calculate(input, wasmFile, wtns, options); return await groth16_prove(zkeyFileName, wtns, logger); } From 0289b3a0c1722bd19c32327a4b6f9fe6e2bb33f9 Mon Sep 17 00:00:00 2001 From: Ivan Chub Date: Fri, 30 Aug 2024 11:12:48 -0700 Subject: [PATCH 2/3] options -> wtnsCalcOptions --- src/groth16_fullprove.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groth16_fullprove.js b/src/groth16_fullprove.js index 320b404f..76560491 100644 --- a/src/groth16_fullprove.js +++ b/src/groth16_fullprove.js @@ -22,12 +22,12 @@ import wtns_calculate from "./wtns_calculate.js"; import {utils} from "ffjavascript"; const {unstringifyBigInts} = utils; -export default async function groth16FullProve(_input, wasmFile, zkeyFileName, logger, options) { +export default async function groth16FullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) { const input = unstringifyBigInts(_input); const wtns= { type: "mem" }; - await wtns_calculate(input, wasmFile, wtns, options); + await wtns_calculate(input, wasmFile, wtns, wtnsCalcOptions); return await groth16_prove(zkeyFileName, wtns, logger); } From c5b50a4b2368de1d59592694daebb92e31a611cc Mon Sep 17 00:00:00 2001 From: Ivan Chub Date: Fri, 30 Aug 2024 11:15:29 -0700 Subject: [PATCH 3/3] also add wtnsCalcOptions argument to plonk_full_prove and fflonk_full_prove --- src/fflonk_full_prove.js | 2 +- src/plonk_fullprove.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fflonk_full_prove.js b/src/fflonk_full_prove.js index 14ecd5bc..b9e6d358 100644 --- a/src/fflonk_full_prove.js +++ b/src/fflonk_full_prove.js @@ -26,7 +26,7 @@ export default async function fflonkFullProve(_input, wasmFilename, zkeyFilename const wtns= {type: "mem"}; // Compute the witness - await wtns_calculate(input, wasmFilename, wtns); + await wtns_calculate(input, wasmFilename, wtns, wtnsCalcOptions); // Compute the proof return await fflonkProve(zkeyFilename, wtns, logger); diff --git a/src/plonk_fullprove.js b/src/plonk_fullprove.js index d1c65be1..73b0fd05 100644 --- a/src/plonk_fullprove.js +++ b/src/plonk_fullprove.js @@ -22,12 +22,12 @@ import wtns_calculate from "./wtns_calculate.js"; import {utils} from "ffjavascript"; const {unstringifyBigInts} = utils; -export default async function plonkFullProve(_input, wasmFile, zkeyFileName, logger) { +export default async function plonkFullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) { const input = unstringifyBigInts(_input); const wtns= { type: "mem" }; - await wtns_calculate(input, wasmFile, wtns); + await wtns_calculate(input, wasmFile, wtns, wtnsCalcOptions); return await plonk_prove(zkeyFileName, wtns, logger); }