-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: async implementation #179
Conversation
@@ -75,27 +57,12 @@ export function functionalInterfaceFactory({ | |||
*/ | |||
function verifyAggregate(publicKeys: PublicKeyArg[], message: Uint8Array, signature: SignatureArg): boolean { | |||
try { | |||
validateBytes(message, "message"); | |||
|
|||
const pks: PublicKey[] = []; |
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.
is it not necessary to validateByutes
for public keys anymore?
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.
I found it's implemented for PublicKey.convertToPublicKeyType
of herumi
but not for blst-native
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.
Yep! Exactly. This was the optimization I made. For serialized objects we were parsing the bytes both here in JS land and in the native code as well. I removed this so that the herumi specific parse is off the main code path and only gets executed for herumi.
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.
the change makes sense, dropped some comments
There was a hard import of
@chainsafe/blst
at the head offunctional.ts
that was causing issues with tree shaking.