provwasm_std/types/tendermint/
types.rs

1use provwasm_proc_macro::CosmwasmExt;
2/// ConsensusParams contains consensus critical parameters that determine the
3/// validity of blocks.
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
6#[proto_message(type_url = "/tendermint.types.ConsensusParams")]
7pub struct ConsensusParams {
8    #[prost(message, optional, tag = "1")]
9    pub block: ::core::option::Option<BlockParams>,
10    #[prost(message, optional, tag = "2")]
11    pub evidence: ::core::option::Option<EvidenceParams>,
12    #[prost(message, optional, tag = "3")]
13    pub validator: ::core::option::Option<ValidatorParams>,
14    #[prost(message, optional, tag = "4")]
15    pub version: ::core::option::Option<VersionParams>,
16    #[prost(message, optional, tag = "5")]
17    pub abci: ::core::option::Option<AbciParams>,
18}
19/// BlockParams contains limits on the block size.
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
22#[proto_message(type_url = "/tendermint.types.BlockParams")]
23pub struct BlockParams {
24    /// Max block size, in bytes.
25    /// Note: must be greater than 0
26    #[prost(int64, tag = "1")]
27    pub max_bytes: i64,
28    /// Max gas per block.
29    /// Note: must be greater or equal to -1
30    #[prost(int64, tag = "2")]
31    pub max_gas: i64,
32}
33/// EvidenceParams determine how we handle evidence of malfeasance.
34#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
36#[proto_message(type_url = "/tendermint.types.EvidenceParams")]
37pub struct EvidenceParams {
38    /// Max age of evidence, in blocks.
39    ///
40    /// The basic formula for calculating this is: MaxAgeDuration / {average block
41    /// time}.
42    #[prost(int64, tag = "1")]
43    pub max_age_num_blocks: i64,
44    /// Max age of evidence, in time.
45    ///
46    /// It should correspond with an app's "unbonding period" or other similar
47    /// mechanism for handling [Nothing-At-Stake
48    /// attacks](<https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed>).
49    #[prost(message, optional, tag = "2")]
50    pub max_age_duration: ::core::option::Option<crate::shim::Duration>,
51    /// This sets the maximum size of total evidence in bytes that can be committed in a single block.
52    /// and should fall comfortably under the max block bytes.
53    /// Default is 1048576 or 1MB
54    #[prost(int64, tag = "3")]
55    pub max_bytes: i64,
56}
57/// ValidatorParams restrict the public key types validators can use.
58/// NOTE: uses ABCI pubkey naming, not Amino names.
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
61#[proto_message(type_url = "/tendermint.types.ValidatorParams")]
62pub struct ValidatorParams {
63    #[prost(string, repeated, tag = "1")]
64    pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
65}
66/// VersionParams contains the ABCI application version.
67#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
69#[proto_message(type_url = "/tendermint.types.VersionParams")]
70pub struct VersionParams {
71    #[prost(uint64, tag = "1")]
72    pub app: u64,
73}
74/// HashedParams is a subset of ConsensusParams.
75///
76/// It is hashed into the Header.ConsensusHash.
77#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
79#[proto_message(type_url = "/tendermint.types.HashedParams")]
80pub struct HashedParams {
81    #[prost(int64, tag = "1")]
82    pub block_max_bytes: i64,
83    #[prost(int64, tag = "2")]
84    pub block_max_gas: i64,
85}
86/// ABCIParams configure functionality specific to the Application Blockchain Interface.
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
89#[proto_message(type_url = "/tendermint.types.ABCIParams")]
90pub struct AbciParams {
91    /// vote_extensions_enable_height configures the first height during which
92    /// vote extensions will be enabled. During this specified height, and for all
93    /// subsequent heights, precommit messages that do not contain valid extension data
94    /// will be considered invalid. Prior to this height, vote extensions will not
95    /// be used or accepted by validators on the network.
96    ///
97    /// Once enabled, vote extensions will be created by the application in ExtendVote,
98    /// passed to the application for validation in VerifyVoteExtension and given
99    /// to the application to use when proposing a block during PrepareProposal.
100    #[prost(int64, tag = "1")]
101    pub vote_extensions_enable_height: i64,
102}
103#[allow(clippy::derive_partial_eq_without_eq)]
104#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
105#[proto_message(type_url = "/tendermint.types.ValidatorSet")]
106pub struct ValidatorSet {
107    #[prost(message, repeated, tag = "1")]
108    pub validators: ::prost::alloc::vec::Vec<Validator>,
109    #[prost(message, optional, tag = "2")]
110    pub proposer: ::core::option::Option<Validator>,
111    #[prost(int64, tag = "3")]
112    pub total_voting_power: i64,
113}
114#[allow(clippy::derive_partial_eq_without_eq)]
115#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
116#[proto_message(type_url = "/tendermint.types.Validator")]
117pub struct Validator {
118    #[prost(bytes = "vec", tag = "1")]
119    pub address: ::prost::alloc::vec::Vec<u8>,
120    #[prost(message, optional, tag = "2")]
121    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
122    #[prost(int64, tag = "3")]
123    pub voting_power: i64,
124    #[prost(int64, tag = "4")]
125    pub proposer_priority: i64,
126}
127#[allow(clippy::derive_partial_eq_without_eq)]
128#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
129#[proto_message(type_url = "/tendermint.types.SimpleValidator")]
130pub struct SimpleValidator {
131    #[prost(message, optional, tag = "1")]
132    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
133    #[prost(int64, tag = "2")]
134    pub voting_power: i64,
135}
136/// BlockIdFlag indicates which BlockID the signature is for
137#[derive(
138    Clone,
139    Copy,
140    Debug,
141    PartialEq,
142    Eq,
143    Hash,
144    PartialOrd,
145    Ord,
146    ::prost::Enumeration,
147    ::schemars::JsonSchema,
148)]
149#[repr(i32)]
150pub enum BlockIdFlag {
151    /// indicates an error condition
152    Unknown = 0,
153    /// the vote was not received
154    Absent = 1,
155    /// voted for the block that received the majority
156    Commit = 2,
157    /// voted for nil
158    Nil = 3,
159}
160impl BlockIdFlag {
161    /// String value of the enum field names used in the ProtoBuf definition.
162    ///
163    /// The values are not transformed in any way and thus are considered stable
164    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
165    pub fn as_str_name(&self) -> &'static str {
166        match self {
167            BlockIdFlag::Unknown => "BLOCK_ID_FLAG_UNKNOWN",
168            BlockIdFlag::Absent => "BLOCK_ID_FLAG_ABSENT",
169            BlockIdFlag::Commit => "BLOCK_ID_FLAG_COMMIT",
170            BlockIdFlag::Nil => "BLOCK_ID_FLAG_NIL",
171        }
172    }
173    /// Creates an enum from field names used in the ProtoBuf definition.
174    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
175        match value {
176            "BLOCK_ID_FLAG_UNKNOWN" => Some(Self::Unknown),
177            "BLOCK_ID_FLAG_ABSENT" => Some(Self::Absent),
178            "BLOCK_ID_FLAG_COMMIT" => Some(Self::Commit),
179            "BLOCK_ID_FLAG_NIL" => Some(Self::Nil),
180            _ => None,
181        }
182    }
183}
184/// PartsetHeader
185#[allow(clippy::derive_partial_eq_without_eq)]
186#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
187#[proto_message(type_url = "/tendermint.types.PartSetHeader")]
188pub struct PartSetHeader {
189    #[prost(uint32, tag = "1")]
190    pub total: u32,
191    #[prost(bytes = "vec", tag = "2")]
192    pub hash: ::prost::alloc::vec::Vec<u8>,
193}
194#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
196#[proto_message(type_url = "/tendermint.types.Part")]
197pub struct Part {
198    #[prost(uint32, tag = "1")]
199    pub index: u32,
200    #[prost(bytes = "vec", tag = "2")]
201    pub bytes: ::prost::alloc::vec::Vec<u8>,
202    #[prost(message, optional, tag = "3")]
203    pub proof: ::core::option::Option<super::crypto::Proof>,
204}
205/// BlockID
206#[allow(clippy::derive_partial_eq_without_eq)]
207#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
208#[proto_message(type_url = "/tendermint.types.BlockID")]
209pub struct BlockId {
210    #[prost(bytes = "vec", tag = "1")]
211    pub hash: ::prost::alloc::vec::Vec<u8>,
212    #[prost(message, optional, tag = "2")]
213    pub part_set_header: ::core::option::Option<PartSetHeader>,
214}
215/// Header defines the structure of a block header.
216#[allow(clippy::derive_partial_eq_without_eq)]
217#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
218#[proto_message(type_url = "/tendermint.types.Header")]
219pub struct Header {
220    /// basic block info
221    #[prost(message, optional, tag = "1")]
222    pub version: ::core::option::Option<super::version::Consensus>,
223    #[prost(string, tag = "2")]
224    pub chain_id: ::prost::alloc::string::String,
225    #[prost(int64, tag = "3")]
226    pub height: i64,
227    #[prost(message, optional, tag = "4")]
228    pub time: ::core::option::Option<crate::shim::Timestamp>,
229    /// prev block info
230    #[prost(message, optional, tag = "5")]
231    pub last_block_id: ::core::option::Option<BlockId>,
232    /// hashes of block data
233    ///
234    /// commit from validators from the last block
235    #[prost(bytes = "vec", tag = "6")]
236    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
237    /// transactions
238    #[prost(bytes = "vec", tag = "7")]
239    pub data_hash: ::prost::alloc::vec::Vec<u8>,
240    /// hashes from the app output from the prev block
241    ///
242    /// validators for the current block
243    #[prost(bytes = "vec", tag = "8")]
244    pub validators_hash: ::prost::alloc::vec::Vec<u8>,
245    /// validators for the next block
246    #[prost(bytes = "vec", tag = "9")]
247    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
248    /// consensus params for current block
249    #[prost(bytes = "vec", tag = "10")]
250    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
251    /// state after txs from the previous block
252    #[prost(bytes = "vec", tag = "11")]
253    pub app_hash: ::prost::alloc::vec::Vec<u8>,
254    /// root hash of all results from the txs from the previous block
255    #[prost(bytes = "vec", tag = "12")]
256    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
257    /// consensus info
258    ///
259    /// evidence included in the block
260    #[prost(bytes = "vec", tag = "13")]
261    pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
262    /// original proposer of the block
263    #[prost(bytes = "vec", tag = "14")]
264    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
265}
266/// Data contains the set of transactions included in the block
267#[allow(clippy::derive_partial_eq_without_eq)]
268#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
269#[proto_message(type_url = "/tendermint.types.Data")]
270pub struct Data {
271    /// Txs that will be applied by state @ block.Height+1.
272    /// NOTE: not all txs here are valid.  We're just agreeing on the order first.
273    /// This means that block.AppHash does not include these txs.
274    #[prost(bytes = "vec", repeated, tag = "1")]
275    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
276}
277/// Vote represents a prevote or precommit vote from validators for
278/// consensus.
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
281#[proto_message(type_url = "/tendermint.types.Vote")]
282pub struct Vote {
283    #[prost(enumeration = "SignedMsgType", tag = "1")]
284    pub r#type: i32,
285    #[prost(int64, tag = "2")]
286    pub height: i64,
287    #[prost(int32, tag = "3")]
288    pub round: i32,
289    /// zero if vote is nil.
290    #[prost(message, optional, tag = "4")]
291    pub block_id: ::core::option::Option<BlockId>,
292    #[prost(message, optional, tag = "5")]
293    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
294    #[prost(bytes = "vec", tag = "6")]
295    pub validator_address: ::prost::alloc::vec::Vec<u8>,
296    #[prost(int32, tag = "7")]
297    pub validator_index: i32,
298    /// Vote signature by the validator if they participated in consensus for the
299    /// associated block.
300    #[prost(bytes = "vec", tag = "8")]
301    pub signature: ::prost::alloc::vec::Vec<u8>,
302    /// Vote extension provided by the application. Only valid for precommit
303    /// messages.
304    #[prost(bytes = "vec", tag = "9")]
305    pub extension: ::prost::alloc::vec::Vec<u8>,
306    /// Vote extension signature by the validator if they participated in
307    /// consensus for the associated block.
308    /// Only valid for precommit messages.
309    #[prost(bytes = "vec", tag = "10")]
310    pub extension_signature: ::prost::alloc::vec::Vec<u8>,
311}
312/// Commit contains the evidence that a block was committed by a set of validators.
313#[allow(clippy::derive_partial_eq_without_eq)]
314#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
315#[proto_message(type_url = "/tendermint.types.Commit")]
316pub struct Commit {
317    #[prost(int64, tag = "1")]
318    pub height: i64,
319    #[prost(int32, tag = "2")]
320    pub round: i32,
321    #[prost(message, optional, tag = "3")]
322    pub block_id: ::core::option::Option<BlockId>,
323    #[prost(message, repeated, tag = "4")]
324    pub signatures: ::prost::alloc::vec::Vec<CommitSig>,
325}
326/// CommitSig is a part of the Vote included in a Commit.
327#[allow(clippy::derive_partial_eq_without_eq)]
328#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
329#[proto_message(type_url = "/tendermint.types.CommitSig")]
330pub struct CommitSig {
331    #[prost(enumeration = "BlockIdFlag", tag = "1")]
332    pub block_id_flag: i32,
333    #[prost(bytes = "vec", tag = "2")]
334    pub validator_address: ::prost::alloc::vec::Vec<u8>,
335    #[prost(message, optional, tag = "3")]
336    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
337    #[prost(bytes = "vec", tag = "4")]
338    pub signature: ::prost::alloc::vec::Vec<u8>,
339}
340#[allow(clippy::derive_partial_eq_without_eq)]
341#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
342#[proto_message(type_url = "/tendermint.types.ExtendedCommit")]
343pub struct ExtendedCommit {
344    #[prost(int64, tag = "1")]
345    pub height: i64,
346    #[prost(int32, tag = "2")]
347    pub round: i32,
348    #[prost(message, optional, tag = "3")]
349    pub block_id: ::core::option::Option<BlockId>,
350    #[prost(message, repeated, tag = "4")]
351    pub extended_signatures: ::prost::alloc::vec::Vec<ExtendedCommitSig>,
352}
353/// ExtendedCommitSig retains all the same fields as CommitSig but adds vote
354/// extension-related fields. We use two signatures to ensure backwards compatibility.
355/// That is the digest of the original signature is still the same in prior versions
356#[allow(clippy::derive_partial_eq_without_eq)]
357#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
358#[proto_message(type_url = "/tendermint.types.ExtendedCommitSig")]
359pub struct ExtendedCommitSig {
360    #[prost(enumeration = "BlockIdFlag", tag = "1")]
361    pub block_id_flag: i32,
362    #[prost(bytes = "vec", tag = "2")]
363    pub validator_address: ::prost::alloc::vec::Vec<u8>,
364    #[prost(message, optional, tag = "3")]
365    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
366    #[prost(bytes = "vec", tag = "4")]
367    pub signature: ::prost::alloc::vec::Vec<u8>,
368    /// Vote extension data
369    #[prost(bytes = "vec", tag = "5")]
370    pub extension: ::prost::alloc::vec::Vec<u8>,
371    /// Vote extension signature
372    #[prost(bytes = "vec", tag = "6")]
373    pub extension_signature: ::prost::alloc::vec::Vec<u8>,
374}
375#[allow(clippy::derive_partial_eq_without_eq)]
376#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
377#[proto_message(type_url = "/tendermint.types.Proposal")]
378pub struct Proposal {
379    #[prost(enumeration = "SignedMsgType", tag = "1")]
380    pub r#type: i32,
381    #[prost(int64, tag = "2")]
382    pub height: i64,
383    #[prost(int32, tag = "3")]
384    pub round: i32,
385    #[prost(int32, tag = "4")]
386    pub pol_round: i32,
387    #[prost(message, optional, tag = "5")]
388    pub block_id: ::core::option::Option<BlockId>,
389    #[prost(message, optional, tag = "6")]
390    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
391    #[prost(bytes = "vec", tag = "7")]
392    pub signature: ::prost::alloc::vec::Vec<u8>,
393}
394#[allow(clippy::derive_partial_eq_without_eq)]
395#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
396#[proto_message(type_url = "/tendermint.types.SignedHeader")]
397pub struct SignedHeader {
398    #[prost(message, optional, tag = "1")]
399    pub header: ::core::option::Option<Header>,
400    #[prost(message, optional, tag = "2")]
401    pub commit: ::core::option::Option<Commit>,
402}
403#[allow(clippy::derive_partial_eq_without_eq)]
404#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
405#[proto_message(type_url = "/tendermint.types.LightBlock")]
406pub struct LightBlock {
407    #[prost(message, optional, tag = "1")]
408    pub signed_header: ::core::option::Option<SignedHeader>,
409    #[prost(message, optional, tag = "2")]
410    pub validator_set: ::core::option::Option<ValidatorSet>,
411}
412#[allow(clippy::derive_partial_eq_without_eq)]
413#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
414#[proto_message(type_url = "/tendermint.types.BlockMeta")]
415pub struct BlockMeta {
416    #[prost(message, optional, tag = "1")]
417    pub block_id: ::core::option::Option<BlockId>,
418    #[prost(int64, tag = "2")]
419    pub block_size: i64,
420    #[prost(message, optional, tag = "3")]
421    pub header: ::core::option::Option<Header>,
422    #[prost(int64, tag = "4")]
423    pub num_txs: i64,
424}
425/// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
426#[allow(clippy::derive_partial_eq_without_eq)]
427#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
428#[proto_message(type_url = "/tendermint.types.TxProof")]
429pub struct TxProof {
430    #[prost(bytes = "vec", tag = "1")]
431    pub root_hash: ::prost::alloc::vec::Vec<u8>,
432    #[prost(bytes = "vec", tag = "2")]
433    pub data: ::prost::alloc::vec::Vec<u8>,
434    #[prost(message, optional, tag = "3")]
435    pub proof: ::core::option::Option<super::crypto::Proof>,
436}
437/// SignedMsgType is a type of signed message in the consensus.
438#[derive(
439    Clone,
440    Copy,
441    Debug,
442    PartialEq,
443    Eq,
444    Hash,
445    PartialOrd,
446    Ord,
447    ::prost::Enumeration,
448    ::schemars::JsonSchema,
449)]
450#[repr(i32)]
451pub enum SignedMsgType {
452    Unknown = 0,
453    /// Votes
454    Prevote = 1,
455    Precommit = 2,
456    /// Proposals
457    Proposal = 32,
458}
459impl SignedMsgType {
460    /// String value of the enum field names used in the ProtoBuf definition.
461    ///
462    /// The values are not transformed in any way and thus are considered stable
463    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
464    pub fn as_str_name(&self) -> &'static str {
465        match self {
466            SignedMsgType::Unknown => "SIGNED_MSG_TYPE_UNKNOWN",
467            SignedMsgType::Prevote => "SIGNED_MSG_TYPE_PREVOTE",
468            SignedMsgType::Precommit => "SIGNED_MSG_TYPE_PRECOMMIT",
469            SignedMsgType::Proposal => "SIGNED_MSG_TYPE_PROPOSAL",
470        }
471    }
472    /// Creates an enum from field names used in the ProtoBuf definition.
473    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
474        match value {
475            "SIGNED_MSG_TYPE_UNKNOWN" => Some(Self::Unknown),
476            "SIGNED_MSG_TYPE_PREVOTE" => Some(Self::Prevote),
477            "SIGNED_MSG_TYPE_PRECOMMIT" => Some(Self::Precommit),
478            "SIGNED_MSG_TYPE_PROPOSAL" => Some(Self::Proposal),
479            _ => None,
480        }
481    }
482}
483#[allow(clippy::derive_partial_eq_without_eq)]
484#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
485#[proto_message(type_url = "/tendermint.types.Evidence")]
486pub struct Evidence {
487    #[prost(oneof = "evidence::Sum", tags = "1, 2")]
488    pub sum: ::core::option::Option<evidence::Sum>,
489}
490/// Nested message and enum types in `Evidence`.
491pub mod evidence {
492    use provwasm_proc_macro::CosmwasmExt;
493    #[allow(clippy::derive_partial_eq_without_eq)]
494    #[derive(Clone, PartialEq, Eq, ::prost::Oneof, ::schemars::JsonSchema)]
495    pub enum Sum {
496        #[prost(message, tag = "1")]
497        DuplicateVoteEvidence(super::DuplicateVoteEvidence),
498        #[prost(message, tag = "2")]
499        LightClientAttackEvidence(super::LightClientAttackEvidence),
500    }
501}
502/// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
503#[allow(clippy::derive_partial_eq_without_eq)]
504#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
505#[proto_message(type_url = "/tendermint.types.DuplicateVoteEvidence")]
506pub struct DuplicateVoteEvidence {
507    #[prost(message, optional, tag = "1")]
508    pub vote_a: ::core::option::Option<Vote>,
509    #[prost(message, optional, tag = "2")]
510    pub vote_b: ::core::option::Option<Vote>,
511    #[prost(int64, tag = "3")]
512    pub total_voting_power: i64,
513    #[prost(int64, tag = "4")]
514    pub validator_power: i64,
515    #[prost(message, optional, tag = "5")]
516    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
517}
518/// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
519#[allow(clippy::derive_partial_eq_without_eq)]
520#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
521#[proto_message(type_url = "/tendermint.types.LightClientAttackEvidence")]
522pub struct LightClientAttackEvidence {
523    #[prost(message, optional, tag = "1")]
524    pub conflicting_block: ::core::option::Option<LightBlock>,
525    #[prost(int64, tag = "2")]
526    pub common_height: i64,
527    #[prost(message, repeated, tag = "3")]
528    pub byzantine_validators: ::prost::alloc::vec::Vec<Validator>,
529    #[prost(int64, tag = "4")]
530    pub total_voting_power: i64,
531    #[prost(message, optional, tag = "5")]
532    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
533}
534#[allow(clippy::derive_partial_eq_without_eq)]
535#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
536#[proto_message(type_url = "/tendermint.types.EvidenceList")]
537pub struct EvidenceList {
538    #[prost(message, repeated, tag = "1")]
539    pub evidence: ::prost::alloc::vec::Vec<Evidence>,
540}
541#[allow(clippy::derive_partial_eq_without_eq)]
542#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
543#[proto_message(type_url = "/tendermint.types.Block")]
544pub struct Block {
545    #[prost(message, optional, tag = "1")]
546    pub header: ::core::option::Option<Header>,
547    #[prost(message, optional, tag = "2")]
548    pub data: ::core::option::Option<Data>,
549    #[prost(message, optional, tag = "3")]
550    pub evidence: ::core::option::Option<EvidenceList>,
551    #[prost(message, optional, tag = "4")]
552    pub last_commit: ::core::option::Option<Commit>,
553}
554#[allow(clippy::derive_partial_eq_without_eq)]
555#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
556#[proto_message(type_url = "/tendermint.types.EventDataRoundState")]
557pub struct EventDataRoundState {
558    #[prost(int64, tag = "1")]
559    pub height: i64,
560    #[prost(int32, tag = "2")]
561    pub round: i32,
562    #[prost(string, tag = "3")]
563    pub step: ::prost::alloc::string::String,
564}
565#[allow(clippy::derive_partial_eq_without_eq)]
566#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
567#[proto_message(type_url = "/tendermint.types.CanonicalBlockID")]
568pub struct CanonicalBlockId {
569    #[prost(bytes = "vec", tag = "1")]
570    pub hash: ::prost::alloc::vec::Vec<u8>,
571    #[prost(message, optional, tag = "2")]
572    pub part_set_header: ::core::option::Option<CanonicalPartSetHeader>,
573}
574#[allow(clippy::derive_partial_eq_without_eq)]
575#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
576#[proto_message(type_url = "/tendermint.types.CanonicalPartSetHeader")]
577pub struct CanonicalPartSetHeader {
578    #[prost(uint32, tag = "1")]
579    pub total: u32,
580    #[prost(bytes = "vec", tag = "2")]
581    pub hash: ::prost::alloc::vec::Vec<u8>,
582}
583#[allow(clippy::derive_partial_eq_without_eq)]
584#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
585#[proto_message(type_url = "/tendermint.types.CanonicalProposal")]
586pub struct CanonicalProposal {
587    /// type alias for byte
588    #[prost(enumeration = "SignedMsgType", tag = "1")]
589    pub r#type: i32,
590    /// canonicalization requires fixed size encoding here
591    #[prost(sfixed64, tag = "2")]
592    pub height: i64,
593    /// canonicalization requires fixed size encoding here
594    #[prost(sfixed64, tag = "3")]
595    pub round: i64,
596    #[prost(int64, tag = "4")]
597    pub pol_round: i64,
598    #[prost(message, optional, tag = "5")]
599    pub block_id: ::core::option::Option<CanonicalBlockId>,
600    #[prost(message, optional, tag = "6")]
601    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
602    #[prost(string, tag = "7")]
603    pub chain_id: ::prost::alloc::string::String,
604}
605#[allow(clippy::derive_partial_eq_without_eq)]
606#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
607#[proto_message(type_url = "/tendermint.types.CanonicalVote")]
608pub struct CanonicalVote {
609    /// type alias for byte
610    #[prost(enumeration = "SignedMsgType", tag = "1")]
611    pub r#type: i32,
612    /// canonicalization requires fixed size encoding here
613    #[prost(sfixed64, tag = "2")]
614    pub height: i64,
615    /// canonicalization requires fixed size encoding here
616    #[prost(sfixed64, tag = "3")]
617    pub round: i64,
618    #[prost(message, optional, tag = "4")]
619    pub block_id: ::core::option::Option<CanonicalBlockId>,
620    #[prost(message, optional, tag = "5")]
621    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
622    #[prost(string, tag = "6")]
623    pub chain_id: ::prost::alloc::string::String,
624}
625/// CanonicalVoteExtension provides us a way to serialize a vote extension from
626/// a particular validator such that we can sign over those serialized bytes.
627#[allow(clippy::derive_partial_eq_without_eq)]
628#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
629#[proto_message(type_url = "/tendermint.types.CanonicalVoteExtension")]
630pub struct CanonicalVoteExtension {
631    #[prost(bytes = "vec", tag = "1")]
632    pub extension: ::prost::alloc::vec::Vec<u8>,
633    #[prost(sfixed64, tag = "2")]
634    pub height: i64,
635    #[prost(sfixed64, tag = "3")]
636    pub round: i64,
637    #[prost(string, tag = "4")]
638    pub chain_id: ::prost::alloc::string::String,
639}