Closed rnbguy closed 2 months ago
This will also improve the rollkit-ibc implementation.
Just a note for posterity: we did end up opting for a From<ConsensusState> for ConsensusStateType
impl, which was enabled after implementing From<Infallible> for ClientError
.
Feature Summary
If implemented, we can use
ConsensuState
directly inibc-client-tendermint-cw
without a newAnyConsensusState
.https://github.com/cosmos/ibc-rs/blob/67d0735d3acc41ddadf8b20eb4b77c02f3707435/ibc-clients/ics07-tendermint/cw-contract/src/client_type.rs#L15-L18
Proposal
Add the following trait implementation in
ibc-client-tendermint
,and use
ConsensusState
directly inibc-client-tendermint-cw
.Note that the
TryFrom<ConsensusState>
never fails. But we can't useFrom<ConsensusState>
, as it impliesTryFrom<ConsensusState, Error = Infallible>
. AndConsensusStateDecoder
requiresTryFrom<ConsensusState, Error = ClientError>
.https://github.com/cosmos/ibc-rs/blob/67d0735d3acc41ddadf8b20eb4b77c02f3707435/ibc-core/ics02-client/context/src/consensus_state.rs#L11
This is a step towards #1169. Also, refer to #1203 for a discussion about removing the concrete
ClientError
type.