Closed rnbguy closed 2 weeks ago
Maybe we can add another generic associated type to ValidationContext
:
type HostClientStateAtCounterparty<V>: Into<V> + TryFrom<Any> where V: TryFrom<Any>;
And, later, we use it as::
Ctx::HostClientStateAtCounterparty<Ctx::HostClientState>::try_from(
msg.client_state_of_a_on_b.clone()
)
.map_err(Into::into)?
.into();
This way, we allow the crate users to build their own custom host client wrapper.
Looks like, the similar is required for host consensus state. In the following, we need to wrap the consensus state in wasm consensus state and then check for proofs.
Feature Summary
Now that ibc-go comes with wasm-08, client state of an ibc-rs chain maybe stored as wasm wrapped format in wasm-08 enabled chain.
So when
MsgConnectionOpenTry
orMsgConnectionOpenAck
is received at ibc-rs, it should expect two cases:Proposal
We need to introduce an enum:
Then, use
HosClientState<Ctx::HostClientState>
in the following places:https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_ack.rs#L52
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_try.rs#L42