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

Add e2e test for ICS27 channel reopening #2675

Closed
3 tasks
damiannolan opened this issue Nov 4, 2022 · 3 comments · Fixed by #2720
Closed
3 tasks

Add e2e test for ICS27 channel reopening #2675

damiannolan opened this issue Nov 4, 2022 · 3 comments · Fixed by #2720

Comments

@damiannolan
Copy link
Member

damiannolan commented Nov 4, 2022

Summary

Add an e2e test for ICS27 channel reopening. This can be done using the new controller MsgServer API.
The e2e test should follow the flow defined below:

  1. Register an interchain account from chainA (controller) to chainB (host)
  2. Broadcast a new MsgSendTx with a short-lived timeout
  3. Wait a number of blocks or potentially sleep for a short period to allow the timeout to pass
  4. Start the relayer and allow it to timeout the packet and in turn close the ICA channel
  5. Attempt to reopen the channel. This should be possible routing a new MsgRegisterInterchainAccount or MsgChannelOpenInit to the controller chain
  6. Broadcast a new MsgSendTx which executes successfully

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@damiannolan damiannolan added this to the v6.0.0 milestone Nov 4, 2022
@damiannolan damiannolan moved this to Todo in ibc-go Nov 4, 2022
@charleenfei charleenfei self-assigned this Nov 4, 2022
@crodriguezvega
Copy link
Contributor

@charleenfei thanks for picking this up!

Some work has been done for this on this branch that might be possible to be reused. But unfortunately it is not working: for some reason it seems like the channel does not get closed. Here's a sample run using the v0.1.5 tag of icad. Maybe it's better to just use simd with v6.0.0 instead from now on.

@colin-axner
Copy link
Contributor

Looks like it should be channels[1], not channels[0]

@crodriguezvega
Copy link
Contributor

Looks like it should be channels[1], not channels[0]

hmmm, in the test run that I will in my comment above it's possible to see in the logs the information for channels[0]:

{State:STATE_OPEN Ordering:ORDER_ORDERED Counterparty:{PortID:icahost ChannelID:channel-1} ConnectionHops:[connection-0] Version:{"version":"ics27-1","controller_connection_id":"connection-0","host_connection_id":"connection-0","address":"cosmos152tahxw0mfvq7rd2gqahpzz2pjs562rs89jdefpnehaes0a238jq55d9aj","encoding":"proto3","tx_type":"sdk_multi_msg"} PortID:icacontroller-cosmos1k88wju6m4j6hycum00h5untgkxnzndcrccuvjh ChannelID:channel-1}

So channels[0] should be the ordered channel created for the interchain account...

@charleenfei charleenfei moved this from Todo to In review in ibc-go Nov 9, 2022
Repository owner moved this from In review to Todo in ibc-go Nov 14, 2022
@damiannolan damiannolan moved this from Todo to Done in ibc-go Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

4 participants