pub enum FrostError {
InvalidCommitment {
party: String,
reason: &'static str,
code: u32,
},
InvalidShareResponse {
party: String,
reason: &'static str,
code: u32,
},
BelowThreshold {
have: u32,
need: u32,
code: u32,
},
MissingCommitment {
party: String,
code: u32,
},
InvalidShareSignature {
party: String,
code: u32,
},
AggregateVerificationFailed {
code: u32,
},
MalformedShare {
reason: &'static str,
code: u32,
},
VssShareVerificationFailed {
party: String,
code: u32,
},
RosterConfig {
reason: &'static str,
code: u32,
},
MalformedMessage {
reason: &'static str,
code: u32,
},
RoundOverflow {
round: u8,
code: u32,
},
SessionNotComplete {
code: u32,
},
}Expand description
FROST-specific failure modes. Each variant maps to a distinct code so a failure cause can be identified without string-matching.
Variants§
InvalidCommitment
A round-1 commitment failed to decode or decompress.
A round-2 share response failed to decode.
BelowThreshold
Fewer than T distinct parties contributed to a signing round.
MissingCommitment
A party’s commitment list is missing a required participant.
A party’s share response failed verification against its commitment — proof of byzantine / malicious behavior.
AggregateVerificationFailed
The aggregate signature failed verification. Indicates either a broken implementation or coalition-level misbehavior.
The local share supplied to a signing session is malformed.
A VSS share received during DKG failed to verify against its sender’s commitment polynomial.
RosterConfig
The roster is empty or has no party index for this party.
MalformedMessage
A message could not be parsed at all.
RoundOverflow
The session was driven past its last round.
SessionNotComplete
result() was called before the session completed.
Implementations§
Source§impl FrostError
impl FrostError
Sourcepub fn code(&self) -> u32
pub fn code(&self) -> u32
Stable sub-code for this error. Combined with
FROST_ERROR_BASE it forms the value reported through the
framework’s SchemeInternalError.
Trait Implementations§
Source§impl Debug for FrostError
impl Debug for FrostError
Source§impl Display for FrostError
impl Display for FrostError
Source§impl Error for FrostError
impl Error for FrostError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCompat for FrostError
impl ErrorCompat for FrostError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more