ibc_client_tendermint

Module client_state

source
Expand description

This module includes trait implementations for the ibc_client_tendermint_types::ClientState type. Implemented traits include ClientStateCommon, ClientStateValidation, and ClientStateExecution.

Note that this crate defines a newtype wrapper around the ibc_client_tendermint_types::ClientState type in order to enable implementing a foreign trait on a foreign type (i.e. the orphan rule in Rust). As such, this module also includes some trait implementations that serve to pass through traits implemented on the wrapped ClientState type.

Structs§

  • Newtype wrapper around the ClientState type, imported from the ibc-client-tendermint-types crate. This wrapper exists so that we can bypass Rust’s orphan rules and implement traits from ibc::core::client::context on the ClientState type.

Functions§

  • Check for misbehaviour on the client state as part of the client state validation process.
  • Checks for misbehaviour upon receiving a new consensus state as part of a client update.
  • Check that the subject and substitute client states match as part of the client recovery validation step.
  • Determines the Status, whether it is Active or Expired, of a consensus state, using its timestamp, the host’s timestamp, and the trusting period.
  • Seed the host store with initial client and consensus states.
  • Removes consensus states from the client store whose timestamps are less than or equal to the host timestamp. This ensures that the client store does not amass a buildup of stale consensus states.
  • Query the status of the client state.
  • Commit a frozen client state, which was frozen as a result of having exhibited misbehaviour, to the store.
  • Update the client_state’s ID, trusting period, latest height, processed height, and processed time metadata values to those values provided by a verified substitute client state in response to a successful client recovery.
  • Commit the new client state and consensus state to the store upon a successful client upgrade.
  • Update the host store with a new client state, pruning old states from the store if need be.
  • Validate the given proof height against the client state’s latest height, returning an error if the proof height is greater than the latest height of the client state.
  • Verify the client message as part of the client state validation process.
  • Verify an Any consensus state by attempting to convert it to a TmConsensusState. Also checks whether the converted consensus state’s root is present.
  • Verify membership of the given value against the client’s merkle proof.
  • Determines if two conflicting headers at the same height would have convinced the light client.
  • Verify that the given value does not belong in the client’s merkle proof.
  • Perform client-specific verifications and check all data in the new client state to be the same across all valid Tendermint clients for the new chain.