Introducing a new way to review your PRs.

Read the announcement

lfdt-ibc / ibc-go

Inter-Blockchain Communication Protocol (IBC) implementation in Golang.

View on GitHub

20 documents · Updated Nov 13, 2026

docs / local-and-solomachine-clients

Localhost and Solo Machine clients

The Localhost and Solo Machine clients provide IBC verification without a normal remote-chain consensus proof. Localhost verifies the chain that is processing the request. Solo Machine verifies signed claims from a single operator or a signing group. See IBC light clients for the common client model and client lifecycle for shared client terms.

Client roles

Localhost client

The Localhost client gives applications on one chain the normal IBC interface for same-chain calls. It trusts the current IBC store because the chain already has the state being checked. It uses the fixed client identity 09-localhost and does not represent a remote chain. (modules/…/doc.go, modules/…/light_client_module.go)

Localhost is always Active. Its latest height and timestamp come from the current execution context. It has no client state or consensus history to update. This makes it suitable for loopback use where a remote header would add no new trust information.

References: modules/…/doc.go• L3-10 modules/…/light_client_module.go• L22-31 modules/…/light_client_module.go• L159-172

Solo Machine client

The Solo Machine client represents a chain or state source controlled by one signing authority or a signing group. It uses client identifiers in the form 06-solomachine-{N}. Its trust anchor is the public key in the current consensus state rather than a block consensus protocol. (modules/…/doc.go, modules/…/consensus_state.go)

The client can verify IBC state with either a single-signature key or a multisignature key. A diversifier lets the same public key serve more than one Solo Machine client without making those clients share one trust state. (modules/…/consensus_state.go, modules/…/codec.go)

References: modules/…/doc.go• L3-10 modules/…/consensus_state.go• L28-58 modules/…/codec.go• L15-34

Verification models

The clients answer the same IBC membership questions with different sources of trust. Localhost reads current local state. Solo Machine accepts a signed statement that binds the requested path and value to the current signing state.

Verification paths

The following diagram shows how an IBC proof request reaches the trust model for its client type.

flowchart LR
    Request[IBC proof request] --> Type{Client type}
    Type --> Local[Localhost]
    Type --> Solo[Solo Machine]
    Local --> Store[Read current IBC store]
    Solo --> Signature[Check signed path, value, sequence, and time]
    Store --> Answer[Membership or non-membership result]
    Signature --> Answer

References: modules/…/light_client_module.go• L74-156 modules/…/client_state.go• L47-149

Same-chain verification

Localhost requires the sentinel proof 0x01. It then checks one key in the current IBC store. Membership succeeds only when the key exists and its stored bytes equal the supplied value. Non-membership succeeds only when the key is absent. (modules/…/light_client_module.go)

The path must identify one key in the IBC store. The requested height and delay values do not create a remote or historical view because Localhost has no consensus states. The same rules cover connection, channel, packet, acknowledgement, and packet-receipt state.

References: modules/…/light_client_module.go• L27-31 modules/…/light_client_module.go• L74-116 modules/…/light_client_module.go• L119-156 modules/…/light_client_module_test.go• L73-337

Signed-state verification

Solo Machine proofs contain a timestamped signature. The signed record, called SignBytes, binds the current sequence, proof timestamp, diversifier, requested path, and data. Membership signs the claimed value. Non-membership signs empty data. The current consensus public key must validate the signature. (modules/…/client_state.go, modules/…/solomachine.pb.go)

After a valid membership or non-membership proof, the client advances its sequence and stores the proof timestamp. A proof therefore consumes one Solo Machine sequence. The model supports client state, consensus state, connection, channel, packet, acknowledgement, receipt, and next-sequence-receive checks.

References: modules/…/solomachine.pb.go• L240-292 modules/…/client_state.go• L47-97 modules/…/client_state.go• L100-149

State models

Localhost state

Localhost is stateless from the light-client point of view. Its status is always Active, its latest height is the current chain height, and its timestamp is the current block time. It does not store a client state or consensus history.

PropertyLocalhost behavior
Client identity09-localhost
StatusAlways Active
Latest heightCurrent execution height
TimestampCurrent block time
Consensus historyNone
Client updateNo-op

References: modules/…/light_client_module.go• L49-72 modules/…/light_client_module.go• L159-172

Solo Machine state

Solo Machine keeps one current client state and one current consensus state. The client state records the sequence and whether the client is frozen. The consensus state records the public key, diversifier, and latest timestamp. A sequence is also the client height, with revision number 0. (modules/…/solomachine.pb.go, modules/…/light_client_module.go)

