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

ICS-2: ClientType is not defined and confusing #810

Closed
plafer opened this issue Jul 29, 2022 · 0 comments · Fixed by #956
Closed

ICS-2: ClientType is not defined and confusing #810

plafer opened this issue Jul 29, 2022 · 0 comments · Fixed by #956
Assignees
Labels
tao Transport, authentication, & ordering layer.

Comments

@plafer
Copy link
Contributor

plafer commented Jul 29, 2022

The type ClientType is not clearly defined in ICS-2, and seems to play 2 different roles.

On the one hand, it is the type of the value stored at "clients/{identifier}/clientType" in the provableStore (see ICS-24 table). Given how it's meant to be used, I would expect it to be a well-defined type (as opposed to an opaque data structure). For example, in ibc-go, ClientType is a string.

On the other hand, the reader can gather that it is an object that is expected to have the methods such as initialise(), checkValidityAndUpdateState(), and checkMisbehaviourAndUpdateState(). I was able to figure that out by looking at how it is used in the code snippets, and then link it to the text that says

Client types MUST define a method to initialise a client state with a provided consensus state, writing to internal state as appropriate. [the initialise method]

It wasn't immediately clear to me that the quote above referred to the ClientType type.

Given this, what is ClientType supposed to be: the former or the latter?

Finally, we should also ensure that the ClientType value "07-tendermint" that ibc-go uses to identify the Tendermint client is documented somewhere.

@crodriguezvega crodriguezvega added the tao Transport, authentication, & ordering layer. label Aug 16, 2022
@mpoke mpoke self-assigned this Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tao Transport, authentication, & ordering layer.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants