From b305700685024d3531e7d34cfa66833bcf646aef Mon Sep 17 00:00:00 2001 From: sifnoc Date: Mon, 26 Aug 2024 17:31:53 +0900 Subject: [PATCH] feat: added warning about 'validateVKPermutationsLength' method --- contracts/src/Summa.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contracts/src/Summa.sol b/contracts/src/Summa.sol index 66904f83..c319762f 100644 --- a/contracts/src/Summa.sol +++ b/contracts/src/Summa.sol @@ -136,6 +136,13 @@ contract Summa is Ownable { * @param vkContract The address of the verifying key contract * @param numberOfCurrencies The number of cryptocurrencies whose polynomials are committed in the proof * @return isValid True if the number of permutations in the verifying key corresponds to the number of cryptocurrencies + * + * WARNING: The permutation length may not be correctly calculated by the method 'calculatePermutationLength' if the prover + * deliberately tries to deceive the process. This issue cannot be resolved even if we change the approach to rely on user input + * for the length instead of calculating it within the method. The ultimate solution is to implement a validation process for the + * verifying key contract that can be performed by the user themselves. This issue will be addressed in the following: + * https://github.com/summa-dev/summa-solvency/issues/299 + */ */ function validateVKPermutationsLength( address vkContract,