Skip to content

Commit 7b9e5a4

Browse files
committed
chore(library-solidity): add comment about reverting for the view function
1 parent dd489ae commit 7b9e5a4

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

host-contracts/lib/FHE.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9521,7 +9521,12 @@ library FHE {
95219521
/// The ABI-encoded list order must match the `handlesList` order.
95229522
/// @param decryptionProof The KMS public decryption proof. It includes the KMS signatures, associated metadata,
95239523
/// and the context needed for verification.
9524-
/// @return true if the signatures verification succeeds, false otherwise.
9524+
/// @dev Reverts if any of the following conditions are met:
9525+
/// - The `decryptionProof` is empty or has an invalid length.
9526+
/// - The number of valid signatures is zero or less than the configured KMS signers threshold.
9527+
/// - Any signature is produced by an address that is not a registered KMS signer.
9528+
/// @dev Returns false if any there are enough signatures to reach threshold, but some recovered signer is duplicated.
9529+
/// @return true if the signatures verification succeeds, false or revert otherwise.
95259530
function isPublicDecryptionResultValid(
95269531
bytes32[] memory handlesList,
95279532
bytes memory abiEncodedCleartexts,

library-solidity/codegen/src/templates/FHE.sol-template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,12 @@ library FHE {
314314
/// The ABI-encoded list order must match the `handlesList` order.
315315
/// @param decryptionProof The KMS public decryption proof. It includes the KMS signatures, associated metadata,
316316
/// and the context needed for verification.
317-
/// @return true if the signatures verification succeeds, false otherwise.
317+
/// @dev Reverts if any of the following conditions are met:
318+
/// - The `decryptionProof` is empty or has an invalid length.
319+
/// - The number of valid signatures is zero or less than the configured KMS signers threshold.
320+
/// - Any signature is produced by an address that is not a registered KMS signer.
321+
/// @dev Returns false if any there are enough signatures to reach threshold, but some recovered signer is duplicated.
322+
/// @return true if the signatures verification succeeds, false or revert otherwise.
318323
function isPublicDecryptionResultValid(
319324
bytes32[] memory handlesList,
320325
bytes memory abiEncodedCleartexts,

library-solidity/lib/FHE.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9521,7 +9521,12 @@ library FHE {
95219521
/// The ABI-encoded list order must match the `handlesList` order.
95229522
/// @param decryptionProof The KMS public decryption proof. It includes the KMS signatures, associated metadata,
95239523
/// and the context needed for verification.
9524-
/// @return true if the signatures verification succeeds, false otherwise.
9524+
/// @dev Reverts if any of the following conditions are met:
9525+
/// - The `decryptionProof` is empty or has an invalid length.
9526+
/// - The number of valid signatures is zero or less than the configured KMS signers threshold.
9527+
/// - Any signature is produced by an address that is not a registered KMS signer.
9528+
/// @dev Returns false if any there are enough signatures to reach threshold, but some recovered signer is duplicated.
9529+
/// @return true if the signatures verification succeeds, false or revert otherwise.
95259530
function isPublicDecryptionResultValid(
95269531
bytes32[] memory handlesList,
95279532
bytes memory abiEncodedCleartexts,

0 commit comments

Comments
 (0)