relayer_ibc_go_v.2.0.0

Relayer v.2.0.0

Official documentation:

Setup instructions

In IBC, blockchains do not directly pass messages to each other over the network. This is where relayer comes in. A relayer process monitors for updates on opens paths between sets of IBC enabled chains. The relayer submits these updates in the form of specific message types to the counterparty chain. Clients are then used to track and verify the consensus state.

In addition to relaying packets, this relayer can open paths across chains, thus creating clients, connections and channels.

Install

Update packages

sudo apt update && sudo apt upgrade -y

Install dependencies

sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils ncdu git jq liblz4-tool -y

Install go

ver="1.18.2"
cd $HOME && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export GOROOT=/usr/local/go" >> ~/.bash_profile && \
echo "export GOPATH=$HOME/go" >> ~/.bash_profile && \
echo "export GO111MODULE=on" >> ~/.bash_profile && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

Download and build binaries

git clone https://github.com/cosmos/relayer.git
cd relayer && git checkout v2.0.0-rc3
make install

Default config file location: ~/.relayer/config/config.yaml

Init app

rly config init --memo "My custom memo"

Config app

Set chains

rly chains add --url https://raw.githubusercontent.com/glukosseth/testnet_guide/main/cosmos/usefull_for_cosmos/relayer_ibc_go_v.2.0.0/gaia.json gaia
rly chains add --url https://raw.githubusercontent.com/glukosseth/testnet_guide/main/cosmos/usefull_for_cosmos/relayer_ibc_go_v.2.0.0/stride.json stride

Restore key

rly keys restore gaia default "mnemonic words here"
rly keys restore stride default "mnemonic words here"

Check balance

rly q balance gaia
rly q balance stride

Change paths

# open config.yaml
nano ~/.relayer/config/config.yaml

# change paths in config
paths:
    stride-gaia:
        src:
            chain-id: STRIDE-TESTNET-4
            client-id: 07-tendermint-0
            connection-id: connection-0
        dst:
            chain-id: GAIA
            client-id: 07-tendermint-0
            connection-id: connection-0
        src-channel-filter:
            rule: allowlist
            channel-list:
                - channel-0
                - channel-1
                - channel-2
                - channel-3
                - channel-4

Verify valid chain, client, and connection

rly paths list

Verify that you have a healthy RPC address. If

-> chns(✔) clnts(✔) conn(✔)

Create service

sudo tee /etc/systemd/system/rlyd.service > /dev/null <<EOF
[Unit]
Description=relayer_go
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which rly) start stride-gaia --log-format logfmt --processor events
Restart=on-failure
RestartSec=10
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF

Register and start service

sudo systemctl daemon-reload
sudo systemctl enable rlyd
sudo systemctl restart rlyd && sudo journalctl -u rlyd -f

Last updated