-
Notifications
You must be signed in to change notification settings - Fork 148
go/worker/common: Replace epoch transitions with committee transitions #6425
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
Conversation
✅ Deploy Preview for oasisprotocol-oasis-core canceled.
|
f272621 to
fdc2523
Compare
|
|
||
| rs, err := n.Consensus.RootHash().GetRuntimeState(ctx, &roothash.RuntimeRequest{ | ||
| RuntimeID: n.Runtime.ID(), | ||
| Height: consensus.HeightLatest, |
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.
Should this be synced by height instead of using "latest"?
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.
Should this be synced by height instead of using "latest"?
We don't know at which height the committee was elected. Actually, all channels that we expose will never tell you on which height something happened, which is troublesome if you want to be in sync. Since the height is unknown, we can always use the latest. This is not a problem because:
- If the committee hasn't changed, things will work just fine.
- If the committee has changed, we will use a newer committee here, so scheduling will work with the latest committee. However, a new committee event will in that case arrive soon, which will invalidate everything and use again the latest committee. In this case all work (block scheduling) will probably be thrown away, but again, I don't see any problems.
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.
all channels that we expose will never tell you on which height something happened
Except the annotated roothash blocks.
But sounds good, we should just make sure to test this well, maybe run some long-term tests.
In the future there will be no empty
EpochTransitionruntime blocks, so we need to change the committee worker to be able to run without relying onHeaderTypeof runtime blocks.