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

Set active channel update #450

Closed
2 of 5 tasks
seantking opened this issue Sep 29, 2021 · 4 comments
Closed
2 of 5 tasks

Set active channel update #450

seantking opened this issue Sep 29, 2021 · 4 comments
Assignees
Labels
27-interchain-accounts audit Feedback from implementation audit good first issue Good for newcomers type: bug Something isn't working as expected

Comments

@seantking
Copy link
Contributor

seantking commented Sep 29, 2021

Summary

On the controller side, we should set the active channel on the OnChanOpenAck step. On the host side, we should set the active channel on the OnChanOpenConfirm step.

Additionally, OnChanCloseConfirm should delete the current active channel mapping.

  • Set active channel correctly
  • Delete the active channel on channel close

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@seantking seantking added type: bug Something isn't working as expected good first issue Good for newcomers 27-interchain-accounts audit Feedback from implementation audit labels Sep 29, 2021
@seantking seantking added this to the Interchain Accounts milestone Sep 29, 2021
@damiannolan damiannolan self-assigned this Oct 4, 2021
@damiannolan
Copy link
Member

damiannolan commented Oct 6, 2021

Additionally, OnChanCloseConfirm should delete the current active channel mapping.

This will only delete the active channel mapping for one party. I think we'll have to also delete the active channel mapping in OnTimeoutPacket. So the scenario there would be:

  1. Controller calls TrySendTx
  2. Packet times out.
  3. Relayer calls Timeout gRPC handler on Controller, which will in turn closes the channel because it's ORDERED.
  4. Relayer calls ChannelCloseConfirm grpc handler on Host

@colin-axner
Copy link
Contributor

Yes, that sounds correct to me

@seantking
Copy link
Contributor Author

Good catch. Agree, we need to add this! I'm wondering if there are any race conditions we need to consider here, especially now that we are allowing for timeouts again.

@damiannolan
Copy link
Member

I'll include this in #463 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27-interchain-accounts audit Feedback from implementation audit good first issue Good for newcomers type: bug Something isn't working as expected
Projects
Archived in project
Development

No branches or pull requests

3 participants