Fix zkv Big circuit

This commit is contained in:
Jordi Baylina 2020-10-30 07:43:32 +01:00
parent 1516767cdf
commit 36b426626b
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112

View File

@ -280,8 +280,8 @@ export default async function phase2verify(r1csFileName, pTauFileName, zkeyFileN
if (logger) logger.debug(`H Verificaition(tau): ${i}/${zkey.domainSize}`); if (logger) logger.debug(`H Verificaition(tau): ${i}/${zkey.domainSize}`);
const n = Math.min(zkey.domainSize - i, MAX_CHUNK_SIZE); const n = Math.min(zkey.domainSize - i, MAX_CHUNK_SIZE);
const buff1 = await fdPTau.read(sG*n, sectionsPTau[2][0].p + zkey.domainSize*sG + i*MAX_CHUNK_SIZE*sG); const buff1 = await fdPTau.read(sG*n, sectionsPTau[2][0].p + zkey.domainSize*sG + i*sG);
const buff2 = await fdPTau.read(sG*n, sectionsPTau[2][0].p + i*MAX_CHUNK_SIZE*sG); const buff2 = await fdPTau.read(sG*n, sectionsPTau[2][0].p + i*sG);
const buffB = await batchSubstract(buff1, buff2); const buffB = await batchSubstract(buff1, buff2);
const buffS = buff_r.slice(i*zkey.n8r, (i+n)*zkey.n8r); const buffS = buff_r.slice(i*zkey.n8r, (i+n)*zkey.n8r);