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: add a workaround for ibc channel creation #134

Merged
merged 1 commit into from
Apr 4, 2024
Merged
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
9 changes: 9 additions & 0 deletions scripts/ibc/setup_ibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,21 @@ 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"

# block_time_workaround: this is a workaround to enable automatic ibc creation,
# it forces block generation as the default block time as of @20240403 is set to 1h
while true; do
rly tx update-clients "$RELAYER_PATH" | tee /dev/stdout
sleep 5
done &
UPDATE_CLIENTS_PID=$!

rly tx link "$RELAYER_PATH" --src-port "$IBC_PORT" --dst-port "$IBC_PORT" --version "$IBC_VERSION"
# 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.
rly tx channel "$RELAYER_PATH"

# this is a part of the block_time_workaround
kill $UPDATE_CLIENTS_PID >/dev/null 2>&1

echo '# -------------------------------- IBC channel established ------------------------------- #'
ROLLAPP_CHANNEL_ID=$(rly q channels "$ROLLAPP_CHAIN_ID" | jq -r 'select(.state == "STATE_OPEN") | .channel_id' | tail -n 1)
Expand Down
Loading