-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make MultiKeyAuthenicator work #34
Conversation
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 think there's some implementation details here that don't match the rust code
BITMAP_NUM_OF_BYTES: int = 4 | ||
MAX_SIGNATURES: int = 16 |
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 couldn't find this 16 signature limit? Is this just for the SDK?
As far as I can tell, the limit is 255
https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L794-L798
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.
https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L811
distinct keys is 16... I think we kinda messed up here, but I think we can make this bigger without any impact since we use the bitvec.
count = 1 if bitmap < 256 else 2 | ||
serializer.to_bytes(bitmap.to_bytes(count, "little")) |
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 signature limit accepted on the other side only goes up to 255? https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L794-L798
Is there a reason it's doing custom byte sequence serialization? I noticed this is really not simple to do in the Python SDK
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 is how the bitvec works...
length + data
The code was written but never tested... and there was an example test that wasn't being tested either....