Crate rhododendron[−][src]
BFT Agreement based on a rotating proposer in different rounds, generic futures-based implementation.
Attempt to reach BFT agreement on a candidate. Not ready for production.
Agreement is between n
nodes, max_faulty
of whom are faulty.
max_faulty
should be less than 1/3 of nodes
, otherwise agreement may never be reached.
Initiate agreement by calling agree
with a generic Context
, an input stream, and an
output sink. The input should never logically conclude and contain messages from all other nodes,
while the output sink
Note that it is possible to witness agreement being reached without ever seeing the candidate. Any candidates seen will be checked for validity.
Although technically the agreement will always complete (given the eventual delivery of messages), in practice it is possible for this future to conclude without having witnessed the conclusion.
Users of the Agreement
future should schedule it to be pre-empted
by an external import of an agreed value.
Structs
Accumulator |
Accumulates messages for a given round of BFT consensus. |
Agreement |
Future that resolves upon BFT agreement for a candidate. |
Committed |
Committed successfully. |
InputStreamConcluded |
Error returned when the input stream concludes. |
Justification |
A checked justification. |
LocalizedProposal |
A localized proposal message. Contains two signed pieces of data. |
LocalizedVote |
A localized vote message, including the sender. |
UncheckedJustification |
Justification for some state at a given round. |
Enums
AdvanceRoundReason |
A reason why we are advancing round. |
Communication |
Communication that can occur between participants in consensus. |
LocalizedMessage |
A localized message. |
Message |
Messages over the proposal. Each message carries an associated round number. |
Misbehavior |
Misbehavior which can occur. |
Vote |
Votes during a round. |
Traits
Context |
Context necessary for agreement. |
TypeResolve |
Hack to get around type alias warning. |
Functions
agree |
Attempt to reach BFT agreement on a candidate. |
Type Definitions
PrepareJustification |
Type alias to represent a justification specifically for a prepare. |