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

Refactor pre protocol execution #416

Closed
JesseAbram opened this issue Oct 3, 2023 · 3 comments · Fixed by #535
Closed

Refactor pre protocol execution #416

JesseAbram opened this issue Oct 3, 2023 · 3 comments · Fixed by #535
Labels
Chore changes that do not relate to a fix or feature and don't modify src or test files (eg updating deps)

Comments

@JesseAbram
Copy link
Member

JesseAbram commented Oct 3, 2023

Refactor pre protocol execution steps that use similar code into reusable functions.

This is setting up the websocket connections functions like:

  • do-dkg
  • do_proactive_refresh
@JesseAbram JesseAbram added the Chore changes that do not relate to a fix or feature and don't modify src or test files (eg updating deps) label Oct 3, 2023
@JesseAbram JesseAbram moved this to 📋 Backlog in Entropy Core Oct 3, 2023
@HCastano
Copy link
Collaborator

What do you mean by "pre protocol execution"? For the functions you mentioned, can you link the relevant places in the codebase?

@HCastano HCastano changed the title refactor pre protocol execution Refactor pre protocol execution Oct 11, 2023
@JesseAbram
Copy link
Member Author

so in do_dkg, do_proactive_refresh and do_signing each require setting up a WS connection logic like open_protocal connection, getting the channels and a few others are copy pasted across these functions and can be generalized

@ameba23
Copy link
Contributor

ameba23 commented Nov 5, 2023

For more context, crypto/protocol/src/execute_protocol.rs has 3 functions mentioned above which all share a large amount of repeated code making them hard to maintain.

We could fix this either with a trait and generics or separating stuff in to common sub-functions.

I think @JesseAbram said that @fjarri has some ideas about how best to do this.

I could take on doing this once im done with wasm problems as im currently looking at these functions quite a bit.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Entropy Core Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore changes that do not relate to a fix or feature and don't modify src or test files (eg updating deps)
Projects
Archived in project
3 participants