From 3b6f7b8ec7c1c3962145308c5ddfc11eceb41f74 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 31 Jan 2024 09:41:44 +0100 Subject: [PATCH] Rename _Q -> _R Using 'r' for the size of the scalar field is standard practice. Co-Authored-By: Balazs Komuves --- contracts/Groth16Verifier.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/Groth16Verifier.sol b/contracts/Groth16Verifier.sol index 5f7c60d..cb17175 100644 --- a/contracts/Groth16Verifier.sol +++ b/contracts/Groth16Verifier.sol @@ -23,7 +23,7 @@ import "./Groth16.sol"; contract Groth16Verifier is IGroth16Verifier { uint private constant _P = 21888242871839275222246405745257275088696311157297823662689037894645226208583; - uint256 private constant _Q = + uint256 private constant _R = 21888242871839275222246405745257275088548364400416034343698204186575808495617; VerifyingKey private _verifyingKey; @@ -137,7 +137,7 @@ contract Groth16Verifier is IGroth16Verifier { } // Check that public inputs are field elements for (uint i = 0; i < input.length; i++) { - if (input[i] >= _Q) { + if (input[i] >= _R) { return false; } }