pub enum ConsensusError {
Show 14 variants
ConsensusNotReached {
votes_for: usize,
total_votes: usize,
required: usize,
},
QuorumNotAchieved {
available: usize,
required: usize,
},
VotingRoundFailed {
round: u64,
reason: String,
},
ByzantineAgentDetected {
agent_id: String,
behavior: String,
},
InvalidVote {
agent_id: String,
reason: String,
},
ConsensusTimeout {
duration: Duration,
votes_cast: usize,
total_agents: usize,
},
InsufficientPoolSize {
size: usize,
minimum: usize,
},
ConflictingResults {
count: usize,
},
InvalidState(String),
AuthorityNotFound(String),
DuplicateVote(String),
ByzantineFault(String),
ViewChangeRequired(String),
AlreadyReached,
}Expand description
Consensus and Byzantine Fault Tolerance errors
Variants§
ConsensusNotReached
Insufficient votes to reach consensus
Fields
QuorumNotAchieved
Quorum not achieved
VotingRoundFailed
BFT voting round failed
ByzantineAgentDetected
Byzantine agent detected
InvalidVote
Vote validation failed
ConsensusTimeout
Consensus timeout exceeded
Fields
InsufficientPoolSize
Pool size too small for BFT
ConflictingResults
Multiple conflicting consensus results
InvalidState(String)
Invalid consensus state
AuthorityNotFound(String)
Authority not found in consensus group
DuplicateVote(String)
Duplicate vote from same authority
ByzantineFault(String)
Byzantine fault detected in consensus
ViewChangeRequired(String)
View change required for consensus
AlreadyReached
Consensus already reached
Implementations§
Trait Implementations§
Source§impl Debug for ConsensusError
impl Debug for ConsensusError
Source§impl Display for ConsensusError
impl Display for ConsensusError
Source§impl Error for ConsensusError
impl Error for ConsensusError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConsensusError> for Error
impl From<ConsensusError> for Error
Source§fn from(source: ConsensusError) -> Self
fn from(source: ConsensusError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConsensusError
impl RefUnwindSafe for ConsensusError
impl Send for ConsensusError
impl Sync for ConsensusError
impl Unpin for ConsensusError
impl UnwindSafe for ConsensusError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more