forked from informalsystems/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICS 024 does not restrict channel IDs to the "channel-{N}" format. Change the internal representation of ChannelId to String, and modify the API accordingly to the similar ID types. --- * Change ChannelId representation to String ICS 024 does not restrict channel IDs to the "channel-{N}" format. * More clone calls for ChannelId, clippy fixes * fmt fix * Changelog entry for informalsystems#2361 * ChannelId formatting fixes - Create valid IDs with ChannelId::new (could be under valid length). - Format as the inner string with Display. - Derive Debug, no need for a manual definition, which printed it wrong. * Relax the channel identifier valid length Contrary to what is still documented in ICS 024, the minimum length accepted by ibc-go is 8 characters: https://github.com/cosmos/ibc-go/blob/e04964912c266bab923253c48d72cc8ec8b38f5e/modules/core/24-host/validate.go#L76-L81 * Add unit tests for validate_channel_identifier * Tweak test data for excessively long channel IDs The length limit is now 64 characters in accordance with ICS 024 and ibc-go, but longer than previous code admitted. * Improve changelog entries for informalsystems#2361 - File under the modules component. - Add an entry to bug-fixes mentioning the corrected enforcement of the length limit on channel IDs. * Fix outdated comment * Clarify comment Co-authored-by: Romain Ruetschi <romain@informal.systems>
- Loading branch information
Showing
33 changed files
with
170 additions
and
146 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/breaking-changes/ibc/2361-string-channel-id.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Change `ChannelId` representation to a string, allowing all IDs valid per ICS 024 | ||
([#2330](https://github.com/informalsystems/ibc-rs/issues/2330)). |
3 changes: 3 additions & 0 deletions
3
.changelog/unreleased/bug-fixes/ibc/2361-channel-id-max-len-64.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Permit channel identifiers with length up to 64 characters, | ||
as per the ICS 024 specification. | ||
([#2330](https://github.com/informalsystems/ibc-rs/issues/2330)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.