@@ -126,20 +126,28 @@ interface IBLSSignatureChecker is IBLSSignatureCheckerErrors, IBLSSignatureCheck
126
126
/* VIEW */
127
127
128
128
/*
129
- * @notice Verifies aggregated BLS signatures and stake information for message hash `msgHash` across `quorumNumbers` at block `referenceBlockNumber`.
130
- * @param msgHash The hash of the message that was signed.
129
+ * @notice This function is called by disperser when it has aggregated all the signatures of the operators
130
+ * that are part of the quorum for a particular taskNumber and is asserting them into onchain. The function
131
+ * checks that the claim for aggregated signatures are valid.
132
+ *
133
+ * The thesis of this procedure entails:
134
+ * 1. Getting the aggregated pubkey of all registered nodes at the time of pre-commit by the
135
+ * disperser (represented by apk in the parameters)
136
+ * 2. Subtracting the pubkeys of all non-signers (nonSignerPubkeys) and storing
137
+ * the output in apk to get aggregated pubkey of all operators that are part of quorum
138
+ * 3. Using this aggregated pubkey to verify the aggregated signature under BLS scheme
139
+ *
140
+ * @param msgHash The hash of the message that was signed. NOTE: Be careful to ensure msgHash is
141
+ * collision-resistant! This method does not hash msgHash in any way, so if an attacker is able
142
+ * to pass in an arbitrary value, they may be able to tamper with signature verification.
131
143
* @param quorumNumbers The quorum numbers to verify signatures for, where each byte is an 8-bit integer.
132
- * @param referenceBlockNumber The block number to use for stake information.
144
+ * @param referenceBlockNumber The block number at which the stake information is being verified
133
145
* @param nonSignerStakesAndSignature Contains non-signer information and aggregated signature data.
134
- * @return Stake totals for each quorum and a hash of the verification data.
135
- * @dev The thesis of this procedure entails:
136
- * 1. Getting the aggregated pubkey of all registered nodes at the time of pre-commit
137
- * 2. Subtracting the pubkeys of all non-signers (nonSignerPubkeys)
138
- * 3. Using the resulting aggregated pubkey to verify the aggregated signature under BLS scheme
139
- * @dev Before signature verification, the function verifies:
140
- * 1. The reference block number is valid and recent enough
141
- * 2. Stake information is either most recent or latest before reference block
142
- * 3. The aggregated signature is valid under the BLS scheme
146
+ * @return quorumStakeTotals The struct containing the total and signed stake for each quorum
147
+ * @return signatoryRecordHash The hash of the signatory record, which is used for fraud proofs
148
+ * @dev Before signature verification, the function verifies operator stake information. This includes
149
+ * ensuring that the provided referenceBlockNumber is valid and recent enough, and that the stake is
150
+ * either the most recent update for the total stake (of the operator) or latest before the referenceBlockNumber.
143
151
*/
144
152
function checkSignatures (
145
153
bytes32 msgHash ,
0 commit comments