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

Phases management: state machines of DisputeKitClassic and KlerosCore #26

Closed
jaybuidl opened this issue Jan 20, 2022 · 0 comments · Fixed by #65
Closed

Phases management: state machines of DisputeKitClassic and KlerosCore #26

jaybuidl opened this issue Jan 20, 2022 · 0 comments · Fixed by #65

Comments

@jaybuidl
Copy link
Member

jaybuidl commented Jan 20, 2022

Previously in v1, the state machine would go through: Staking->Generating->Drawing->Staking.

In v2 things are different because:

  • Staking is the Core's responsibility
  • Generating and Drawing is the DisputeKit's responsibility

Future dispute kits may even have totally different state machines, but they will always including some form of drawing stage.

In addition different DisputeKit implementations may use totally different RNGs with longer or shorter durations in Generating phase. Therefore different DisputeKits can proceed from Generating to Drawing phases in parallel as long as they all join at the end of their Drawing phase.

Some kind of coordination is needed:

  1. For Core to notify a particular DisputeKit that a dispute is in need of jurors
  2. For Core to notify all the DisputeKits that the maxDrawingTime has passed
  3. For a DisputeKit to notify Core that it has completed its drawing of jurors for the disputes notified by 1.

Possible state machines for v2

  • KlerosCore: Staking->Freezing->Staking
  • DisputeKitClassic: Generating->Drawing->Resolving->Generating
@jaybuidl jaybuidl added this to the prealpha-1 milestone Jan 20, 2022
@jaybuidl jaybuidl removed this from the prealpha-1 milestone Jan 31, 2022
@jaybuidl jaybuidl linked a pull request Feb 15, 2022 that will close this issue
@jaybuidl jaybuidl added this to the pre-alpha2 milestone Feb 15, 2022
@jaybuidl jaybuidl linked a pull request Mar 22, 2022 that will close this issue
@jaybuidl jaybuidl added the Package: Contracts Court smart contracts label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment