-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'romac/rust-state-machine' into romac/get-value
- Loading branch information
Showing
18 changed files
with
873 additions
and
386 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
use malachite_common::{Context, ValueId}; | ||
use malachite_common::{Context, Round, ValueId}; | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq)] | ||
pub enum Event<Ctx> | ||
where | ||
Ctx: Context, | ||
{ | ||
NewRound, // Start a new round, not as proposer. | ||
NewRoundProposer(Ctx::Value), // Start a new round and propose the Value. | ||
Proposal(Ctx::Proposal), // Receive a proposal with possible polka round. | ||
ProposalInvalid, // Receive an invalid proposal. | ||
PolkaAny, // Receive +2/3 prevotes for anything. | ||
PolkaNil, // Receive +2/3 prevotes for nil. | ||
PolkaValue(ValueId<Ctx>), // Receive +2/3 prevotes for Value. | ||
PrecommitAny, // Receive +2/3 precommits for anything. | ||
PrecommitValue(ValueId<Ctx>), // Receive +2/3 precommits for Value. | ||
RoundSkip, // Receive +1/3 votes from a higher round. | ||
TimeoutPropose, // Timeout waiting for proposal. | ||
TimeoutPrevote, // Timeout waiting for prevotes. | ||
TimeoutPrecommit, // Timeout waiting for precommits. | ||
NewRound, // Start a new round, not as proposer.L20 | ||
NewRoundProposer(Ctx::Value), // Start a new round and propose the Value.L14 | ||
Proposal(Ctx::Proposal), // Receive a proposal. L22 + L23 (valid) | ||
ProposalAndPolkaPrevious(Ctx::Proposal), // Recieved a proposal and a polka value from a previous round. L28 + L29 (valid) | ||
ProposalInvalid, // Receive an invalid proposal. L26 + L32 (invalid) | ||
PolkaValue(ValueId<Ctx>), // Receive +2/3 prevotes for valueId. L44 | ||
PolkaAny, // Receive +2/3 prevotes for anything. L34 | ||
PolkaNil, // Receive +2/3 prevotes for nil. L44 | ||
ProposalAndPolkaCurrent(Ctx::Proposal), // Receive +2/3 prevotes for Value in current round. L36 | ||
PrecommitAny, // Receive +2/3 precommits for anything. L47 | ||
ProposalAndPrecommitValue(Ctx::Proposal), // Receive +2/3 precommits for Value. L49 | ||
PrecommitValue(ValueId<Ctx>), // Receive +2/3 precommits for ValueId. L51 | ||
SkipRound(Round), // Receive +1/3 messages from a higher round. OneCorrectProcessInHigherRound, L55 | ||
TimeoutPropose, // Timeout waiting for proposal. L57 | ||
TimeoutPrevote, // Timeout waiting for prevotes. L61 | ||
TimeoutPrecommit, // Timeout waiting for precommits. L65 | ||
} |
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
Oops, something went wrong.