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

Fix mock module capability claiming in IBC app callbacks #755

Closed
3 tasks
colin-axner opened this issue Jan 18, 2022 · 0 comments · Fixed by #776
Closed
3 tasks

Fix mock module capability claiming in IBC app callbacks #755

colin-axner opened this issue Jan 18, 2022 · 0 comments · Fixed by #776
Assignees
Labels
testing Testing package and unit/integration tests

Comments

@colin-axner
Copy link
Contributor

colin-axner commented Jan 18, 2022

Summary

IBC mock module uses capabilities to test redundant packet relays. The capability claiming doesn't account for multiple channels

Problem Definition

When trying to send packets across multiple channels connected to the mock module, the app callbacks will panic

Proposal

Create a helper function with creates the capability name. For example:

func createOnRecvMockCapabilityName() string {
    return fmt.Sprintf("%s%s%s%s", MockRecvCanaryCapabilityName, packet.GetDestPort(), packet.GetDestChannel(), strconv.Itoa(int(packet.GetSequence())))
}

OnAck and OnTimeout should use source port/channel. It might be possible to add dashes to split up the capability name (but I'm not sure what capability name restrictions are)

These helper functions should be called when creating the new capability


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner colin-axner added the testing Testing package and unit/integration tests label Jan 18, 2022
@colin-axner colin-axner added this to the Interchain Accounts milestone Jan 18, 2022
@crodriguezvega crodriguezvega moved this to Todo in ibc-go Jan 18, 2022
@crodriguezvega crodriguezvega moved this from Todo to In review in ibc-go Jan 21, 2022
Repository owner moved this from In review to Done in ibc-go Jan 21, 2022
faddat pushed a commit to notional-labs/ibc-go that referenced this issue Feb 23, 2022
In this file a module description could be added as exaplained here:
https://docs.buf.build/bsr/documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing package and unit/integration tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants