ibc
ibc copied to clipboard
ICS7: Include chain ID parsing requirements
Per https://github.com/informalsystems/ibc-rs/pull/304#discussion_r506982998
@cwgoes Is there any update on this? I'm trying to update the CAIP-5 (a cross-chain specification basically condensing upstream specifications from different communities) and I'm having trouble understanding what the current state is of chain_ids. Is there a canonical regex somewhere? Is it any 32 unicode characters? is the version suffix mandatory, or mandatory for ICB support? Any help appreciated!
Alas I am a bit out of date on IBC standards - off the top of my head I'm not sure - @AdityaSripal might have a better idea.
IBC core does not enforce anything about the chainID because the chainID is not a concept used at all within IBC core.
All of the requirements on chainID are only relevant to particular client implementations. In our case, IBC tendermint clients.
Here the requirements are the same as tendermint: It supports all characters supported by golang strings, and it cannot be empty space and must be less than 50 characters.
The version suffix is only necessary if a chain wishes to support height-resetting upgrades. Then, the version prefix is used so that cosmoshub-3, height 500 is less than cosmoshub-4, height 1 and is considered the same blockchain by the counterparty. For chains that do not need this feature, the version suffix is unnecessary.
This is documented to some extent here: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md#clients
However we should reflect this in the Tendermint spec
VERY helpful, thank you very much!