Skip to main content

Run an IBC Relayer

What is an IBC Relayer?

An IBC relayer is a software component that facilitates communication between two distinct blockchain networks that support the Inter-Blockchain Communication (IBC) protocol. The IBC protocol is a standard for the secure and reliable transfer of digital assets and data across different blockchain networks. An IBC relayer is responsible for relaying IBC packets, which are used to send messages and data between two different blockchain networks. It receives packets from one chain, verifies their authenticity and validity, and then relays them to the receiving chain.

Minimum Requirements

  • 8 core (4 physical core), x86_64 architecture processor
  • 32 GB RAM (or equivalent swap file set up)
  • 1 TB+ nVME drives
If running many nodes on a single VM, ensure your open files limit is increased.

Prerequisites

Before beginning, ensure you have an HyperPaxeer node running in the background of the same machine that you intend to relay on. Follow this guide to set up an HyperPaxeer node if you have not already. In this guide, we will be relaying between HyperPaxeer (channel-3) and Cosmos Hub (channel-292). When setting up your HyperPaxeer and Cosmos full nodes, be sure to offset the ports being used in both the app.toml and config.toml files of the respective chains (this process will be shown below). In this example, the default ports for HyperPaxeer will be used, and the ports of the Cosmos Hub node will be manually changed.

HyperPaxeer Daemon Settings

First, set grpc server on port 9090 in the app.toml file from the $HOME/.hyperpaxd/config directory:
Then, set the pprof_laddr to port 6060, rpc laddr to port 26657, and prp laddr to 26656 in the config.toml file from the $HOME/.hyperpaxd/config directory:

Cosmos Daemon Settings

First, set grpc server to port 9090 in the app.toml file from the $HOME/.gaiad/config directory:
Then, set the pprof_laddr to port 6062, rpc laddr to port 26757, and prp laddr to 26756 in the config.toml file from the $HOME/.gaiad/config directory:

Install Rust Dependencies

Install the following rust dependencies:

Build & Setup Hermes

Create the directory where the binary will be placed, clone the hermes source repository, and build it using the latest release.
Make the hermes config and keys directory, and copy config.toml to the config directory:
Check the hermes version and configuration directory setup:
Edit the hermes configuration (use ports according the port configuration set above, adding only chains that will be relayed):
Add your relayer wallet to Hermes’ keyring (located in $HOME/.hermes/keys) The best practice is to use the same mnemonic over all networks. Do not use your relaying-addresses for anything else, because it will lead to account sequence errors.
Ensure this wallet has funds in both HyperPaxeer and ATOM in order to pay the fees required to relay.

Final Checks

Validate your hermes configuration file:
Perform the hermes health-check to see if all connected nodes are up and synced:
When your nodes are fully synced, you can start the hermes daemon:
Watch hermes’ output for successfully relayed packets, or any errors. It will try and clear any unrecieved packets after startup has completed.

Helpful Commands

Query hermes for unrecieved packets and acknowledgements (ie. check if channels are “clear”) with the following:
Query hermes for packet commitments with the following:
Clear the channel (only works on hermes v0.12.0 and higher) with the following:
Clear unrecieved packets manually (experimental, will need to stop hermes daemon to prevent confusion with account sequences) with the following: