ibc
ibc copied to clipboard
Connection `version` still defined with `string`: inconsistent with ibc-go
The connection version in the standard is inconsistent with what's being used in ibc-go. Specifically, in the standard, a version is an opaque string, whereas in ibc-go, it is as follows:
message Version {
option (gogoproto.goproto_getters) = false;
// unique version identifier
string identifier = 1;
// list of features compatible with the specified identifier
repeated string features = 2;
}
My understanding is that the standard fell behind and should be updated to reflect what's in ibc-go.
Additionally, the values for currently standard identifier/features should be added to the standard:
- identifier:
"1"to specify IBC 1.0.0 - features:
"ORDER_UNORDERED"and"ORDER_ORDERED"to specify unordered and ordered channels, respectively.
The signature of helper functions getCompatibleVersions and pickVersion should be adjusted accordingly.
I'm happy to open a PR with the fix if we agree that the standard should indeed be fixed as described.
The following statement in ICS-3 should also be fixed.
At the moment, the contents of this version bytestring are opaque to the IBC core protocol. In the future, it might be used to indicate what kinds of channels can utilise the connection in question, or what encoding formats channel-related datagrams will use.
ibc-go already uses the connection version information to encode channel ordering.
Thanks for pointing this out, @plafer! We discussed with @cwgoes and given that (if I'm not mistaken) ibc-rs is also using a structure for Version, then it was agreed that we can update the spec.
Would you be interested in opening a PR to make the change?
Sure!