juno_rust_proto/prost/ibc-go/
ibc.lightclients.tendermint.v1.rs

1/// ClientState from Tendermint tracks the current validator set, latest height,
2/// and a possible frozen height.
3#[allow(clippy::derive_partial_eq_without_eq)]
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<::prost_types::Duration>,
14    /// duration of the staking unbonding period
15    #[prost(message, optional, tag = "4")]
16    pub unbonding_period: ::core::option::Option<::prost_types::Duration>,
17    /// defines how much new (untrusted) header's Time can drift into the future.
18    #[prost(message, optional, tag = "5")]
19    pub max_clock_drift: ::core::option::Option<::prost_types::Duration>,
20    /// Block height when the client was frozen due to a misbehaviour
21    #[prost(message, optional, tag = "6")]
22    pub frozen_height: ::core::option::Option<super::super::super::core::client::v1::Height>,
23    /// Latest height the client was updated to
24    #[prost(message, optional, tag = "7")]
25    pub latest_height: ::core::option::Option<super::super::super::core::client::v1::Height>,
26    /// Proof specifications used in verifying counterparty state
27    #[prost(message, repeated, tag = "8")]
28    pub proof_specs: ::prost::alloc::vec::Vec<super::super::super::super::ics23::ProofSpec>,
29    /// Path at which next upgraded client will be committed.
30    /// Each element corresponds to the key for a single CommitmentProof in the
31    /// chained proof. NOTE: ClientState must stored under
32    /// `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
33    /// under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
34    /// the default upgrade module, upgrade_path should be []string{"upgrade",
35    /// "upgradedIBCState"}`
36    #[prost(string, repeated, tag = "9")]
37    pub upgrade_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
38    /// This flag, when set to true, will allow governance to recover a client
39    /// which has expired
40    #[prost(bool, tag = "10")]
41    pub allow_update_after_expiry: bool,
42    /// This flag, when set to true, will allow governance to unfreeze a client
43    /// whose chain has experienced a misbehaviour event
44    #[prost(bool, tag = "11")]
45    pub allow_update_after_misbehaviour: bool,
46}
47/// ConsensusState defines the consensus state from Tendermint.
48#[allow(clippy::derive_partial_eq_without_eq)]
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct ConsensusState {
51    /// timestamp that corresponds to the block height in which the ConsensusState
52    /// was stored.
53    #[prost(message, optional, tag = "1")]
54    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
55    /// commitment root (i.e app hash)
56    #[prost(message, optional, tag = "2")]
57    pub root: ::core::option::Option<super::super::super::core::commitment::v1::MerkleRoot>,
58    #[prost(bytes = "vec", tag = "3")]
59    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
60}
61/// Misbehaviour is a wrapper over two conflicting Headers
62/// that implements Misbehaviour interface expected by ICS-02
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct Misbehaviour {
66    #[prost(string, tag = "1")]
67    pub client_id: ::prost::alloc::string::String,
68    #[prost(message, optional, tag = "2")]
69    pub header_1: ::core::option::Option<Header>,
70    #[prost(message, optional, tag = "3")]
71    pub header_2: ::core::option::Option<Header>,
72}
73/// Header defines the Tendermint client consensus Header.
74/// It encapsulates all the information necessary to update from a trusted
75/// Tendermint ConsensusState. The inclusion of TrustedHeight and
76/// TrustedValidators allows this update to process correctly, so long as the
77/// ConsensusState for the TrustedHeight exists, this removes race conditions
78/// among relayers The SignedHeader and ValidatorSet are the new untrusted update
79/// fields for the client. The TrustedHeight is the height of a stored
80/// ConsensusState on the client that will be used to verify the new untrusted
81/// header. The Trusted ConsensusState must be within the unbonding period of
82/// current time in order to correctly verify, and the TrustedValidators must
83/// hash to TrustedConsensusState.NextValidatorsHash since that is the last
84/// trusted validator set at the TrustedHeight.
85#[allow(clippy::derive_partial_eq_without_eq)]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct Header {
88    #[prost(message, optional, tag = "1")]
89    pub signed_header: ::core::option::Option<::tendermint_proto::types::SignedHeader>,
90    #[prost(message, optional, tag = "2")]
91    pub validator_set: ::core::option::Option<::tendermint_proto::types::ValidatorSet>,
92    #[prost(message, optional, tag = "3")]
93    pub trusted_height: ::core::option::Option<super::super::super::core::client::v1::Height>,
94    #[prost(message, optional, tag = "4")]
95    pub trusted_validators: ::core::option::Option<::tendermint_proto::types::ValidatorSet>,
96}
97/// Fraction defines the protobuf message type for tmmath.Fraction that only
98/// supports positive values.
99#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct Fraction {
102    #[prost(uint64, tag = "1")]
103    pub numerator: u64,
104    #[prost(uint64, tag = "2")]
105    pub denominator: u64,
106}