Skip to content

Commit

Permalink
Update with fixes of circom_runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrezhniev committed Sep 7, 2024
1 parent 67e06be commit 2fca4d5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 37 deletions.
15 changes: 7 additions & 8 deletions build/browser.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3975,13 +3975,13 @@ async function wtnsCalculate(_input, wasmFileName, wtnsFileName, options) {
*/
const {unstringifyBigInts: unstringifyBigInts$a} = utils;

async function groth16FullProve(_input, wasmFile, zkeyFileName, logger) {
async function groth16FullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$a(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate(input, wasmFile, wtns);
await wtnsCalculate(input, wasmFile, wtns, wtnsCalcOptions);
return await groth16Prove(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -7043,8 +7043,7 @@ async function wtnsDebug(_input, wasmFileName, wtnsFileName, symName, options, l
const wasm = await fdWasm.read(fdWasm.totalSize);
await fdWasm.close();

let wcOps = options || {};
wcOps.sanityCheck = true;
const wcOps = {...options, sanityCheck: true};
let sym = await loadSymbols(symName);
if (options.set) {
if (!sym) sym = await loadSymbols(symName);
Expand Down Expand Up @@ -12799,13 +12798,13 @@ async function plonk16Prove(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$5} = utils;

async function plonkFullProve(_input, wasmFile, zkeyFileName, logger) {
async function plonkFullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$5(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate(input, wasmFile, wtns);
await wtnsCalculate(input, wasmFile, wtns, wtnsCalcOptions);
return await plonk16Prove(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -15390,13 +15389,13 @@ async function fflonkProve(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$2} = utils;

async function fflonkFullProve(_input, wasmFilename, zkeyFilename, logger) {
async function fflonkFullProve(_input, wasmFilename, zkeyFilename, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$2(_input);

const wtns= {type: "mem"};

// Compute the witness
await wtnsCalculate(input, wasmFilename, wtns);
await wtnsCalculate(input, wasmFilename, wtns, wtnsCalcOptions);

// Compute the proof
return await fflonkProve(zkeyFilename, wtns, logger);
Expand Down
15 changes: 7 additions & 8 deletions build/cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6109,13 +6109,13 @@ async function wtnsCalculate$1(_input, wasmFileName, wtnsFileName, options) {
*/
const {unstringifyBigInts: unstringifyBigInts$9} = ffjavascript.utils;

async function groth16FullProve$1(_input, wasmFile, zkeyFileName, logger) {
async function groth16FullProve$1(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$9(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate$1(input, wasmFile, wtns);
await wtnsCalculate$1(input, wasmFile, wtns, wtnsCalcOptions);
return await groth16Prove$1(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -9004,13 +9004,13 @@ async function plonk16Prove(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$6} = ffjavascript.utils;

async function plonkFullProve$1(_input, wasmFile, zkeyFileName, logger) {
async function plonkFullProve$1(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$6(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate$1(input, wasmFile, wtns);
await wtnsCalculate$1(input, wasmFile, wtns, wtnsCalcOptions);
return await plonk16Prove(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -11569,13 +11569,13 @@ async function fflonkProve$1(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$3} = ffjavascript.utils;

async function fflonkFullProve$1(_input, wasmFilename, zkeyFilename, logger) {
async function fflonkFullProve$1(_input, wasmFilename, zkeyFilename, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$3(_input);

const wtns= {type: "mem"};

// Compute the witness
await wtnsCalculate$1(input, wasmFilename, wtns);
await wtnsCalculate$1(input, wasmFilename, wtns, wtnsCalcOptions);

// Compute the proof
return await fflonkProve$1(zkeyFilename, wtns, logger);
Expand Down Expand Up @@ -12257,8 +12257,7 @@ async function wtnsDebug$1(_input, wasmFileName, wtnsFileName, symName, options,
const wasm = await fdWasm.read(fdWasm.totalSize);
await fdWasm.close();

let wcOps = options || {};
wcOps.sanityCheck = true;
const wcOps = {...options, sanityCheck: true};
let sym = await loadSymbols(symName);
if (options.set) {
if (!sym) sym = await loadSymbols(symName);
Expand Down
15 changes: 7 additions & 8 deletions build/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,13 +1299,13 @@ async function wtnsCalculate(_input, wasmFileName, wtnsFileName, options) {
*/
const {unstringifyBigInts: unstringifyBigInts$a} = ffjavascript.utils;

async function groth16FullProve(_input, wasmFile, zkeyFileName, logger) {
async function groth16FullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$a(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate(input, wasmFile, wtns);
await wtnsCalculate(input, wasmFile, wtns, wtnsCalcOptions);
return await groth16Prove(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -4017,8 +4017,7 @@ async function wtnsDebug(_input, wasmFileName, wtnsFileName, symName, options, l
const wasm = await fdWasm.read(fdWasm.totalSize);
await fdWasm.close();

let wcOps = options || {};
wcOps.sanityCheck = true;
const wcOps = {...options, sanityCheck: true};
let sym = await loadSymbols(symName);
if (options.set) {
if (!sym) sym = await loadSymbols(symName);
Expand Down Expand Up @@ -9112,13 +9111,13 @@ async function plonk16Prove(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$5} = ffjavascript.utils;

async function plonkFullProve(_input, wasmFile, zkeyFileName, logger) {
async function plonkFullProve(_input, wasmFile, zkeyFileName, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$5(_input);

const wtns= {
type: "mem"
};
await wtnsCalculate(input, wasmFile, wtns);
await wtnsCalculate(input, wasmFile, wtns, wtnsCalcOptions);
return await plonk16Prove(zkeyFileName, wtns, logger);
}

Expand Down Expand Up @@ -11705,13 +11704,13 @@ async function fflonkProve(zkeyFileName, witnessFileName, logger) {
*/
const {unstringifyBigInts: unstringifyBigInts$2} = ffjavascript.utils;

async function fflonkFullProve(_input, wasmFilename, zkeyFilename, logger) {
async function fflonkFullProve(_input, wasmFilename, zkeyFilename, logger, wtnsCalcOptions) {
const input = unstringifyBigInts$2(_input);

const wtns= {type: "mem"};

// Compute the witness
await wtnsCalculate(input, wasmFilename, wtns);
await wtnsCalculate(input, wasmFilename, wtns, wtnsCalcOptions);

// Compute the proof
return await fflonkProve(zkeyFilename, wtns, logger);
Expand Down
17 changes: 8 additions & 9 deletions build/snarkjs.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/snarkjs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@iden3/binfileutils": "0.0.12",
"bfj": "^7.0.2",
"blake2b-wasm": "^2.4.0",
"circom_runtime": "iden3/circom_runtime#6d4843929b61baba03be8090b094946e54717192",
"circom_runtime": "iden3/circom_runtime#30bcddf",
"ejs": "^3.1.6",
"fastfile": "0.0.20",
"ffjavascript": "0.3.0",
Expand Down

0 comments on commit 2fca4d5

Please sign in to comment.