Search Docs...

Search Docs...

For Infrastructure Operators

Relayers

Set up Hermes Relayer

How to set up a Hermes Relayer

Prerequisites:

Linux

Make sure your system is updated and has the required dependencies installed:

sudo apt-get update sudo apt-get upgrade -y sudo apt-get install -y build-essential curl wget pkg-config libssl-dev libclang-dev git

Install Rust

First, ensure that Rust is installed on your system. This is necessary to compile Hermes:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env

Hermes

Clone the Hermes repository:

git clone https://github.com/informalsystems/ibc-rs cd ibc-rs

Build Hermes:

cargo build --release --bin hermes

Move the Hermes binary to your PATH:

sudo mv target/release/hermes /usr/local/bin/

Configuration

Create configuration directory:

mkdir -p ~/.hermes

Create configuration file:

nano ~/.hermes/config.toml

Here is an example of a configuration file for relaying between Stride and Osmosis. You will need to edit your configuration to fit your use case, including updating the addresses of your node RPC, GRPC, and websocket:

[global]
log_level = 'info'
[chains.stride]
id = 'stride-1'
rpc_addr = 'http://localhost:26657'
grpc_addr = 'http://localhost:9090'
websocket_addr = 'ws://localhost:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'stride'
key_name = 'relayer-key'
store_prefix = 'ibc'
gas_price = { denom = 'ustrd', amount = 0.025 }
max_gas = 200000
trusting_period = '14days'
[chains.counterparty]
id = 'osmosis-1'
rpc_addr = 'http://osmosis-node:26657'
grpc_addr = 'http://osmosis-node:9090'
websocket_addr = 'ws://osmosis-node:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'osmo'
key_name = 'relayer-key'
store_prefix = 'ibc'
gas_price = { denom = 'uosmo', amount = 0.025 }
max_gas = 200000
trusting_period = '14days'

Create relayer keys. Don’t forget to backup the mnemonic that’s provided:

hermes keys add stride-1 --hd-path "m/44'/118'/0'/0/0"
hermes keys add osmosis-1 --hd-path "m/44'/118'/0'/0/0"

Start Hermes:

hermes start

Stride Labs

Last updated:

8/30/24

Stride Labs

Last updated:

8/30/24