Celestia uses IBC (Inter-Blockchain Communication protocol) to enable cross-chain transfer of tokens. To support this capability it relies on relayers, processes that can be run by anyone which constantly scan for outbound packets on one chain and submits these packets alongside corresponding proofs on the destination chain. This section briefly describes how one can setup a relayer. There are two standard implementations:
- Hermes built in Rust
- Go Relayer built in Go
For this guide, we will look just at Hermes.
- Download the latest version of the binary from Releases.
- Create the directory for the binary:
mkdir -p $HOME/.hermes/bin
- Extract the binary:
tar -C $HOME/.hermes/bin/ -vxzf $ARCHIVE_NAME
PATHto point to the binary, either in
You should now have it installed:
> hermes version
Hermes uses a
config.toml file to instruct the process.
This should be placed in
You can try to do this automatically by typing the command:
hermes config auto --chains cosmoshub testnets/celestiatestnet --output $HOME/.hermes/config.toml
This takes information from the chain-registry.
If the information is not there, you will have to enter it
manually by opening the
config.toml. You can read the
self-documented example here.
You will be required to find RPC and gRPC endpoints.
Next step is to add keys for the accounts that will be paying the fees to transfer the tokens across. Assuming you have an existing account with a known mnemonic, you can simply save the words into a file:
echo word1 ... word12or24 > mnemonic_file
Next, run the following:
hermes keys add --chain blockspacerace-1 --mnemonic-file mnemonic_file
You can confirm the keys by executing:
hermes keys list --chain blockspacerace-1
Make sure you have added the keys and have sufficient funds for each chain you are relaying across.
Now, you should be able to start the process. As a quick sanity check, first run
hermes config validate
Then begin by running
As with other processes, you can use
systemd to manage
hermes in the background. For more information on setting
channels, use the
command within the cli or refer to Hermes website.
The Celestia state machine is built with the IBC transfer
module, allowing for the native celestia token to be
transferred to any other IBC enabled chain. Transfer can
be initialized through the
celestia-appd CLI. Information
can be found via the help label as follows:
celestia-appd tx ibc-transfer transfer --help
The transfer module uses a token filter middleware which serves to prevent non-native Celestia tokens from being on Celestia. If a user is to try to send a token from another chain across, it will be simply rejected and the token returned back to the user.