Client and relayer standards
IBC clients and relayers provide the trust and transport parts of cross-chain communication. A client keeps a verifiable view of a counterparty ledger and checks proofs against that view. A relayer reads both ledgers, carries IBC messages between them, and supplies the updates and proofs that clients need.
Client verification model
An IBC client is a verification view of a remote state machine. It starts from a trusted consensus state, accepts later updates only when the client-specific rules validate them, and exposes proof checks to core IBC. Core IBC can then authenticate a packet without running the counterparty state machine.
Client state and proof verification
The client separates long-lived rules from per-height evidence. ClientState holds the client’s validation parameters and current status. ConsensusState records a trusted view of the counterparty at one height. Together they let the client verify both that a value exists at a path and that no value exists there.
The client interface supports these broad actions:
- Create a client from an initial client state and trusted consensus state.
- Update the client with a client-specific message, such as a signed or consensus-backed header.
- Query stored views and the latest verified height.
- Verify membership and non-membership proofs for core IBC state.
- Report valid evidence of consensus failure.
The initial view is a trust choice. After creation, the client must preserve the security rules of the counterparty consensus model as it accepts new views. Each chain pair must support a client type that can validate the other chain’s consensus process. See core protocol semantics for the connection and packet rules that consume these proofs.
References: spec/…/README.md• L15-33 spec/…/README.md• L148-156 spec/…/README.md• L346-387
Misbehaviour handling
Client safety includes a separate check for misbehaviour. Misbehaviour is evidence that the counterparty broke the consensus assumptions used by the client, such as producing conflicting valid views at one height. When the client accepts this evidence, it freezes or otherwise disables the affected view so that later proof checks and packet processing do not continue on a known-bad basis.
Freezing stops further damage but does not undo state changes that already passed verification. Recovery therefore needs action outside the normal packet flow, such as governance or a trusted recovery process. A stale client can also stop packet and timeout verification when its validation window expires.
References: spec/…/README.md• L122-144 spec/…/README.md• L304-338 spec/…/README.md• L569-584
Client specifications
The repository defines one common client model and several client specifications for different trust and consensus settings. These specifications describe the verification rules a chain may support; they do not require every chain to support every type.
Consensus-specific clients
The main fixed client specifications map to the type of state machine being tracked:
| Specification | State model | Role in the network |
|---|---|---|
| ICS-06 Solo Machine Client | A single machine or signer with an updateable public key | Extends IBC to devices or ledgers whose updates are authenticated by signatures. |
| ICS-07 Tendermint Client | A blockchain finalized by Tendermint consensus | Verifies signed headers and commitment roots using the counterparty validator history. |
| ICS-10 GRANDPA Client | A blockchain finalized by the GRANDPA finality gadget | Verifies finality justifications and changes in the authority set. |
These clients differ in how they validate an update, but they expose the same high-level result: a trusted counterparty height and a commitment root that can be used for IBC proofs. Their misbehaviour rules also differ because each consensus model has different evidence of a broken safety rule. The Solo Machine client uses signed state claims with replay protection, while the Tendermint client uses trusted validator history and time bounds around finalized headers.
References: spec/…/README.md• L14-22 spec/…/README.md• L32-36 spec/…/README.md• L14-20 spec/…/README.md• L58-80 spec/…/README.md• L14-20 spec/…/README.md• L195-209 spec/…/README.md• L147-185
Local and adaptable clients
Other specifications cover cases where the usual remote-chain model is not the best fit. The loopback client gives modules on one ledger the same IBC interface for local communication. The Wasm client lets a chain load client logic as Wasm so that new client rules and upgrades do not always require a change to the chain binary. The rollup integration guide describes how a rollup client can depend on data-availability and settlement clients; it is guidance rather than a complete client standard.
These choices change where trust and finality come from. A loopback client relies on the local ledger and uses a reserved local client and connection identity. A Wasm client delegates the rules to a portable client program while keeping the common client interface. A rollup client may combine proof checks from several underlying ledgers and may wait through a fraud period before treating a state view as final.
References: spec/…/README.md• L14-20 spec/…/README.md• L38-48 spec/…/README.md• L71-85 spec/…/README.md• L13-29 spec/…/README.md• L31-47 spec/…/README.md• L114-126 spec/…/Rollup-Integration-guide.md• L3-7 spec/…/Rollup-Integration-guide.md• L25-29
Relayer algorithm
A relayer is an off-chain process that reads chain state and submits transactions to the ledgers in an IBC pair. It supplies the physical transport that blockchains cannot provide themselves. The chain remains responsible for checking the client update, proof, packet, and state transition, so a faulty relayer must not make an invalid message valid.
Relay cycle
The relayer repeatedly compares the state of two chains. It finds pending datagrams, which are IBC messages that can now be submitted, and sends each one to the chain where it belongs. A relayer may serve only some chains or some clients, connections, channels, or packet types.
The diagram shows the high-level relay cycle from chain state to an on-chain result.
flowchart LR
A[Read source and destination state] --> B[Find pending datagrams]
B --> C[Build messages with updates and proofs]
C --> D[Submit transactions to the opposite chain]
D --> E{On-chain client and core checks}
E -->|valid| F[Apply IBC state transition]
E -->|invalid or already handled| G[Reject or skip message]
F --> A
G --> A
The expected liveness condition is simple: while both chains remain live, at least one correct and live relayer for the pair must continue working. Relaying is permissionless in the protocol model, and the required verification occurs on-chain.
References: spec/…/README.md• L13-31 spec/…/README.md• L35-59 spec/…/README.md• L109-114
Packet and acknowledgement transport
Packet transport follows the state changes recorded by the sending and receiving chains. The relayer observes or queries sent packets, checks whether the destination has handled them, and submits receive messages when needed. After the destination writes an acknowledgement, the relayer carries that acknowledgement back to the source.
Timeout transport uses the absence of a successful receipt rather than a dedicated timeout event. The relayer tracks packets until the destination passes the packet timeout, then submits a timeout proof if the source still holds the packet commitment. Some ordered channel modes require a receive attempt that writes a timeout receipt before the source can accept the timeout.
The diagram shows the normal packet path and its alternative timeout path.
flowchart LR
S[Source sends packet] --> R[Relayer carries packet and proof]
R --> D[Destination verifies and receives]
D --> ACK[Destination writes acknowledgement]
ACK --> RA[Relayer carries acknowledgement and proof]
RA --> SA[Source processes acknowledgement]
S --> T{Destination timeout passes first}
T --> RT[Relayer checks packet commitment]
RT --> TO[Source verifies timeout proof]
TO --> SO[Source processes timeout]
Loopback traffic is the local exception to the remote-chain path. A relayer that supports the reserved loopback connection sends the next message back to the originating ledger and uses the loopback proof form, which does not claim a remote Merkle proof. An implementation may execute this step automatically instead of using a relayer.
References: spec/…/README.md• L61-107 spec/…/README.md• L79-85 spec/…/README.md• L168-178
Ordering and concurrent relayers
Relayers must respect dependencies between messages. A client update that adds the needed trusted state must reach a chain before a packet proof that uses that state. Handshake steps and packet flow also have protocol order, so a relayer must query current state before choosing the next message.
More than one relayer may submit the same work. On-chain state rules make duplicate attempts safe at the protocol level, but the later transaction can fail and still consume fees. Relayers may bundle dependent messages when the host supports it, and they need funded accounts on the chains where they submit transactions.
References: spec/…/README.md• L251-267
Protocol relationships
Clients and relayers sit between core IBC semantics and application behavior. The client authenticates a counterparty state claim. Core IBC checks packet ordering and commitment paths. The application receives the authenticated packet data and decides what that data means.
- IBC protocol specifications provides the catalog view of these standards.
- Core protocol semantics covers the client, connection, channel, packet, host, and handler rules that use client proofs.
- IBC application standards covers the application protocols that consume relayed packet data.
- IBC v2 specifications describes a model that addresses packets through client pairs and reduces the role of connection and channel handshakes.
Change checklist
When these files or sections are changed, remember to consider these:
- A new client type must preserve the common client proof and misbehaviour contracts before a chain can use it in a connection.
- A change to client height, commitment, or freeze rules must be checked against packet proof heights and timeout verification.
- A change to packet or acknowledgement paths must be reflected in relayer proof construction and in the client verification view.
- A change to channel timeout behavior must update the relayer decision between a direct timeout and a timeout-receipt flow.
- A change to loopback client or connection identifiers must be checked against local message routing and its sentinel proof behavior.
- A change to IBC v2 client-pair addressing must be checked against the relayer’s source and destination client selection.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A relayer submits a packet before the client has the required consensus view | The destination cannot verify the packet proof | Relay the client update before dependent packet messages. |
| A client accepts evidence of conflicting consensus without freezing | Later proofs may use a broken counterparty view | Validate misbehaviour and stop proof verification for the affected client. |
A loopback relayer treats connection-localhost as a remote connection | The local message is routed incorrectly or carries an invalid proof | Detect the sentinel connection and send the message to the originating chain with the loopback proof form. |
| The relayer misses the timeout-receipt requirement for an ordered channel mode | The source chain rejects an otherwise valid timeout | Check the channel mode and attempt destination receipt processing first. |
| No correct live relayer serves a chain pair | Packets remain pending even though on-chain safety is intact | Run at least one live relayer with access to both chain state and funded submit accounts. |
Key files
| File | Why to read it |
|---|---|
| spec/…/README.md | Defines the common client model, trusted views, proof checks, updates, and misbehaviour behavior. |
| spec/…/README.md | Defines the off-chain relay cycle and the packet, acknowledgement, timeout, ordering, and concurrency rules. |
| spec/…/README.md | Shows the standard client model applied to a widely used finalized blockchain consensus system. |
| spec/…/README.md | Shows how the common interface supports signature-based state updates. |
| spec/…/README.md | Describes portable and dynamically replaceable client logic. |
| spec/…/README.md | Describes local-ledger communication through the IBC client interface. |
| spec/…/README.md | Shows how a different finality gadget fits the client model. |
| spec/…/Rollup-Integration-guide.md | Explains the client concerns raised by data availability, settlement, and fraud periods in rollups. |