Chain connectivity and network configuration
The IBC CLI turns one shared configuration into the chain connections, client pairings, signing paths, and attestor links that relaying needs. It uses each chain's RPC endpoint to read router state, packet events, commitments, and proofs. It then uses the configured signer and network services to build and send relay work.
System boundary
Link treats a chain as a named network target. A chain entry identifies the network with a chainId, selects the supported EVM chain type, and points to the chain's RPC endpoint and ICS26 router contract. The router is the on-chain IBC entry point that Link reads for packet state and uses as the destination for relay transactions. The chain registry is shared by the relayer and attestor services through cli/…/config.go.
The network boundary includes more than chain RPC. Link can reach remote attestors and remote signers over separate services, while its own relayer and attestor APIs listen on the configured server address. Remote service links can use HTTPS with optional custom trust roots or client certificates. These links support different jobs and must not be confused:
| Network link | Purpose |
|---|---|
| Chain RPC | Read blocks, router events, commitments, client state, proofs, and transaction results. |
| Remote attestor service | Return signed claims about a chain for proof creation. An attestation is a signed claim about chain state. |
| Remote signer service | Sign relay transactions without exposing the private key to Link. |
| Remote prover service | Build proof material for a client end configured with the remote client type. |
| Link server address | Expose relayer and, when enabled, local attestor operations to clients. |
Configuration model
The configuration has one chain registry and then uses chain IDs as references. A connection describes a pair of on-chain light-client ends. Each end lives on one chain, names the client that tracks the other chain, and names the signer that submits transactions on its own chain. This makes one connection bidirectional without duplicating the relationship in a second top-level object.
Chain registry
The chains list is the source of truth for chain access. Each chain ID must be unique, and every chain named by a connection, chain override, or local attestor must exist in this list. The current chain model supports EVM networks with a required RPC endpoint, an optional ws:// or wss:// endpoint for auto-relay subscriptions, and an ICS26 router address. A chain can also name the signer alias used by deployment commands.
The router address is optional during general configuration checks because deployment can provide it later. A runnable relayer or attestor must have a valid, non-zero EVM router address. Auto-relay also requires a WebSocket endpoint on the chain that sources the route.
The same chain entry serves two readers. The chain client uses it to inspect router events, on-chain commitments, and state proofs at a selected height. The transaction path uses the same RPC address to submit relay transactions. When Link dials an EVM endpoint, it also checks that the node reports the configured chain ID. A wrong endpoint can therefore fail before the process reads or writes chain state.
Besu networks support both QBFT and IBFT 2.0 consensus. Link prepares sealed Besu headers for the matching light-client contract by reading validator data and accepted commit seals from the header. The Besu test fixtures cover both consensus modes and include valid updates, proofs, and rejected update cases.
References: cli/…/config.go• L66-129 cli/…/config.go• L459-506 cli/…/config.go• L674-690 cli/…/config.go• L693-715 cli/…/config.go• L793-814 cli/…/consensus.go• L16-50 cli/…/doc.go• L3-10 cli/…/header.go• L34-68 cli/…/fixture.go• L24-84 cli/…/ibft2.json• L1-14 cli/…/qbft.json• L1-14 cli/…/client.go• L90-124 cli/…/lightclient.go• L59-82 cli/…/ibc.yml• L19-32
Relay connections
The relayer.connections list defines the routes that Link actively relays. Each route has two client ends. The counterparty of clientA is clientB, and the counterparty of clientB is clientA; the ends must use different chains and must not reuse the same chain/client pair in another route.
Each end selects a client type and a signer alias. An attestation client builds proof material from configured attestors, while a remote client delegates proof work to a prover service named in its parameters. The signer belongs to the end's own chain because it pays for and submits the transaction there. autoRelay controls whether Link discovers packets from that end and how far back it checks the source chain.
Remote prover parameters accept a bare host and port or an HTTP(S) endpoint. An HTTPS endpoint turns on TLS. Its optional tls block only customizes trust or client authentication; it does not turn TLS on for a plaintext endpoint.
Per-chain overrides adjust relay timing and batch behavior without changing the chain identity or route. The sample configuration uses a packetBatchSize of 25 for chain 1. The overrides apply when Link creates the transaction path for each (chain, signer) pair.
References: cli/…/relayer.go• L27-85 cli/…/relayer.go• L87-124 cli/…/relayer.go• L129-169 cli/…/relayer.go• L227-315 cli/…/relayer.go• L317-366 cli/…/relayer_test.go• L15-60 cli/…/relayer_test.go• L88-318 link/…/txsubmitter.go• L31-90 cli/…/ibc.yml• L36-41
Attestor and signer roles
Attestors provide signed observations of chain state. A local attestor watches a declared chain through its chain client and signs with a local ECDSA key. A remote attestor is reached through a bare host:port address or an HTTP(S) endpoint. Link asks it for its identity and chain, so the remote entry does not declare a chain ID.
Signers provide the keys used by relay ends and local attestors. A local signer reads a key file. A remote signer first loads public key information from a KMS-compatible service and sends later signing requests to that service. Remote attestors and remote signers use the same endpoint rule as remote provers: HTTPS enables TLS, while an optional tls block supplies CA, server-name, or client-certificate settings.
TLS settings are checked when Link loads or builds the remote connection. CA files must contain certificates. A client certificate must have its matching private key. A client certificate that is expired or not yet valid is rejected. Link does not accept a TLS block on a plaintext endpoint, and it warns when server verification is disabled.
The attestor set for a client must be able to meet the attestor set and signature threshold registered on chain. Local attestor names must be unique. The same local signer cannot back two local attestors on one chain, although it can back local attestors on different chains. Link resolves local and reachable remote attestors before it creates the proof path for each client end.
References: cli/…/config.go• L137-190 cli/…/config.go• L508-628 cli/…/config.go• L644-671 cli/…/tls.go• L19-53 cli/…/tls.go• L56-176 link/…/config.go• L549-663 link/…/resolve.go• L17-75 link/…/local.go• L40-74 link/…/remote.go• L17-50 link/…/signer.go• L43-87
Configuration loading
The CLI loads one YAML file for each command. The --config value is resolved relative to --home, which defaults to ~/…/ibc.yml. Link expands environment variables before it parses the file. The loader rejects unknown YAML fields, so a misspelled setting does not silently become a default value. The loaded values can also receive a database URL override from --db.
File resolution
Link creates the home directory when needed, changes into that directory, and then reads the selected configuration file. Relative paths in the configuration therefore resolve from the Link home directory. This applies to the SQLite database and to local signer key paths.
ibc config new creates the default file, while ibc config add-chain adds a chain entry without requiring the incomplete file to pass normal validation first. Operators can use ibc config validate for structural checks. Configuration output can include comments that mark values an operator must fill in, such as router addresses, signer aliases, and local attestor finality settings.
References: cli/…/flags.go• L13-57 cli/…/flags.go• L68-93 link/…/config.go• L63-111 link/…/config.go• L141-175 cli/…/file.go• L15-43 cli/…/config.go• L352-360 cli/…/config.go• L817-853 cli/…/config_test.go• L282-467
Remote endpoint security
Remote attestor, signer, and prover addresses share one endpoint model. A bare host and port uses plaintext HTTP transport. An http:// address also uses plaintext, while an https:// address uses TLS. The gRPC target removes the HTTP scheme and supplies port 80 or 443 when the address has no explicit port.
The TLS block is optional. Without it, HTTPS uses system trust roots and no client certificate. With it, Link can add a CA bundle, set the server name, or present a client certificate for mutual TLS. TLS files are read at startup, so certificate or CA rotation needs a process restart.
References: cli/…/tls.go• L19-43 cli/…/tls.go• L140-176 cli/…/tls.go• L199-265 cli/…/tls.go• L12-47 cli/…/tls_test.go• L187-254 cli/…/tls_test.go• L11-25
Deployment patches
Deployment rendering can project chain, connection, and attestor entries from deployment manifests into the existing configuration. A Patch carries only these network sections, so the merge preserves unrelated settings such as signers and service options.
The merge matches chains by chain ID, connections by alias, and attestors by their type and identity. New entries are added. Equal entries are left unchanged. A changed entry replaces the old entry and returns a conflict so the CLI can show which values will be overwritten before it writes the populated configuration. Replacement is for the full entry, not for individual fields; values omitted by the incoming deployment data are not carried over from the old entry.
Remote attestors are distinct when their names or endpoints differ. Local attestors match by type and name, so a signer change is reported as an overwrite. This keeps a deployment patch repeatable while still exposing changes to network endpoints, routes, and attestor credentials.
References: cli/…/patch.go• L10-36 cli/…/patch.go• L39-121 cli/…/patch_test.go• L34-131 link/…/deploy.go• L655-684
Validation layers
Static validation checks the shape and links inside the file before Link builds services. It checks required chain and client fields, unique IDs and aliases, declared chain references, signer references, client-specific parameters, valid remote URLs and TLS files, and valid listener and database settings. General validation allows an empty router address for configuration-building steps, but runnable relayer and attestor checks require a valid non-zero EVM router. Static validation does not prove that a network endpoint is reachable.
Relayer sufficiency also requires at least one connection. Attestor sufficiency requires at least one local attestor. These checks distinguish a structurally valid file from one that can start the requested service.
Live validation adds network checks without starting a runnable relayer. It checks database access, creates chain clients, confirms that each on-chain client points to the configured counterparty client, and checks that the resolved attestors can satisfy the on-chain quorum. This is the best pre-start check for a new or changed network configuration.
References: cli/…/config.go• L231-302 cli/…/config.go• L459-628 cli/…/config.go• L718-814 cli/…/tls.go• L248-265 cli/…/config_test.go• L17-280 cli/…/tls_test.go• L546-567 cli/…/relayer_test.go• L88-318 link/…/file.go• L15-43 link/…/validate.go• L17-34 link/…/connections.go• L14-54 link/…/quorum.go• L17-40
Connectivity assembly
At startup, Link turns the configuration into a set of connected resources. The build order matters because later services use the earlier resources: chain clients support attestors and relay reads, signers support attestors and transaction submission, and the resolved attestors support proof generation.
Chain clients
The chain client is Link's read view of one network. It connects to the configured HTTP RPC endpoint and binds to the configured ICS26 router. Relaying uses it to find packet events, read commitments, obtain router state proofs at an exact height, and later inspect transaction outcomes. Attestors use it to read block headers and IBC commitments. Live checks use it to read each client's registered counterparty and attestation set.
When a chain has a WebSocket endpoint, the client can stream SendPacket events for auto-relay. HTTP remains the path for ordinary chain reads and for block headers needed to interpret streamed events. Both configured endpoints must identify the configured EVM chain. Link keeps one client per configured chain ID. A request that names an unknown chain cannot be routed to a network, even if its transaction hash or client ID is otherwise valid.
For Besu light-client work, the chain client can read a sealed header at a fixed height or at the latest block. It extracts the validator set and the recovered commit-seal signers from the header, identifies the QBFT or IBFT 2.0 consensus mode, and passes the resulting state to proof and update paths. It also reads the Besu client state and consensus state through the light-client address registered in the ICS26 router.
References: cli/…/client.go• L16-29 cli/…/client.go• L80-99 cli/…/client.go• L103-132 cli/…/client.go• L68-184 cli/…/client.go• L298-347 cli/…/client.go• L646-707 cli/…/besu.go• L19-86 cli/…/header.go• L34-98 cli/…/header_test.go• L22-39 e2e/…/besu.go• L83-110 e2e/…/besu.go• L235-268 e2e/…/besu.go• L508-540 e2e/…/container.go• L25-69 e2e/…/container.go• L71-99 cli/…/lightclient.go• L85-109
Managed EVM test networks
The end-to-end harness provides disposable EVM networks that expose the same HTTP RPC and WebSocket connectivity expected by chain clients. An Anvil or Besu chain carries both a logical chain identity and an EVM chain ID. The harness verifies the chain ID and block progress before it returns the network to tests, so relay checks do not run against a node that only accepts connections but is not ready.
The shared container boundary keeps managed RPC ports on loopback, marks resources with the test run, and retries failed starts with fresh containers. Anvil supplies a fast development network with controlled mining. Besu supplies a QBFT network with a configured block period. Both expose a WebSocket URL for flows that need automatic event discovery.
References: e2e/…/anvil.go• L83-177 e2e/…/anvil.go• L179-189 e2e/…/besu.go• L83-110 e2e/…/besu.go• L235-268 e2e/…/besu.go• L508-540 e2e/…/container.go• L25-69 e2e/…/container.go• L71-99
Service dependencies
The relayer build connects storage, chain clients, signers, attestors, proof generators, transaction builders, and transaction submitters. It then gives the dispatcher the resources needed to turn stored relay work into chain transactions. A local attestor may also run in the same process as the relayer, which is called dual mode.
For each configured client end, proof generation uses the end's chain/client identity and its counterparty end. An attestation end uses the configured attestor set, while a remote end uses its prover-service endpoint. For each unique chain/signer pair, transaction submission uses the chain RPC and the selected signer. Several routes can share one submission path when they use the same pair.
References: cli/…/config.go• L866-885 cli/…/config.go• L793-814 cli/…/relayer.go• L111-124 link/…/bootstrap.go• L36-135 link/…/proofgen.go• L46-130 link/…/txsubmitter.go• L31-90
Operational interfaces
The server address is the process boundary for the relayer API and any local attestor API. The relayer starts its server and its background dispatch loop after storage and network resources are ready. A separate CLI command can use the same configured server address, or an explicit --host, to call relayer operations.
Remote service addresses are separate from the Link server address. Remote attestors expose an attestation API, remote signers expose a signing API, and remote provers expose proof-generation APIs. These services must be reachable from the Link process even when the chain RPC itself is healthy. Their HTTPS settings protect the transport but do not replace endpoint or service-level validation.
References: cli/…/config.go• L81-84 cli/…/config.go• L140-190 cli/…/relayer.go• L112-120 cli/…/tls.go• L140-176 cli/…/tls.go• L19-47 link/…/bootstrap.go• L113-135 link/…/relayer.go• L52-112 link/…/relayer.go• L128-161 link/…/remote.go• L31-68 link/…/remote.go• L47-99
Connectivity flow
The following flow shows how configuration becomes the connected resources used by the relayer and attestor paths.
flowchart TD
A[Config file] --> B[Static and optional live validation]
B --> C[Chain clients]
B --> D[Signer set]
C --> E[Local and remote attestors]
D --> E
C --> F[Proof generators]
E --> F
C --> G[Transaction submitters]
D --> G
F --> H[Relay dispatcher]
G --> H
C --> H
H --> I[ICS26 router on destination chain]
The route begins with a source-chain event. Link reads the event through the source chain client, uses the configured client end and attestors to produce proof data, and submits the resulting call through the destination chain's signer and RPC path. The same chain connections also let the relayer check whether later receive, acknowledgement, or timeout work is complete.
Related systems
This page gives the network view of the wider Link relayer system. Read Link runtime and services for process roles, Link relay execution for packet work, Link deployment and persistence for on-chain setup and stored state, and Link operational observability for service health and metrics.
Change checklist
When these files or sections are changed, remember to consider these:
- When a chain ID or router address changes, update every connection end, chain override, local attestor assignment, and deployment record that refers to the old chain.
- When a client ID or counterparty changes, update both ends of the route and the matching on-chain client registration. Static validation cannot confirm the on-chain pairing.
- When a signer alias or signer type changes, check every connection end, local attestor, and deployer that uses it. EVM transaction paths require an ECDSA signer.
- When an attestor set or quorum changes, update the client's on-chain attestation set and the local or remote entries that supply those signatures.
- When enabling auto-relay on a client end, add a valid WebSocket endpoint to the end's chain. When disabling it, confirm that the route still has the intended packet discovery mode.
- When adding or renaming a local attestor, preserve unique local names and do not reuse one signer for two local attestors on the same chain.
- When
--home, a relative database path, or a relative key path changes, check the effective working directory and the files available under the new home. - When a remote endpoint changes, verify its scheme, gRPC target, TLS files, and reachability from the deployment network. An HTTPS endpoint and its trust settings must change together.
- When a remote certificate or CA bundle rotates, restart Link because TLS files are loaded at startup.
- When a remote endpoint changes, run live validation for chain RPC, attestor discovery, signer setup, and the Link server address from the deployment network.
- When a client type changes between attestation and remote, update its parameters and confirm that the proof service or attestor set matches the new type.
- When deployment rendering changes a chain, connection, or attestor entry, review the reported conflicts and remember that replacement does not retain fields omitted from the rendered entry.
- When a Besu consensus mode changes between QBFT and IBFT 2.0, update the selected light-client contract and confirm that sealed-header proof data matches that mode.
- When an EVM endpoint changes, preserve the chain ID match for both HTTP and WebSocket connections. A WebSocket endpoint used for auto-relay must point to the same network as the HTTP endpoint.
- When managed container startup changes, preserve run labels, safe names, loopback-only port binding, and cleanup after failed attempts so one test run cannot affect another.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A chain has an empty or unreachable RPC endpoint | The chain client or transaction submitter cannot start. | Run structural validation, then ibc config validate --live. |
| An RPC or WebSocket endpoint reports a chain ID different from the configured chain | Link rejects the endpoint and cannot establish a trusted chain client. | Point both endpoints at the configured network and run live validation. |
| Auto-relay is enabled but the source chain has no valid WebSocket endpoint | Link cannot subscribe to the source chain for automatic packet discovery. | Set a ws:// or wss:// endpoint on that chain before enabling auto-relay. |
| The router address does not identify the deployed ICS26 router | Link cannot read packet state or send relay calls to the expected contract. | Check the chain entry against the deployment record and live chain. |
| A route names a missing chain, client, or signer alias | The route has no usable read, proof, or submit path. | Keep all route references in the top-level registries and run validation. |
| A remote client omits its prover-service URL or uses an unknown parameter field | The route cannot create its remote proof path. | Validate the client type and its type-specific parameters before startup. |
| On-chain counterparty data differs from the configured opposite end | Link may refuse live validation and cannot trust the route pairing. | Check both client registrations with live validation. |
| A remote attestor or signer cannot be reached or initialized | Proof quorum or transaction signing fails even when chain RPC works. | Test each remote service from the Link host and run live validation. |
| An HTTPS service has a missing, malformed, expired, or mismatched TLS file | Link rejects the remote connection before it can query or sign. | Validate the TLS block and rotate all matching files before restart. |
| A TLS block is attached to a plaintext endpoint | Configuration fails instead of silently ignoring the security settings. | Use https:// when TLS settings are present. |
| Server verification is disabled without a controlled reason | Link can accept an untrusted remote service. | Use a CA bundle or system roots in production; reserve insecureSkipVerify for development. |
| A Besu header has unsupported consensus data or no seal that recovers to a validator | Link cannot produce the header form or light-client update needed for that chain. | Use a supported QBFT or IBFT 2.0 network and keep its light-client contract aligned with the network. |
| An EVM relay signer is not ECDSA, or the chain lacks EIP-1559 support | Link cannot construct or sign the relay transaction. | Use an ECDSA signer and a chain with a usable base fee. |
The server listener is not a valid host:port address | The relayer or attestor API does not start. | Validate server.listenAddr before deployment. |
| A YAML field is misspelled or uses an unsupported name | Configuration loading fails instead of applying the intended value. | Use the shipped field names and validate the complete file after edits. |
| A deployment patch replaces an entry with incomplete data | Previously configured fields such as an RPC or WebSocket endpoint are lost. | Review conflicts and carry required fields into the rendered entry before populating the file. |
| A managed EVM node reports the wrong chain ID or does not advance blocks | The harness rejects the network, so relay tests cannot establish a trusted chain connection. | Match the requested EVM chain ID and wait for verified block progress before use. |
| A managed container cannot start after its retry budget is used | The test environment has no usable RPC or WebSocket endpoint. | Keep failed containers removable and inspect the startup error and node logs. |
Key files
| File | Why to read it |
|---|---|
| cli/…/config.go | Defines the shared chain registry, service references, file loading, and cross-reference checks. |
| cli/…/flags.go | Defines the home and config path relationship used by CLI commands. |
| cli/…/relayer.go | Defines bidirectional client ends, route identity, auto-relay settings, remote prover parameters, and per-chain relay overrides. |
| cli/…/tls.go | Defines the shared TLS and remote endpoint rules for attestors, signers, and provers. |
| cli/…/tls.go | Defines how configured HTTP(S) service addresses become gRPC targets. |
| cli/…/file.go | Defines environment expansion, strict YAML decoding, local key path checks, and safe config writes. |
| cli/…/patch.go | Defines how deployment-produced chain, connection, and attestor data merges into the current configuration. |
| cli/…/patch_test.go | Shows the merge contract for new, equal, changed, local, and remote entries. |
| cli/…/errors.go | Defines the config paths attached to validation errors so operators can locate invalid values. |
| cli/…/ibc.yml | Shows the operator-facing shape for EVM chains, routes, auto-relay, attestors, signers, and the current packet batch override example. |
| cli/…/sample.yml | Provides a complete configuration example used to check chain, route, attestor, and signer relationships. |
| cli/…/client.go | Shows the chain-independent read contract and the one-client-per-chain registry. |
| cli/…/client.go | Shows the EVM network boundary around RPC, WebSocket event discovery, proofs, and the ICS26 router. |
| cli/…/besu.go | Shows how the EVM client reads Besu headers and light-client state through the router. |
| cli/…/revert.go | Explains relay failures returned by the EVM contracts in terms that operators can use. |
| cli/…/doc.go | Defines the Besu package boundary for header data, storage paths, and light-client payloads. |
| cli/…/consensus.go | Defines the Besu consensus modes and their matching light-client contracts. |
| cli/…/header.go | Shows how sealed Besu headers become verified light-client update data. |
| cli/…/header_test.go | Shows the accepted and rejected header-seal cases for both Besu consensus modes. |
| cli/…/fixture.go | Defines the shared fixture shape for live Besu headers, proofs, and rejected updates. |
| cli/…/ibft2.json | Provides the IBFT 2.0 header and proof fixture used by the Besu contract and CLI tests. |
| cli/…/qbft.json | Provides the QBFT header and proof fixture used by the Besu contract and CLI tests. |
| cli/…/lightclient.go | Shows Besu light-client payload encoding and contract state access. |
| cli/…/proof.go | Shows the chain proof data Link obtains from an EVM node. |
| link/…/bootstrap.go | Shows how configured resources become a runnable relayer or attestor process. |
| link/…/resolve.go | Shows how local and remote attestor entries become usable attestors. |
| link/…/validate.go | Shows the network checks available before process startup. |
| link/…/proofgen.go | Shows how route client ends connect to attestors and proof generators. |
| link/…/txsubmitter.go | Shows how chain/signer pairs become transaction submission paths. |
| link/…/deploy.go | Shows how deployment manifests become a patch and how conflicts are surfaced before config population. |
| e2e/…/anvil.go | Shows how the fast managed EVM network exposes RPC and WebSocket connectivity and verifies readiness. |
| e2e/…/besu.go | Shows how the QBFT managed EVM network exposes endpoints and verifies chain identity and block progress. |
| e2e/…/container.go | Shows the shared container boundary for retries, cleanup, labels, names, and loopback-only ports. |
| link/…/configuration.md | Provides the operator-facing configuration reference and example YAML. |