IBC light clients
IBC light clients give core IBC a trusted view of a counterparty chain. They verify updates to that view and check whether counterparty state contains a value at a path. Core IBC uses these checks before it accepts cross-chain actions. Each client family supplies a different trust model behind the same core contract.
System role
The light-client system keeps chain trust separate from packet and channel rules. Core IBC selects a client module, while that module validates the counterparty evidence and maintains the trusted state used by later proof checks.
The main relationship is:
flowchart LR
A[Client creation] --> B[Client module]
B --> C[Trusted client state]
D[Client update message] --> B
B --> C
E[Packet proof] --> F[Membership check]
C --> F
F --> G[Core IBC decision]
Each client has client state and consensus state. Client state holds the trust rules and the latest trusted height. Consensus state holds trusted data for a height. Core IBC gives each client an isolated store so one client cannot read or change another client's state.
References: modules/…/keeper.go• L419-425 modules/…/store.go• L18-38
Shared client contract
The exported LightClientModule contract is the boundary between core IBC and a client family. It covers initialization, update checks, misbehaviour handling, membership and non-membership checks, status, time, recovery, and upgrades.
The shared data contracts give every family the same meanings for its inputs and outputs:
ClientStateidentifies and validates the client trust state.ConsensusStateidentifies and validates trusted consensus data and exposes its timestamp.ClientMessagecarries an update or evidence of misbehaviour.Heightlets core IBC compare revisions and heights.
Proof calls carry a height, delay limits, a path, and proof data. They support both proof of membership and proof of non-membership. The selected client decides how its trust model checks the proof.
References: modules/…/client.go• L46-127 modules/…/client.go• L130-176
Client lifecycle
Core IBC routes a client identifier to its client module. The module validates the initial state and owns the client-specific records in the isolated store. Core IBC accepts a new client only when its reported status is Active.
When core IBC processes an update, it follows this sequence:
- It selects the module from the client identifier.
- The module verifies the client message.
- The module checks for misbehaviour.
- It freezes the client when the message proves misbehaviour. Otherwise, it stores the new trusted state.
- Later packet checks use the resulting status and trusted state.
Only an active client can process updates or verify packet proofs. A client can also be Frozen, Expired, Unknown, or Unauthorized; these states block normal IBC use. Recovery and upgrade support depend on the client family.
See Client lifecycle for the wider create, update, freeze, recover, and upgrade flow.
References: modules/…/client.go• L15-85 modules/…/client.go• L88-164 modules/…/keeper.go• L71-90
Proof verification boundary
Membership verification proves that a value exists at a path and height. Non-membership verification proves that no value exists there. Core IBC sends the request to the selected client, and the client checks it against the trusted evidence for that height.
Delay periods prevent a proof from being used too soon after the client received the trusted state. Time and block delays are part of the common request. Their enforcement and their relation to the client trust model are client-specific.
See Core IBC protocol for how proof results support packet and channel work.
References: modules/…/client.go• L71-94 modules/…/keeper.go• L336-362 modules/…/client_state.go• L205-327
Client families
The repository supports client families with different sources of trust. The child pages describe each family in more detail.
Tendermint light client
The Tendermint client trusts a counterparty chain through signed headers and validator-set changes. It stores a consensus state for each trusted height and uses the associated application root for membership and non-membership proofs. A trusting period can make an otherwise unfrozen client Expired.
The client detects conflicting headers and time violations, freezes on verified misbehaviour, and can verify a counterparty-authorized upgrade when an upgrade path is configured. It also keeps the metadata needed for delay checks and for removing expired consensus states.
References: modules/…/client_state.go• L73-109 modules/…/client_state.go• L205-327 modules/…/update.go• L24-176 modules/…/upgrade.go• L23-135
Wasm light client
The Wasm client is a proxy that lets a Wasm contract define the update, misbehaviour, status, and proof rules. The Go module maps the shared IBC calls to contract query and state-changing entry points, then reads the contract result or its updated client store.
Each client instance uses a checksum for approved verification code. The code must be stored before a client can be created, and normal execution cannot change the checksum. This model lets a chain add or migrate verification code through the Wasm module without changing the shared light-client contract.
See Wasm light client.
References: modules/…/light_client_module.go• L40-101 modules/…/light_client_module.go• L137-199 modules/…/light_client_module.go• L202-305 modules/…/contract_keeper.go• L101-170 modules/…/keeper.go• L85-139
Local and solo-machine clients
The local client is a stateless view of the current chain. It does not accept remote updates. It checks values directly in the local IBC store and uses the current chain height and time.
The solo-machine client trusts signed data from one machine. A signed header can replace its trusted public key and advances a sequence. A signed membership or non-membership proof also advances that sequence. Conflicting signed messages can freeze the client, while client upgrades are not supported.
See Local and solo-machine clients.
References: modules/…/light_client_module.go• L49-72 modules/…/light_client_module.go• L74-183 modules/…/client_state.go• L47-149 modules/…/update.go• L16-103 modules/…/light_client_module.go• L152-225
Attestation light client
The attestation client trusts a fixed set of ECDSA signers instead of verifying block headers. Updates use a signed state attestation. Packet membership and non-membership checks use signed packet attestations that identify the height and the packet commitments.
The client accepts a proof only when it has the configured quorum of unique trusted signers. It records trusted timestamps by height and freezes when a later attestation conflicts with the stored timestamp. This client is experimental. It does not support recovery or upgrades, and the attestor set is fixed when the client is created.
See Attestation light clients.
References: modules/…/README.md• L1-28 modules/…/attestation_proof.go• L19-50 modules/…/client_state.go• L72-223 modules/…/light_client_module.go• L74-207
Client type routing
The client router maps a client type to its light-client module. Core IBC parses the type from the client identifier, checks the allowed-client parameter, and selects the registered route. The local client is registered by default. Other client families must be added during application setup.
This routing gate must pass before creation, update, recovery, upgrade, or proof verification can reach a module. A valid module without an allowed type is unusable, and an allowed type without a route has no verifier.
References: modules/…/router.go• L11-52 modules/…/keeper.go• L37-90
Change checklist
When these files or sections are changed, remember to consider these:
- A new client type needs a valid type name, a registered route, and an allowed-client parameter entry.
- Changes to
LightClientModuleaffect every client family. Update the exported contract and all registered modules together. - Changes to client or consensus state encoding must stay aligned with interface unpacking and genesis state.
- Changes to proof paths, proof heights, or delay data must stay aligned between core callers and every client verifier.
- Changes to status rules must preserve the core gate that only
Activeclients update or verify proofs. - Changes to Wasm contract messages or results must stay aligned across the Go proxy, contract API, and contract code.
- Changes to a Wasm checksum or migration rule must preserve the link between stored code, client state, and contract execution.
- Changes to attestation encoding must preserve ABI compatibility with the Solidity and CosmWasm attestation clients.
- Changes to Tendermint consensus-state retention must preserve the metadata needed for delay checks and ordered state pruning.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Client type is not allowed or has no route | Core IBC cannot create or use the client | Register the module and allow the type in client parameters |
Client status is not Active | Updates and proof checks are rejected | Refresh, recover, or otherwise use the family-specific state transition |
| Proof height has no trusted consensus state | Membership or non-membership verification fails | Update the client at the height required by the proof |
| A verified update shows conflicting evidence | The client is frozen instead of advanced | Submit valid evidence and follow the family's misbehaviour rules |
| Wasm checksum is not stored or contract execution changes it unexpectedly | Wasm client creation or operation fails | Store approved code first and keep checksum changes limited to migration |
| Wasm contract returns unsupported messages, events, or attributes | The proxy rejects the contract result | Return only the data allowed by the Wasm client contract boundary |
| Attestation proof lacks a quorum of unique trusted signers | The update or packet proof is rejected | Use valid signatures from the configured attestor set |
| Tendermint trusting period expires or delay metadata is missing | Header or packet proof verification fails | Update before expiry and retain the metadata for each proof height |
Key files
| File | Why to read it |
|---|---|
| modules/…/client.go | Defines the shared light-client contract and common state interfaces. |
| modules/…/client.go | Shows how core IBC creates, updates, freezes, upgrades, and recovers clients. |
| modules/…/keeper.go | Shows routing, active-status gates, proof entry points, and isolated client stores. |
| modules/…/router.go | Shows how client types map to light-client modules. |
| modules/…/store.go | Shows the store boundary exposed to light clients. |
| modules/…/client_state.go | Shows Tendermint status, trust settings, and proof checks. |
| modules/…/update.go | Shows signed-header updates, misbehaviour freeze, and consensus-state changes. |
| modules/…/upgrade.go | Shows the Tendermint client upgrade trust boundary. |
| modules/…/light_client_module.go | Shows the shared contract boundary for Wasm verification. |
| modules/…/contract_api.go | Defines the messages and results exchanged with Wasm contracts. |
| modules/…/contract_keeper.go | Shows contract execution and post-execution state checks. |
| modules/…/light_client_module.go | Shows the stateless local client and direct local-store checks. |
| modules/…/light_client_module.go | Shows the solo-machine lifecycle and its supported operations. |
| modules/…/client_state.go | Shows attestation-based packet proof checks and quorum trust. |
| modules/…/light_client_module.go | Shows attestation client status, updates, and limits. |