pub enum ConsensusError {
Show 24 variants
InvalidProposal(String),
InvalidVote(String),
InsufficientVotes {
got: u64,
need: u64,
},
NonValidator(String),
DuplicateBlock(BlockHeight),
BlockNotFound(BlockHeight),
InvalidHeight {
expected: BlockHeight,
actual: BlockHeight,
},
InvalidHash {
expected: String,
actual: String,
},
InvalidSignature(String),
ViewTimeout(u64),
NotLeader(u64),
AlreadyVoted(u64),
InvalidValidatorSet(String),
EpochTransition(String),
Mempool(String),
InvalidAttestation(String),
Configuration(String),
Crypto(String),
Internal(String),
NotStarted,
AlreadyStarted,
Equivocation {
validator: String,
view: u64,
},
RateLimited {
lane: &'static str,
retry_after_ms: u64,
burst_remaining: u32,
current_rate: f64,
},
FeeFloorTooLow {
lane: &'static str,
gas_price: u64,
required: u64,
base: u64,
multiplier: f64,
},
}Expand description
Errors that can occur during consensus operations
Variants§
InvalidProposal(String)
Invalid block proposal
InvalidVote(String)
Invalid vote
InsufficientVotes
Insufficient votes for quorum
NonValidator(String)
Vote from non-validator
DuplicateBlock(BlockHeight)
Block already exists
BlockNotFound(BlockHeight)
Block not found
InvalidHeight
Invalid block height
InvalidHash
Invalid block hash
InvalidSignature(String)
Invalid signature
ViewTimeout(u64)
View timeout
NotLeader(u64)
Not the leader for current view
AlreadyVoted(u64)
Already voted in this view
InvalidValidatorSet(String)
Invalid validator set
EpochTransition(String)
Epoch transition error
Mempool(String)
Mempool error
InvalidAttestation(String)
Invalid TEE attestation
Configuration(String)
Configuration error
Crypto(String)
Cryptographic error
Internal(String)
Internal error
NotStarted
Not started
AlreadyStarted
Already started
Equivocation
Equivocation detected
RateLimited
Per-DID admission lane bucket exhausted (Spec 2).
lane carries the lane the controller was assigned to; retry_after_ms
is the controller’s best-effort hint for when one bucket token will be
available; current_rate is the lane’s per-second refill in tokens/sec.
FeeFloorTooLow
Per-DID admission lane fee-floor not met (Spec 2).
The lane multiplier is applied to the mempool’s static minimum gas
price (mempool_min_gas_price) at admission time. Verified-lane
controllers pay 1.0×, Delegated 1.5×, Open 4.0×. This makes
unverified controllers strictly more expensive per-tx so they can’t
trivially crowd out verified traffic during congestion.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()