-
Notifications
You must be signed in to change notification settings - Fork 39
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: wrong public keys signing #1027
Conversation
What was the issue? |
Yeah, good question. |
// Own ST fields | ||
pub public_keys: Vec<IdentityPublicKeyInCreationWithWitness>, | ||
// The signable | ||
#[platform_signable(into = "Vec<IdentityPublicKeyInCreationSignable>")] |
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.
proc macros are cool!
@@ -1,4 +1,7 @@ | |||
use crate::ProtocolError; | |||
use crate::identity::KeyType; |
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.
Shall we put it encoding
module?
use dashcore::signer; | ||
|
||
impl PlatformMessageSignable for &[u8] { | ||
fn verify_signature( |
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.
Since this function can be used outside of validation functions it should return own errors which should be transformed to consensus errors in validation function.
Issue being fixed or feature implemented
There was an issue with signing public keys that has now been resolved. Previously keys were signing only the key which is not secure. Now they are signing the whole state transition.
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only