-
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
User can participate in signing #379
Conversation
…e as a single argument
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Having starting trying to write a test for this, my feeling is that it might make sense that rather than having JS bindings for synedrion's signing session API, we could have wasm-compilable crate with a function which handles the connecting, handshaking and executing signing protocol, which is called by the SDK and passed a keyshare and an array of validator info. Although this could all be done from JS and there are good noise implementations in JS, i feel like we would be repeating a lot of work we already have here, and would make things harder to maintain. |
… - as the user themselves is not in the list
Test currently failing with: coming from this line in Synedrion. and i am not sure why - relevant part of stack trace:
so this line in |
For the record, the problem was caused by calling This meant the signing protocol ran, but failed when checking the signature, as a required signing party was missing. |
… when connecting to validators
…t, to make it more generic
@@ -80,13 +82,17 @@ impl Default for SignatureState { | |||
pub async fn do_signing( |
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 reason we are now passing the app_state struct here is because otherwise clippy complains that there are now too many arguments to this 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.
that is fine, you could also put in an ignore for clippy in the future if you want
|
||
for validator in validators_info { | ||
if &validator.tss_account != my_id { | ||
validators.insert(validator.tss_account, validator.x25519_public_key); |
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.
Here we also store the x25519 public key, so that when validators connect we can check both Account ID and x25519 public key. This is needed for one of our negative tests where a bad x25519 public key is passed.
…hare for the user
@@ -80,13 +82,17 @@ impl Default for SignatureState { | |||
pub async fn do_signing( |
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.
that is fine, you could also put in an ignore for clippy in the future if you want
If key visibility is private, we should assume the user is also going to connect to the threshold servers and participate in the signing process.
Because of this, i have changed the key visibility used in our existing tests to use 'permissioned', so the vanilla case we test for does not require participation from the user.
As explained in the related issue #362 making this practical to use from the SDK will also require having wasm bindings for Synedrion's sessions API.