mirror of
https://github.com/arnaucube/snarkjs.git
synced 2026-02-27 21:46:47 +01:00
Add extra point in lagrange to avoid constant polinomials
This commit is contained in:
@@ -62,13 +62,9 @@ function unstringifyBigInts(o) {
|
||||
describe("zkSnark", () => {
|
||||
it("Load a circuit, create trusted setup, create a proof and validate", () => {
|
||||
|
||||
const cirDef = JSON.parse(fs.readFileSync(path.join(__dirname, "circuit", "sum_old.json"), "utf8"));
|
||||
const cirDef = JSON.parse(fs.readFileSync(path.join(__dirname, "circuit", "sum.json"), "utf8"));
|
||||
const cir = new Circuit(cirDef);
|
||||
|
||||
console.log("Signals: " + cir.nSignals);
|
||||
console.log("Vars: " + cir.nVars);
|
||||
console.log("Constants: " + cir.nConstants);
|
||||
|
||||
const setup = zkSnark.setup(cir);
|
||||
const strSetup = stringifyBigInts(setup);
|
||||
fs.writeFileSync("vk_proof.json", JSON.stringify(strSetup.vk_proof), "utf-8");
|
||||
|
||||
Reference in New Issue
Block a user