-
Notifications
You must be signed in to change notification settings - Fork 60
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
consensus: Start from saved iteration on restart #2229
Merged
fed-franz
merged 4 commits into
master
from
1908-do-not-start-from-iteration-0-when-the-node-restarts
Sep 6, 2024
Merged
consensus: Start from saved iteration on restart #2229
fed-franz
merged 4 commits into
master
from
1908-do-not-start-from-iteration-0-when-the-node-restarts
Sep 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fed-franz
force-pushed
the
1908-do-not-start-from-iteration-0-when-the-node-restarts
branch
from
August 31, 2024 10:39
4aac4dc
to
290d7ad
Compare
fed-franz
force-pushed
the
1908-do-not-start-from-iteration-0-when-the-node-restarts
branch
2 times, most recently
from
September 2, 2024 13:48
64845df
to
1f79d2f
Compare
herr-seppia
previously approved these changes
Sep 5, 2024
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.
LGTM
fed-franz
force-pushed
the
1908-do-not-start-from-iteration-0-when-the-node-restarts
branch
4 times, most recently
from
September 5, 2024 15:04
149362d
to
de57bec
Compare
- add generate_committee to IterationCtx - move committee generation code from phase `run` function - remove save_committee - move get_sortition_config to IterationCtx
- fix a bug of not extracting the next generator due to skipping the already done Proposal step - extract next generator on Validation/Ratification step instead of Proposal - fix 'iteration < CONSENSUS_MAX_ITER' wrong check (last iteration is actually CONSENSUS_MAX_ITER-1)
fed-franz
force-pushed
the
1908-do-not-start-from-iteration-0-when-the-node-restarts
branch
from
September 6, 2024 16:17
de57bec
to
69c2165
Compare
Tested Successfully:
|
herr-seppia
approved these changes
Sep 6, 2024
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.
LGTM
fed-franz
deleted the
1908-do-not-start-from-iteration-0-when-the-node-restarts
branch
September 6, 2024 19:12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #1908
run
function to the newgenerate_committee
in IterationCtxsaved_iteration != 0
, generate all committees from iteration 0 to saved_iteration before running the step loop. This is needed in order to ensure we don't panic due to a missing committee when processing a message from a past iteration1.Footnotes
This is a naive approach just to be on the safe side and not waste too much time. A future refactor should actually allow creating a committee on the fly, as needed (if we receive a message from the past and we don't have the committee, than generate it). ↩