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.
Closes #<ISSUE_NUMBER>
This PR:
This fixes the cause of the timeouts in view 2 (really view 1). Consensus is supposed to be started at the genesis view if it is starting at genesis. In Hotshot we trigger getting a block and sending a DA proposal when we get a view change for the view before we are the leader. What was happening was that the first leader (of view 1) was never getting a block, proposing for DA, calculating VID share, or proposing. Meanwhile all replicas believed they were in view 1 and thus are waiting for a proposal for view 2. The proposer for view 2 never proposes because it gets not votes for QC or timeout. All replicas time out and send their timeout votes to the leader of view 3 (because they expected the view 2 leader to propose). This means the sequencer was effectively starting in view 3 with a timeout certificate and the genesis QC.
This PR fixes the issue by simply starting from view 0 when we are not loading up some saved consensus state.
This PR does not:
Key places to review: