-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize BLSSignatureChecker #76
Conversation
calculate operators negative APK on de/registration to prevent scalar multiplication at sigcheck runtime
@@ -404,6 +407,16 @@ contract BLSRegistryCoordinatorWithIndices is EIP712, Initializable, IBLSRegistr | |||
newBitmap: newBitmap | |||
}); | |||
|
|||
//Update the operator contribution to aggregate public key across all quorums | |||
BN254.G1Point memory operatorPubkey = blsPubkeyRegistry.getOperatorPubkey(operator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal function for this?
@@ -404,6 +407,16 @@ contract BLSRegistryCoordinatorWithIndices is EIP712, Initializable, IBLSRegistr | |||
newBitmap: newBitmap | |||
}); | |||
|
|||
//Update the operator contribution to aggregate public key across all quorums | |||
BN254.G1Point memory operatorPubkey = blsPubkeyRegistry.getOperatorPubkey(operator); | |||
operatorNegativeAPKs[operatorId] = operatorNegativeAPKs[operatorId].plus( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should get rid of the other "time series" pubkey and replace it with this
src/BLSSignatureChecker.sol
Outdated
); | ||
|
||
{ | ||
BN254.G1Point memory operatorNegativeAPK = registryCoordinator.getOperatorNegativeAPK(nonSignerPubkeyHashes[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be verified to be at the reference block number
@@ -168,10 +146,8 @@ contract BLSSignatureChecker is IBLSSignatureChecker { | |||
require(pairingSuccessful, "BLSSignatureChecker.checkSignatures: pairing precompile call failed"); | |||
require(signatureIsValid, "BLSSignatureChecker.checkSignatures: signature is invalid"); | |||
} | |||
// set signatoryRecordHash variable used for fraudproofs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why deleting comments
@@ -69,96 +69,74 @@ contract BLSSignatureChecker is IBLSSignatureChecker { | |||
bytes32 | |||
) | |||
{ | |||
// verify the provided apk was the apk at referenceBlockNumber | |||
// loop through every quorumNumber and keep track of the apk | |||
QuorumStakeTotals memory quorumStakeTotals; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have estimates of how much gas this saves
No description provided.