One less addition
This commit is contained in:
parent
df58f2d3db
commit
a4ce10f4de
|
@ -139,7 +139,7 @@ contract Groth16Verifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Compute the linear combination vkX
|
// Compute the linear combination vkX
|
||||||
G1Point memory vkX = G1Point(0, 0);
|
G1Point memory vkX = _verifyingKey.ic[0];
|
||||||
for (uint i = 0; i < input.length; i++) {
|
for (uint i = 0; i < input.length; i++) {
|
||||||
G1Point memory product;
|
G1Point memory product;
|
||||||
(success, product) = _multiply(_verifyingKey.ic[i + 1], input[i]);
|
(success, product) = _multiply(_verifyingKey.ic[i + 1], input[i]);
|
||||||
|
@ -151,10 +151,6 @@ contract Groth16Verifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(success, vkX) = _add(vkX, _verifyingKey.ic[0]);
|
|
||||||
if (!success) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
uint outcome;
|
uint outcome;
|
||||||
(success, outcome) = _checkPairing(
|
(success, outcome) = _checkPairing(
|
||||||
_negate(proof.a),
|
_negate(proof.a),
|
||||||
|
|
Loading…
Reference in New Issue