Enum Error
pub enum Error {
Show 41 variants
ChainIdTooLong {
chain_id: ChainId,
len: usize,
max_len: usize,
},
InvalidHeader {
reason: String,
error: Error,
},
InvalidTrustThreshold {
reason: String,
},
FailedTrustThresholdConversion {
numerator: u64,
denominator: u64,
},
InvalidTendermintTrustThreshold(Error),
InvalidMaxClockDrift {
reason: String,
},
InvalidLatestHeight {
reason: String,
},
MissingSignedHeader,
Validation {
reason: String,
},
InvalidRawClientState {
reason: String,
},
MissingValidatorSet,
MissingTrustedValidatorSet,
MissingTrustedHeight,
MissingTrustingPeriod,
MissingUnbondingPeriod,
NegativeMaxClockDrift,
MissingLatestHeight,
InvalidRawHeader(Error),
InvalidRawMisbehaviour {
reason: String,
},
Decode(DecodeError),
WrongTypeUrl {
url: String,
},
HeaderTimestampTooHigh {
actual: String,
max: String,
},
HeaderTimestampTooLow {
actual: String,
min: String,
},
TimestampOverflow(TimestampOverflowError),
NotEnoughTimeElapsed {
current_time: Timestamp,
earliest_time: Timestamp,
},
NotEnoughBlocksElapsed {
current_height: Height,
earliest_height: Height,
},
InvalidHeaderHeight {
height: u64,
},
MismatchedRevisions {
current_revision: u64,
update_revision: u64,
},
NotEnoughTrustedValsSigned {
reason: VotingPowerTally,
},
VerificationError {
detail: VerificationErrorDetail,
},
ProcessedTimeNotFound {
client_id: ClientId,
height: Height,
},
ProcessedHeightNotFound {
client_id: ClientId,
height: Height,
},
InsufficientHeight {
latest_height: Height,
target_height: Height,
},
ClientFrozen {
frozen_height: Height,
target_height: Height,
},
MisbehaviourTrustedValidatorHashMismatch {
trusted_validator_set: Vec<Info>,
next_validators_hash: Hash,
trusted_val_hash: Hash,
},
ConsensusStateTimestampGteTrustingPeriod {
duration_since_consensus_state: Duration,
trusting_period: Duration,
},
MisbehaviourHeadersBlockHashesEqual,
MisbehaviourHeadersNotAtSameHeight,
MisbehaviourHeadersChainIdMismatch {
header_chain_id: String,
chain_id: String,
},
MismatchValidatorsHashes {
validators_hash: Hash,
signed_header_validators_hash: Hash,
},
InvalidRawClientId {
client_id: String,
},
}
Variants§
ChainIdTooLong
chain-id is ({chain_id}
) is too long, got: {len}
, max allowed: {max_len}
InvalidHeader
invalid header, failed basic validation: {reason}
, error: {error}
InvalidTrustThreshold
invalid client state trust threshold: {reason}
FailedTrustThresholdConversion
failed to build Tendermint domain type trust threshold from fraction: {numerator}
/{denominator}
InvalidTendermintTrustThreshold(Error)
invalid tendermint client state trust threshold error: {0}
InvalidMaxClockDrift
invalid client state max clock drift: {reason}
InvalidLatestHeight
invalid client state latest height: {reason}
MissingSignedHeader
missing signed header
Validation
invalid header, failed basic validation: {reason}
InvalidRawClientState
invalid raw client state: {reason}
MissingValidatorSet
missing validator set
MissingTrustedValidatorSet
missing trusted validator set
MissingTrustedHeight
missing trusted height
MissingTrustingPeriod
missing trusting period
MissingUnbondingPeriod
missing unbonding period
NegativeMaxClockDrift
negative max clock drift
MissingLatestHeight
missing latest height
InvalidRawHeader(Error)
invalid raw header error: {0}
InvalidRawMisbehaviour
invalid raw misbehaviour: {reason}
Decode(DecodeError)
decode error: {0}
WrongTypeUrl
wrong type url for tendermint light client state: {url}
HeaderTimestampTooHigh
given other previous updates, header timestamp should be at most {max}
, but was {actual}
HeaderTimestampTooLow
given other previous updates, header timestamp should be at least {min}
, but was {actual}
TimestampOverflow(TimestampOverflowError)
timestamp overflowed error: {0}
NotEnoughTimeElapsed
not enough time elapsed, current timestamp {current_time}
is still less than earliest acceptable timestamp {earliest_time}
NotEnoughBlocksElapsed
not enough blocks elapsed, current height {current_height}
is still less than earliest acceptable height {earliest_height}
InvalidHeaderHeight
header revision height = {height}
is invalid
MismatchedRevisions
the header’s current/trusted revision number ({current_revision}
) and the update’s revision number ({update_revision}
) should be the same
NotEnoughTrustedValsSigned
not enough trust because insufficient validators overlap: {reason}
Fields
reason: VotingPowerTally
VerificationError
verification failed: {detail}
Fields
detail: VerificationErrorDetail
ProcessedTimeNotFound
Processed time for the client {client_id}
at height {height}
not found
ProcessedHeightNotFound
Processed height for the client {client_id}
at height {height}
not found
InsufficientHeight
the height is insufficient: latest_height={latest_height}
target_height={target_height}
ClientFrozen
the client is frozen: frozen_height={frozen_height}
target_height={target_height}
MisbehaviourTrustedValidatorHashMismatch
trusted validators {trusted_validator_set:?}
, does not hash to latest trusted validators. Expected: {next_validators_hash}
, got: {trusted_val_hash}
ConsensusStateTimestampGteTrustingPeriod
current timestamp minus the latest consensus state timestamp is greater than or equal to the trusting period ({duration_since_consensus_state:?}
>= {trusting_period:?}
)
MisbehaviourHeadersBlockHashesEqual
headers block hashes are equal
MisbehaviourHeadersNotAtSameHeight
headers are not at same height and are monotonically increasing
MisbehaviourHeadersChainIdMismatch
header chain-id {header_chain_id}
does not match the light client’s chain-id {chain_id}
)
MismatchValidatorsHashes
The given hash of the validators does not matches the given hash in the signed header. Expected: {signed_header_validators_hash}
, got: {validators_hash}
InvalidRawClientId
invalid raw client id: {client_id}
Trait Implementations§
§impl Error for Error
Available on crate feature std
only.
impl Error for Error
std
only.§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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request