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 IBC support to multi-test #1

Closed
ethanfrey opened this issue Oct 11, 2021 · 9 comments
Closed

Add IBC support to multi-test #1

ethanfrey opened this issue Oct 11, 2021 · 9 comments
Labels
IBC IBC support
Milestone

Comments

@ethanfrey
Copy link
Member

We now have support for Custom Msg and Queries, and an easy way to plug in Staking and Distribution support. (#266)

One missing feature is being able to simulate IBC calls between 2 apps. This will require significant changes to the App structure and some coordinator that controls 2 apps. Rather than hide this as a checkbox, it makes sense to pull it into a full-blown issue to discuss.

@hoomp3
Copy link

hoomp3 commented Jul 18, 2022

Has any progress been made here?

@ethanfrey
Copy link
Member Author

I am considering doing this with cosmjs, as the ibc stack is very hard to emulate.

I will post some update here in a week, please ping me if I forget

@hoomp3
Copy link

hoomp3 commented Jul 21, 2022

Okay, sounds good, thanks for letting me know!

@hoomp3
Copy link

hoomp3 commented Jul 28, 2022

@ethanfrey Hey, any update to this?

@ethanfrey
Copy link
Member Author

I have made https://github.com/CosmWasm/resources with many links

In particular, I made a new repo https://github.com/confio/cw-ibc-demo which I explain at hackatom Seoul (jt was 11am Saturday if you find the recording.

check it out

@hoomp3
Copy link

hoomp3 commented Jul 31, 2022

Okay sweet, found the recording and linking it here in case anyone else finds this thread - https://youtu.be/x75UobIr4qo?t=7183

@hashedone
Copy link
Contributor

I guess I would take it at some point unless anyone else would. My suggestion for that is:

[ ] Add module to handle IbcMsg
[ ] Add API to call IBC-related entry points
[ ] Add additional type to abstract IBC relayer. It should keep handles (borrows?) to pair/group of Apps and have an API to relay single message/all pending messages/all messages until both queues are empty (so also messages generated while executing relayed messages)

Open question - App is mutable and it has to be mutable to call various entry points. However, the new relayer type would need to keep borrows (probably mutable) to make it possible to execute IBC-related entry points. This would make it impossible to execute messages on App when there is an existing relayer on that App. Solutions in my mind are:

  • Make a relayer own Apps, so they are accessed through it - but it would make it impossible to create a couple of relates for the same App
  • Use Rc<App> in relayer - but it would require to use Rc<App> in the entire test, it is not the best possible API
  • Pass borrow to Apps to relayer API functions instead to keep them in it
  • Make relayers to be built "ad hoc" (maybe from configuration stored in some additional type)

All approaches have pros and cons, after a bit of thought I am leading to the last one.

@hoomp3
Copy link

hoomp3 commented Aug 9, 2022

The last one sounds like it would work best.

@uint uint transferred this issue from CosmWasm/cw-plus Oct 17, 2022
@hashedone hashedone added this to the 3.0.0 milestone Feb 21, 2024
@DariuszDepta DariuszDepta added the IBC IBC support label Jul 3, 2024
@DariuszDepta
Copy link
Member

I am closing this issue, as IBC support will be implemented as in #184.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IBC IBC support
Projects
None yet
Development

No branches or pull requests

4 participants