A guide to setting up a relayer service using Hermes (ibc-rs)

Connection Targets

Seinami (atlantic-1)

Menkar (deweb-testnet-1)

Configure Hermes Relayer Binary

Dependencies

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

Download Hermes Binary

wget <https://github.com/informalsystems/ibc-rs/releases/download/v0.15.0/hermes-v0.15.0-x86_64-unknown-linux-gnu.zip>

sudo apt install unzip
unzip hermes-v0.15.0-x86_64-unknown-linux-gnu.zip
sudo mv hermes /usr/local/bin
rm hermes-v0.15.0-x86_64-unknown-linux-gnu.zip

hermes version
hermes 0.15.0+4e83aae

Create a hermes config

mkdir $HOME/.hermes
cd $HOME/.hermes
nano config.toml

To relay packets, we need two chains that support the IBC protocol.This guide assumes the nodes on the source and destination chains have been setup. For demonstration purposes we’ll be using Deweb’s Menkar testnet (deweb-testnet-1) as the source chain and Sei’s Senami testnet (atlantic-1) as the remote chain. The relayer is installed on a separate remote instance.

Example config

[global]
log_level = 'trace'

[mode]

[mode.clients]
enabled = true
refresh = true
misbehaviour = true

[mode.connections]
enabled = false

[mode.channels]
enabled = false

[mode.packets]
enabled = true
clear_interval = 100
clear_on_start = true
tx_confirmation = true

[rest]
enabled = false
host = '127.0.0.1'
port = 3000

[telemetry]
enabled = false
host = '127.0.0.1'
port = 3001

[[chains]]
id = 'atlantic-1'
rpc_addr = 'http://<sei-node-ip>:26657'
grpc_addr = 'http://<sei-node-ip>:9090'
websocket_addr = 'ws://<sei-node-ip>:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'sei'
key_name = 'testkey'
address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'
default_gas = 200000
max_gas = 400000
gas_price = { price = 0.001, denom = 'usei' }
gas_adjustment = 1.0
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '30s'
trusting_period = '1day'
trust_threshold = { numerator = '1', denominator = '3' }
memo_prefix = 'Lydia Labs Relayer'

[[chains]]
id = 'deweb-testnet-1'
rpc_addr = 'http://<deweb-node-ip>:26657'
grpc_addr = 'http://<deweb-node-ip>:9090'
websocket_addr = 'ws://<deweb-node-ip>:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'deweb'
key_name = 'testkey'
store_prefix = 'udws'
default_gas = 100000
max_gas = 400000
gas_price = { price = 0.001, denom = 'udws' }
gas_adjustment = 0.1
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '30s'
trusting_period = '1day'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }

Full example: https://hermes.informal.systems/example-config.html