Fix last point FFT times2
This commit is contained in:
parent
1fafad70ee
commit
2ddfb6391c
@ -3773,7 +3773,7 @@ async function preparePhase2(oldPtauFilename, newPTauFilename, logger) {
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
@ -3973,7 +3973,7 @@ async function convert(oldPtauFilename, newPTauFilename, logger) {
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
|
@ -3571,7 +3571,7 @@ async function preparePhase2(oldPtauFilename, newPTauFilename, logger) {
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
@ -3771,7 +3771,7 @@ async function convert(oldPtauFilename, newPTauFilename, logger) {
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
|
File diff suppressed because one or more lines are too long
2
build/snarkjs.min.js
vendored
2
build/snarkjs.min.js
vendored
File diff suppressed because one or more lines are too long
@ -73,7 +73,7 @@ export default async function convert(oldPtauFilename, newPTauFilename, logger)
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
|
@ -67,7 +67,7 @@ export default async function preparePhase2(oldPtauFilename, newPTauFilename, lo
|
|||||||
for (let i=0; i<nChunks; i++) {
|
for (let i=0; i<nChunks; i++) {
|
||||||
let buff;
|
let buff;
|
||||||
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
|
||||||
if ((oldSectionId == 2)&&(p==power+1)) {
|
if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
|
||||||
buff = new Uint8Array(pointsPerChunk*sGin);
|
buff = new Uint8Array(pointsPerChunk*sGin);
|
||||||
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
|
||||||
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
|
||||||
|
Loading…
Reference in New Issue
Block a user