classic_rust/types/tendermint/
types.rs

1use osmosis_std_derive::CosmwasmExt;
2/// ConsensusParams contains consensus critical parameters that determine the
3/// validity of blocks.
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(
6    Clone,
7    PartialEq,
8    Eq,
9    ::prost::Message,
10    ::serde::Serialize,
11    ::serde::Deserialize,
12    ::schemars::JsonSchema,
13    CosmwasmExt,
14)]
15#[proto_message(type_url = "/tendermint.types.ConsensusParams")]
16pub struct ConsensusParams {
17    #[prost(message, optional, tag = "1")]
18    pub block: ::core::option::Option<BlockParams>,
19    #[prost(message, optional, tag = "2")]
20    pub evidence: ::core::option::Option<EvidenceParams>,
21    #[prost(message, optional, tag = "3")]
22    pub validator: ::core::option::Option<ValidatorParams>,
23    #[prost(message, optional, tag = "4")]
24    pub version: ::core::option::Option<VersionParams>,
25    #[prost(message, optional, tag = "5")]
26    pub abci: ::core::option::Option<AbciParams>,
27}
28/// BlockParams contains limits on the block size.
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(
31    Clone,
32    PartialEq,
33    Eq,
34    ::prost::Message,
35    ::serde::Serialize,
36    ::serde::Deserialize,
37    ::schemars::JsonSchema,
38    CosmwasmExt,
39)]
40#[proto_message(type_url = "/tendermint.types.BlockParams")]
41pub struct BlockParams {
42    /// Max block size, in bytes.
43    /// Note: must be greater than 0
44    #[prost(int64, tag = "1")]
45    pub max_bytes: i64,
46    /// Max gas per block.
47    /// Note: must be greater or equal to -1
48    #[prost(int64, tag = "2")]
49    pub max_gas: i64,
50}
51/// EvidenceParams determine how we handle evidence of malfeasance.
52#[allow(clippy::derive_partial_eq_without_eq)]
53#[derive(
54    Clone,
55    PartialEq,
56    Eq,
57    ::prost::Message,
58    ::serde::Serialize,
59    ::serde::Deserialize,
60    ::schemars::JsonSchema,
61    CosmwasmExt,
62)]
63#[proto_message(type_url = "/tendermint.types.EvidenceParams")]
64pub struct EvidenceParams {
65    /// Max age of evidence, in blocks.
66    ///
67    /// The basic formula for calculating this is: MaxAgeDuration / {average block
68    /// time}.
69    #[prost(int64, tag = "1")]
70    pub max_age_num_blocks: i64,
71    /// Max age of evidence, in time.
72    ///
73    /// It should correspond with an app's "unbonding period" or other similar
74    /// mechanism for handling [Nothing-At-Stake
75    /// attacks](<https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed>).
76    #[prost(message, optional, tag = "2")]
77    pub max_age_duration: ::core::option::Option<crate::shim::Duration>,
78    /// This sets the maximum size of total evidence in bytes that can be committed in a single block.
79    /// and should fall comfortably under the max block bytes.
80    /// Default is 1048576 or 1MB
81    #[prost(int64, tag = "3")]
82    pub max_bytes: i64,
83}
84/// ValidatorParams restrict the public key types validators can use.
85/// NOTE: uses ABCI pubkey naming, not Amino names.
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(
88    Clone,
89    PartialEq,
90    Eq,
91    ::prost::Message,
92    ::serde::Serialize,
93    ::serde::Deserialize,
94    ::schemars::JsonSchema,
95    CosmwasmExt,
96)]
97#[proto_message(type_url = "/tendermint.types.ValidatorParams")]
98pub struct ValidatorParams {
99    #[prost(string, repeated, tag = "1")]
100    pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
101}
102/// VersionParams contains the ABCI application version.
103#[allow(clippy::derive_partial_eq_without_eq)]
104#[derive(
105    Clone,
106    PartialEq,
107    Eq,
108    ::prost::Message,
109    ::serde::Serialize,
110    ::serde::Deserialize,
111    ::schemars::JsonSchema,
112    CosmwasmExt,
113)]
114#[proto_message(type_url = "/tendermint.types.VersionParams")]
115pub struct VersionParams {
116    #[prost(uint64, tag = "1")]
117    pub app: u64,
118}
119/// HashedParams is a subset of ConsensusParams.
120///
121/// It is hashed into the Header.ConsensusHash.
122#[allow(clippy::derive_partial_eq_without_eq)]
123#[derive(
124    Clone,
125    PartialEq,
126    Eq,
127    ::prost::Message,
128    ::serde::Serialize,
129    ::serde::Deserialize,
130    ::schemars::JsonSchema,
131    CosmwasmExt,
132)]
133#[proto_message(type_url = "/tendermint.types.HashedParams")]
134pub struct HashedParams {
135    #[prost(int64, tag = "1")]
136    pub block_max_bytes: i64,
137    #[prost(int64, tag = "2")]
138    pub block_max_gas: i64,
139}
140/// ABCIParams configure functionality specific to the Application Blockchain Interface.
141#[allow(clippy::derive_partial_eq_without_eq)]
142#[derive(
143    Clone,
144    PartialEq,
145    Eq,
146    ::prost::Message,
147    ::serde::Serialize,
148    ::serde::Deserialize,
149    ::schemars::JsonSchema,
150    CosmwasmExt,
151)]
152#[proto_message(type_url = "/tendermint.types.ABCIParams")]
153pub struct AbciParams {
154    /// vote_extensions_enable_height configures the first height during which
155    /// vote extensions will be enabled. During this specified height, and for all
156    /// subsequent heights, precommit messages that do not contain valid extension data
157    /// will be considered invalid. Prior to this height, vote extensions will not
158    /// be used or accepted by validators on the network.
159    ///
160    /// Once enabled, vote extensions will be created by the application in ExtendVote,
161    /// passed to the application for validation in VerifyVoteExtension and given
162    /// to the application to use when proposing a block during PrepareProposal.
163    #[prost(int64, tag = "1")]
164    pub vote_extensions_enable_height: i64,
165}
166#[allow(clippy::derive_partial_eq_without_eq)]
167#[derive(
168    Clone,
169    PartialEq,
170    Eq,
171    ::prost::Message,
172    ::serde::Serialize,
173    ::serde::Deserialize,
174    ::schemars::JsonSchema,
175    CosmwasmExt,
176)]
177#[proto_message(type_url = "/tendermint.types.ValidatorSet")]
178pub struct ValidatorSet {
179    #[prost(message, repeated, tag = "1")]
180    pub validators: ::prost::alloc::vec::Vec<Validator>,
181    #[prost(message, optional, tag = "2")]
182    pub proposer: ::core::option::Option<Validator>,
183    #[prost(int64, tag = "3")]
184    pub total_voting_power: i64,
185}
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(
188    Clone,
189    PartialEq,
190    Eq,
191    ::prost::Message,
192    ::serde::Serialize,
193    ::serde::Deserialize,
194    ::schemars::JsonSchema,
195    CosmwasmExt,
196)]
197#[proto_message(type_url = "/tendermint.types.Validator")]
198pub struct Validator {
199    #[prost(bytes = "vec", tag = "1")]
200    pub address: ::prost::alloc::vec::Vec<u8>,
201    #[prost(message, optional, tag = "2")]
202    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
203    #[prost(int64, tag = "3")]
204    pub voting_power: i64,
205    #[prost(int64, tag = "4")]
206    pub proposer_priority: i64,
207}
208#[allow(clippy::derive_partial_eq_without_eq)]
209#[derive(
210    Clone,
211    PartialEq,
212    Eq,
213    ::prost::Message,
214    ::serde::Serialize,
215    ::serde::Deserialize,
216    ::schemars::JsonSchema,
217    CosmwasmExt,
218)]
219#[proto_message(type_url = "/tendermint.types.SimpleValidator")]
220pub struct SimpleValidator {
221    #[prost(message, optional, tag = "1")]
222    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
223    #[prost(int64, tag = "2")]
224    pub voting_power: i64,
225}
226/// BlockIdFlag indicates which BlockID the signature is for
227#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
228#[repr(i32)]
229#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
230pub enum BlockIdFlag {
231    /// indicates an error condition
232    Unknown = 0,
233    /// the vote was not received
234    Absent = 1,
235    /// voted for the block that received the majority
236    Commit = 2,
237    /// voted for nil
238    Nil = 3,
239}
240impl BlockIdFlag {
241    /// String value of the enum field names used in the ProtoBuf definition.
242    ///
243    /// The values are not transformed in any way and thus are considered stable
244    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
245    pub fn as_str_name(&self) -> &'static str {
246        match self {
247            BlockIdFlag::Unknown => "BLOCK_ID_FLAG_UNKNOWN",
248            BlockIdFlag::Absent => "BLOCK_ID_FLAG_ABSENT",
249            BlockIdFlag::Commit => "BLOCK_ID_FLAG_COMMIT",
250            BlockIdFlag::Nil => "BLOCK_ID_FLAG_NIL",
251        }
252    }
253    /// Creates an enum from field names used in the ProtoBuf definition.
254    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
255        match value {
256            "BLOCK_ID_FLAG_UNKNOWN" => Some(Self::Unknown),
257            "BLOCK_ID_FLAG_ABSENT" => Some(Self::Absent),
258            "BLOCK_ID_FLAG_COMMIT" => Some(Self::Commit),
259            "BLOCK_ID_FLAG_NIL" => Some(Self::Nil),
260            _ => None,
261        }
262    }
263}
264/// PartsetHeader
265#[allow(clippy::derive_partial_eq_without_eq)]
266#[derive(
267    Clone,
268    PartialEq,
269    Eq,
270    ::prost::Message,
271    ::serde::Serialize,
272    ::serde::Deserialize,
273    ::schemars::JsonSchema,
274    CosmwasmExt,
275)]
276#[proto_message(type_url = "/tendermint.types.PartSetHeader")]
277pub struct PartSetHeader {
278    #[prost(uint32, tag = "1")]
279    pub total: u32,
280    #[prost(bytes = "vec", tag = "2")]
281    pub hash: ::prost::alloc::vec::Vec<u8>,
282}
283#[allow(clippy::derive_partial_eq_without_eq)]
284#[derive(
285    Clone,
286    PartialEq,
287    Eq,
288    ::prost::Message,
289    ::serde::Serialize,
290    ::serde::Deserialize,
291    ::schemars::JsonSchema,
292    CosmwasmExt,
293)]
294#[proto_message(type_url = "/tendermint.types.Part")]
295pub struct Part {
296    #[prost(uint32, tag = "1")]
297    pub index: u32,
298    #[prost(bytes = "vec", tag = "2")]
299    pub bytes: ::prost::alloc::vec::Vec<u8>,
300    #[prost(message, optional, tag = "3")]
301    pub proof: ::core::option::Option<super::crypto::Proof>,
302}
303/// BlockID
304#[allow(clippy::derive_partial_eq_without_eq)]
305#[derive(
306    Clone,
307    PartialEq,
308    Eq,
309    ::prost::Message,
310    ::serde::Serialize,
311    ::serde::Deserialize,
312    ::schemars::JsonSchema,
313    CosmwasmExt,
314)]
315#[proto_message(type_url = "/tendermint.types.BlockID")]
316pub struct BlockId {
317    #[prost(bytes = "vec", tag = "1")]
318    pub hash: ::prost::alloc::vec::Vec<u8>,
319    #[prost(message, optional, tag = "2")]
320    pub part_set_header: ::core::option::Option<PartSetHeader>,
321}
322/// Header defines the structure of a block header.
323#[allow(clippy::derive_partial_eq_without_eq)]
324#[derive(
325    Clone,
326    PartialEq,
327    Eq,
328    ::prost::Message,
329    ::serde::Serialize,
330    ::serde::Deserialize,
331    ::schemars::JsonSchema,
332    CosmwasmExt,
333)]
334#[proto_message(type_url = "/tendermint.types.Header")]
335pub struct Header {
336    /// basic block info
337    #[prost(message, optional, tag = "1")]
338    pub version: ::core::option::Option<super::version::Consensus>,
339    #[prost(string, tag = "2")]
340    pub chain_id: ::prost::alloc::string::String,
341    #[prost(int64, tag = "3")]
342    pub height: i64,
343    #[prost(message, optional, tag = "4")]
344    pub time: ::core::option::Option<crate::shim::Timestamp>,
345    /// prev block info
346    #[prost(message, optional, tag = "5")]
347    pub last_block_id: ::core::option::Option<BlockId>,
348    /// hashes of block data
349    ///
350    /// commit from validators from the last block
351    #[prost(bytes = "vec", tag = "6")]
352    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
353    /// transactions
354    #[prost(bytes = "vec", tag = "7")]
355    pub data_hash: ::prost::alloc::vec::Vec<u8>,
356    /// hashes from the app output from the prev block
357    ///
358    /// validators for the current block
359    #[prost(bytes = "vec", tag = "8")]
360    pub validators_hash: ::prost::alloc::vec::Vec<u8>,
361    /// validators for the next block
362    #[prost(bytes = "vec", tag = "9")]
363    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
364    /// consensus params for current block
365    #[prost(bytes = "vec", tag = "10")]
366    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
367    /// state after txs from the previous block
368    #[prost(bytes = "vec", tag = "11")]
369    pub app_hash: ::prost::alloc::vec::Vec<u8>,
370    /// root hash of all results from the txs from the previous block
371    #[prost(bytes = "vec", tag = "12")]
372    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
373    /// consensus info
374    ///
375    /// evidence included in the block
376    #[prost(bytes = "vec", tag = "13")]
377    pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
378    /// original proposer of the block
379    #[prost(bytes = "vec", tag = "14")]
380    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
381}
382/// Data contains the set of transactions included in the block
383#[allow(clippy::derive_partial_eq_without_eq)]
384#[derive(
385    Clone,
386    PartialEq,
387    Eq,
388    ::prost::Message,
389    ::serde::Serialize,
390    ::serde::Deserialize,
391    ::schemars::JsonSchema,
392    CosmwasmExt,
393)]
394#[proto_message(type_url = "/tendermint.types.Data")]
395pub struct Data {
396    /// Txs that will be applied by state @ block.Height+1.
397    /// NOTE: not all txs here are valid.  We're just agreeing on the order first.
398    /// This means that block.AppHash does not include these txs.
399    #[prost(bytes = "vec", repeated, tag = "1")]
400    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
401}
402/// Vote represents a prevote or precommit vote from validators for
403/// consensus.
404#[allow(clippy::derive_partial_eq_without_eq)]
405#[derive(
406    Clone,
407    PartialEq,
408    Eq,
409    ::prost::Message,
410    ::serde::Serialize,
411    ::serde::Deserialize,
412    ::schemars::JsonSchema,
413    CosmwasmExt,
414)]
415#[proto_message(type_url = "/tendermint.types.Vote")]
416pub struct Vote {
417    #[prost(enumeration = "SignedMsgType", tag = "1")]
418    pub r#type: i32,
419    #[prost(int64, tag = "2")]
420    pub height: i64,
421    #[prost(int32, tag = "3")]
422    pub round: i32,
423    /// zero if vote is nil.
424    #[prost(message, optional, tag = "4")]
425    pub block_id: ::core::option::Option<BlockId>,
426    #[prost(message, optional, tag = "5")]
427    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
428    #[prost(bytes = "vec", tag = "6")]
429    pub validator_address: ::prost::alloc::vec::Vec<u8>,
430    #[prost(int32, tag = "7")]
431    pub validator_index: i32,
432    /// Vote signature by the validator if they participated in consensus for the
433    /// associated block.
434    #[prost(bytes = "vec", tag = "8")]
435    pub signature: ::prost::alloc::vec::Vec<u8>,
436    /// Vote extension provided by the application. Only valid for precommit
437    /// messages.
438    #[prost(bytes = "vec", tag = "9")]
439    pub extension: ::prost::alloc::vec::Vec<u8>,
440    /// Vote extension signature by the validator if they participated in
441    /// consensus for the associated block.
442    /// Only valid for precommit messages.
443    #[prost(bytes = "vec", tag = "10")]
444    pub extension_signature: ::prost::alloc::vec::Vec<u8>,
445}
446/// Commit contains the evidence that a block was committed by a set of validators.
447#[allow(clippy::derive_partial_eq_without_eq)]
448#[derive(
449    Clone,
450    PartialEq,
451    Eq,
452    ::prost::Message,
453    ::serde::Serialize,
454    ::serde::Deserialize,
455    ::schemars::JsonSchema,
456    CosmwasmExt,
457)]
458#[proto_message(type_url = "/tendermint.types.Commit")]
459pub struct Commit {
460    #[prost(int64, tag = "1")]
461    pub height: i64,
462    #[prost(int32, tag = "2")]
463    pub round: i32,
464    #[prost(message, optional, tag = "3")]
465    pub block_id: ::core::option::Option<BlockId>,
466    #[prost(message, repeated, tag = "4")]
467    pub signatures: ::prost::alloc::vec::Vec<CommitSig>,
468}
469/// CommitSig is a part of the Vote included in a Commit.
470#[allow(clippy::derive_partial_eq_without_eq)]
471#[derive(
472    Clone,
473    PartialEq,
474    Eq,
475    ::prost::Message,
476    ::serde::Serialize,
477    ::serde::Deserialize,
478    ::schemars::JsonSchema,
479    CosmwasmExt,
480)]
481#[proto_message(type_url = "/tendermint.types.CommitSig")]
482pub struct CommitSig {
483    #[prost(enumeration = "BlockIdFlag", tag = "1")]
484    pub block_id_flag: i32,
485    #[prost(bytes = "vec", tag = "2")]
486    pub validator_address: ::prost::alloc::vec::Vec<u8>,
487    #[prost(message, optional, tag = "3")]
488    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
489    #[prost(bytes = "vec", tag = "4")]
490    pub signature: ::prost::alloc::vec::Vec<u8>,
491}
492#[allow(clippy::derive_partial_eq_without_eq)]
493#[derive(
494    Clone,
495    PartialEq,
496    Eq,
497    ::prost::Message,
498    ::serde::Serialize,
499    ::serde::Deserialize,
500    ::schemars::JsonSchema,
501    CosmwasmExt,
502)]
503#[proto_message(type_url = "/tendermint.types.ExtendedCommit")]
504pub struct ExtendedCommit {
505    #[prost(int64, tag = "1")]
506    pub height: i64,
507    #[prost(int32, tag = "2")]
508    pub round: i32,
509    #[prost(message, optional, tag = "3")]
510    pub block_id: ::core::option::Option<BlockId>,
511    #[prost(message, repeated, tag = "4")]
512    pub extended_signatures: ::prost::alloc::vec::Vec<ExtendedCommitSig>,
513}
514/// ExtendedCommitSig retains all the same fields as CommitSig but adds vote
515/// extension-related fields. We use two signatures to ensure backwards compatibility.
516/// That is the digest of the original signature is still the same in prior versions
517#[allow(clippy::derive_partial_eq_without_eq)]
518#[derive(
519    Clone,
520    PartialEq,
521    Eq,
522    ::prost::Message,
523    ::serde::Serialize,
524    ::serde::Deserialize,
525    ::schemars::JsonSchema,
526    CosmwasmExt,
527)]
528#[proto_message(type_url = "/tendermint.types.ExtendedCommitSig")]
529pub struct ExtendedCommitSig {
530    #[prost(enumeration = "BlockIdFlag", tag = "1")]
531    pub block_id_flag: i32,
532    #[prost(bytes = "vec", tag = "2")]
533    pub validator_address: ::prost::alloc::vec::Vec<u8>,
534    #[prost(message, optional, tag = "3")]
535    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
536    #[prost(bytes = "vec", tag = "4")]
537    pub signature: ::prost::alloc::vec::Vec<u8>,
538    /// Vote extension data
539    #[prost(bytes = "vec", tag = "5")]
540    pub extension: ::prost::alloc::vec::Vec<u8>,
541    /// Vote extension signature
542    #[prost(bytes = "vec", tag = "6")]
543    pub extension_signature: ::prost::alloc::vec::Vec<u8>,
544}
545#[allow(clippy::derive_partial_eq_without_eq)]
546#[derive(
547    Clone,
548    PartialEq,
549    Eq,
550    ::prost::Message,
551    ::serde::Serialize,
552    ::serde::Deserialize,
553    ::schemars::JsonSchema,
554    CosmwasmExt,
555)]
556#[proto_message(type_url = "/tendermint.types.Proposal")]
557pub struct Proposal {
558    #[prost(enumeration = "SignedMsgType", tag = "1")]
559    pub r#type: i32,
560    #[prost(int64, tag = "2")]
561    pub height: i64,
562    #[prost(int32, tag = "3")]
563    pub round: i32,
564    #[prost(int32, tag = "4")]
565    pub pol_round: i32,
566    #[prost(message, optional, tag = "5")]
567    pub block_id: ::core::option::Option<BlockId>,
568    #[prost(message, optional, tag = "6")]
569    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
570    #[prost(bytes = "vec", tag = "7")]
571    pub signature: ::prost::alloc::vec::Vec<u8>,
572}
573#[allow(clippy::derive_partial_eq_without_eq)]
574#[derive(
575    Clone,
576    PartialEq,
577    Eq,
578    ::prost::Message,
579    ::serde::Serialize,
580    ::serde::Deserialize,
581    ::schemars::JsonSchema,
582    CosmwasmExt,
583)]
584#[proto_message(type_url = "/tendermint.types.SignedHeader")]
585pub struct SignedHeader {
586    #[prost(message, optional, tag = "1")]
587    pub header: ::core::option::Option<Header>,
588    #[prost(message, optional, tag = "2")]
589    pub commit: ::core::option::Option<Commit>,
590}
591#[allow(clippy::derive_partial_eq_without_eq)]
592#[derive(
593    Clone,
594    PartialEq,
595    Eq,
596    ::prost::Message,
597    ::serde::Serialize,
598    ::serde::Deserialize,
599    ::schemars::JsonSchema,
600    CosmwasmExt,
601)]
602#[proto_message(type_url = "/tendermint.types.LightBlock")]
603pub struct LightBlock {
604    #[prost(message, optional, tag = "1")]
605    pub signed_header: ::core::option::Option<SignedHeader>,
606    #[prost(message, optional, tag = "2")]
607    pub validator_set: ::core::option::Option<ValidatorSet>,
608}
609#[allow(clippy::derive_partial_eq_without_eq)]
610#[derive(
611    Clone,
612    PartialEq,
613    Eq,
614    ::prost::Message,
615    ::serde::Serialize,
616    ::serde::Deserialize,
617    ::schemars::JsonSchema,
618    CosmwasmExt,
619)]
620#[proto_message(type_url = "/tendermint.types.BlockMeta")]
621pub struct BlockMeta {
622    #[prost(message, optional, tag = "1")]
623    pub block_id: ::core::option::Option<BlockId>,
624    #[prost(int64, tag = "2")]
625    pub block_size: i64,
626    #[prost(message, optional, tag = "3")]
627    pub header: ::core::option::Option<Header>,
628    #[prost(int64, tag = "4")]
629    pub num_txs: i64,
630}
631/// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
632#[allow(clippy::derive_partial_eq_without_eq)]
633#[derive(
634    Clone,
635    PartialEq,
636    Eq,
637    ::prost::Message,
638    ::serde::Serialize,
639    ::serde::Deserialize,
640    ::schemars::JsonSchema,
641    CosmwasmExt,
642)]
643#[proto_message(type_url = "/tendermint.types.TxProof")]
644pub struct TxProof {
645    #[prost(bytes = "vec", tag = "1")]
646    pub root_hash: ::prost::alloc::vec::Vec<u8>,
647    #[prost(bytes = "vec", tag = "2")]
648    pub data: ::prost::alloc::vec::Vec<u8>,
649    #[prost(message, optional, tag = "3")]
650    pub proof: ::core::option::Option<super::crypto::Proof>,
651}
652/// SignedMsgType is a type of signed message in the consensus.
653#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
654#[repr(i32)]
655#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
656pub enum SignedMsgType {
657    Unknown = 0,
658    /// Votes
659    Prevote = 1,
660    Precommit = 2,
661    /// Proposals
662    Proposal = 32,
663}
664impl SignedMsgType {
665    /// String value of the enum field names used in the ProtoBuf definition.
666    ///
667    /// The values are not transformed in any way and thus are considered stable
668    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
669    pub fn as_str_name(&self) -> &'static str {
670        match self {
671            SignedMsgType::Unknown => "SIGNED_MSG_TYPE_UNKNOWN",
672            SignedMsgType::Prevote => "SIGNED_MSG_TYPE_PREVOTE",
673            SignedMsgType::Precommit => "SIGNED_MSG_TYPE_PRECOMMIT",
674            SignedMsgType::Proposal => "SIGNED_MSG_TYPE_PROPOSAL",
675        }
676    }
677    /// Creates an enum from field names used in the ProtoBuf definition.
678    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
679        match value {
680            "SIGNED_MSG_TYPE_UNKNOWN" => Some(Self::Unknown),
681            "SIGNED_MSG_TYPE_PREVOTE" => Some(Self::Prevote),
682            "SIGNED_MSG_TYPE_PRECOMMIT" => Some(Self::Precommit),
683            "SIGNED_MSG_TYPE_PROPOSAL" => Some(Self::Proposal),
684            _ => None,
685        }
686    }
687}
688#[allow(clippy::derive_partial_eq_without_eq)]
689#[derive(
690    Clone,
691    PartialEq,
692    Eq,
693    ::prost::Message,
694    ::serde::Serialize,
695    ::serde::Deserialize,
696    ::schemars::JsonSchema,
697    CosmwasmExt,
698)]
699#[proto_message(type_url = "/tendermint.types.Evidence")]
700pub struct Evidence {
701    #[prost(oneof = "evidence::Sum", tags = "1, 2")]
702    pub sum: ::core::option::Option<evidence::Sum>,
703}
704/// Nested message and enum types in `Evidence`.
705pub mod evidence {
706    use osmosis_std_derive::CosmwasmExt;
707    #[allow(clippy::derive_partial_eq_without_eq)]
708    #[derive(
709        Clone,
710        PartialEq,
711        Eq,
712        ::prost::Oneof,
713        ::serde::Serialize,
714        ::serde::Deserialize,
715        ::schemars::JsonSchema,
716    )]
717    pub enum Sum {
718        #[prost(message, tag = "1")]
719        DuplicateVoteEvidence(super::DuplicateVoteEvidence),
720        #[prost(message, tag = "2")]
721        LightClientAttackEvidence(super::LightClientAttackEvidence),
722    }
723}
724/// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
725#[allow(clippy::derive_partial_eq_without_eq)]
726#[derive(
727    Clone,
728    PartialEq,
729    Eq,
730    ::prost::Message,
731    ::serde::Serialize,
732    ::serde::Deserialize,
733    ::schemars::JsonSchema,
734    CosmwasmExt,
735)]
736#[proto_message(type_url = "/tendermint.types.DuplicateVoteEvidence")]
737pub struct DuplicateVoteEvidence {
738    #[prost(message, optional, tag = "1")]
739    pub vote_a: ::core::option::Option<Vote>,
740    #[prost(message, optional, tag = "2")]
741    pub vote_b: ::core::option::Option<Vote>,
742    #[prost(int64, tag = "3")]
743    pub total_voting_power: i64,
744    #[prost(int64, tag = "4")]
745    pub validator_power: i64,
746    #[prost(message, optional, tag = "5")]
747    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
748}
749/// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
750#[allow(clippy::derive_partial_eq_without_eq)]
751#[derive(
752    Clone,
753    PartialEq,
754    Eq,
755    ::prost::Message,
756    ::serde::Serialize,
757    ::serde::Deserialize,
758    ::schemars::JsonSchema,
759    CosmwasmExt,
760)]
761#[proto_message(type_url = "/tendermint.types.LightClientAttackEvidence")]
762pub struct LightClientAttackEvidence {
763    #[prost(message, optional, tag = "1")]
764    pub conflicting_block: ::core::option::Option<LightBlock>,
765    #[prost(int64, tag = "2")]
766    pub common_height: i64,
767    #[prost(message, repeated, tag = "3")]
768    pub byzantine_validators: ::prost::alloc::vec::Vec<Validator>,
769    #[prost(int64, tag = "4")]
770    pub total_voting_power: i64,
771    #[prost(message, optional, tag = "5")]
772    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
773}
774#[allow(clippy::derive_partial_eq_without_eq)]
775#[derive(
776    Clone,
777    PartialEq,
778    Eq,
779    ::prost::Message,
780    ::serde::Serialize,
781    ::serde::Deserialize,
782    ::schemars::JsonSchema,
783    CosmwasmExt,
784)]
785#[proto_message(type_url = "/tendermint.types.EvidenceList")]
786pub struct EvidenceList {
787    #[prost(message, repeated, tag = "1")]
788    pub evidence: ::prost::alloc::vec::Vec<Evidence>,
789}
790#[allow(clippy::derive_partial_eq_without_eq)]
791#[derive(
792    Clone,
793    PartialEq,
794    Eq,
795    ::prost::Message,
796    ::serde::Serialize,
797    ::serde::Deserialize,
798    ::schemars::JsonSchema,
799    CosmwasmExt,
800)]
801#[proto_message(type_url = "/tendermint.types.Block")]
802pub struct Block {
803    #[prost(message, optional, tag = "1")]
804    pub header: ::core::option::Option<Header>,
805    #[prost(message, optional, tag = "2")]
806    pub data: ::core::option::Option<Data>,
807    #[prost(message, optional, tag = "3")]
808    pub evidence: ::core::option::Option<EvidenceList>,
809    #[prost(message, optional, tag = "4")]
810    pub last_commit: ::core::option::Option<Commit>,
811}
812#[allow(clippy::derive_partial_eq_without_eq)]
813#[derive(
814    Clone,
815    PartialEq,
816    Eq,
817    ::prost::Message,
818    ::serde::Serialize,
819    ::serde::Deserialize,
820    ::schemars::JsonSchema,
821    CosmwasmExt,
822)]
823#[proto_message(type_url = "/tendermint.types.CanonicalBlockID")]
824pub struct CanonicalBlockId {
825    #[prost(bytes = "vec", tag = "1")]
826    pub hash: ::prost::alloc::vec::Vec<u8>,
827    #[prost(message, optional, tag = "2")]
828    pub part_set_header: ::core::option::Option<CanonicalPartSetHeader>,
829}
830#[allow(clippy::derive_partial_eq_without_eq)]
831#[derive(
832    Clone,
833    PartialEq,
834    Eq,
835    ::prost::Message,
836    ::serde::Serialize,
837    ::serde::Deserialize,
838    ::schemars::JsonSchema,
839    CosmwasmExt,
840)]
841#[proto_message(type_url = "/tendermint.types.CanonicalPartSetHeader")]
842pub struct CanonicalPartSetHeader {
843    #[prost(uint32, tag = "1")]
844    pub total: u32,
845    #[prost(bytes = "vec", tag = "2")]
846    pub hash: ::prost::alloc::vec::Vec<u8>,
847}
848#[allow(clippy::derive_partial_eq_without_eq)]
849#[derive(
850    Clone,
851    PartialEq,
852    Eq,
853    ::prost::Message,
854    ::serde::Serialize,
855    ::serde::Deserialize,
856    ::schemars::JsonSchema,
857    CosmwasmExt,
858)]
859#[proto_message(type_url = "/tendermint.types.CanonicalProposal")]
860pub struct CanonicalProposal {
861    /// type alias for byte
862    #[prost(enumeration = "SignedMsgType", tag = "1")]
863    pub r#type: i32,
864    /// canonicalization requires fixed size encoding here
865    #[prost(sfixed64, tag = "2")]
866    pub height: i64,
867    /// canonicalization requires fixed size encoding here
868    #[prost(sfixed64, tag = "3")]
869    pub round: i64,
870    #[prost(int64, tag = "4")]
871    pub pol_round: i64,
872    #[prost(message, optional, tag = "5")]
873    pub block_id: ::core::option::Option<CanonicalBlockId>,
874    #[prost(message, optional, tag = "6")]
875    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
876    #[prost(string, tag = "7")]
877    pub chain_id: ::prost::alloc::string::String,
878}
879#[allow(clippy::derive_partial_eq_without_eq)]
880#[derive(
881    Clone,
882    PartialEq,
883    Eq,
884    ::prost::Message,
885    ::serde::Serialize,
886    ::serde::Deserialize,
887    ::schemars::JsonSchema,
888    CosmwasmExt,
889)]
890#[proto_message(type_url = "/tendermint.types.CanonicalVote")]
891pub struct CanonicalVote {
892    /// type alias for byte
893    #[prost(enumeration = "SignedMsgType", tag = "1")]
894    pub r#type: i32,
895    /// canonicalization requires fixed size encoding here
896    #[prost(sfixed64, tag = "2")]
897    pub height: i64,
898    /// canonicalization requires fixed size encoding here
899    #[prost(sfixed64, tag = "3")]
900    pub round: i64,
901    #[prost(message, optional, tag = "4")]
902    pub block_id: ::core::option::Option<CanonicalBlockId>,
903    #[prost(message, optional, tag = "5")]
904    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
905    #[prost(string, tag = "6")]
906    pub chain_id: ::prost::alloc::string::String,
907}
908/// CanonicalVoteExtension provides us a way to serialize a vote extension from
909/// a particular validator such that we can sign over those serialized bytes.
910#[allow(clippy::derive_partial_eq_without_eq)]
911#[derive(
912    Clone,
913    PartialEq,
914    Eq,
915    ::prost::Message,
916    ::serde::Serialize,
917    ::serde::Deserialize,
918    ::schemars::JsonSchema,
919    CosmwasmExt,
920)]
921#[proto_message(type_url = "/tendermint.types.CanonicalVoteExtension")]
922pub struct CanonicalVoteExtension {
923    #[prost(bytes = "vec", tag = "1")]
924    pub extension: ::prost::alloc::vec::Vec<u8>,
925    #[prost(sfixed64, tag = "2")]
926    pub height: i64,
927    #[prost(sfixed64, tag = "3")]
928    pub round: i64,
929    #[prost(string, tag = "4")]
930    pub chain_id: ::prost::alloc::string::String,
931}
932#[allow(clippy::derive_partial_eq_without_eq)]
933#[derive(
934    Clone,
935    PartialEq,
936    Eq,
937    ::prost::Message,
938    ::serde::Serialize,
939    ::serde::Deserialize,
940    ::schemars::JsonSchema,
941    CosmwasmExt,
942)]
943#[proto_message(type_url = "/tendermint.types.EventDataRoundState")]
944pub struct EventDataRoundState {
945    #[prost(int64, tag = "1")]
946    pub height: i64,
947    #[prost(int32, tag = "2")]
948    pub round: i32,
949    #[prost(string, tag = "3")]
950    pub step: ::prost::alloc::string::String,
951}