-
Notifications
You must be signed in to change notification settings - Fork 29
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
PBFT consensus #112
Merged
Merged
PBFT consensus #112
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
* Message types are implicit * Some semblence of a pBFT cluster * Add execution, sending response to orign, and handle messages on the "b7s" protocol * Ensure execution is done only once * Add check that incoming messages are in the correct view * Add state locking * Broadcast is concurrent and network operations are limited in duration * Add state locking for general Blockless protocol too
* WIP: View change initialization (sending) * Processing view change messages (starting view change if condition met) * Adding a new-view message with valid preprepares * Handling new view message * Small tweaks and comment updates * Determine which messages are allowed in which stage at a single place * Minor tweaks to request and preprepare handling * Ensure requests are executed in order (sequence number accounting) + minor tweaks (accounting commits) * View change/New view logging tweaks * Splitting commit function into two * Use 'AfterFunc' for view change instead of timer * Fix stopping a timer thats not running + broadcast error handling * Fix commit quorum condition * Fix log message for not sending a commit * Fix log message if the request has already been executed * Logging tweaks - decrease log levels and remove redundant log messages * Code for byzantine replica plus few small improvements/fixes * Fix new view preprepare set (starting from 1) + fix JSON handling of new-view/view-change * Add serialization/deserialization code for message types * Tidy up marshallers/unmarshallers * Checking if request is commit-able after a preprepare * Cache past executions + cleanup old state after transition to a new view * New primary resubmits request that it received but havent been executed yet * Delayed view change messages AFTER we successfully transitioned to a new view are no-op * Several fixes related to view changes - new primary records the generated preprepares - sequence number check corrected - checking for prepared requests corrected * Introducing PBFT as a consensus option for execution requests (#104) * Plucking out raft from the "node" package * FormCluster message specifies the type of consensus expected * Fix bootstrap check on new Raft cluster * Minor tweaks, raft returns a multierror on shutdown errors * Add support for PBFT consensus to node execution * PBFT replica no longer listens on the Blockless general protocol (only PBFT specific protocol) * Rename Raft handler => replica * File rename and const rename * Tweak how we treat execution requests on the worker node * Refactor roll call/cluster formation * Remove mentions of a "quorum" in node code since its imprecise * PBFT uses a cluster-specific protocol for messaging
…ve local definitions
- signature marshalling - timestamp fixed - set by the head node
dmikey
approved these changes
Sep 6, 2023
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 support for PBFT consensus to
b7s
node.