Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(readme): update instruction and script for running rly v0.3.3-v2.5.2-relayer #90

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ sudo systemctl daemon-reload
### Install dymension relayer

```shell
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.3.2-v2.5.2-relayer
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.3.3-v2.5.2-relayer
cd go-relayer && make install
```

Expand Down
22 changes: 20 additions & 2 deletions scripts/ibc/setup_ibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jq --arg rpc "$SETTLEMENT_RPC_FOR_RELAYER" '.value."rpc-addr" = $rpc' $HUB_IBC_C
rly chains add --file "$ROLLAPP_IBC_CONF_FILE" "$ROLLAPP_CHAIN_ID"
rly chains add --file "$HUB_IBC_CONF_FILE" "$SETTLEMENT_CHAIN_ID"

echo -e '--------------------------------- Setting min-loop-duration to 100ms in rly config... --------------------------------'
sed -i.bak '/min-loop-duration:/s/.*/ min-loop-duration: 100ms/' "$RLY_CONFIG_FILE"

echo '# -------------------------------- creating keys ------------------------------- #'
rly keys add "$ROLLAPP_CHAIN_ID" "$RELAYER_KEY_FOR_ROLLAPP"
rly keys add "$SETTLEMENT_CHAIN_ID" "$RELAYER_KEY_FOR_HUB"
Expand Down Expand Up @@ -105,15 +108,30 @@ echo '# -------------------------------- creating IBC link ---------------------

rly paths new "$ROLLAPP_CHAIN_ID" "$SETTLEMENT_CHAIN_ID" "$RELAYER_PATH" --src-port "$IBC_PORT" --dst-port "$IBC_PORT" --version "$IBC_VERSION"

rly tx link "$RELAYER_PATH" --src-port "$IBC_PORT" --dst-port "$IBC_PORT" --version "$IBC_VERSION"
rly tx link "$RELAYER_PATH" --src-port "$IBC_PORT" --dst-port "$IBC_PORT" --version "$IBC_VERSION" --max-clock-drift 70m
# Channel is currently not created in the tx link since we changed the relayer to support on demand blocks
# Which messed up with channel creation as part of tx link.

sleep 5

echo '# -------------------------------- IBC channel established ------------------------------- #'
echo "Channel Information:"
echo $(rly q channels "$ROLLAPP_CHAIN_ID" | jq '{ "rollapp-channel": .channel_id, "hub-channel": .counterparty.channel_id }')
channel_info=$(rly q channels "$ROLLAPP_CHAIN_ID" | jq '{ "rollapp-channel": .channel_id, "hub-channel": .counterparty.channel_id }')
rollapp_channel=$(echo "$channel_info" | jq -r '.["rollapp-channel"]')
hub_channel=$(echo "$channel_info" | jq -r '.["hub-channel"]')

echo "$channel_info"

echo -e '--------------------------------- Set channel-filter --------------------------------'

if [ -z "$rollapp_channel" ] || [ -z "$hub_channel" ]; then
echo "Both channels must be provided. Something is wrong. Exiting."
exit 1
fi

sed -i.bak '/rule:/s/.*/ rule: "allowlist"/' "$RLY_CONFIG_FILE"
sed -i.bak '/channel-list:/s/.*/ channel-list: ["'"$rollapp_channel"'","'"$hub_channel"'"]/' "$RLY_CONFIG_FILE"
echo "Config file updated successfully."

# --------------------------------- revert empty block time to 1h --------------------------------- #
kill $(pgrep rollapp-wasm)
Expand Down
Loading