-
Notifications
You must be signed in to change notification settings - Fork 5
feat: handle wasm wrapped client and consensus state #160
Conversation
07c9266
to
f1c8b2c
Compare
Native { | ||
state: SovTmClientState, | ||
}, | ||
Wasm { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This is resolved at ibc-rs side via cosmos/ibc-rs#1246 |
Closes: #159
Description
PR author checklist
docs/
).