Optimization added for removing linear combination only constraints with an internal variable

This commit is contained in:
Jordi Baylina
2018-10-14 10:43:03 +02:00
parent f445a95c8f
commit ac9f051067
6 changed files with 245 additions and 84 deletions

View File

@@ -57,6 +57,9 @@ describe("SHA256 test", () => {
const cirDef = await compiler(path.join(__dirname, "circuits", "sha256_2_test.circom"));
const circuit = new zkSnark.Circuit(cirDef);
console.log("Vars: "+circuit.nVars);
console.log("Constraints: "+circuit.nConstraints);
const witness = circuit.calculateWitness({ "a": "1", "b": "2" });
const b = new Buffer.alloc(54);