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:
Build the Go relayer:
If you run into any errors during installation, you can install without make
like so:
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:
rly chains add
will check the liveliness of the available RPC endpoints for that chain in the chain registry. The command may fail if none of these RPC endpoints are available. In this case, you will want to manually add the chain config.
Create wallet keys
Create new keys for the relayer to use when signing and relaying transactions:
Query your key balances:
Then, dit the relayer's key
values in the config file to match the key-name
s 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.
There is one easy command to get this path information - from the interchain folder in the Go relayer repository:
Update your config file like so to use a configuration path that has been tested in production:
Alternatively, you can also create your own path like so:
If you create your own path, be sure to add your transfer channels to the channel filters in the config.yaml
like so:
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:
In case one of the checks receives a β
instead of β
, you will need to check if you completed all the previous steps correctly.
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