Remove dirty prints and comments
This commit is contained in:
parent
1854c1b411
commit
90ae0d9b04
@ -1180,6 +1180,7 @@ async function r1csInfo(r1csName, logger) {
|
|||||||
if (logger) logger.info(`# of Constraints: ${cir.nConstraints}`);
|
if (logger) logger.info(`# of Constraints: ${cir.nConstraints}`);
|
||||||
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
|
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
|
||||||
if (logger) logger.info(`# of Public Inputs: ${cir.nPubInputs}`);
|
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}`);
|
if (logger) logger.info(`# of Outputs: ${cir.nOutputs}`);
|
||||||
|
|
||||||
return cir;
|
return cir;
|
||||||
@ -6907,7 +6908,7 @@ async function groth16Verify$1(params, options) {
|
|||||||
// zkey export vkey [circuit.zkey] [verification_key.json]",
|
// zkey export vkey [circuit.zkey] [verification_key.json]",
|
||||||
async function zkeyExportVKey(params, options) {
|
async function zkeyExportVKey(params, options) {
|
||||||
const zkeyName = params[0] || "circuit.zkey";
|
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");
|
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 Constraints: ${cir.nConstraints}`);
|
||||||
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
|
if (logger) logger.info(`# of Private Inputs: ${cir.nPrvInputs}`);
|
||||||
if (logger) logger.info(`# of Public Inputs: ${cir.nPubInputs}`);
|
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}`);
|
if (logger) logger.info(`# of Outputs: ${cir.nOutputs}`);
|
||||||
|
|
||||||
return cir;
|
return cir;
|
||||||
|
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
@ -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 inc = power == Fr.s ? curve.Fr.shift : curve.Fr.w[power+1];
|
||||||
|
|
||||||
const buffA = await Fr.ifft(buffA_T, "", "", logger, "IFFT_A");
|
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 = await Fr.batchApplyKey(buffA, Fr.e(1), inc);
|
||||||
const buffAodd_T = await Fr.fft(buffAodd, "", "", logger, "FFT_A");
|
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 buffB = await Fr.ifft(buffB_T, "", "", logger, "IFFT_B");
|
||||||
const buffBodd = await Fr.batchApplyKey(buffB, Fr.e(1), inc);
|
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 buffBasesH = await binFileUtils.readSection(fdZKey, sectionsZKey, 9);
|
||||||
const resH = await curve.G1.multiExpAffine(buffBasesH, buffPodd_T, logger, "multiexp H");
|
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.random();
|
|
||||||
// const s = curve.Fr.random();
|
|
||||||
const r = curve.Fr.zero;
|
|
||||||
const s = curve.Fr.zero;
|
|
||||||
|
|
||||||
proof.pi_a = G1.add( proof.pi_a, zkey.vk_alpha_1 );
|
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 ));
|
proof.pi_a = G1.add( proof.pi_a, G1.timesFr( zkey.vk_delta_1, r ));
|
||||||
|
Loading…
Reference in New Issue
Block a user