1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Request {
4 #[prost(
5 oneof = "request::Value",
6 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
7 )]
8 pub value: ::core::option::Option<request::Value>,
9}
10pub mod request {
12 #[allow(clippy::derive_partial_eq_without_eq)]
13 #[derive(Clone, PartialEq, ::prost::Oneof)]
14 pub enum Value {
15 #[prost(message, tag = "1")]
16 Echo(super::RequestEcho),
17 #[prost(message, tag = "2")]
18 Flush(super::RequestFlush),
19 #[prost(message, tag = "3")]
20 Info(super::RequestInfo),
21 #[prost(message, tag = "4")]
22 SetOption(super::RequestSetOption),
23 #[prost(message, tag = "5")]
24 InitChain(super::RequestInitChain),
25 #[prost(message, tag = "6")]
26 Query(super::RequestQuery),
27 #[prost(message, tag = "7")]
28 BeginBlock(super::RequestBeginBlock),
29 #[prost(message, tag = "8")]
30 CheckTx(super::RequestCheckTx),
31 #[prost(message, tag = "9")]
32 DeliverTx(super::RequestDeliverTx),
33 #[prost(message, tag = "10")]
34 EndBlock(super::RequestEndBlock),
35 #[prost(message, tag = "11")]
36 Commit(super::RequestCommit),
37 #[prost(message, tag = "12")]
38 ListSnapshots(super::RequestListSnapshots),
39 #[prost(message, tag = "13")]
40 OfferSnapshot(super::RequestOfferSnapshot),
41 #[prost(message, tag = "14")]
42 LoadSnapshotChunk(super::RequestLoadSnapshotChunk),
43 #[prost(message, tag = "15")]
44 ApplySnapshotChunk(super::RequestApplySnapshotChunk),
45 }
46}
47#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct RequestEcho {
50 #[prost(string, tag = "1")]
51 pub message: ::prost::alloc::string::String,
52}
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct RequestFlush {}
56#[allow(clippy::derive_partial_eq_without_eq)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct RequestInfo {
59 #[prost(string, tag = "1")]
60 pub version: ::prost::alloc::string::String,
61 #[prost(uint64, tag = "2")]
62 pub block_version: u64,
63 #[prost(uint64, tag = "3")]
64 pub p2p_version: u64,
65}
66#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct RequestSetOption {
70 #[prost(string, tag = "1")]
71 pub key: ::prost::alloc::string::String,
72 #[prost(string, tag = "2")]
73 pub value: ::prost::alloc::string::String,
74}
75#[allow(clippy::derive_partial_eq_without_eq)]
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct RequestInitChain {
78 #[prost(message, optional, tag = "1")]
79 pub time: ::core::option::Option<::prost_types::Timestamp>,
80 #[prost(string, tag = "2")]
81 pub chain_id: ::prost::alloc::string::String,
82 #[prost(message, optional, tag = "3")]
83 pub consensus_params: ::core::option::Option<ConsensusParams>,
84 #[prost(message, repeated, tag = "4")]
85 pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
86 #[prost(bytes = "vec", tag = "5")]
87 pub app_state_bytes: ::prost::alloc::vec::Vec<u8>,
88 #[prost(int64, tag = "6")]
89 pub initial_height: i64,
90}
91#[allow(clippy::derive_partial_eq_without_eq)]
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct RequestQuery {
94 #[prost(bytes = "vec", tag = "1")]
95 pub data: ::prost::alloc::vec::Vec<u8>,
96 #[prost(string, tag = "2")]
97 pub path: ::prost::alloc::string::String,
98 #[prost(int64, tag = "3")]
99 pub height: i64,
100 #[prost(bool, tag = "4")]
101 pub prove: bool,
102}
103#[allow(clippy::derive_partial_eq_without_eq)]
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct RequestBeginBlock {
106 #[prost(bytes = "vec", tag = "1")]
107 pub hash: ::prost::alloc::vec::Vec<u8>,
108 #[prost(message, optional, tag = "2")]
109 pub header: ::core::option::Option<super::types::Header>,
110 #[prost(message, optional, tag = "3")]
111 pub last_commit_info: ::core::option::Option<LastCommitInfo>,
112 #[prost(message, repeated, tag = "4")]
113 pub byzantine_validators: ::prost::alloc::vec::Vec<Evidence>,
114}
115#[allow(clippy::derive_partial_eq_without_eq)]
116#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct RequestCheckTx {
118 #[prost(bytes = "vec", tag = "1")]
119 pub tx: ::prost::alloc::vec::Vec<u8>,
120 #[prost(enumeration = "CheckTxType", tag = "2")]
121 pub r#type: i32,
122}
123#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct RequestDeliverTx {
126 #[prost(bytes = "vec", tag = "1")]
127 pub tx: ::prost::alloc::vec::Vec<u8>,
128}
129#[allow(clippy::derive_partial_eq_without_eq)]
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct RequestEndBlock {
132 #[prost(int64, tag = "1")]
133 pub height: i64,
134}
135#[allow(clippy::derive_partial_eq_without_eq)]
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct RequestCommit {}
138#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct RequestListSnapshots {}
142#[allow(clippy::derive_partial_eq_without_eq)]
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct RequestOfferSnapshot {
146 #[prost(message, optional, tag = "1")]
148 pub snapshot: ::core::option::Option<Snapshot>,
149 #[prost(bytes = "vec", tag = "2")]
151 pub app_hash: ::prost::alloc::vec::Vec<u8>,
152}
153#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct RequestLoadSnapshotChunk {
157 #[prost(uint64, tag = "1")]
158 pub height: u64,
159 #[prost(uint32, tag = "2")]
160 pub format: u32,
161 #[prost(uint32, tag = "3")]
162 pub chunk: u32,
163}
164#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct RequestApplySnapshotChunk {
168 #[prost(uint32, tag = "1")]
169 pub index: u32,
170 #[prost(bytes = "vec", tag = "2")]
171 pub chunk: ::prost::alloc::vec::Vec<u8>,
172 #[prost(string, tag = "3")]
173 pub sender: ::prost::alloc::string::String,
174}
175#[allow(clippy::derive_partial_eq_without_eq)]
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct Response {
178 #[prost(
179 oneof = "response::Value",
180 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16"
181 )]
182 pub value: ::core::option::Option<response::Value>,
183}
184pub mod response {
186 #[allow(clippy::derive_partial_eq_without_eq)]
187 #[derive(Clone, PartialEq, ::prost::Oneof)]
188 pub enum Value {
189 #[prost(message, tag = "1")]
190 Exception(super::ResponseException),
191 #[prost(message, tag = "2")]
192 Echo(super::ResponseEcho),
193 #[prost(message, tag = "3")]
194 Flush(super::ResponseFlush),
195 #[prost(message, tag = "4")]
196 Info(super::ResponseInfo),
197 #[prost(message, tag = "5")]
198 SetOption(super::ResponseSetOption),
199 #[prost(message, tag = "6")]
200 InitChain(super::ResponseInitChain),
201 #[prost(message, tag = "7")]
202 Query(super::ResponseQuery),
203 #[prost(message, tag = "8")]
204 BeginBlock(super::ResponseBeginBlock),
205 #[prost(message, tag = "9")]
206 CheckTx(super::ResponseCheckTx),
207 #[prost(message, tag = "10")]
208 DeliverTx(super::ResponseDeliverTx),
209 #[prost(message, tag = "11")]
210 EndBlock(super::ResponseEndBlock),
211 #[prost(message, tag = "12")]
212 Commit(super::ResponseCommit),
213 #[prost(message, tag = "13")]
214 ListSnapshots(super::ResponseListSnapshots),
215 #[prost(message, tag = "14")]
216 OfferSnapshot(super::ResponseOfferSnapshot),
217 #[prost(message, tag = "15")]
218 LoadSnapshotChunk(super::ResponseLoadSnapshotChunk),
219 #[prost(message, tag = "16")]
220 ApplySnapshotChunk(super::ResponseApplySnapshotChunk),
221 }
222}
223#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct ResponseException {
227 #[prost(string, tag = "1")]
228 pub error: ::prost::alloc::string::String,
229}
230#[allow(clippy::derive_partial_eq_without_eq)]
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct ResponseEcho {
233 #[prost(string, tag = "1")]
234 pub message: ::prost::alloc::string::String,
235}
236#[allow(clippy::derive_partial_eq_without_eq)]
237#[derive(Clone, PartialEq, ::prost::Message)]
238pub struct ResponseFlush {}
239#[allow(clippy::derive_partial_eq_without_eq)]
240#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct ResponseInfo {
242 #[prost(string, tag = "1")]
243 pub data: ::prost::alloc::string::String,
244 #[prost(string, tag = "2")]
245 pub version: ::prost::alloc::string::String,
246 #[prost(uint64, tag = "3")]
247 pub app_version: u64,
248 #[prost(int64, tag = "4")]
249 pub last_block_height: i64,
250 #[prost(bytes = "vec", tag = "5")]
251 pub last_block_app_hash: ::prost::alloc::vec::Vec<u8>,
252}
253#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct ResponseSetOption {
257 #[prost(uint32, tag = "1")]
258 pub code: u32,
259 #[prost(string, tag = "3")]
261 pub log: ::prost::alloc::string::String,
262 #[prost(string, tag = "4")]
263 pub info: ::prost::alloc::string::String,
264}
265#[allow(clippy::derive_partial_eq_without_eq)]
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct ResponseInitChain {
268 #[prost(message, optional, tag = "1")]
269 pub consensus_params: ::core::option::Option<ConsensusParams>,
270 #[prost(message, repeated, tag = "2")]
271 pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
272 #[prost(bytes = "vec", tag = "3")]
273 pub app_hash: ::prost::alloc::vec::Vec<u8>,
274}
275#[allow(clippy::derive_partial_eq_without_eq)]
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct ResponseQuery {
278 #[prost(uint32, tag = "1")]
279 pub code: u32,
280 #[prost(string, tag = "3")]
284 pub log: ::prost::alloc::string::String,
285 #[prost(string, tag = "4")]
287 pub info: ::prost::alloc::string::String,
288 #[prost(int64, tag = "5")]
289 pub index: i64,
290 #[prost(bytes = "vec", tag = "6")]
291 pub key: ::prost::alloc::vec::Vec<u8>,
292 #[prost(bytes = "vec", tag = "7")]
293 pub value: ::prost::alloc::vec::Vec<u8>,
294 #[prost(message, optional, tag = "8")]
295 pub proof_ops: ::core::option::Option<super::crypto::ProofOps>,
296 #[prost(int64, tag = "9")]
297 pub height: i64,
298 #[prost(string, tag = "10")]
299 pub codespace: ::prost::alloc::string::String,
300}
301#[allow(clippy::derive_partial_eq_without_eq)]
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct ResponseBeginBlock {
304 #[prost(message, repeated, tag = "1")]
305 pub events: ::prost::alloc::vec::Vec<Event>,
306}
307#[allow(clippy::derive_partial_eq_without_eq)]
308#[derive(Clone, PartialEq, ::prost::Message)]
309pub struct ResponseCheckTx {
310 #[prost(uint32, tag = "1")]
311 pub code: u32,
312 #[prost(bytes = "vec", tag = "2")]
313 pub data: ::prost::alloc::vec::Vec<u8>,
314 #[prost(string, tag = "3")]
316 pub log: ::prost::alloc::string::String,
317 #[prost(string, tag = "4")]
319 pub info: ::prost::alloc::string::String,
320 #[prost(int64, tag = "5")]
321 pub gas_wanted: i64,
322 #[prost(int64, tag = "6")]
323 pub gas_used: i64,
324 #[prost(message, repeated, tag = "7")]
325 pub events: ::prost::alloc::vec::Vec<Event>,
326 #[prost(string, tag = "8")]
327 pub codespace: ::prost::alloc::string::String,
328 #[prost(string, tag = "9")]
329 pub sender: ::prost::alloc::string::String,
330 #[prost(int64, tag = "10")]
331 pub priority: i64,
332 #[prost(string, tag = "11")]
335 pub mempool_error: ::prost::alloc::string::String,
336}
337#[allow(clippy::derive_partial_eq_without_eq)]
338#[derive(Clone, PartialEq, ::prost::Message)]
339pub struct ResponseDeliverTx {
340 #[prost(uint32, tag = "1")]
341 pub code: u32,
342 #[prost(bytes = "vec", tag = "2")]
343 pub data: ::prost::alloc::vec::Vec<u8>,
344 #[prost(string, tag = "3")]
346 pub log: ::prost::alloc::string::String,
347 #[prost(string, tag = "4")]
349 pub info: ::prost::alloc::string::String,
350 #[prost(int64, tag = "5")]
351 pub gas_wanted: i64,
352 #[prost(int64, tag = "6")]
353 pub gas_used: i64,
354 #[prost(message, repeated, tag = "7")]
356 pub events: ::prost::alloc::vec::Vec<Event>,
357 #[prost(string, tag = "8")]
358 pub codespace: ::prost::alloc::string::String,
359}
360#[allow(clippy::derive_partial_eq_without_eq)]
361#[derive(Clone, PartialEq, ::prost::Message)]
362pub struct ResponseEndBlock {
363 #[prost(message, repeated, tag = "1")]
364 pub validator_updates: ::prost::alloc::vec::Vec<ValidatorUpdate>,
365 #[prost(message, optional, tag = "2")]
366 pub consensus_param_updates: ::core::option::Option<ConsensusParams>,
367 #[prost(message, repeated, tag = "3")]
368 pub events: ::prost::alloc::vec::Vec<Event>,
369}
370#[allow(clippy::derive_partial_eq_without_eq)]
371#[derive(Clone, PartialEq, ::prost::Message)]
372pub struct ResponseCommit {
373 #[prost(bytes = "vec", tag = "2")]
375 pub data: ::prost::alloc::vec::Vec<u8>,
376 #[prost(int64, tag = "3")]
377 pub retain_height: i64,
378}
379#[allow(clippy::derive_partial_eq_without_eq)]
380#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct ResponseListSnapshots {
382 #[prost(message, repeated, tag = "1")]
383 pub snapshots: ::prost::alloc::vec::Vec<Snapshot>,
384}
385#[allow(clippy::derive_partial_eq_without_eq)]
386#[derive(Clone, PartialEq, ::prost::Message)]
387pub struct ResponseOfferSnapshot {
388 #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")]
389 pub result: i32,
390}
391pub mod response_offer_snapshot {
393 #[derive(
394 Clone,
395 Copy,
396 Debug,
397 PartialEq,
398 Eq,
399 Hash,
400 PartialOrd,
401 Ord,
402 ::prost::Enumeration
403 )]
404 #[repr(i32)]
405 pub enum Result {
406 Unknown = 0,
408 Accept = 1,
410 Abort = 2,
412 Reject = 3,
414 RejectFormat = 4,
416 RejectSender = 5,
418 }
419 impl Result {
420 pub fn as_str_name(&self) -> &'static str {
425 match self {
426 Result::Unknown => "UNKNOWN",
427 Result::Accept => "ACCEPT",
428 Result::Abort => "ABORT",
429 Result::Reject => "REJECT",
430 Result::RejectFormat => "REJECT_FORMAT",
431 Result::RejectSender => "REJECT_SENDER",
432 }
433 }
434 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
436 match value {
437 "UNKNOWN" => Some(Self::Unknown),
438 "ACCEPT" => Some(Self::Accept),
439 "ABORT" => Some(Self::Abort),
440 "REJECT" => Some(Self::Reject),
441 "REJECT_FORMAT" => Some(Self::RejectFormat),
442 "REJECT_SENDER" => Some(Self::RejectSender),
443 _ => None,
444 }
445 }
446 }
447}
448#[allow(clippy::derive_partial_eq_without_eq)]
449#[derive(Clone, PartialEq, ::prost::Message)]
450pub struct ResponseLoadSnapshotChunk {
451 #[prost(bytes = "vec", tag = "1")]
452 pub chunk: ::prost::alloc::vec::Vec<u8>,
453}
454#[allow(clippy::derive_partial_eq_without_eq)]
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct ResponseApplySnapshotChunk {
457 #[prost(enumeration = "response_apply_snapshot_chunk::Result", tag = "1")]
458 pub result: i32,
459 #[prost(uint32, repeated, tag = "2")]
461 pub refetch_chunks: ::prost::alloc::vec::Vec<u32>,
462 #[prost(string, repeated, tag = "3")]
464 pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
465}
466pub mod response_apply_snapshot_chunk {
468 #[derive(
469 Clone,
470 Copy,
471 Debug,
472 PartialEq,
473 Eq,
474 Hash,
475 PartialOrd,
476 Ord,
477 ::prost::Enumeration
478 )]
479 #[repr(i32)]
480 pub enum Result {
481 Unknown = 0,
483 Accept = 1,
485 Abort = 2,
487 Retry = 3,
489 RetrySnapshot = 4,
491 RejectSnapshot = 5,
493 }
494 impl Result {
495 pub fn as_str_name(&self) -> &'static str {
500 match self {
501 Result::Unknown => "UNKNOWN",
502 Result::Accept => "ACCEPT",
503 Result::Abort => "ABORT",
504 Result::Retry => "RETRY",
505 Result::RetrySnapshot => "RETRY_SNAPSHOT",
506 Result::RejectSnapshot => "REJECT_SNAPSHOT",
507 }
508 }
509 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
511 match value {
512 "UNKNOWN" => Some(Self::Unknown),
513 "ACCEPT" => Some(Self::Accept),
514 "ABORT" => Some(Self::Abort),
515 "RETRY" => Some(Self::Retry),
516 "RETRY_SNAPSHOT" => Some(Self::RetrySnapshot),
517 "REJECT_SNAPSHOT" => Some(Self::RejectSnapshot),
518 _ => None,
519 }
520 }
521 }
522}
523#[allow(clippy::derive_partial_eq_without_eq)]
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct ConsensusParams {
528 #[prost(message, optional, tag = "1")]
529 pub block: ::core::option::Option<BlockParams>,
530 #[prost(message, optional, tag = "2")]
531 pub evidence: ::core::option::Option<super::types::EvidenceParams>,
532 #[prost(message, optional, tag = "3")]
533 pub validator: ::core::option::Option<super::types::ValidatorParams>,
534 #[prost(message, optional, tag = "4")]
535 pub version: ::core::option::Option<super::types::VersionParams>,
536}
537#[allow(clippy::derive_partial_eq_without_eq)]
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct BlockParams {
541 #[prost(int64, tag = "1")]
543 pub max_bytes: i64,
544 #[prost(int64, tag = "2")]
546 pub max_gas: i64,
547}
548#[allow(clippy::derive_partial_eq_without_eq)]
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct LastCommitInfo {
551 #[prost(int32, tag = "1")]
552 pub round: i32,
553 #[prost(message, repeated, tag = "2")]
554 pub votes: ::prost::alloc::vec::Vec<VoteInfo>,
555}
556#[allow(clippy::derive_partial_eq_without_eq)]
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct Event {
562 #[prost(string, tag = "1")]
563 pub r#type: ::prost::alloc::string::String,
564 #[prost(message, repeated, tag = "2")]
565 pub attributes: ::prost::alloc::vec::Vec<EventAttribute>,
566}
567#[allow(clippy::derive_partial_eq_without_eq)]
569#[derive(Clone, PartialEq, ::prost::Message)]
570pub struct EventAttribute {
571 #[prost(bytes = "vec", tag = "1")]
572 pub key: ::prost::alloc::vec::Vec<u8>,
573 #[prost(bytes = "vec", tag = "2")]
574 pub value: ::prost::alloc::vec::Vec<u8>,
575 #[prost(bool, tag = "3")]
577 pub index: bool,
578}
579#[allow(clippy::derive_partial_eq_without_eq)]
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct TxResult {
585 #[prost(int64, tag = "1")]
586 pub height: i64,
587 #[prost(uint32, tag = "2")]
588 pub index: u32,
589 #[prost(bytes = "vec", tag = "3")]
590 pub tx: ::prost::alloc::vec::Vec<u8>,
591 #[prost(message, optional, tag = "4")]
592 pub result: ::core::option::Option<ResponseDeliverTx>,
593}
594#[allow(clippy::derive_partial_eq_without_eq)]
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct Validator {
598 #[prost(bytes = "vec", tag = "1")]
600 pub address: ::prost::alloc::vec::Vec<u8>,
601 #[prost(int64, tag = "3")]
605 pub power: i64,
606}
607#[allow(clippy::derive_partial_eq_without_eq)]
609#[derive(Clone, PartialEq, ::prost::Message)]
610pub struct ValidatorUpdate {
611 #[prost(message, optional, tag = "1")]
612 pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
613 #[prost(int64, tag = "2")]
614 pub power: i64,
615}
616#[allow(clippy::derive_partial_eq_without_eq)]
618#[derive(Clone, PartialEq, ::prost::Message)]
619pub struct VoteInfo {
620 #[prost(message, optional, tag = "1")]
621 pub validator: ::core::option::Option<Validator>,
622 #[prost(bool, tag = "2")]
623 pub signed_last_block: bool,
624}
625#[allow(clippy::derive_partial_eq_without_eq)]
626#[derive(Clone, PartialEq, ::prost::Message)]
627pub struct Evidence {
628 #[prost(enumeration = "EvidenceType", tag = "1")]
629 pub r#type: i32,
630 #[prost(message, optional, tag = "2")]
632 pub validator: ::core::option::Option<Validator>,
633 #[prost(int64, tag = "3")]
635 pub height: i64,
636 #[prost(message, optional, tag = "4")]
638 pub time: ::core::option::Option<::prost_types::Timestamp>,
639 #[prost(int64, tag = "5")]
643 pub total_voting_power: i64,
644}
645#[allow(clippy::derive_partial_eq_without_eq)]
646#[derive(Clone, PartialEq, ::prost::Message)]
647pub struct Snapshot {
648 #[prost(uint64, tag = "1")]
650 pub height: u64,
651 #[prost(uint32, tag = "2")]
653 pub format: u32,
654 #[prost(uint32, tag = "3")]
656 pub chunks: u32,
657 #[prost(bytes = "vec", tag = "4")]
659 pub hash: ::prost::alloc::vec::Vec<u8>,
660 #[prost(bytes = "vec", tag = "5")]
662 pub metadata: ::prost::alloc::vec::Vec<u8>,
663}
664#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
665#[repr(i32)]
666pub enum CheckTxType {
667 New = 0,
668 Recheck = 1,
669}
670impl CheckTxType {
671 pub fn as_str_name(&self) -> &'static str {
676 match self {
677 CheckTxType::New => "NEW",
678 CheckTxType::Recheck => "RECHECK",
679 }
680 }
681 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
683 match value {
684 "NEW" => Some(Self::New),
685 "RECHECK" => Some(Self::Recheck),
686 _ => None,
687 }
688 }
689}
690#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
691#[repr(i32)]
692pub enum EvidenceType {
693 Unknown = 0,
694 DuplicateVote = 1,
695 LightClientAttack = 2,
696}
697impl EvidenceType {
698 pub fn as_str_name(&self) -> &'static str {
703 match self {
704 EvidenceType::Unknown => "UNKNOWN",
705 EvidenceType::DuplicateVote => "DUPLICATE_VOTE",
706 EvidenceType::LightClientAttack => "LIGHT_CLIENT_ATTACK",
707 }
708 }
709 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
711 match value {
712 "UNKNOWN" => Some(Self::Unknown),
713 "DUPLICATE_VOTE" => Some(Self::DuplicateVote),
714 "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack),
715 _ => None,
716 }
717 }
718}