Skip to content

Commit

Permalink
chore: add 'options' parameter to 'groth16FullProve', and pass it thr…
Browse files Browse the repository at this point in the history
…ough to 'wtns_calculate' (#519)

* chore: add 'options' parameter to 'groth16FullProve', and pass it through to 'wtns_calculate'

* options -> wtnsCalcOptions

* also add wtnsCalcOptions argument to plonk_full_prove and fflonk_full_prove
  • Loading branch information
ichub authored Sep 7, 2024
1 parent 12da614 commit 8f018e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/fflonk_full_prove.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/groth16_fullprove.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, wtnsCalcOptions) {
const input = unstringifyBigInts(_input);

const wtns= {
type: "mem"
};
await wtns_calculate(input, wasmFile, wtns);
await wtns_calculate(input, wasmFile, wtns, wtnsCalcOptions);
return await groth16_prove(zkeyFileName, wtns, logger);
}
4 changes: 2 additions & 2 deletions src/plonk_fullprove.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 8f018e6

Please sign in to comment.