consensus: remove logic to unlock block on 2/3 prevote for nil#6954
Merged
williambanfield merged 40 commits intowb/proposer-based-timestampsfrom Sep 24, 2021
Merged
consensus: remove logic to unlock block on 2/3 prevote for nil#6954williambanfield merged 40 commits intowb/proposer-based-timestampsfrom
williambanfield merged 40 commits intowb/proposer-based-timestampsfrom
Conversation
Contributor
Author
|
cc @zeu5 |
williambanfield
commented
Sep 20, 2021
cmwaters
approved these changes
Sep 21, 2021
Contributor
cmwaters
left a comment
There was a problem hiding this comment.
Looks mostly good. I have a few questions / comments.
|
@williambanfield I have also found that the implementation of tendermint is different from the algorithm description in tendermint paper. That's confusing. So thank you for your changes! Another problem I can't understand is the |
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.
What does this change do?
This change removes the logic for a validator to 'unlock' its locked block if it sees > 2/3 prevotes for nil in a round. This condition is not in the algorithm description in the Tendermint paper.
This logic was present in both
enterPrecommitandaddVote. The logic inaddVotehas been updated to only unlock on receipt of 2/3 prevotes for non-nil values and the logic inenterPrecommithas been completely removed.This change also updates the tests to add a new test for the unlock condition. As a cosmetic fixup, the test file was also updated to match the comments with the current names of the
Locksuite of tests. Finally, theRelocktest was updated to use the lock channels to ensure the unlock/lock logic remained correct despite this change. The test for the old behavior was removed.Notes
closes: #6849