Special thanks to Confuzerpy and goooodnes from Let's encrypt community
in this guide we will using ibc between kichain-t-4 and testnet-croeseid-4
1. Install the latest ibc relayer from the official repo
Once relayer installed check the relayer version. In my case it was 0.9.3 version
rly version
version: v0.9.3
commit: 4b81fa59055e3e94520bdfae1debe2fe0b747dc1
cosmos-sdk: v0.42.4
go: go1.15.11 linux/amd64
rly config init
cd && mkdir relayer_config && cd relayer_config
Create config for the kichain-t-4 network
nano ki_config.json
{
"chain-id": "kichain-t-4",
"rpc-addr": "http://127.0.0.1:26657",
"account-prefix": "tki",
"gas-adjustment": 1.5,
"gas-prices": "0.025utki",
"trusting-period": "48h"
}
Create config for the croeseid testnet network
- note in my case i configured my croeseid testnet to operate with port 26552. Your port might be different!
nano cro_config.json
{
"chain-id": "testnet-croeseid-4",
"rpc-addr": "http://127.0.0.1:26652",
"account-prefix": "tcro",
"gas-adjustment": 1.5,
"gas-prices": "0.025basetcro",
"trusting-period": "48h"
}
rly chains add -f ki_config.json
rly chains add -f cro_config.
- Notice in my case im using key name kichain_key and cro_key. You can specify watever you want name.
rly keys add kichain-t-4 kichain_key
rly keys add testnet-croeseid-4 --coin-type 1 cro_key
- We using coin type 1 when generating croeseid wallet because croesseid using DIFFERENT hd path!
rly keys restore kichain-t-4 kichain_key "MNEMONIC"
rly keys restore "testnet-croeseid-4" cro_key --coin-type 1 "MNEMONIC"
rly keys list kichain-t-4
key(0): kichain_key -> tki1__YOUR_WALLET
rly keys list testnet-croeseid-4
key(0): cro_key -> tcro__YOUR_WALLET
rly chains edit kichain-t-4 key kichain_key
rly chains edit testnet-croeseid-4 key cro_key
nano ~/.relayer/config/config.yaml
Find the line timeout: 10s
and replace to timeout: 10m
- If you dont have funds. Claim some through faucet.
Under kichain testnet-challenge channel you will find faucet thread.
rly q balance kichain-t-4
10000000utki
rly q balance testnet-croeseid-4
100000000basetcro
rly light init kichain-t-4 -f
rly light init testnet-croeseid-4 -f
rly paths generate kichain-t-4 testnet-croeseid-4 transfer --port=transfer
Note this command might take some time. If you have some errors try to repeat several times. Creating channel from croeseid to kichain
rly tx link transfer
If operation completes successfull the otput of the last line should be like:
★ Channel created: [kichain-t-4]chan{channel-45}port{transfer} -> [testnet-croeseid-4]chan{channel-18}port{transfer}
rly paths list -d
0: transfer -> chns(✔) clnts(✔) conn(✔) chan(✔) (kichain-t-4:transfer<>testnet-croeseid-4:transfer)
In our service file we are using rly tx link-then-start transfer --timeout 30s
command.
First it will link our channel and then relayer will immediately started with timeout 30 seconds.
sudo tee /etc/systemd/system/rlyd.service > /dev/null <<EOF
[Unit]
Description=relayer service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which rly) tx link-then-start transfer --timeout 30s
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Start rlyd daemon
sudo systemctl daemon-reload
sudo systemctl enable rlyd
sudo systemctl start rlyd
From croeseid to kichain
rly tx transfer testnet-croeseid-4 kichain-t-4 1000000basetcro $(rly chains address kichain-t-4) --path transfer
The output should be:
From kichain to croeseid
rly tx transfer kichain-t-4 testnet-croeseid-4 666000utki $(rly chains address testnet-croeseid-4) --path transfer
The output should be:
Example of txs from kichain to croeseid:
E929A4C1FB860F7850B18E5C0F43E60C5D4434A066428B06C872D0640214F1DA
6A4E115EF029501FEA54CABA2A0A05D306216422D8D62A0A5BCB667953FA5D3F
E1B62CC37BF895CFB7B74944D1B8BB9C9AF403158F65EB6F55318AA25BD93BF6
B52FBC271B4D7D070ED30B81614A74DABA350D6C7CF2B32BF022EA751EF28479
05803A35AE80361ABBC76C239CA8F9DB3B118138CB7B13492312D37AFD48D1C3
Example of txs from croeseid to kichain:
6E76A5BC2C14113AA231E4BE27C64252F2C00B19E7BDA3C8606F68D80F72AD0D