Skip to content

Commit 4f9b2bc

Browse files
committed
chore: add bytes, use uint256
1 parent f44309f commit 4f9b2bc

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

src/contracts/interfaces/IBN254CertificateVerifier.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface IBN254CertificateVerifier is IBN254CertificateVerifierEvents, IBaseCer
7070
function verifyCertificate(
7171
OperatorSet memory operatorSet,
7272
BN254Certificate memory cert
73-
) external returns (uint96[] memory signedStakes);
73+
) external returns (uint256[] memory signedStakes);
7474

7575
/**
7676
* @notice verifies a certificate and makes sure that the signed stakes meet
@@ -99,6 +99,6 @@ interface IBN254CertificateVerifier is IBN254CertificateVerifierEvents, IBaseCer
9999
function verifyCertificateNominal(
100100
OperatorSet memory operatorSet,
101101
BN254Certificate memory cert,
102-
uint96[] memory totalStakeNominalThresholds
102+
uint256[] memory totalStakeNominalThresholds
103103
) external returns (bool);
104104
}

src/contracts/interfaces/IBN254TableCalculator.sol

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface IBN254TableCalculatorTypes {
1414
*/
1515
struct BN254OperatorInfo {
1616
BN254.G1Point pubkey;
17-
uint96[] weights;
17+
uint256[] weights;
1818
}
1919

2020
/**
@@ -35,7 +35,7 @@ interface IBN254TableCalculatorTypes {
3535
bytes32 operatorInfoTreeRoot;
3636
uint256 numOperators;
3737
BN254.G1Point aggregatePubkey;
38-
uint96[] totalWeights;
38+
uint256[] totalWeights;
3939
}
4040
}
4141

@@ -50,6 +50,15 @@ interface IBN254TableCalculator is IBN254TableCalculatorTypes {
5050
OperatorSet calldata operatorSet
5151
) external view returns (BN254OperatorSetInfo memory operatorSetInfo);
5252

53+
/**
54+
* @notice calculates the operatorInfos for a given operatorSet
55+
* @param operatorSet the operatorSet to calculate the operator table for
56+
* @return operatorTableBytes the operatorTableBytes for the given operatorSet
57+
*/
58+
function calculateOperatorTableBytes(
59+
OperatorSet calldata operatorSet
60+
) external view returns (bytes memory operatorTableBytes);
61+
5362
/**
5463
* @notice Get the operatorInfos for a given operatorSet
5564
* @param operatorSet the operatorSet to get the operatorInfos for

src/contracts/interfaces/IECDSACertificateVerifier.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ interface IECDSACertificateVerifier is IECDSACertificateVerifierEvents, IBaseCer
5353
function verifyCertificate(
5454
OperatorSet calldata operatorSet,
5555
ECDSACertificate memory cert
56-
) external returns (uint96[] memory signedStakes);
56+
) external returns (uint256[] memory signedStakes);
5757

5858
/**
5959
* @notice verifies a certificate and makes sure that the signed stakes meet
6060
* provided portions of the total stake on the AVS
6161
* @param cert a certificate
6262
* @param totalStakeProportionThresholds the proportion of total stake that
6363
* the signed stake of the certificate should meet
64-
* @return whether or not certificate is valid and meets thresholds
64+
* @return Whether or not the certificate is valid and meets thresholds
6565
*/
6666
function verifyCertificateProportion(
6767
OperatorSet calldata operatorSet,
@@ -75,11 +75,11 @@ interface IECDSACertificateVerifier is IECDSACertificateVerifierEvents, IBaseCer
7575
* @param cert a certificate
7676
* @param totalStakeNominalThresholds the proportion of total stake that
7777
* the signed stake of the certificate should meet
78-
* @return whether or not certificate is valid and meets thresholds
78+
* @return Whether or not the certificate is valid and meets thresholds
7979
*/
8080
function verifyCertificateNominal(
8181
OperatorSet calldata operatorSet,
8282
ECDSACertificate memory cert,
83-
uint96[] memory totalStakeNominalThresholds
83+
uint256[] memory totalStakeNominalThresholds
8484
) external returns (bool);
8585
}

src/contracts/interfaces/IECDSATableCalculator.sol

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ interface IECDSATableCalculator is IECDSATableCalculatorTypes {
2727
function calculateOperatorTable(
2828
OperatorSet calldata operatorSet
2929
) external view returns (ECDSAOperatorInfo[] memory operatorInfos);
30+
31+
/**
32+
* @notice calculates the operatorInfos for a given operatorSet
33+
* @param operatorSet the operatorSet to calculate the operator table for
34+
* @return operatorTableBytes the operatorTableBytes for the given operatorSet
35+
*/
36+
function calculateOperatorTableBytes(
37+
OperatorSet calldata operatorSet
38+
) external view returns (bytes memory operatorTableBytes);
3039
}

0 commit comments

Comments
 (0)