Initia (Closed Testnet)
  • Reminder
    • ⛔Confidentiality Disclaimer
  • WELCOME TO CLOSED TESTNET
    • Welcome to Closed Testnet
  • About Initia
    • What is the Initia Platform?
      • Architecture
        • Layer 1
        • Layer 2
      • Aligning Initia (coming soon!)
    • InitiaDEX
    • Enshrined Liquidity and Staking
  • Developers
    • Initiad
      • Download Initiad
      • Using Initiad
    • Get INIT token
    • Build your own Minitia
      • Simple Minitia Setup
      • Connect Minitia to L1
        • OPinit Stack
          • OPinit Module
          • OPinit Bots
        • Relayer
          • Fetching Oracle Prices
    • Virtual Machines
      • MoveVM
        • Interact with CLI
      • WasmVM
    • Contracts
      • Move Contracts
      • CosmWasm Contracts
      • EVM Contracts (Coming Soon)
    • Oracles
  • Initia Developer Tutorials
    • 1. Create account
    • 2. Send Move coin
    • 3. Interchain Message
    • 4. Create your own Move coin
    • 5. Create your own Move NFT
    • 6. Build and Publish Contracts
      • Move Module
      • CosmWasm Contract
  • Core Applications
    • Core Applications
      • Wallet
      • Initia App
      • Usernames
      • Initia Scan
  • Node Operators
    • Running Initia Node
      • Prerequisites
      • Oracle
      • Boot an Initia Node
      • Connect to Initia Network
      • Cosmovisor Guide
    • Configuring Initia Validator
  • References and Tools
    • Move Language
    • Rust Language (CosmWasm)
    • Closed Testnet Chain Information
    • Chain Parameters
    • Initia.js
    • API Docs
    • API Docs (minimove)
    • API Docs (miniwasm)
    • Whitelisted Tokens and Pairs
Powered by GitBook
On this page
  • Hermes
  • Prerequisites
  • Clone Repository
  • Install and Setup Hermes
  • Update Chain Configs
  • Create Relayer Key
  • Channel transfer channel
  • Start Hermes
  1. Developers
  2. Build your own Minitia
  3. Connect Minitia to L1

Relayer

PreviousOPinit BotsNextFetching Oracle Prices

Last updated 1 year ago

Relayers are in charge of delivering and tracking packets.

Hermes

Prerequisites

  • Rust 1.72 +

Clone Repository

Open a terminal and clone Hermes repository.

git clone https://github.com/informalsystems/hermes.git

Change to the repository directory.

cd hermes

Install and Setup Hermes

cargo install --path ./crates/ibc-relayer-cli

# check installed herems
hermes --version

# create working directory for herems
mkdir ~/.hermes

# copy default config.toml to working directory
cp ./config.toml ~/.hermes/config.toml

Update Chain Configs

Append following chain configs to ~/.hermes/config.toml and remove pre-existing ibc-0 & ibc-1 chain configs. You need to replace all config sections with <> to real values.

You are highly recommended to use your own RPC endpoints for both l1 and l2.

...

[[chains]]
id = '<l1-chain-id>' # mahalo-1
type = "CosmosSdk"
rpc_addr = '<l1-rpc-endpoint>' # https://rpc.mahalo-1.initia.xyz (mahalo-1)
grpc_addr = '<l1-grpc-endpoint>' # http://34.143.171.2:9090 (mahalo-1)
event_source = { mode = 'push', url = '<l1-websocket-endpoint>', batch_delay = '500ms' } # wss://rpc.mahalo-1.initia.xyz/websocket (mahalo-1)
rpc_timeout = '10s'
trusted_node = false
account_prefix = 'init'
key_name = 'relayer'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3000000
gas_price = { price = 0.15, denom = 'uinit' }
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '10s'
address_type = { derivation = 'cosmos' }

[[chains]]
id = '<l2-chain-id>' # $L2_CHAIN_ID
type = "CosmosSdk"
rpc_addr = '<l2-rpc-endpoint>' # http://127.0.0.1:26657
grpc_addr = '<l2-grpc-endpoint>' # http://127.0.0.1:9090
event_source = { mode = 'push', url = '<l2-websocket-endpoint>', batch_delay = '500ms' } # ws://127.0.0.1:26657/websocket
rpc_timeout = '10s'
trusted_node = false
account_prefix = 'init'
key_name = 'relayer'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3000000
gas_price = { price = 0.15, denom = '<denom>' } # $DENOM
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
# this should be configured as `2 * create_empty_blocks_interval`
# in your ~/.minitia/config/config.toml
max_block_time = '2m0s' 
address_type = { derivation = 'cosmos' }

Create Relayer Key

You need to fund the relayer account before setting the keys on both L1 and L2.

# create temporal keyfile for herems
echo "relayer mnemonic" > mnemonic.key

# add relayer key for the chains
hermes keys add --key-name relayer --chain $L1_CHAIN_ID --mnemonic-file ./mnemonic.key
hermes keys add --key-name relayer --chain $L2_CHAIN_ID --mnemonic-file ./mnemonic.key

rm ./mnemonic.key

Channel transfer channel

# create channel with clients and connections
# tooks 5 minutes (send any tx to boost)
hermes create channel \
  --a-chain $L1_CHAIN_ID \
  --b-chain $L2_CHAIN_ID \
  --a-port transfer \
  --b-port transfer \
  --new-client-connection 

SUCCESS Channel {
    ...
}

Start Hermes

hermes start

IBC