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 channel identifier format to be compatible with IBC-go #39

Closed
7 tasks
adizere opened this issue Jun 22, 2022 · 2 comments
Closed
7 tasks

Fix channel identifier format to be compatible with IBC-go #39

adizere opened this issue Jun 22, 2022 · 2 comments
Assignees

Comments

@adizere
Copy link
Contributor

adizere commented Jun 22, 2022

Summary of Bug

In the modules, we define a channel id to be represented as a u64.

https://github.com/informalsystems/ibc-rs/blob/baf0e3f60f37934cab89526f47f7cb6524f7d92c/modules/src/core/ics24_host/identifier.rs#L339

The code performs additional validation and requires channel IDs in received messages to have exactly the channel-N format. This is not part of the IBC specification. Instead, channel identifiers should be validated as follows:

  • should contain alphanumeric chars and
  • should have a certain maximum length.

This problem only exists for channel IDs. Client and connection ID validation conforms with the IBC spec.

Version

v0.15

Acceptance Criteria

  • Channel identifiers no longer restrict the format to u64 based representation.
  • Hermes has no assumptions on the format of channel identifiers aside from the validation rules described above.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ancazamfir
Copy link
Collaborator

I think we should fix this in v1. I believe it also affects the relayer, if a chain uses something else than channel-n hermes will not relay for it.

@adizere
Copy link
Contributor Author

adizere commented Jun 24, 2022

I think we should fix this in v1. I believe it also affects the relayer, if a chain uses something else than channel-n hermes will not relay for it.

Managed to confirm this:

$ hermes query channel end ibc-0 transfer chan-2
    Finished dev [unoptimized + debuginfo] target(s) in 0.26s
     Running `target/debug/hermes query channel end ibc-0 transfer chan-2`
error: Invalid value "chan-2" for '<CHANNEL_ID>': channel identifiers are expected to be in `channel-{N}` format

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

No branches or pull requests

3 participants