Fix Big Prove

This commit is contained in:
Jordi Baylina 2020-10-25 12:22:07 +01:00
parent 467e30f727
commit 19951ea443
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
5 changed files with 30 additions and 6 deletions

@ -6265,7 +6265,13 @@ async function joinABC(curve, zkey, a, b, c, logger) {
const result = await Promise.all(promises); const result = await Promise.all(promises);
const outBuff = new Uint8Array(a.byteLength); let outBuff;
if (a instanceof ffjavascript.BigBuffer) {
outBuff = new ffjavascript.BigBuffer(a.byteLength);
} else {
outBuff = new Uint8Array(a.byteLength);
}
let p=0; let p=0;
for (let i=0; i<result.length; i++) { for (let i=0; i<result.length; i++) {
outBuff.set(result[i][0], p); outBuff.set(result[i][0], p);

@ -1753,7 +1753,13 @@ async function joinABC(curve, zkey, a, b, c, logger) {
const result = await Promise.all(promises); const result = await Promise.all(promises);
const outBuff = new Uint8Array(a.byteLength); let outBuff;
if (a instanceof ffjavascript.BigBuffer) {
outBuff = new ffjavascript.BigBuffer(a.byteLength);
} else {
outBuff = new Uint8Array(a.byteLength);
}
let p=0; let p=0;
for (let i=0; i<result.length; i++) { for (let i=0; i<result.length; i++) {
outBuff.set(result[i][0], p); outBuff.set(result[i][0], p);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -333,7 +333,13 @@ async function joinABC(curve, zkey, a, b, c, logger) {
const result = await Promise.all(promises); const result = await Promise.all(promises);
const outBuff = new Uint8Array(a.byteLength); let outBuff;
if (a instanceof BigBuffer) {
outBuff = new BigBuffer(a.byteLength);
} else {
outBuff = new Uint8Array(a.byteLength);
}
let p=0; let p=0;
for (let i=0; i<result.length; i++) { for (let i=0; i<result.length; i++) {
outBuff.set(result[i][0], p); outBuff.set(result[i][0], p);