-
Notifications
You must be signed in to change notification settings - Fork 2
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
Register Operations logic #26
Conversation
Contract comparison - from 932feb2 to 5391e54
|
multisigverifier/src/lib.rs
Outdated
require!( | ||
is_bls_valid, | ||
"BLS signature is not valid" | ||
); |
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 this check right after the verify_bls
call, no need to process further if that fails.
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.
done
multisigverifier/src/lib.rs
Outdated
if is_bls_valid && signatures_count > minimum_signatures { | ||
return true | ||
} | ||
|
||
false |
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.
Can simply return the condition. i.e.
is_bls_valid && signatures_count > minimum_signatures
Having said that, I wouldn't give a bool arg to this function just to check if it's true, I'd just check it outside the function.
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.
done
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.
Remove empty file
|
||
let bridge_operations_hash = "6ee1e00813a74f8293d2c63172c062d38bf780d8811ff63984813a49cd61ff9e"; | ||
let mock_signature: BlsSignature<StaticApi> = ManagedByteArray::new_from_bytes( | ||
b"EIZ2\x05\xf7q\xc7G\x96\x1f\xba0\xe2\xd1\xf5pE\x14\xd7?\xac\xff\x8d\x1a\x0c\x11\x900f5\xfb\xff4\x94\xb8@\xc5^\xc2,exn0\xe3\xf0\n" |
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.
How did you get this magic signature? Would be useful to compute it here.
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 tried using methods from the SDK but couldn't find the correct steps
multisigverifier/src/lib.rs
Outdated
@@ -0,0 +1,106 @@ | |||
#![no_std] | |||
|
|||
use core::ptr::null; |
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.
clippy: unused import
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.
resolving more clippy warning right now
2975f5f
to
5391e54
Compare
No description provided.