🌅
Sunrise / Gluon Docs
  • Home
    • 👋Sunrise
  • 📜Learn
    • 🌆Sunrise
      • Proof of Liquidity
      • Fee Abstraction
      • Data Availability
      • Gauges Voting
      • Liquidity Pool
      • Liquidity Incentive
      • Swap
      • TokenConverter
      • Fee
      • Lockup Account
      • Bribes
    • 💴$RISE
      • Allocations
    • 🏦Gluon
    • 💴$GLU
    • 🎓Thesis
      • App chain thesis
      • Interoperability
  • 🛠️Build
    • 🚀Quick Start
    • Client
    • L2 Blockchains
      • Rollkit
        • Sunrise Data
        • Rollkit L2 Chain
      • OP Stack
        • Sunrise Data
        • OP Stack L2 Chain
    • Validators
      • Proof of Data Availability
      • Self Delegation
  • 🏗️Run a Sunrise Node
    • Networks
    • Types of Nodes
      • Consensus
        • Full Consensus Node
        • Validator Node (Genesis)
        • Validator Node
        • Setup Cosmovisor
      • IBC Relayers
    • Resources
      • Upgrade
      • Environment
  • 🏗️Run a Gluon Node
    • Networks
    • Node
      • Validator Node
  • 🔗Links
    • GitHub
    • Discord
    • X (Twitter)
    • Medium
    • dev.to
  • 📓Deprecated (UnUniFi)
    • IBC Channels
    • Security
    • CosmWasm
      • Tutorial
      • Create Project
    • IYA Strategy
      • Interface
      • External CosmWasm chain with IBCHooks
      • External EVM chain with Axelar
    • Frontend
      • Cosmos Client TS
    • Resources
    • Setup ununifid
    • ununifid
      • Basic Commands
      • Module Commands
        • wasm
    • Build a Node
    • Build a Validator Node
    • Setup Cosmovisor
    • Mainnet Upgrades
    • IBC Relayer
Powered by GitBook
On this page
  • Setting up relayer with Go relayer (Deprecated)
  • Setting up relayer with Rust relayer Hermes (Recommended)
  • Setup accounts
  • Configuration file
  • Setting up daemon
  • Monitoring daemon
  1. Run a Sunrise Node
  2. Types of Nodes

IBC Relayers

PreviousSetup CosmovisorNextResources

Last updated 8 months ago

By setting up the IBC relayer, you can create new connections and channels of IBC between Sunrise and other blockchains.

Setting up relayer with Go relayer (Deprecated)

You can see details .

First, install

Setting up relayer with Rust relayer Hermes (Recommended)

You can see details .

First, install

Then, run the commands below:

sudo apt update && sudo apt upgrade -y
sudo apt install librust-openssl-dev build-essential git -y

cargo install ibc-relayer-cli --bin hermes --locked
hermes version

echo word1 ... word12or24 > ~/mnemonic.txt

Setup accounts

First, you need a wallet with enough funds on both chains. This tutorial assumes that you already have wallets created on the chains you want to relay on, and that these wallets have funds allocated to each of them.

hermes keys add --key-name <user-name> --chain <ibc-0> --mnemonic-file mnemonic.txt
hermes keys add --key-name <user-name> --chain <ibc-1> --mnemonic-file mnemonic.txt

Configuration file

hermes config auto --output $HOME/.hermes/config.toml --chain <ibc-0>:<key-ibc-0> <ibc-1>:<key-ibc-1> --chain

Add a new relay path

The following settings are not required for mainnets that already have an established IBC channel. Follow only if you are starting a new connection.

  • Create a connection

First, create a client on ibc-1 tracking the state of ibc-0. It will be assigned 07-tendermint-0 as its identifier:

hermes create client --host-chain <ibc-1> --reference-chain <ibc-0>
  • Create a connection

After creating clients on both chains, you have to establish a connection between them. Both chains will assign connection-0 as the identifier of their first connection:

hermes create connection --a-chain <ibc-0> --b-chain <ibc-1>

If the command runs successfully, it should output the connection ID.

  • Channel identifiers

Finally, after the connection has been established, you can now open a new channel on top of it. Both chains will assign channel-0 as the identifier of their first channel:

hermes create channel --a-chain <ibc-0> --a-connection <connection-id> --a-port transfer --b-port transfer

If the command runs successfully, it should output the channel IDs of both chains.

Add these to .hermes/config.toml

[chains.packet_filter]
policy = "allow"
list = [[
    "transfer",
    "channel-0",
]]

Once the configuration is complete, you can start the relayer with the following command.

hermes start

Setting up daemon

Recommend setting SystemD to run automatically after reboot.

sudo tee /etc/systemd/system/hermes.service > /dev/null <<EOF
[Unit]
Description=Hermes Relayer Service
After=network-online.target

[Service]
User=ubuntu
ExecStart=/usr/local/bin/hermes start
Restart=on-failure
RestartSec=3
LimitNOFILE=1400000

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable hermes
sudo systemctl daemon-reload
sudo systemctl start hermes

Monitoring daemon

journalctl -u hermes.service -f

The command hermes config auto provides a way to automatically generate a configuration file for chains in the :

You must set each parameter yourself for the testnet. See the for more details.

🏗️
here
Go
here
Rust
chain-registry
documentation