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
Copy sudo apt update && sudo apt upgrade -y
Install dependencies
Copy sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils ncdu git jq liblz4-tool -y
Install go
Copy 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
Copy 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
Copy rly config init --memo "My custom memo"
Config app
Set chains
Copy 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
Copy rly keys restore gaia default "mnemonic words here"
rly keys restore stride default "mnemonic words here"
Check balance
Copy rly q balance gaia
rly q balance stride
Change paths
Copy # 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
Verify that you have a healthy RPC address.
If
Copy -> chns(✔) clnts(✔) conn(✔)
Create service
Copy 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
Copy sudo systemctl daemon-reload
sudo systemctl enable rlyd
sudo systemctl restart rlyd && sudo journalctl -u rlyd -f
Last updated 4 months ago