bls12-381 fix and fast r1cs generation

This commit is contained in:
Jordi Baylina
2020-09-24 19:18:49 +02:00
parent f9f1d0c13e
commit a002bcbc25
4 changed files with 43 additions and 40 deletions

View File

@@ -701,6 +701,9 @@ function execPin(ctx, ast) {
if (sel.v[0].t != "N") return NQVAL;
selsP.push(Scalar.toNumber(sel.v[0].v));
}
if (!ctx.components[cIdx]) {
return ctx.throwError(ast, "Component not defined yet");
}
const sIdx = ctx.components[cIdx].names.getSignalIdx(ast.pin.name, selsP);
if (sIdx<0) return ctx.throwError(ast, "Signal not defined:" + buildFullName() );

View File

@@ -8,8 +8,7 @@ module.exports.buildR1cs = buildR1cs;
async function buildR1cs(ctx, fileName) {
const fd = await fastFile.createOverride(fileName);
const fd = await fastFile.createOverride(fileName, 1<<22, 1<<24);
const buffBigInt = new Uint8Array(ctx.F.n8);