Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

feat: handle wasm wrapped client and consensus state #160

Closed
wants to merge 9 commits into from

Conversation

rnbguy
Copy link
Member

@rnbguy rnbguy commented May 13, 2024

Closes: #159

Description


PR author checklist

  • Linked to GitHub issue.
  • Added tests.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

@rnbguy rnbguy requested a review from soareschen May 13, 2024 19:16
Native {
state: SovTmClientState,
},
Wasm {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach might be too general, assuming if this ClientState type is used at places other than verifying counterparty client state. For example, if the client state is also used for local query, it should never return a Wasm-wrapped client state.

Also, we should not allow the two types to be interchangeable when verifying proofs. If it is first verified as a Wasm-wrapped client during connection open init, then it should always remain a Wasm-wrapped client, and vice versa.

Copy link
Member Author

@rnbguy rnbguy May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this allows creating clients with WASM wrapped types. But I don't see any other way to fix this - other than making ConnectionHandshake take an extra initialization parameter - that determines if the counterparty is actually a wasm-08 proxy client.

PS: The above comment assumes that, we want to make changes in sov-ibc source code directly. If I make changes in ibc-rs, it is possible to handle this situation. I deserialize Any type to either of WasmClientState<ClientState> and ClientState at ConnectionHandshake.

@rnbguy
Copy link
Member Author

rnbguy commented Jun 6, 2024

This is resolved at ibc-rs side via cosmos/ibc-rs#1246

@rnbguy rnbguy closed this Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

wasm wrapped client and consensus state at counterparty
2 participants