Overview
This page covers the configuration and operation of the IBC v2 Relayer. For more information on the IBC v2 Relayer, see the IBC v2 Relayer overview or the IBC v2 Relayer repository.About
The relayer delivers IBC packets between connected chains. The relayer is request-driven: it does not watch for new packets automatically. A client submits a source transaction hash; the relayer reads IBC events from that transaction, fetches attestation proofs from the Proof API, and submits the relay transaction to the destination chain. The relayer has three components:- gRPC API server — accepts relay requests and status queries; also serves
GET /healthon the same port - Postgres database — persists packet state; migrations must be applied before the relayer starts
- Relay dispatcher — polls the database and submits RecvPacket / Ack / Timeout transactions
Configuration
The relayer is configured via a YAML file. Below is the config used in the Cosmos ↔ EVM Interoperability Tutorial, derived fromibc/relayer-config.yml.tmpl. It shows the relayer configuration between a Cosmos and Besu chain:
counterparty_chains: It is important to note this field. It maps each IBC client ID on a chain to the chain ID it tracks. The relayer only relays packets for clients listed here, and any unlisted client ID is ignored.
Local signing keys
Setsigning.keys_path to a JSON file keyed by chain ID. The format follows config/local/ibcv2keys.json.example in the ibc-relayer repository:
- EVM: hex-encoded ECDSA private key — use any standard wallet or key generation tool
- Cosmos: hex-encoded secp256k1 private key — create with your chain binary, then export:
keys.json. The address on each chain must be funded with enough balance to pay transaction fees.
For production key management, see Remote Signing in the relayer README.
Getting started
To start the relayer, clone the ibc-relayer repository and follow the instructions below for local development. Refer to the relayer README for full setup details.Prerequisites
- Running Proof API
- Postgres with migrations applied (see Database migrations)
- RPC endpoints for both chains
- A funded signing key on each chain
Starting the relayer
For local development, the full startup sequence from the ibc-relayer repo is:- Start Postgres
- Build the binary and apply database migrations
- Create a local config file (see the Configuration section).
- Create a local keys file (see the Local Signing section).
- Start the relayer
- gRPC API server on the address configured in
relayer_api.address - Prometheus metrics server on the configured address
- Relay dispatcher polling for new transfers
CLI flags and subcommands
| Flag | Default | Description |
|---|---|---|
--config | ./config/local/config.yml | Path to relayer config file |
--ibcv2-relaying | true | Enable or disable the relay dispatcher |
--db-migrate | false | Apply pending database migrations before starting the relayer |
| Subcommand | Description |
|---|---|
migrate | Apply pending database migrations and exit (does not start the relayer) |
Database migrations
Migrations are compiled into the relayer binary and applied by the relayer itself. There are two modes: One-shot (recommended for production — apply migrations and exit, then start the relayer separately):Triggering a relay
These commands require both chains to be connected (IBC clients created) and the relayer running. Example command to submit a transaction for relaying:packetStatuses array:
state will be one of TRANSFER_STATE_UNKNOWN, TRANSFER_STATE_PENDING, TRANSFER_STATE_COMPLETE, or TRANSFER_STATE_FAILED. ackTx and timeoutTx are also present once those legs complete.
Ports
| Port | Protocol | Config key | Purpose |
|---|---|---|---|
| 3000 | gRPC + HTTP | relayer_api.address | Relay/Status API and /health |
| 9100 | HTTP (Prometheus) | metrics.prometheus_address | Metrics scrape endpoint |
Observability
The relayer exposes Prometheus metrics at the address set inmetrics.prometheus_address. Scrape it with any standard Prometheus-compatible collector: