-
Notifications
You must be signed in to change notification settings - Fork 53
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
Reproduce safety error in Fast-HotStuff with Twins #55
Merged
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
This makes Propose() continue even if the QC block could not be found. There is no reason why the proposal should be aborted if this happens.
This disables the check of the proposer's identity in OnPropose. By disabling this, we can perform the HighQC update in AdvanceView
This enables the GetLeader function to work correctly with the absence of an early HighQC update.
Broadcast and strict mode are on by default, which should be consistent with the old behavior.
This advances the node to the next view in the network when a timeout occurs, which should help prevent nodes from becoming "stuck".
This reverts commit e704f4a.
Not needed anymore
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 53.72% 54.97% +1.25%
==========================================
Files 70 70
Lines 6362 6437 +75
==========================================
+ Hits 3418 3539 +121
+ Misses 2670 2626 -44
+ Partials 274 272 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This reverts commit a556c47.
This reverts commit 1b1198b.
This changes the way the executor uses rounds. In a round, each replica is allowed to process all of its pending events. Any messages that are sent are held by the network until the start of the next round. A timeout mananger module sends a timeout every 5 rounds unless a view change happens.
We need a working view context to send the timeout messages
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.
This PR adds a test case showing that our Twins implementation can detect the safety violation in Fast-HotStuff that was found in the Twins paper.
The main problem I encountered is this:
Because our view synchronizer requires a timeout certificate created from a quorum of timeout messages, All nodes become stuck because they cannot gather a quorum of timeout messages:
At round 5, node B timeouts. It is prevented from sending timeout messages to the other nodes due to the firewall of round 5.
At round 6, nodes A and D timeout. They are prevented from communicating with node B due to the firewall of round 6.
At round 7, node C timeouts. It is prevented from communicating with the other nodes due to the firewall of round 7.
Several changes were made to the Twins executor to get it working:
Each node now runs concurrently.EDIT: I figured out how to run the event loops in turns.Each scenario is executed for a fixed amount of time with fixed timeout durations and message delays.EDIT: now, the executor runs for some number of "rounds" in which all replicas are allowed to process eventsThe test scenario results in the following commits, where node 2 disagrees with all other nodes at height 4: