1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use crate::header::Header;
use crate::state::{ClientState, ConsensusState};
/// Type of IBC client.
pub enum ClientType {
Loopback,
SoloMachine,
Tendermint,
GRANDPA,
}
pub trait ClientDef {
type Header: Header;
type ClientState: ClientState;
type ConsensusState: ConsensusState;
// fn check_header_and_update_state(
// &self,
// client_state: Self::ClientState,
// header: Self::Header,
// ) -> Result<(Self::ClientState, Self::ConsensusState), Box<dyn std::error::Error>>;
// fn verify_client_consensus_state(
// &self,
// client_state: &Self::ClientState,
// height: Height,
// prefix: &CommitmentPrefix,
// proof: &CommitmentProof,
// client_id: &ClientId,
// consensus_height: Height,
// expected_consensus_state: &AnyConsensusState,
// ) -> Result<(), Box<dyn std::error::Error>>;
// /// Verify a `proof` that a connection state matches that of the input `connection_end`.
// fn verify_connection_state(
// &self,
// client_state: &Self::ClientState,
// height: Height,
// prefix: &CommitmentPrefix,
// proof: &CommitmentProof,
// connection_id: &ConnectionId,
// expected_connection_end: &ConnectionEnd,
// ) -> Result<(), Box<dyn std::error::Error>>;
// /// Verify the client state for this chain that it is stored on the counterparty chain.
// #[allow(clippy::too_many_arguments)]
// fn verify_client_full_state(
// &self,
// _client_state: &Self::ClientState,
// height: Height,
// root: &CommitmentRoot,
// prefix: &CommitmentPrefix,
// client_id: &ClientId,
// proof: &CommitmentProof,
// client_state: &AnyClientState,
// ) -> Result<(), Box<dyn std::error::Error>>;
}