Overview
Synopsis
Learn about the 07-tendermint light client module. The Tendermint client is the first and most deployed light client in IBC. It implements the IBC light client module interface to track a counterparty running CometBFT consensus.Tendermint is the old name of CometBFT which has been retained in IBC to avoid
expensive migration costs.
ClientState
struct contains all the parameters necessary for CometBFT header verification. The ConsensusState
, on the other hand, is a compressed view of a particular header of the counterparty chain. Unlike off chain light clients, IBC does not store full header. Instead it stores only the information it needs to prove verification of key/value pairs in the counterparty state (i.e. the header AppHash
), and the information necessary to use the consensus state as the next root of trust to add a new consensus state to the client (i.e. the header NextValidatorsHash
and Timestamp
). The relayer provides the full trusted header on UpdateClient
, which will get checked against the compressed root-of-trust consensus state. If the trusted header matches a previous consensus state, and the trusted header and new header pass the CometBFT light client update algorithm, then the new header is compressed into a consensus state and added to the IBC client.
Each Tendermint Client is composed of a single ClientState
keyed on the client ID, and multiple consensus states which are keyed on both the clientID and header height. Relayers can use the consensus states to verify merkle proofs of packet commitments, acknowledgements, and receipts against the AppHash
of the counterparty chain in order to enable verified packet flow.
If a counterparty chain violates the CometBFT protocol in a way that is detectable to off-chain light clients, this misbehaviour can also be submitted to an IBC client by any off-chain actor. Upon verification of this misbehaviour, the Tendermint IBC Client will freeze, preventing any further packet flow from this malicious chain from occurring. Governance or some other out-of-band protocol may then be used to unwind any damage that has already occurred.
Initialization
The Tendermint light client is initialized with aClientState
that contains parameters necessary for CometBFT header verification along with a latest height and ConsensusState
that encapsulates the application state root of a trusted header that will serve to verify future incoming headers from the counterparty.
Updates
Once the initial client state and consensus state are submitted, future consensus states can be added to the client by submitting IBC headers. These headers contain all necessary information to run the CometBFT light client protocol.Proofs
As consensus states are added to the client, they can be used for proof verification by relayers wishing to prove packet flow messages against a particular height on the counterparty. This uses theVerifyMembership
and VerifyNonMembership
methods on the Tendermint client.
ics23.ProofSpec
.