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

ChainId parsing fails if revision number is absent #940

Closed
Tracked by #882
rnbguy opened this issue Nov 1, 2023 · 0 comments · Fixed by #941
Closed
Tracked by #882

ChainId parsing fails if revision number is absent #940

rnbguy opened this issue Nov 1, 2023 · 0 comments · Fixed by #941
Assignees
Milestone

Comments

@rnbguy
Copy link
Member

rnbguy commented Nov 1, 2023

Bug Summary

ChainId::from_str("basecoin") fails as revision number is not given. ibc-go docs discusses that the clients without revision requirement should have hardcoded zero as revision number.

Details

Current ChainId::from_str uses parse_chain_id_string, which requires a revision number at the end of the string.

https://github.com/cosmos/ibc-rs/blob/553bc79b31b31c586128e4e533105fe917df4c0e/crates/ibc/src/core/ics24_host/identifier.rs#L139-L146

But ibc-go implementation doesn't require this and returns zero by default if the revision number is not specified.

Version

v0.47.0

@rnbguy rnbguy self-assigned this Nov 1, 2023
@rnbguy rnbguy changed the title ChainId parsing fails if revision number is not given ChainId parsing fails if revision number is absent Nov 1, 2023
@rnbguy rnbguy changed the title ChainId parsing fails if revision number is absent ChainId parsing fails if revision number is absent Nov 2, 2023
@github-project-automation github-project-automation bot moved this to 📥 To Do in ibc-rs Nov 2, 2023
@Farhad-Shabani Farhad-Shabani added this to the v0.48.0 milestone Nov 2, 2023
@github-project-automation github-project-automation bot moved this from 📥 To Do to ✅ Done in ibc-rs Nov 6, 2023
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

Successfully merging a pull request may close this issue.

2 participants