Repository navigation
refactor(consensus): remove not needed commit timeout and unused LastPrecommits - #751
Merged
Merged
Conversation
We don't need LastPrecommits because they are only used in Tenderdash to construct commit. In our case, it's enough to just set LastCommit, as we use threshold signatures and don't need these precommits.
… ConsensusParams.Timeout.BypassCommitTimeout
Merged
4 tasks done
lklimek
added a commit
that referenced
this pull request
Nov 17, 2026
…urrent-height votes (#1601) * fix(consensus): stop a previous-height precommit marking the peer's current-height bit getVoteBitArray resolved (PRS.Height-1, LastCommitRound, Precommit) to PRS.Precommits, the bit array of the peer's current height, after #751 removed the dedicated LastPrecommits array. A late precommit of the height the peer had just left (reactor Vote handler -> SetHasVote) therefore marked the same validator index as already held for the current height, and that validator's current-height precommit was never offered to the peer. A VoteSetBits answer about the previous height's commit (ApplyVoteSetBitsMessage with ourVotes == nil) overwrote the whole current-height precommit bit array the same way. Previous-height votes are not gossiped individually (the commit is sent whole), so the lookup now returns nil for them: no tracking, no side effects. LastCommitRound bookkeeping in ApplyNewRoundStepMessage is unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> * test(consensus): cover VoteSetBits with own votes; drop dead LastPrecommits branch ApplyVoteSetBitsMessage has two branches (ourVotes nil or not); the previous-height regression test now exercises both. ApplyNewRoundStepMessage kept an if/else with identical branches under a "Shift Precommits to LastPrecommits" comment from before #751 removed that array; collapsed to the single assignment it performs. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Lukasz Klimek <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
This file contains hidden or 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
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.
Issue being fixed or feature implemented
We don't need LastPrecommits because they are only used in Tenderdash to construct commit.
In our case, it's enough to just set LastCommit, as we use threshold signatures and don't need these precommits.
It also means we don't need to wait for all precommits to get to our node, so commit timeout is not needed.
What was done?
Removed LastPrecommits.
Removed consensus params: commit timeout and bypass_commit_timeout.
How Has This Been Tested?
GHA + tested during stress tests on ouzo devnet
Breaking Changes
Changed definition of consensus params: removed timeout commit and bypass_commit_timeout.
Affects protobuf and json encoding of these params.
Checklist:
For repository code-owners and collaborators only