@@ -62,7 +62,7 @@ library FrLib {
6262 mstore(add(free, 0x20), 0x20)
6363 mstore(add(free, 0x40), 0x20)
6464 mstore(add(free, 0x60), v)
65- mstore(add(free, 0x80), sub(MODULUS, 2))
65+ mstore(add(free, 0x80), sub(MODULUS, 2))
6666 mstore(add(free, 0xa0), MODULUS)
6767 let success := staticcall(gas(), 0x05, free, 0xc0, 0x00, 0x20)
6868 if iszero(success) {
@@ -85,7 +85,7 @@ library FrLib {
8585 mstore(add(free, 0x20), 0x20)
8686 mstore(add(free, 0x40), 0x20)
8787 mstore(add(free, 0x60), b)
88- mstore(add(free, 0x80), v)
88+ mstore(add(free, 0x80), v)
8989 mstore(add(free, 0xa0), MODULUS)
9090 let success := staticcall(gas(), 0x05, free, 0xc0, 0x00, 0x20)
9191 if iszero(success) {
@@ -2053,7 +2053,7 @@ abstract contract BaseHonkVerifier is IVerifier {
20532053 mem.scalingFactorPos = mem.batchingChallenge * mem.posInvertedDenominator;
20542054 mem.scalingFactorNeg = mem.batchingChallenge * tp.shplonkNu * mem.negInvertedDenominator;
20552055 // [Aₗ] is multiplied by -v^{2l}/(z-r^{2^l}) - v^{2l+1} /(z+ r^{2^l})
2056- scalars[NUMBER_OF_ENTITIES + 1 + i] = mem.scalingFactorNeg.neg() + mem.scalingFactorPos.neg();
2056+ scalars[NUMBER_UNSHIFTED + 1 + i] = mem.scalingFactorNeg.neg() + mem.scalingFactorPos.neg();
20572057
20582058 // Accumulate the const term contribution given by
20592059 // v^{2l} * Aₗ(r^{2ˡ}) /(z-r^{2^l}) + v^{2l+1} * Aₗ(-r^{2ˡ}) /(z+ r^{2^l})
@@ -2066,28 +2066,6 @@ abstract contract BaseHonkVerifier is IVerifier {
20662066 }
20672067
20682068 for (uint256 i = 0; i < CONST_PROOF_SIZE_LOG_N - 1; ++i) {
2069- bool dummy_round = i >= ($LOG_N - 1);
2070-
2071- if (!dummy_round) {
2072- // Update inverted denominators
2073- mem.posInvertedDenominator = (tp.shplonkZ - powers_of_evaluation_challenge[i + 1]).invert();
2074- mem.negInvertedDenominator = (tp.shplonkZ + powers_of_evaluation_challenge[i + 1]).invert();
2075-
2076- // Compute the scalar multipliers for Aₗ(± r^{2ˡ}) and [Aₗ]
2077- mem.scalingFactorPos = mem.batchingChallenge * mem.posInvertedDenominator;
2078- mem.scalingFactorNeg = mem.batchingChallenge * tp.shplonkNu * mem.negInvertedDenominator;
2079- // [Aₗ] is multiplied by -v^{2l}/(z-r^{2^l}) - v^{2l+1} /(z+ r^{2^l})
2080- scalars[NUMBER_UNSHIFTED + 1 + i] = mem.scalingFactorNeg.neg() + mem.scalingFactorPos.neg();
2081-
2082- // Accumulate the const term contribution given by
2083- // v^{2l} * Aₗ(r^{2ˡ}) /(z-r^{2^l}) + v^{2l+1} * Aₗ(-r^{2ˡ}) /(z+ r^{2^l})
2084- Fr accumContribution = mem.scalingFactorNeg * proof.geminiAEvaluations[i + 1];
2085- accumContribution = accumContribution + mem.scalingFactorPos * foldPosEvaluations[i + 1];
2086- mem.constantTermAccumulator = mem.constantTermAccumulator + accumContribution;
2087- // Update the running power of v
2088- mem.batchingChallenge = mem.batchingChallenge * tp.shplonkNu * tp.shplonkNu;
2089- }
2090-
20912069 commitments[NUMBER_UNSHIFTED + 1 + i] = convertProofPoint(proof.geminiFoldComms[i]);
20922070 }
20932071
0 commit comments