State or propertySolo Machine behavior
ActiveThe client can verify messages and proofs
FrozenThe client is blocked after verified misbehaviour
UnknownNo client state exists for the client ID
Latest heightRevision 0 and current sequence
Consensus dataCurrent public key, diversifier, and timestamp

An initial client must have a non-zero sequence and a valid consensus state. The initial client and consensus states must describe the same consensus state. (modules/…/client_state.go, modules/…/light_client_module.go)

References: modules/…/solomachine.pb.go• L27-80 modules/…/client_state.go• L22-45 modules/…/light_client_module.go• L33-64 modules/…/light_client_module.go• L152-193

Lifecycle boundaries

Localhost lifecycle

Localhost has no normal initialization, update, misbehaviour, recovery, or upgrade flow. Initialization and client-message verification are rejected. Update returns the current execution height without changing client state. Misbehaviour handling is a no-op.

The only changing inputs are the current chain height, block time, and IBC store. This keeps Localhost active without a relayer-delivered header or stored state history.

References: modules/…/light_client_module.go• L49-72 modules/…/light_client_module.go• L175-182 modules/…/light_client_module_test.go• L40-71

Solo Machine lifecycle

Solo Machine advances through signed updates and explicit safety states:

  1. Initialization: The client starts with a valid non-zero sequence and matching consensus state.
  2. Header update: The current key signs a new public key, diversifier, and timestamp. A valid header advances the sequence and replaces the consensus state.
  3. Proof use: A valid membership or non-membership proof advances the sequence and timestamp.
  4. Misbehaviour: Two valid signatures over different messages at one sequence freeze the client.
  5. Recovery: A Solo Machine substitute with a different public key replaces the subject state and unfreezes it.

Header timestamps cannot move backward. The client does not support normal client upgrades because signed headers already provide key rotation. (modules/…/update.go, modules/…/proposal_handle.go)

References: modules/…/update.go• L16-27 modules/…/update.go• L30-103 modules/…/misbehaviour.go• L21-46 modules/…/misbehaviour_handle.go• L25-74 modules/…/proposal_handle.go• L18-55 modules/…/light_client_module.go• L196-225

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to the Solo Machine signed record or signature encoding must stay aligned across header updates, membership proofs, non-membership proofs, misbehaviour evidence, and signature producers.
  • Changes to sequence or timestamp rules must cover proof use, header updates, client heights, and misbehaviour checks because they share the same signing state.
  • Changes to public-key types must preserve both single-signature and multisignature support and their interface registration.
  • Changes to the Solo Machine frozen or recovery rules must preserve the contract between status reporting, proof use, and substitute-client state.
  • Changes to the Localhost sentinel proof, fixed client ID, or two-part path must cover both membership and non-membership requests.
  • Changes to IBC store path or key rules must keep the Localhost store lookup and the Solo Machine signed path format compatible with IBC callers.

Important failure modes

TriggerConsequenceGuard
A Localhost request does not use the sentinel proofVerification fails before the store checkUse the Localhost sentinel proof for every proof-bearing request
A Localhost path does not identify one IBC-store keyMembership or non-membership verification failsUse the standard two-part IBC path
Localhost stored bytes differ from the supplied value, or an expected absence is presentThe IBC proof check failsRead the current same-chain state before submitting the request
A Solo Machine signature binds the wrong key, sequence, timestamp, diversifier, path, or dataSignature verification failsSign the complete record with the current consensus key
A Solo Machine proof timestamp is older than the stored timestampThe proof is rejectedUse a proof timestamp at or after the current timestamp
Two different messages are signed at one sequenceThe client is frozen as misbehavingSubmit valid misbehaviour evidence and recover the client before further use
Recovery uses a non-Solo Machine substitute or the same public keyRecovery fails and the subject stays frozenUse a valid Solo Machine substitute with a different public key

Key files

FileWhy to read it
modules/…/light_client_module.goDefines Localhost identity, same-chain checks, status, height, and lifecycle limits.
modules/…/doc.goStates the Localhost client role and fixed identifier.
modules/…/light_client_module.goConnects core IBC operations to Solo Machine state, status, recovery, and upgrade behavior.
modules/…/client_state.goDefines signed membership and non-membership verification and sequence changes.
modules/…/update.goDefines signed header checks and state advances.
modules/…/misbehaviour_handle.goDefines verification of conflicting signed claims.
modules/…/proposal_handle.goDefines substitute-client recovery and unfreeze rules.
modules/…/solomachine.pb.goDefines the Solo Machine state and signed-message concepts.
modules/…/codec.goShows how Solo Machine state and messages are registered for IBC encoding.
modules/…/client.goDefines the common light-client status and interface terms used by both clients.