pub trait ExtClientValidationContext: ClientValidationContext {
    // Required methods
    fn host_timestamp(&self) -> Result<Timestamp, ContextError>;
    fn host_height(&self) -> Result<Height, ContextError>;
    fn consensus_state_heights(
        &self,
        client_id: &ClientId
    ) -> Result<Vec<Height>, ContextError>;
    fn next_consensus_state(
        &self,
        client_id: &ClientId,
        height: &Height
    ) -> Result<Option<Self::ConsensusStateRef>, ContextError>;
    fn prev_consensus_state(
        &self,
        client_id: &ClientId,
        height: &Height
    ) -> Result<Option<Self::ConsensusStateRef>, ContextError>;
}
Expand description

An optional trait that extends the client validation context capabilities by providing additional methods for validating a client state. Mainly benefiting ICS-07 Tendermint clients by granting access to essential information from hosts.

Categorized under ICS-02, as it may also be utilized by other types of light clients. Developers may view this trait as an example of a custom context definition that expands client validation capabilities, according to their specific light client requirements.

Required Methods§

source

fn host_timestamp(&self) -> Result<Timestamp, ContextError>

Returns the current timestamp of the local chain.

source

fn host_height(&self) -> Result<Height, ContextError>

Returns the current height of the local chain.

source

fn consensus_state_heights( &self, client_id: &ClientId ) -> Result<Vec<Height>, ContextError>

Returns all the heights at which a consensus state is stored.

source

fn next_consensus_state( &self, client_id: &ClientId, height: &Height ) -> Result<Option<Self::ConsensusStateRef>, ContextError>

Search for the lowest consensus state higher than height.

source

fn prev_consensus_state( &self, client_id: &ClientId, height: &Height ) -> Result<Option<Self::ConsensusStateRef>, ContextError>

Search for the highest consensus state lower than height.

Object Safety§

This trait is not object safe.

Implementors§