Description
Problem Statement
While implementing ICS12 (client for NEAR protocol) based on ibc-rs
, I found that the verify_upgrade_client
function of ClientState
trait will NOT work when the client needs to use a proof verification algorithm other than Merkle proof.
As in NEAR protocol, the state proof is MPT proof rather than Merkle proof, we can not construct a Merkle proof for this function. But we can implement verify_membership
and verify_non_membership
functions for NEAR client like I did here, because they are using generic data type for proofs.
Solution Proposal
To resolve this issue, the proposed solution is to change the data types of proof_upgrade_client
and proof_upgrade_consensus_state
to CommitmentProofBytes
, similar to the design of verify_membership
and verify_non_membership
. This modification will allow the implementation of clients to choose their own verification algorithms.