substreams_cosmos_core/pb/
sf.cosmos.type.v2.rs

1// @generated
2// This file is @generated by prost-build.
3/// Repeated messages
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Events {
7    #[prost(message, repeated, tag="1")]
8    pub events: ::prost::alloc::vec::Vec<Event>,
9}
10#[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct Transactions {
13    #[prost(message, repeated, tag="1")]
14    pub transactions: ::prost::alloc::vec::Vec<TxResults>,
15}
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct ValidatorUpdates {
19    #[prost(message, repeated, tag="1")]
20    pub validator_updates: ::prost::alloc::vec::Vec<ValidatorUpdate>,
21}
22#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct Misbehaviors {
25    #[prost(message, repeated, tag="1")]
26    pub misbehaviors: ::prost::alloc::vec::Vec<Misbehavior>,
27}
28/// Firehose-centric Block
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct Block {
32    #[prost(bytes="vec", tag="1")]
33    pub hash: ::prost::alloc::vec::Vec<u8>,
34    #[prost(int64, tag="2")]
35    pub height: i64,
36    #[prost(message, optional, tag="3")]
37    pub time: ::core::option::Option<::prost_types::Timestamp>,
38    #[prost(message, optional, tag="4")]
39    pub header: ::core::option::Option<Header>,
40    #[prost(message, repeated, tag="6")]
41    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
42    #[prost(message, repeated, tag="7")]
43    pub events: ::prost::alloc::vec::Vec<Event>,
44    #[prost(bytes="vec", repeated, tag="8")]
45    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
46    #[prost(message, repeated, tag="9")]
47    pub tx_results: ::prost::alloc::vec::Vec<TxResults>,
48    #[prost(message, repeated, tag="10")]
49    pub validator_updates: ::prost::alloc::vec::Vec<ValidatorUpdate>,
50    #[prost(message, optional, tag="11")]
51    pub consensus_param_updates: ::core::option::Option<ConsensusParams>,
52}
53/// Header defines the structure of a block header.
54#[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct Header {
57    /// basic block info
58    #[prost(message, optional, tag="1")]
59    pub version: ::core::option::Option<Consensus>,
60    #[prost(string, tag="2")]
61    pub chain_id: ::prost::alloc::string::String,
62    #[prost(int64, tag="3")]
63    pub height: i64,
64    #[prost(message, optional, tag="4")]
65    pub time: ::core::option::Option<::prost_types::Timestamp>,
66    /// prev block info
67    #[prost(message, optional, tag="5")]
68    pub last_block_id: ::core::option::Option<BlockId>,
69    /// hashes of block data
70    ///
71    /// commit from validators from the last block
72    #[prost(bytes="vec", tag="6")]
73    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
74    /// transactions
75    #[prost(bytes="vec", tag="7")]
76    pub data_hash: ::prost::alloc::vec::Vec<u8>,
77    /// hashes from the app output from the prev block
78    ///
79    /// validators for the current block
80    #[prost(bytes="vec", tag="8")]
81    pub validators_hash: ::prost::alloc::vec::Vec<u8>,
82    /// validators for the next block
83    #[prost(bytes="vec", tag="9")]
84    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
85    /// consensus params for current block
86    #[prost(bytes="vec", tag="10")]
87    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
88    /// state after txs from the previous block
89    #[prost(bytes="vec", tag="11")]
90    pub app_hash: ::prost::alloc::vec::Vec<u8>,
91    /// root hash of all results from the txs from the previous block
92    #[prost(bytes="vec", tag="12")]
93    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
94    /// consensus info
95    ///
96    /// evidence included in the block
97    #[prost(bytes="vec", tag="13")]
98    pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
99    /// original proposer of the block
100    #[prost(bytes="vec", tag="14")]
101    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
102}
103#[allow(clippy::derive_partial_eq_without_eq)]
104#[derive(Clone, Copy, PartialEq, ::prost::Message)]
105pub struct Consensus {
106    #[prost(uint64, tag="1")]
107    pub block: u64,
108    #[prost(uint64, tag="2")]
109    pub app: u64,
110}
111#[allow(clippy::derive_partial_eq_without_eq)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct BlockId {
114    #[prost(bytes="vec", tag="1")]
115    pub hash: ::prost::alloc::vec::Vec<u8>,
116    #[prost(message, optional, tag="2")]
117    pub part_set_header: ::core::option::Option<PartSetHeader>,
118}
119#[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct PartSetHeader {
122    #[prost(uint32, tag="1")]
123    pub total: u32,
124    #[prost(bytes="vec", tag="2")]
125    pub hash: ::prost::alloc::vec::Vec<u8>,
126}
127#[allow(clippy::derive_partial_eq_without_eq)]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct Misbehavior {
130    #[prost(enumeration="MisbehaviorType", tag="1")]
131    pub r#type: i32,
132    /// The offending validator
133    #[prost(message, optional, tag="2")]
134    pub validator: ::core::option::Option<Validator>,
135    /// The height when the offense occurred
136    #[prost(int64, tag="3")]
137    pub height: i64,
138    /// The corresponding time where the offense occurred
139    #[prost(message, optional, tag="4")]
140    pub time: ::core::option::Option<::prost_types::Timestamp>,
141    /// Total voting power of the validator set in case the ABCI application does
142    /// not store historical validators.
143    /// <https://github.com/tendermint/tendermint/issues/4581>
144    #[prost(int64, tag="5")]
145    pub total_voting_power: i64,
146}
147#[allow(clippy::derive_partial_eq_without_eq)]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct Validator {
150    /// The first 20 bytes of SHA256(public key)
151    #[prost(bytes="vec", tag="1")]
152    pub address: ::prost::alloc::vec::Vec<u8>,
153    /// The voting power
154    #[prost(int64, tag="3")]
155    pub power: i64,
156}
157#[allow(clippy::derive_partial_eq_without_eq)]
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct Event {
160    #[prost(string, tag="1")]
161    pub r#type: ::prost::alloc::string::String,
162    #[prost(message, repeated, tag="2")]
163    pub attributes: ::prost::alloc::vec::Vec<EventAttribute>,
164}
165#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct EventAttribute {
168    #[prost(string, tag="1")]
169    pub key: ::prost::alloc::string::String,
170    #[prost(string, tag="2")]
171    pub value: ::prost::alloc::string::String,
172}
173#[allow(clippy::derive_partial_eq_without_eq)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct EventBytes {
176    #[prost(string, tag="1")]
177    pub r#type: ::prost::alloc::string::String,
178    #[prost(message, repeated, tag="2")]
179    pub attributes: ::prost::alloc::vec::Vec<EventAttributeBytes>,
180}
181#[allow(clippy::derive_partial_eq_without_eq)]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct EventAttributeBytes {
184    #[prost(bytes="vec", tag="1")]
185    pub key: ::prost::alloc::vec::Vec<u8>,
186    #[prost(bytes="vec", tag="2")]
187    pub value: ::prost::alloc::vec::Vec<u8>,
188}
189#[allow(clippy::derive_partial_eq_without_eq)]
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct TxResults {
192    #[prost(uint32, tag="1")]
193    pub code: u32,
194    #[prost(bytes="vec", tag="2")]
195    pub data: ::prost::alloc::vec::Vec<u8>,
196    /// nondeterministic
197    #[prost(string, tag="3")]
198    pub log: ::prost::alloc::string::String,
199    /// nondeterministic
200    #[prost(string, tag="4")]
201    pub info: ::prost::alloc::string::String,
202    #[prost(int64, tag="5")]
203    pub gas_wanted: i64,
204    #[prost(int64, tag="6")]
205    pub gas_used: i64,
206    /// nondeterministic
207    #[prost(message, repeated, tag="7")]
208    pub events: ::prost::alloc::vec::Vec<Event>,
209    #[prost(string, tag="8")]
210    pub codespace: ::prost::alloc::string::String,
211}
212/// ValidatorUpdate
213#[allow(clippy::derive_partial_eq_without_eq)]
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct ValidatorUpdate {
216    #[prost(message, optional, tag="1")]
217    pub pub_key: ::core::option::Option<PublicKey>,
218    #[prost(int64, tag="2")]
219    pub power: i64,
220}
221#[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct PublicKey {
224    #[prost(oneof="public_key::Sum", tags="1, 2")]
225    pub sum: ::core::option::Option<public_key::Sum>,
226}
227/// Nested message and enum types in `PublicKey`.
228pub mod public_key {
229    #[allow(clippy::derive_partial_eq_without_eq)]
230#[derive(Clone, PartialEq, ::prost::Oneof)]
231    pub enum Sum {
232        #[prost(bytes, tag="1")]
233        Ed25519(::prost::alloc::vec::Vec<u8>),
234        #[prost(bytes, tag="2")]
235        Secp256k1(::prost::alloc::vec::Vec<u8>),
236    }
237}
238#[allow(clippy::derive_partial_eq_without_eq)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct ConsensusParams {
241    #[prost(message, optional, tag="1")]
242    pub block: ::core::option::Option<BlockParams>,
243    #[prost(message, optional, tag="2")]
244    pub evidence: ::core::option::Option<EvidenceParams>,
245    #[prost(message, optional, tag="3")]
246    pub validator: ::core::option::Option<ValidatorParams>,
247    #[prost(message, optional, tag="4")]
248    pub version: ::core::option::Option<VersionParams>,
249}
250/// BlockParams contains limits on the block size.
251#[allow(clippy::derive_partial_eq_without_eq)]
252#[derive(Clone, Copy, PartialEq, ::prost::Message)]
253pub struct BlockParams {
254    /// Max block size, in bytes.
255    /// Note: must be greater than 0
256    #[prost(int64, tag="1")]
257    pub max_bytes: i64,
258    /// Max gas per block.
259    /// Note: must be greater or equal to -1
260    #[prost(int64, tag="2")]
261    pub max_gas: i64,
262}
263/// EvidenceParams determine how we handle evidence of malfeasance.
264#[allow(clippy::derive_partial_eq_without_eq)]
265#[derive(Clone, Copy, PartialEq, ::prost::Message)]
266pub struct EvidenceParams {
267    /// Max age of evidence, in blocks.
268    ///
269    /// The basic formula for calculating this is: MaxAgeDuration / {average block
270    /// time}.
271    #[prost(int64, tag="1")]
272    pub max_age_num_blocks: i64,
273    /// Max age of evidence, in time.
274    ///
275    /// It should correspond with an app's "unbonding period" or other similar
276    /// mechanism for handling [Nothing-At-Stake
277    /// attacks](<https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed>).
278    #[prost(message, optional, tag="2")]
279    pub max_age_duration: ::core::option::Option<::prost_types::Duration>,
280    /// This sets the maximum size of total evidence in bytes that can be committed
281    /// in a single block. and should fall comfortably under the max block bytes.
282    /// Default is 1048576 or 1MB
283    #[prost(int64, tag="3")]
284    pub max_bytes: i64,
285}
286/// ValidatorParams restrict the public key types validators can use.
287/// NOTE: uses ABCI pubkey naming, not Amino names.
288#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct ValidatorParams {
291    #[prost(string, repeated, tag="1")]
292    pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
293}
294/// VersionParams contains the ABCI application version.
295#[allow(clippy::derive_partial_eq_without_eq)]
296#[derive(Clone, Copy, PartialEq, ::prost::Message)]
297pub struct VersionParams {
298    #[prost(uint64, tag="1")]
299    pub app: u64,
300}
301/// HashedParams is a subset of ConsensusParams.
302///
303/// It is hashed into the Header.ConsensusHash.
304#[allow(clippy::derive_partial_eq_without_eq)]
305#[derive(Clone, Copy, PartialEq, ::prost::Message)]
306pub struct HashedParams {
307    #[prost(int64, tag="1")]
308    pub block_max_bytes: i64,
309    #[prost(int64, tag="2")]
310    pub block_max_gas: i64,
311}
312#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
313#[repr(i32)]
314pub enum MisbehaviorType {
315    Unknown = 0,
316    DuplicateVote = 1,
317    LightClientAttack = 2,
318}
319impl MisbehaviorType {
320    /// String value of the enum field names used in the ProtoBuf definition.
321    ///
322    /// The values are not transformed in any way and thus are considered stable
323    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
324    pub fn as_str_name(&self) -> &'static str {
325        match self {
326            MisbehaviorType::Unknown => "UNKNOWN",
327            MisbehaviorType::DuplicateVote => "DUPLICATE_VOTE",
328            MisbehaviorType::LightClientAttack => "LIGHT_CLIENT_ATTACK",
329        }
330    }
331    /// Creates an enum from field names used in the ProtoBuf definition.
332    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
333        match value {
334            "UNKNOWN" => Some(Self::Unknown),
335            "DUPLICATE_VOTE" => Some(Self::DuplicateVote),
336            "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack),
337            _ => None,
338        }
339    }
340}
341// @@protoc_insertion_point(module)