ibc icon indicating copy to clipboard operation
ibc copied to clipboard

ICS7: Include chain ID parsing requirements

Open cwgoes opened this issue 5 years ago • 4 comments

Per https://github.com/informalsystems/ibc-rs/pull/304#discussion_r506982998

cwgoes avatar Oct 17 '20 20:10 cwgoes

@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!

bumblefudge avatar Mar 02 '22 01:03 bumblefudge

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.

cwgoes avatar Mar 02 '22 17:03 cwgoes

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

AdityaSripal avatar Mar 02 '22 17:03 AdityaSripal

VERY helpful, thank you very much!

bumblefudge avatar Mar 03 '22 22:03 bumblefudge