Lava IBC Relayer Guide


0
  • 8-core (4 physical core), x86_64 architecture processor
  • 32 GB RAM
  • 1 TB+ nVME drives
  • Tested in Ubuntu Server 22.04 / Rocky Linux 8 x64

In this guide, we will create a channel between Lava and Cosmos with Hermes and prepare IBC relayer.

Firstly, we install the full node of both networks, Lava mainnet and Cosmos-hub4, on our server and match the network.

Lava Daemon Settings

First, set grpc server on port 9090 in the app.toml file from the $HOME/.lava/config/app.toml directory:

nano $HOME/.lava/config/app.toml
[grpc]

# Enable defines if the gRPC server should be enabled.
enable = true

# Address defines the gRPC server address to bind to.
address = "0.0.0.0:9090"

Then, set the pprof_laddr to port 6060, rpc laddr to port 26657, and prp laddr to 26656 in the config.toml file from the $HOME/.lava/config directory:

nano $HOME/.lava/config/config.toml
# pprof listen address (https://golang.org/pkg/net/http/pprof)
pprof_laddr = "localhost:6060"
[rpc]

# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://127.0.0.1:26657"
[p2p]

# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:26656"

Cosmos Daemon Settings

First, set grpc server to port 9092 in the app.toml file from the $HOME/.gaia/config directory:

nano $HOME/.gaia/config/app.toml
[grpc]

# Enable defines if the gRPC server should be enabled.
enable = true

# Address defines the gRPC server address to bind to.
address = "0.0.0.0:9092"

Then, set the pprof_laddr to port 6062, rpc laddr to port 36757, and prp laddr to 36756 in the config.toml file from the $HOME/.gaia/config directory:

nano $HOME/.gaia/config/config.toml
# pprof listen address (https://golang.org/pkg/net/http/pprof)
pprof_laddr = "localhost:6062"
[rpc]

# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://127.0.0.1:36757"
[p2p]

# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:36756"

Make the updates and install the necessary packages.

sudo apt update && sudo apt upgrade
  • Install Rust
  • Install Hermes

Make the hermes directory and keysand create config.toml and save this config

mkdir -p $HOME/.hermes
mkdir -p $HOME/.hermes/keys
cd .hermes
nano config.toml

From here you can access the Hermes configuration settings and make settings according to the networks you will use.

After editing the config file, we exit with CTRL X Y enter.

Now, let’s import our wallets for both lava and cosmos. To run IBC relayer, our wallets must have coins from both networks.

# Create mnemonic file for MNEMONIC_A and CHAIN_ID_A
MNEMONIC_A=‘private keys’
CHAIN_ID_A=‘lava-mainnet-1’
sudo tee $HOME/.hermes/${CHAIN_ID_A}.mnemonic > /dev/null <<EOF
${{MNEMONIC_A}
EOF
# Create mnemonic file for MNEMONIC_B and CHAIN_ID_B
MNEMONIC_B=‘private keys’
CHAIN_ID_B=‘cosmoshub-4’
sudo tee $HOME/.hermes/${CHAIN_ID_B}.mnemonic > /dev/null <<EOF
${{MNEMONIC_B}
EOF
# Add keys to Hermes using mnemonic files
hermes keys add --chain ${CHAIN_ID_A} --mnemonic-file $HOME/.hermes/${CHAIN_ID_A}.mnemonic
hermes keys add --chain ${CHAIN_ID_B} --mnemonic-file $HOME/.hermes/${CHAIN_ID_B}.mnemonic
hermes config validate

Now let’s check if Hermes is working correctly. If you get an output like below. The process is complete.

INFO ThreadId(01) using default configuration from '/root/.hermes/config.toml'
INFO ThreadId(01) running Hermes v1.7.4
SUCCESS "configuration is valid"

Let’s open the screen to start Hermes.

screen -S hermes
hermes start

Let’s exit the screen we opened with CTRL A + D and perform the first transfer operation.

hermes tx raw ft-transfer \
  --dst-chain cosmoshub-4 \
  --src-chain lava-mainnet-1 \
  --src-port transfer \
  --src-channel channel-50 \
  --amount 100000000 \
  --denom ulava \
  --receiver <cosmoshub_address> \
  --timeout-height-offset 1000

You successfully received the Txhash. It means that you have successfully completed all steps.

Bu Yazıya Tepkiniz Ne Oldu?
  • 0
    alk_l_yorum
    Alkışlıyorum
  • 0
    be_endim
    Beğendim
  • 0
    d_nceliyim
    Düşünceliyim
  • 0
    be_enmedim
    Beğenmedim

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Bültenimize Katılın

Hemen ücretsiz üye olun ve yeni güncellemelerden haberdar olan ilk kişi olun.