ibc_proto/prost/
ibc.lightclients.tendermint.v1.rs

1// This file is @generated by prost-build.
2/// ClientState from Tendermint tracks the current validator set, latest height,
3/// and a possible frozen height.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ClientState {
6    #[prost(string, tag = "1")]
7    pub chain_id: ::prost::alloc::string::String,
8    #[prost(message, optional, tag = "2")]
9    pub trust_level: ::core::option::Option<Fraction>,
10    /// duration of the period since the LastestTimestamp during which the
11    /// submitted headers are valid for upgrade
12    #[prost(message, optional, tag = "3")]
13    pub trusting_period: ::core::option::Option<
14        ::tendermint_proto::google::protobuf::Duration,
15    >,
16    /// duration of the staking unbonding period
17    #[prost(message, optional, tag = "4")]
18    pub unbonding_period: ::core::option::Option<
19        ::tendermint_proto::google::protobuf::Duration,
20    >,
21    /// defines how much new (untrusted) header's Time can drift into the future.
22    #[prost(message, optional, tag = "5")]
23    pub max_clock_drift: ::core::option::Option<
24        ::tendermint_proto::google::protobuf::Duration,
25    >,
26    /// Block height when the client was frozen due to a misbehaviour
27    #[prost(message, optional, tag = "6")]
28    pub frozen_height: ::core::option::Option<
29        super::super::super::core::client::v1::Height,
30    >,
31    /// Latest height the client was updated to
32    #[prost(message, optional, tag = "7")]
33    pub latest_height: ::core::option::Option<
34        super::super::super::core::client::v1::Height,
35    >,
36    /// Proof specifications used in verifying counterparty state
37    #[prost(message, repeated, tag = "8")]
38    pub proof_specs: ::prost::alloc::vec::Vec<::ics23::ProofSpec>,
39    /// Path at which next upgraded client will be committed.
40    /// Each element corresponds to the key for a single CommitmentProof in the
41    /// chained proof. NOTE: ClientState must stored under
42    /// `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
43    /// under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
44    /// the default upgrade module, upgrade_path should be \[\]string{"upgrade",
45    /// "upgradedIBCState"}`
46    #[prost(string, repeated, tag = "9")]
47    pub upgrade_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
48    /// allow_update_after_expiry is deprecated
49    #[deprecated]
50    #[prost(bool, tag = "10")]
51    pub allow_update_after_expiry: bool,
52    /// allow_update_after_misbehaviour is deprecated
53    #[deprecated]
54    #[prost(bool, tag = "11")]
55    pub allow_update_after_misbehaviour: bool,
56}
57impl ::prost::Name for ClientState {
58    const NAME: &'static str = "ClientState";
59    const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1";
60    fn full_name() -> ::prost::alloc::string::String {
61        "ibc.lightclients.tendermint.v1.ClientState".into()
62    }
63    fn type_url() -> ::prost::alloc::string::String {
64        "/ibc.lightclients.tendermint.v1.ClientState".into()
65    }
66}
67/// ConsensusState defines the consensus state from Tendermint.
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct ConsensusState {
70    /// timestamp that corresponds to the block height in which the ConsensusState
71    /// was stored.
72    #[prost(message, optional, tag = "1")]
73    pub timestamp: ::core::option::Option<
74        ::tendermint_proto::google::protobuf::Timestamp,
75    >,
76    /// commitment root (i.e app hash)
77    #[prost(message, optional, tag = "2")]
78    pub root: ::core::option::Option<
79        super::super::super::core::commitment::v1::MerkleRoot,
80    >,
81    #[prost(bytes = "vec", tag = "3")]
82    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
83}
84impl ::prost::Name for ConsensusState {
85    const NAME: &'static str = "ConsensusState";
86    const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1";
87    fn full_name() -> ::prost::alloc::string::String {
88        "ibc.lightclients.tendermint.v1.ConsensusState".into()
89    }
90    fn type_url() -> ::prost::alloc::string::String {
91        "/ibc.lightclients.tendermint.v1.ConsensusState".into()
92    }
93}
94/// Misbehaviour is a wrapper over two conflicting Headers
95/// that implements Misbehaviour interface expected by ICS-02
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct Misbehaviour {
98    /// ClientID is deprecated
99    #[deprecated]
100    #[prost(string, tag = "1")]
101    pub client_id: ::prost::alloc::string::String,
102    #[prost(message, optional, tag = "2")]
103    pub header_1: ::core::option::Option<Header>,
104    #[prost(message, optional, tag = "3")]
105    pub header_2: ::core::option::Option<Header>,
106}
107impl ::prost::Name for Misbehaviour {
108    const NAME: &'static str = "Misbehaviour";
109    const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1";
110    fn full_name() -> ::prost::alloc::string::String {
111        "ibc.lightclients.tendermint.v1.Misbehaviour".into()
112    }
113    fn type_url() -> ::prost::alloc::string::String {
114        "/ibc.lightclients.tendermint.v1.Misbehaviour".into()
115    }
116}
117/// Header defines the Tendermint client consensus Header.
118/// It encapsulates all the information necessary to update from a trusted
119/// Tendermint ConsensusState. The inclusion of TrustedHeight and
120/// TrustedValidators allows this update to process correctly, so long as the
121/// ConsensusState for the TrustedHeight exists, this removes race conditions
122/// among relayers The SignedHeader and ValidatorSet are the new untrusted update
123/// fields for the client. The TrustedHeight is the height of a stored
124/// ConsensusState on the client that will be used to verify the new untrusted
125/// header. The Trusted ConsensusState must be within the unbonding period of
126/// current time in order to correctly verify, and the TrustedValidators must
127/// hash to TrustedConsensusState.NextValidatorsHash since that is the last
128/// trusted validator set at the TrustedHeight.
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct Header {
131    #[prost(message, optional, tag = "1")]
132    pub signed_header: ::core::option::Option<::tendermint_proto::types::SignedHeader>,
133    #[prost(message, optional, tag = "2")]
134    pub validator_set: ::core::option::Option<::tendermint_proto::types::ValidatorSet>,
135    #[prost(message, optional, tag = "3")]
136    pub trusted_height: ::core::option::Option<
137        super::super::super::core::client::v1::Height,
138    >,
139    #[prost(message, optional, tag = "4")]
140    pub trusted_validators: ::core::option::Option<
141        ::tendermint_proto::types::ValidatorSet,
142    >,
143}
144impl ::prost::Name for Header {
145    const NAME: &'static str = "Header";
146    const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1";
147    fn full_name() -> ::prost::alloc::string::String {
148        "ibc.lightclients.tendermint.v1.Header".into()
149    }
150    fn type_url() -> ::prost::alloc::string::String {
151        "/ibc.lightclients.tendermint.v1.Header".into()
152    }
153}
154/// Fraction defines the protobuf message type for tmmath.Fraction that only
155/// supports positive values.
156#[derive(Clone, Copy, PartialEq, ::prost::Message)]
157pub struct Fraction {
158    #[prost(uint64, tag = "1")]
159    pub numerator: u64,
160    #[prost(uint64, tag = "2")]
161    pub denominator: u64,
162}
163impl ::prost::Name for Fraction {
164    const NAME: &'static str = "Fraction";
165    const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1";
166    fn full_name() -> ::prost::alloc::string::String {
167        "ibc.lightclients.tendermint.v1.Fraction".into()
168    }
169    fn type_url() -> ::prost::alloc::string::String {
170        "/ibc.lightclients.tendermint.v1.Fraction".into()
171    }
172}