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

feat: add channel close feature #382

Merged
merged 9 commits into from
Nov 22, 2023
Merged

feat: add channel close feature #382

merged 9 commits into from
Nov 22, 2023

Conversation

ashuralyk
Copy link
Contributor

@ashuralyk ashuralyk commented Nov 14, 2023

Related issues

Description

Channel layer misses close feature for a long time, and for a compatible version of IBC protocol, close feature should be accomplished at last.

Change logs

  1. bump ckb-ics to https://github.com/synapseweb3/ckb-ics/commits/0299a9126a7cb28ff54b1a02f286f0618133731c
  2. bump forcerelay-ckb-sdk to https://github.com/synapseweb3/forcerelay-ckb-sdk/commits/cd29a30b350ab853a496a58b970017bfa1249182
  3. complete transaction assembly for MsgChannelCloseInit and MsgChannelCloseConfirm
  4. iterate contracts of IBC for CKB endpoint
  5. extract the envelope struct from IBC transaction to distinguish which type of message is behind a closed channel, specifically to distinguish a channel that comes to close is triggered by MsgChannelCloseInit or MsgChannelCloseConfirm
  6. emit channel close command in packet related CI tests
  7. complete query_txs() method, but others are unreachable to do

    Scan and check the incomplete methods in Ckb4Ibc, and find only query_txs() needs to implemented, others can keep unimplemented status.

  8. add channel close trigger in CI test only between CKB chains

Related PRs

@ashuralyk
Copy link
Contributor Author

@blckngm this PR's CI won't pass because we give relayer a random key but the module is set PRIVKEY, which would emit error in the contract check of MsgChannelCloseInit, we should send transaction to close channel via forcerelay-ckb-sdk

@ashuralyk
Copy link
Contributor Author

@Flouse this PR can start to review

tools/ibc-test/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@Flouse Flouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Flouse Flouse merged commit 6202a13 into main Nov 22, 2023
31 checks passed
@ashuralyk ashuralyk deleted the feat/channel-close branch November 23, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants