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

Support IBC Client Params #865

Open
rnbguy opened this issue Sep 14, 2023 · 1 comment
Open

Support IBC Client Params #865

rnbguy opened this issue Sep 14, 2023 · 1 comment
Labels
O: new-feature Objective: aims to add new feature

Comments

@rnbguy
Copy link
Collaborator

rnbguy commented Sep 14, 2023

Feature Summary

Right now, ibc-rs doesn't support IBC Client params. With Client params, the host chain can disable or enable supported client types via governance.

Proposal

Let me differentiate between supported clients and allowed clients.

  • Supported Clients: This is implementation specific. This indicates the client state decoders available in the host chain implementation.
  • Allowed Clients: This is blockchain specific. The blockchain community decides which client state decoders should be allowed on the chain via governance.

The allowed clients must also be supported. Otherwise, the implementation can't decode a valid allowed client.

IMO, the distinction is required to give flexibility to the community without any developer intervention. This is useful in the case of any faulty implementation of a client type. A chain can immediately pass a governance to disable a client type without a chain upgrade.

Implementation

I propose to use ClientState macro to create a method called supported_clients to return a set of the supported client types corresponding to the enum variants.

At Genesis

In the genesis, the client params can have a subset of the supported client types as allowed clients. And the subset condition is checked at ibc module initialization.

At Client Create or Client Upgrade

Successfully create or upgrade client state if the client state can be decoded to one of the allowed_clients types - whose decoders are available. Otherwise, the transaction fails.

At Client Params Update

Successfully update the client params on the blockchain if the provided allowed_clients is a subset of supported_clients. Otherwise, the transaction fails.

@rnbguy rnbguy added the O: new-feature Objective: aims to add new feature label Sep 14, 2023
@rnbguy
Copy link
Collaborator Author

rnbguy commented Sep 14, 2023

This feature will also complete the unimplemented ClientParams query in #842.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: new-feature Objective: aims to add new feature
Projects
Status: 📥 To Do
Development

No branches or pull requests

1 participant