diff --git a/templates/verifier_groth.sol b/templates/verifier_groth.sol index f1573e1..b5f5abf 100644 --- a/templates/verifier_groth.sol +++ b/templates/verifier_groth.sol @@ -188,7 +188,7 @@ contract Verifier { // Compute the linear combination vk_x Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0); for (uint i = 0; i < input.length; i++) { - require(input[i] < snark_scalar_field); + require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field"); vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } vk_x = Pairing.addition(vk_x, vk.IC[0]); diff --git a/templates/verifier_kimleeoh.sol b/templates/verifier_kimleeoh.sol index 073a2bc..ece863b 100644 --- a/templates/verifier_kimleeoh.sol +++ b/templates/verifier_kimleeoh.sol @@ -179,7 +179,7 @@ contract Verifier { // Compute the linear combination vk_x Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0); for (uint i = 0; i < input.length; i++) { - require(input[i] < snark_scalar_field); + require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field"); vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } vk_x = Pairing.addition(vk_x, vk.IC[0]); diff --git a/templates/verifier_original.sol b/templates/verifier_original.sol index a57105c..4340dae 100644 --- a/templates/verifier_original.sol +++ b/templates/verifier_original.sol @@ -189,7 +189,7 @@ contract Verifier { // Compute the linear combination vk_x Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0); for (uint i = 0; i < input.length; i++) { - require(input[i] < snark_scalar_field); + require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field"); vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } vk_x = Pairing.addition(vk_x, vk.IC[0]);