You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: enforce ordering of nonsigners in bn254CV (#1615)
**Motivation:**
Currently there is no ordering check for non-signers in the BN254CV,
which can present some edge cases with duplicate non-signers.
**Modifications:**
Ordering check for non-signers.
**Result:**
Addresses minor issue brought up in audit.
Copy file name to clipboardExpand all lines: docs/multichain/destination/CertificateVerifier.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -427,6 +427,7 @@ The contract supports 3 verification patterns:
427
427
* @param signature the G1 signature of the message. The signature is over the signable digest, which is calculated by `calculateCertificateDigest`
428
428
* @param apk the G2 aggregate public key
429
429
* @param nonSignerWitnesses an array of witnesses of non-signing operators
430
+
* @dev Non-signer witnesses MUST be strictly increasing by `operatorIndex`
430
431
* @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain
431
432
*/
432
433
struct BN254Certificate {
@@ -475,6 +476,7 @@ Verifies a BN254 certificate by checking the aggregated signature against the op
475
476
* The root at the `referenceTimestamp` MUST not be disabled
476
477
* The operator set info MUST exist for the `referenceTimestamp`
477
478
* The `operatorIndex` must be valid for the non signer
479
+
* The non-signer witnesses MUST be strictly increasing by `operatorIndex`
Copy file name to clipboardExpand all lines: src/contracts/interfaces/IBN254CertificateVerifier.sol
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ interface IBN254CertificateVerifierTypes is IOperatorTableCalculatorTypes {
31
31
* @param signature the G1 signature of the message. The signature is over the signable digest, which is calculated by `calculateCertificateDigest`
32
32
* @param apk the G2 aggregate public key
33
33
* @param nonSignerWitnesses an array of witnesses of non-signing operators
34
+
* @dev Non-signer witnesses MUST be strictly increasing by `operatorIndex`
34
35
* @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain
0 commit comments