Remove dirty prints and comments

This commit is contained in:
Jordi Baylina 2020-12-16 11:24:34 +01:00
parent 1854c1b411
commit 90ae0d9b04
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
5 changed files with 8 additions and 13 deletions

@ -1180,6 +1180,7 @@ async function r1csInfo(r1csName, logger) {
if (logger) logger.info(`# of Constraints: ${cir.nConstraints}`);
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
if (logger) logger.info(`# of Public Inputs: ${cir.nPubInputs}`);
if (logger) logger.info(`# of Labels: ${cir.nLabels}`);
if (logger) logger.info(`# of Outputs: ${cir.nOutputs}`);
return cir;
@ -6907,7 +6908,7 @@ async function groth16Verify$1(params, options) {
// zkey export vkey [circuit.zkey] [verification_key.json]",
async function zkeyExportVKey(params, options) {
const zkeyName = params[0] || "circuit.zkey";
const verificationKeyName = params[2] || "verification_key.json";
const verificationKeyName = params[1] || "verification_key.json";
if (options.verbose) Logger.setLogLevel("DEBUG");

@ -4286,6 +4286,7 @@ async function r1csInfo(r1csName, logger) {
if (logger) logger.info(`# of Constraints: ${cir.nConstraints}`);
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
if (logger) logger.info(`# of Public Inputs: ${cir.nPubInputs}`);
if (logger) logger.info(`# of Labels: ${cir.nLabels}`);
if (logger) logger.info(`# of Outputs: ${cir.nOutputs}`);
return cir;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -41,12 +41,8 @@ export default async function groth16Prove(zkeyFileName, witnessFileName, logger
const inc = power == Fr.s ? curve.Fr.shift : curve.Fr.w[power+1];
const buffA = await Fr.ifft(buffA_T, "", "", logger, "IFFT_A");
console.log(curve.Fr.toString(buffA.slice(0, 32)));
console.log(curve.Fr.toString(buffA.slice(32, 64)));
const buffAodd = await Fr.batchApplyKey(buffA, Fr.e(1), inc);
const buffAodd_T = await Fr.fft(buffAodd, "", "", logger, "FFT_A");
console.log(curve.Fr.toString(buffAodd_T.slice(0, 32)));
console.log(curve.Fr.toString(buffAodd_T.slice(32, 64)));
const buffB = await Fr.ifft(buffB_T, "", "", logger, "IFFT_B");
const buffBodd = await Fr.batchApplyKey(buffB, Fr.e(1), inc);
@ -81,12 +77,8 @@ export default async function groth16Prove(zkeyFileName, witnessFileName, logger
const buffBasesH = await binFileUtils.readSection(fdZKey, sectionsZKey, 9);
const resH = await curve.G1.multiExpAffine(buffBasesH, buffPodd_T, logger, "multiexp H");
console.log(curve.G1.toString(curve.G1.toAffine(resH)));
// const r = curve.Fr.random();
// const s = curve.Fr.random();
const r = curve.Fr.zero;
const s = curve.Fr.zero;
const r = curve.Fr.random();
const s = curve.Fr.random();
proof.pi_a = G1.add( proof.pi_a, zkey.vk_alpha_1 );
proof.pi_a = G1.add( proof.pi_a, G1.timesFr( zkey.vk_delta_1, r ));