Skip to content

ICS2: Allow Light Client implementations more flexibility in setting/getting of client states and consensus states #569

Closed
@colin-axner

Description

Edit: see comment

Summary

IBC clients as defined by ICS 02 should contain a version to allow backwards compatible changes to proof key formats and proto definitions.

Problem

As we continue to iterate on IBC after 1.0.0 has been released, we have ran into difficulty in making clean backwards compatible changes to proof keys. This is because the first notion of versioning occurs at the second layer of the TAO stack (03 connection). At the first layer we create clients and consensus states, but without versioning information it is impossible to cleanly make changes at the 02-client level in a backwards compatible way.

It seems very strange to me that the first notion of versioning occurs at the second level. It has become clear to me that versions are primarily useful in providing information for usage at the layer above. For example, the current connection versioning is useful for establishing channel types. The current version in a channel is useful for providing information about the application. A client version would be useful in establishing information about proof keys and proto definitions used in connection handshake verification.

Currently, if we want to change our client state or consensus state, it is impossible to do so in a backwards compatible fashion. We create our clients and update them before we establish an IBC connection version. There is no flexibility in using different store keys or different proto definitions.

Proposed Solution

Add a client version into each IBC client which represents the versions of IBC the counterparty currently supports.

In ibc-go we would not store this version inside the ClientState. This is because we need to know the version of a client before we can even get the client as the version may indicate which store key to use. Instead we store the client version under a version key which should not be verified by counterpartys (this way the version key can change without waiting for the next major IBC version). Properly verifying the counterparty in connection handshakes acts as an implicit verification of the counterparty version. The client version is used to ensure the connection handshake can be completed properly, if the counterparty is using an unsupported version, the connection handshake would fail.

Positives

Proof keys and proto definitions for clients can change in a backwards compatible way.

Negatives

Another layer of versioning, may become confusing

Unresolved Questions

  • Does the client version need to be verified
  • How does the counterparty chain indicate it updates its versioning if the version is not stored in the client state

Opening to start discussion as I think this is a useful feature in helping us decrease the amount of times IBC needs to do a synchronous network upgrade. Would love to see someone sketch out this idea in more detail

Metadata

Assignees

No one assigned

    Labels

    implementationTracking an external implementation of the spec.taoTransport, authentication, & ordering layer.

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions