cometbft_proto/prost/
cometbft.types.v1beta1.rs

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