Skip to content
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 DKG test #428

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

fix DKG test #428

wants to merge 2 commits into from

Conversation

conradoplg
Copy link
Contributor

This is a draft because it's pointing to a local change to frost-core and reddsa and won't compile for now. I'll create PR for those next.

The fix was very complicated for these reasons:

  • The DKG test spawns the "main" function in a task, which requires the function to be Send. That wasn't previously required since tokio::main and tokio::test do not require functions to be Send. However, requiring Send cascades through all the program. In particular, Scalar and Element are not Send because those are traits and Send was not in their trait bounds (this will require a new PR in frost). But even fixing that, the Comms trait needs to be Send which requires a lot of the change, and the old CLI code also breaks because BufRead and Write are also not Send. This required changing all CLI code to be async which was a lot of work.
  • Tokio can spawn !Send tasks with LocalSet but I couldn't get it to work. But even if it did work, anyone using frost-core with async Rust could face the same problem, so it makes sense to fix this now.

@mpguerra mpguerra requested a review from natalieesk January 8, 2025 12:58
Base automatically changed from dkg-server to main January 15, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant