IBC Relaying with Go Relayer
Learn how to run the Go relayer to create a transfer channel between any Cosmos chain and Secret Network.
Overview
The Go relayer is a relayer implementation written in Golang. It can create clients, connections, and channels, as well as relay packets and update and upgrade clients.
In order to use Secret Network's IBC Developer Toolkit, you need an IBC transfer channel established between Secret Network and your Cosmos chain.
In this section, you will learn:
How to get started with the Go relayer.
Basic Go relayer commands.
How to create a transfer channel between Secret Network testnet and Neutron testnet.
Let's get started! π
Installing Go Relayer
Clone the Go relayer repository:
git clone https://github.com/cosmos/relayer.gitInstall Go:
brew install goSet Go path:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/binBuild the Go relayer:
To check that the installation was successful, run:
Which returns:
Configuring Go Relayer
The configuration data is added to the config file, stored at $HOME/.relayer/config/config.yaml by default.
If this is the first time you run the relayer, first initialize the config with the following command:
And check the config with:
Now you are all set to add the chains and paths you want to relay on, add your keys and start relaying. You will set up two testnet chains: Neutron's pion-1 and Secret Network's pulsar-3.
Add chain configs
The rly chains add command fetches chain metadata from the chain registry and adds it to your config file:
Create wallet keys
Create new keys for the relayer to use when signing and relaying transactions:
Query your key balances:
Then, edit the relayer's key values in the config file to match the key-names chosen above.
The configuration data is added to the config file, stored at $HOME/.relayer/config/config.yaml:
Configure path metadata in the config file
You configured the chain metadata, now you need path metadata.
Update your config file like so to use a configuration path that has been tested in production:
Create a relayer path:
Check Configuration Status
Before starting to relay and after making some changes to the config, you can check the status of the chains in the config:
Which returns this output when healthy:
And you can check the status of the paths in the config:
Starting the Relayer
Finally, start the relayer on the desired path. The relayer will periodically update the clients and listen for IBC messages to relay:
Congrats! You are now relaying between Secret Network testnet and Neutron testnet! π
Further reading:
Last updated
Was this helpful?