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 state machine of the signer #1922

Closed
4 tasks done
jpraynaud opened this issue Sep 9, 2024 · 0 comments · Fixed by #1931
Closed
4 tasks done

Refactor state machine of the signer #1922

jpraynaud opened this issue Sep 9, 2024 · 0 comments · Fixed by #1931
Assignees
Labels
refactoring 🛠️ Code refactoring and enhancements

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Sep 9, 2024

Why

We need to update the state machine of the signer as a preparation phase of the decentralization of the signature orchestration.
We also need to remove the Signed state which adds latency to the signature of the signers by adding an extra cycle before the signer is able to sign.

What

Refactor the state machine of the signer with these new states and transitions:

  • Unregistered -> RegisteredNotAbleToSign when registration succeeds but the signer can not sign the current epoch
  • Unregistered -> ReadyToSign when registration succeeds and the signer can sign the current epoch
  • ReadyToSign -> ReadyToSign when trying to create a new message if any and sign it

Image

How

  • can_signer_sign computation is done once per epoch (in EpochService?)
  • Refactor the state machine of the signer with the new states and transitions
  • Adapt integration tests
  • Update documentation with new state machine diagram
@jpraynaud jpraynaud added the refactoring 🛠️ Code refactoring and enhancements label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring 🛠️ Code refactoring and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants