1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Request {
5 #[prost(
7 oneof = "request::Value",
8 tags = "1, 2, 3, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20"
9 )]
10 pub value: ::core::option::Option<request::Value>,
11}
12pub mod request {
14 #[allow(clippy::derive_partial_eq_without_eq)]
16 #[derive(Clone, PartialEq, ::prost::Oneof)]
17 pub enum Value {
18 #[prost(message, tag = "1")]
19 Echo(super::EchoRequest),
20 #[prost(message, tag = "2")]
21 Flush(super::FlushRequest),
22 #[prost(message, tag = "3")]
23 Info(super::InfoRequest),
24 #[prost(message, tag = "5")]
25 InitChain(super::InitChainRequest),
26 #[prost(message, tag = "6")]
27 Query(super::QueryRequest),
28 #[prost(message, tag = "8")]
29 CheckTx(super::CheckTxRequest),
30 #[prost(message, tag = "11")]
31 Commit(super::CommitRequest),
32 #[prost(message, tag = "12")]
33 ListSnapshots(super::ListSnapshotsRequest),
34 #[prost(message, tag = "13")]
35 OfferSnapshot(super::OfferSnapshotRequest),
36 #[prost(message, tag = "14")]
37 LoadSnapshotChunk(super::LoadSnapshotChunkRequest),
38 #[prost(message, tag = "15")]
39 ApplySnapshotChunk(super::ApplySnapshotChunkRequest),
40 #[prost(message, tag = "16")]
41 PrepareProposal(super::PrepareProposalRequest),
42 #[prost(message, tag = "17")]
43 ProcessProposal(super::ProcessProposalRequest),
44 #[prost(message, tag = "18")]
45 ExtendVote(super::ExtendVoteRequest),
46 #[prost(message, tag = "19")]
47 VerifyVoteExtension(super::VerifyVoteExtensionRequest),
48 #[prost(message, tag = "20")]
49 FinalizeBlock(super::FinalizeBlockRequest),
50 }
51}
52#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct EchoRequest {
56 #[prost(string, tag = "1")]
57 pub message: ::prost::alloc::string::String,
58}
59#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct FlushRequest {}
63#[allow(clippy::derive_partial_eq_without_eq)]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct InfoRequest {
67 #[prost(string, tag = "1")]
68 pub version: ::prost::alloc::string::String,
69 #[prost(uint64, tag = "2")]
70 pub block_version: u64,
71 #[prost(uint64, tag = "3")]
72 pub p2p_version: u64,
73 #[prost(string, tag = "4")]
74 pub abci_version: ::prost::alloc::string::String,
75}
76#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct InitChainRequest {
80 #[prost(message, optional, tag = "1")]
81 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
82 #[prost(string, tag = "2")]
83 pub chain_id: ::prost::alloc::string::String,
84 #[prost(message, optional, tag = "3")]
85 pub consensus_params: ::core::option::Option<
86 super::super::types::v1::ConsensusParams,
87 >,
88 #[prost(message, repeated, tag = "4")]
89 pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
90 #[prost(bytes = "bytes", tag = "5")]
91 pub app_state_bytes: ::prost::bytes::Bytes,
92 #[prost(int64, tag = "6")]
93 pub initial_height: i64,
94}
95#[allow(clippy::derive_partial_eq_without_eq)]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct QueryRequest {
99 #[prost(bytes = "bytes", tag = "1")]
100 pub data: ::prost::bytes::Bytes,
101 #[prost(string, tag = "2")]
102 pub path: ::prost::alloc::string::String,
103 #[prost(int64, tag = "3")]
104 pub height: i64,
105 #[prost(bool, tag = "4")]
106 pub prove: bool,
107}
108#[allow(clippy::derive_partial_eq_without_eq)]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct CheckTxRequest {
112 #[prost(bytes = "bytes", tag = "1")]
113 pub tx: ::prost::bytes::Bytes,
114 #[prost(enumeration = "CheckTxType", tag = "3")]
115 pub r#type: i32,
116}
117#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct CommitRequest {}
121#[allow(clippy::derive_partial_eq_without_eq)]
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct ListSnapshotsRequest {}
125#[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct OfferSnapshotRequest {
129 #[prost(message, optional, tag = "1")]
131 pub snapshot: ::core::option::Option<Snapshot>,
132 #[prost(bytes = "bytes", tag = "2")]
134 pub app_hash: ::prost::bytes::Bytes,
135}
136#[allow(clippy::derive_partial_eq_without_eq)]
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct LoadSnapshotChunkRequest {
140 #[prost(uint64, tag = "1")]
141 pub height: u64,
142 #[prost(uint32, tag = "2")]
143 pub format: u32,
144 #[prost(uint32, tag = "3")]
145 pub chunk: u32,
146}
147#[allow(clippy::derive_partial_eq_without_eq)]
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct ApplySnapshotChunkRequest {
151 #[prost(uint32, tag = "1")]
152 pub index: u32,
153 #[prost(bytes = "bytes", tag = "2")]
154 pub chunk: ::prost::bytes::Bytes,
155 #[prost(string, tag = "3")]
156 pub sender: ::prost::alloc::string::String,
157}
158#[allow(clippy::derive_partial_eq_without_eq)]
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct PrepareProposalRequest {
163 #[prost(int64, tag = "1")]
165 pub max_tx_bytes: i64,
166 #[prost(bytes = "bytes", repeated, tag = "2")]
169 pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
170 #[prost(message, optional, tag = "3")]
171 pub local_last_commit: ::core::option::Option<ExtendedCommitInfo>,
172 #[prost(message, repeated, tag = "4")]
173 pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
174 #[prost(int64, tag = "5")]
175 pub height: i64,
176 #[prost(message, optional, tag = "6")]
177 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
178 #[prost(bytes = "bytes", tag = "7")]
179 pub next_validators_hash: ::prost::bytes::Bytes,
180 #[prost(bytes = "bytes", tag = "8")]
182 pub proposer_address: ::prost::bytes::Bytes,
183}
184#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct ProcessProposalRequest {
189 #[prost(bytes = "bytes", repeated, tag = "1")]
190 pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
191 #[prost(message, optional, tag = "2")]
192 pub proposed_last_commit: ::core::option::Option<CommitInfo>,
193 #[prost(message, repeated, tag = "3")]
194 pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
195 #[prost(bytes = "bytes", tag = "4")]
197 pub hash: ::prost::bytes::Bytes,
198 #[prost(int64, tag = "5")]
199 pub height: i64,
200 #[prost(message, optional, tag = "6")]
201 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
202 #[prost(bytes = "bytes", tag = "7")]
203 pub next_validators_hash: ::prost::bytes::Bytes,
204 #[prost(bytes = "bytes", tag = "8")]
206 pub proposer_address: ::prost::bytes::Bytes,
207}
208#[allow(clippy::derive_partial_eq_without_eq)]
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct ExtendVoteRequest {
212 #[prost(bytes = "bytes", tag = "1")]
214 pub hash: ::prost::bytes::Bytes,
215 #[prost(int64, tag = "2")]
217 pub height: i64,
218 #[prost(message, optional, tag = "3")]
220 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
221 #[prost(bytes = "bytes", repeated, tag = "4")]
222 pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
223 #[prost(message, optional, tag = "5")]
224 pub proposed_last_commit: ::core::option::Option<CommitInfo>,
225 #[prost(message, repeated, tag = "6")]
226 pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
227 #[prost(bytes = "bytes", tag = "7")]
228 pub next_validators_hash: ::prost::bytes::Bytes,
229 #[prost(bytes = "bytes", tag = "8")]
231 pub proposer_address: ::prost::bytes::Bytes,
232}
233#[allow(clippy::derive_partial_eq_without_eq)]
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct VerifyVoteExtensionRequest {
238 #[prost(bytes = "bytes", tag = "1")]
240 pub hash: ::prost::bytes::Bytes,
241 #[prost(bytes = "bytes", tag = "2")]
243 pub validator_address: ::prost::bytes::Bytes,
244 #[prost(int64, tag = "3")]
245 pub height: i64,
246 #[prost(bytes = "bytes", tag = "4")]
247 pub vote_extension: ::prost::bytes::Bytes,
248}
249#[allow(clippy::derive_partial_eq_without_eq)]
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct FinalizeBlockRequest {
253 #[prost(bytes = "bytes", repeated, tag = "1")]
254 pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
255 #[prost(message, optional, tag = "2")]
256 pub decided_last_commit: ::core::option::Option<CommitInfo>,
257 #[prost(message, repeated, tag = "3")]
258 pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
259 #[prost(bytes = "bytes", tag = "4")]
261 pub hash: ::prost::bytes::Bytes,
262 #[prost(int64, tag = "5")]
263 pub height: i64,
264 #[prost(message, optional, tag = "6")]
265 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
266 #[prost(bytes = "bytes", tag = "7")]
267 pub next_validators_hash: ::prost::bytes::Bytes,
268 #[prost(bytes = "bytes", tag = "8")]
270 pub proposer_address: ::prost::bytes::Bytes,
271}
272#[allow(clippy::derive_partial_eq_without_eq)]
274#[derive(Clone, PartialEq, ::prost::Message)]
275pub struct Response {
276 #[prost(
278 oneof = "response::Value",
279 tags = "1, 2, 3, 4, 6, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21"
280 )]
281 pub value: ::core::option::Option<response::Value>,
282}
283pub mod response {
285 #[allow(clippy::derive_partial_eq_without_eq)]
287 #[derive(Clone, PartialEq, ::prost::Oneof)]
288 pub enum Value {
289 #[prost(message, tag = "1")]
290 Exception(super::ExceptionResponse),
291 #[prost(message, tag = "2")]
292 Echo(super::EchoResponse),
293 #[prost(message, tag = "3")]
294 Flush(super::FlushResponse),
295 #[prost(message, tag = "4")]
296 Info(super::InfoResponse),
297 #[prost(message, tag = "6")]
298 InitChain(super::InitChainResponse),
299 #[prost(message, tag = "7")]
300 Query(super::QueryResponse),
301 #[prost(message, tag = "9")]
302 CheckTx(super::CheckTxResponse),
303 #[prost(message, tag = "12")]
304 Commit(super::CommitResponse),
305 #[prost(message, tag = "13")]
306 ListSnapshots(super::ListSnapshotsResponse),
307 #[prost(message, tag = "14")]
308 OfferSnapshot(super::OfferSnapshotResponse),
309 #[prost(message, tag = "15")]
310 LoadSnapshotChunk(super::LoadSnapshotChunkResponse),
311 #[prost(message, tag = "16")]
312 ApplySnapshotChunk(super::ApplySnapshotChunkResponse),
313 #[prost(message, tag = "17")]
314 PrepareProposal(super::PrepareProposalResponse),
315 #[prost(message, tag = "18")]
316 ProcessProposal(super::ProcessProposalResponse),
317 #[prost(message, tag = "19")]
318 ExtendVote(super::ExtendVoteResponse),
319 #[prost(message, tag = "20")]
320 VerifyVoteExtension(super::VerifyVoteExtensionResponse),
321 #[prost(message, tag = "21")]
322 FinalizeBlock(super::FinalizeBlockResponse),
323 }
324}
325#[allow(clippy::derive_partial_eq_without_eq)]
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct ExceptionResponse {
329 #[prost(string, tag = "1")]
330 pub error: ::prost::alloc::string::String,
331}
332#[allow(clippy::derive_partial_eq_without_eq)]
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct EchoResponse {
336 #[prost(string, tag = "1")]
337 pub message: ::prost::alloc::string::String,
338}
339#[allow(clippy::derive_partial_eq_without_eq)]
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct FlushResponse {}
343#[derive(::serde::Deserialize, ::serde::Serialize)]
345#[allow(clippy::derive_partial_eq_without_eq)]
346#[derive(Clone, PartialEq, ::prost::Message)]
347pub struct InfoResponse {
348 #[prost(string, tag = "1")]
349 #[serde(default)]
350 pub data: ::prost::alloc::string::String,
351 #[prost(string, tag = "2")]
352 #[serde(default)]
353 pub version: ::prost::alloc::string::String,
354 #[prost(uint64, tag = "3")]
355 #[serde(with = "crate::serializers::from_str", default)]
356 pub app_version: u64,
357 #[prost(int64, tag = "4")]
358 #[serde(with = "crate::serializers::from_str", default)]
359 pub last_block_height: i64,
360 #[prost(bytes = "bytes", tag = "5")]
361 #[serde(default)]
362 #[serde(skip_serializing_if = "bytes::Bytes::is_empty")]
363 pub last_block_app_hash: ::prost::bytes::Bytes,
364}
365#[allow(clippy::derive_partial_eq_without_eq)]
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct InitChainResponse {
370 #[prost(message, optional, tag = "1")]
371 pub consensus_params: ::core::option::Option<
372 super::super::types::v1::ConsensusParams,
373 >,
374 #[prost(message, repeated, tag = "2")]
375 pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
376 #[prost(bytes = "bytes", tag = "3")]
377 pub app_hash: ::prost::bytes::Bytes,
378}
379#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct QueryResponse {
383 #[prost(uint32, tag = "1")]
384 pub code: u32,
385 #[prost(string, tag = "3")]
389 pub log: ::prost::alloc::string::String,
390 #[prost(string, tag = "4")]
392 pub info: ::prost::alloc::string::String,
393 #[prost(int64, tag = "5")]
394 pub index: i64,
395 #[prost(bytes = "bytes", tag = "6")]
396 pub key: ::prost::bytes::Bytes,
397 #[prost(bytes = "bytes", tag = "7")]
398 pub value: ::prost::bytes::Bytes,
399 #[prost(message, optional, tag = "8")]
400 pub proof_ops: ::core::option::Option<super::super::crypto::v1::ProofOps>,
401 #[prost(int64, tag = "9")]
402 pub height: i64,
403 #[prost(string, tag = "10")]
404 pub codespace: ::prost::alloc::string::String,
405}
406#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct CheckTxResponse {
411 #[prost(uint32, tag = "1")]
412 pub code: u32,
413 #[prost(bytes = "bytes", tag = "2")]
414 pub data: ::prost::bytes::Bytes,
415 #[prost(string, tag = "3")]
417 pub log: ::prost::alloc::string::String,
418 #[prost(string, tag = "4")]
420 pub info: ::prost::alloc::string::String,
421 #[prost(int64, tag = "5")]
422 pub gas_wanted: i64,
423 #[prost(int64, tag = "6")]
424 pub gas_used: i64,
425 #[prost(message, repeated, tag = "7")]
426 pub events: ::prost::alloc::vec::Vec<Event>,
427 #[prost(string, tag = "8")]
428 pub codespace: ::prost::alloc::string::String,
429}
430#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct CommitResponse {
434 #[prost(int64, tag = "3")]
435 pub retain_height: i64,
436}
437#[allow(clippy::derive_partial_eq_without_eq)]
439#[derive(Clone, PartialEq, ::prost::Message)]
440pub struct ListSnapshotsResponse {
441 #[prost(message, repeated, tag = "1")]
442 pub snapshots: ::prost::alloc::vec::Vec<Snapshot>,
443}
444#[allow(clippy::derive_partial_eq_without_eq)]
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct OfferSnapshotResponse {
449 #[prost(enumeration = "OfferSnapshotResult", tag = "1")]
450 pub result: i32,
451}
452#[allow(clippy::derive_partial_eq_without_eq)]
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct LoadSnapshotChunkResponse {
456 #[prost(bytes = "bytes", tag = "1")]
457 pub chunk: ::prost::bytes::Bytes,
458}
459#[allow(clippy::derive_partial_eq_without_eq)]
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct ApplySnapshotChunkResponse {
463 #[prost(enumeration = "ApplySnapshotChunkResult", tag = "1")]
464 pub result: i32,
465 #[prost(uint32, repeated, tag = "2")]
467 pub refetch_chunks: ::prost::alloc::vec::Vec<u32>,
468 #[prost(string, repeated, tag = "3")]
470 pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
471}
472#[allow(clippy::derive_partial_eq_without_eq)]
474#[derive(Clone, PartialEq, ::prost::Message)]
475pub struct PrepareProposalResponse {
476 #[prost(bytes = "bytes", repeated, tag = "1")]
477 pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
478}
479#[allow(clippy::derive_partial_eq_without_eq)]
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct ProcessProposalResponse {
484 #[prost(enumeration = "ProcessProposalStatus", tag = "1")]
485 pub status: i32,
486}
487#[allow(clippy::derive_partial_eq_without_eq)]
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct ExtendVoteResponse {
492 #[prost(bytes = "bytes", tag = "1")]
493 pub vote_extension: ::prost::bytes::Bytes,
494}
495#[allow(clippy::derive_partial_eq_without_eq)]
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct VerifyVoteExtensionResponse {
500 #[prost(enumeration = "VerifyVoteExtensionStatus", tag = "1")]
501 pub status: i32,
502}
503#[allow(clippy::derive_partial_eq_without_eq)]
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct FinalizeBlockResponse {
507 #[prost(message, repeated, tag = "1")]
509 pub events: ::prost::alloc::vec::Vec<Event>,
510 #[prost(message, repeated, tag = "2")]
514 pub tx_results: ::prost::alloc::vec::Vec<ExecTxResult>,
515 #[prost(message, repeated, tag = "3")]
517 pub validator_updates: ::prost::alloc::vec::Vec<ValidatorUpdate>,
518 #[prost(message, optional, tag = "4")]
520 pub consensus_param_updates: ::core::option::Option<
521 super::super::types::v1::ConsensusParams,
522 >,
523 #[prost(bytes = "bytes", tag = "5")]
527 pub app_hash: ::prost::bytes::Bytes,
528}
529#[allow(clippy::derive_partial_eq_without_eq)]
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct CommitInfo {
533 #[prost(int32, tag = "1")]
534 pub round: i32,
535 #[prost(message, repeated, tag = "2")]
536 pub votes: ::prost::alloc::vec::Vec<VoteInfo>,
537}
538#[allow(clippy::derive_partial_eq_without_eq)]
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct ExtendedCommitInfo {
544 #[prost(int32, tag = "1")]
546 pub round: i32,
547 #[prost(message, repeated, tag = "2")]
550 pub votes: ::prost::alloc::vec::Vec<ExtendedVoteInfo>,
551}
552#[allow(clippy::derive_partial_eq_without_eq)]
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct Event {
560 #[prost(string, tag = "1")]
561 pub r#type: ::prost::alloc::string::String,
562 #[prost(message, repeated, tag = "2")]
563 pub attributes: ::prost::alloc::vec::Vec<EventAttribute>,
564}
565#[allow(clippy::derive_partial_eq_without_eq)]
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct EventAttribute {
569 #[prost(string, tag = "1")]
570 pub key: ::prost::alloc::string::String,
571 #[prost(string, tag = "2")]
572 pub value: ::prost::alloc::string::String,
573 #[prost(bool, tag = "3")]
575 pub index: bool,
576}
577#[allow(clippy::derive_partial_eq_without_eq)]
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct ExecTxResult {
583 #[prost(uint32, tag = "1")]
584 pub code: u32,
585 #[prost(bytes = "bytes", tag = "2")]
586 pub data: ::prost::bytes::Bytes,
587 #[prost(string, tag = "3")]
589 pub log: ::prost::alloc::string::String,
590 #[prost(string, tag = "4")]
592 pub info: ::prost::alloc::string::String,
593 #[prost(int64, tag = "5")]
594 pub gas_wanted: i64,
595 #[prost(int64, tag = "6")]
596 pub gas_used: i64,
597 #[prost(message, repeated, tag = "7")]
599 pub events: ::prost::alloc::vec::Vec<Event>,
600 #[prost(string, tag = "8")]
601 pub codespace: ::prost::alloc::string::String,
602}
603#[allow(clippy::derive_partial_eq_without_eq)]
607#[derive(Clone, PartialEq, ::prost::Message)]
608pub struct TxResult {
609 #[prost(int64, tag = "1")]
610 pub height: i64,
611 #[prost(uint32, tag = "2")]
612 pub index: u32,
613 #[prost(bytes = "bytes", tag = "3")]
614 pub tx: ::prost::bytes::Bytes,
615 #[prost(message, optional, tag = "4")]
616 pub result: ::core::option::Option<ExecTxResult>,
617}
618#[allow(clippy::derive_partial_eq_without_eq)]
620#[derive(Clone, PartialEq, ::prost::Message)]
621pub struct Validator {
622 #[prost(bytes = "bytes", tag = "1")]
624 pub address: ::prost::bytes::Bytes,
625 #[prost(int64, tag = "3")]
629 pub power: i64,
630}
631#[allow(clippy::derive_partial_eq_without_eq)]
633#[derive(Clone, PartialEq, ::prost::Message)]
634pub struct ValidatorUpdate {
635 #[prost(message, optional, tag = "1")]
636 pub pub_key: ::core::option::Option<super::super::crypto::v1::PublicKey>,
637 #[prost(int64, tag = "2")]
638 pub power: i64,
639}
640#[allow(clippy::derive_partial_eq_without_eq)]
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct VoteInfo {
644 #[prost(message, optional, tag = "1")]
645 pub validator: ::core::option::Option<Validator>,
646 #[prost(enumeration = "super::super::types::v1::BlockIdFlag", tag = "3")]
647 pub block_id_flag: i32,
648}
649#[allow(clippy::derive_partial_eq_without_eq)]
651#[derive(Clone, PartialEq, ::prost::Message)]
652pub struct ExtendedVoteInfo {
653 #[prost(message, optional, tag = "1")]
655 pub validator: ::core::option::Option<Validator>,
656 #[prost(bytes = "bytes", tag = "3")]
658 pub vote_extension: ::prost::bytes::Bytes,
659 #[prost(bytes = "bytes", tag = "4")]
661 pub extension_signature: ::prost::bytes::Bytes,
662 #[prost(enumeration = "super::super::types::v1::BlockIdFlag", tag = "5")]
664 pub block_id_flag: i32,
665}
666#[allow(clippy::derive_partial_eq_without_eq)]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct Misbehavior {
670 #[prost(enumeration = "MisbehaviorType", tag = "1")]
671 pub r#type: i32,
672 #[prost(message, optional, tag = "2")]
674 pub validator: ::core::option::Option<Validator>,
675 #[prost(int64, tag = "3")]
677 pub height: i64,
678 #[prost(message, optional, tag = "4")]
680 pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
681 #[prost(int64, tag = "5")]
685 pub total_voting_power: i64,
686}
687#[allow(clippy::derive_partial_eq_without_eq)]
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct Snapshot {
691 #[prost(uint64, tag = "1")]
693 pub height: u64,
694 #[prost(uint32, tag = "2")]
696 pub format: u32,
697 #[prost(uint32, tag = "3")]
699 pub chunks: u32,
700 #[prost(bytes = "bytes", tag = "4")]
702 pub hash: ::prost::bytes::Bytes,
703 #[prost(bytes = "bytes", tag = "5")]
705 pub metadata: ::prost::bytes::Bytes,
706}
707#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
713#[repr(i32)]
714pub enum CheckTxType {
715 Unknown = 0,
717 Recheck = 1,
719 Check = 2,
721}
722impl CheckTxType {
723 pub fn as_str_name(&self) -> &'static str {
728 match self {
729 CheckTxType::Unknown => "CHECK_TX_TYPE_UNKNOWN",
730 CheckTxType::Recheck => "CHECK_TX_TYPE_RECHECK",
731 CheckTxType::Check => "CHECK_TX_TYPE_CHECK",
732 }
733 }
734 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
736 match value {
737 "CHECK_TX_TYPE_UNKNOWN" => Some(Self::Unknown),
738 "CHECK_TX_TYPE_RECHECK" => Some(Self::Recheck),
739 "CHECK_TX_TYPE_CHECK" => Some(Self::Check),
740 _ => None,
741 }
742 }
743}
744#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
746#[repr(i32)]
747pub enum OfferSnapshotResult {
748 Unknown = 0,
750 Accept = 1,
752 Abort = 2,
754 Reject = 3,
756 RejectFormat = 4,
758 RejectSender = 5,
760}
761impl OfferSnapshotResult {
762 pub fn as_str_name(&self) -> &'static str {
767 match self {
768 OfferSnapshotResult::Unknown => "OFFER_SNAPSHOT_RESULT_UNKNOWN",
769 OfferSnapshotResult::Accept => "OFFER_SNAPSHOT_RESULT_ACCEPT",
770 OfferSnapshotResult::Abort => "OFFER_SNAPSHOT_RESULT_ABORT",
771 OfferSnapshotResult::Reject => "OFFER_SNAPSHOT_RESULT_REJECT",
772 OfferSnapshotResult::RejectFormat => "OFFER_SNAPSHOT_RESULT_REJECT_FORMAT",
773 OfferSnapshotResult::RejectSender => "OFFER_SNAPSHOT_RESULT_REJECT_SENDER",
774 }
775 }
776 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
778 match value {
779 "OFFER_SNAPSHOT_RESULT_UNKNOWN" => Some(Self::Unknown),
780 "OFFER_SNAPSHOT_RESULT_ACCEPT" => Some(Self::Accept),
781 "OFFER_SNAPSHOT_RESULT_ABORT" => Some(Self::Abort),
782 "OFFER_SNAPSHOT_RESULT_REJECT" => Some(Self::Reject),
783 "OFFER_SNAPSHOT_RESULT_REJECT_FORMAT" => Some(Self::RejectFormat),
784 "OFFER_SNAPSHOT_RESULT_REJECT_SENDER" => Some(Self::RejectSender),
785 _ => None,
786 }
787 }
788}
789#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
791#[repr(i32)]
792pub enum ApplySnapshotChunkResult {
793 Unknown = 0,
795 Accept = 1,
797 Abort = 2,
799 Retry = 3,
801 RetrySnapshot = 4,
803 RejectSnapshot = 5,
805}
806impl ApplySnapshotChunkResult {
807 pub fn as_str_name(&self) -> &'static str {
812 match self {
813 ApplySnapshotChunkResult::Unknown => "APPLY_SNAPSHOT_CHUNK_RESULT_UNKNOWN",
814 ApplySnapshotChunkResult::Accept => "APPLY_SNAPSHOT_CHUNK_RESULT_ACCEPT",
815 ApplySnapshotChunkResult::Abort => "APPLY_SNAPSHOT_CHUNK_RESULT_ABORT",
816 ApplySnapshotChunkResult::Retry => "APPLY_SNAPSHOT_CHUNK_RESULT_RETRY",
817 ApplySnapshotChunkResult::RetrySnapshot => {
818 "APPLY_SNAPSHOT_CHUNK_RESULT_RETRY_SNAPSHOT"
819 }
820 ApplySnapshotChunkResult::RejectSnapshot => {
821 "APPLY_SNAPSHOT_CHUNK_RESULT_REJECT_SNAPSHOT"
822 }
823 }
824 }
825 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
827 match value {
828 "APPLY_SNAPSHOT_CHUNK_RESULT_UNKNOWN" => Some(Self::Unknown),
829 "APPLY_SNAPSHOT_CHUNK_RESULT_ACCEPT" => Some(Self::Accept),
830 "APPLY_SNAPSHOT_CHUNK_RESULT_ABORT" => Some(Self::Abort),
831 "APPLY_SNAPSHOT_CHUNK_RESULT_RETRY" => Some(Self::Retry),
832 "APPLY_SNAPSHOT_CHUNK_RESULT_RETRY_SNAPSHOT" => Some(Self::RetrySnapshot),
833 "APPLY_SNAPSHOT_CHUNK_RESULT_REJECT_SNAPSHOT" => Some(Self::RejectSnapshot),
834 _ => None,
835 }
836 }
837}
838#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
840#[repr(i32)]
841pub enum ProcessProposalStatus {
842 Unknown = 0,
844 Accept = 1,
846 Reject = 2,
848}
849impl ProcessProposalStatus {
850 pub fn as_str_name(&self) -> &'static str {
855 match self {
856 ProcessProposalStatus::Unknown => "PROCESS_PROPOSAL_STATUS_UNKNOWN",
857 ProcessProposalStatus::Accept => "PROCESS_PROPOSAL_STATUS_ACCEPT",
858 ProcessProposalStatus::Reject => "PROCESS_PROPOSAL_STATUS_REJECT",
859 }
860 }
861 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
863 match value {
864 "PROCESS_PROPOSAL_STATUS_UNKNOWN" => Some(Self::Unknown),
865 "PROCESS_PROPOSAL_STATUS_ACCEPT" => Some(Self::Accept),
866 "PROCESS_PROPOSAL_STATUS_REJECT" => Some(Self::Reject),
867 _ => None,
868 }
869 }
870}
871#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
873#[repr(i32)]
874pub enum VerifyVoteExtensionStatus {
875 Unknown = 0,
877 Accept = 1,
879 Reject = 2,
884}
885impl VerifyVoteExtensionStatus {
886 pub fn as_str_name(&self) -> &'static str {
891 match self {
892 VerifyVoteExtensionStatus::Unknown => "VERIFY_VOTE_EXTENSION_STATUS_UNKNOWN",
893 VerifyVoteExtensionStatus::Accept => "VERIFY_VOTE_EXTENSION_STATUS_ACCEPT",
894 VerifyVoteExtensionStatus::Reject => "VERIFY_VOTE_EXTENSION_STATUS_REJECT",
895 }
896 }
897 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
899 match value {
900 "VERIFY_VOTE_EXTENSION_STATUS_UNKNOWN" => Some(Self::Unknown),
901 "VERIFY_VOTE_EXTENSION_STATUS_ACCEPT" => Some(Self::Accept),
902 "VERIFY_VOTE_EXTENSION_STATUS_REJECT" => Some(Self::Reject),
903 _ => None,
904 }
905 }
906}
907#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
909#[repr(i32)]
910pub enum MisbehaviorType {
911 Unknown = 0,
913 DuplicateVote = 1,
915 LightClientAttack = 2,
917}
918impl MisbehaviorType {
919 pub fn as_str_name(&self) -> &'static str {
924 match self {
925 MisbehaviorType::Unknown => "MISBEHAVIOR_TYPE_UNKNOWN",
926 MisbehaviorType::DuplicateVote => "MISBEHAVIOR_TYPE_DUPLICATE_VOTE",
927 MisbehaviorType::LightClientAttack => "MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK",
928 }
929 }
930 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
932 match value {
933 "MISBEHAVIOR_TYPE_UNKNOWN" => Some(Self::Unknown),
934 "MISBEHAVIOR_TYPE_DUPLICATE_VOTE" => Some(Self::DuplicateVote),
935 "MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack),
936 _ => None,
937 }
938 }
939}
940#[cfg(feature = "grpc-server")]
942pub mod abci_service_server {
943 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
944 use tonic::codegen::*;
945 #[async_trait]
947 pub trait AbciService: Send + Sync + 'static {
948 async fn echo(
950 &self,
951 request: tonic::Request<super::EchoRequest>,
952 ) -> std::result::Result<tonic::Response<super::EchoResponse>, tonic::Status>;
953 async fn flush(
955 &self,
956 request: tonic::Request<super::FlushRequest>,
957 ) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status>;
958 async fn info(
960 &self,
961 request: tonic::Request<super::InfoRequest>,
962 ) -> std::result::Result<tonic::Response<super::InfoResponse>, tonic::Status>;
963 async fn check_tx(
965 &self,
966 request: tonic::Request<super::CheckTxRequest>,
967 ) -> std::result::Result<tonic::Response<super::CheckTxResponse>, tonic::Status>;
968 async fn query(
970 &self,
971 request: tonic::Request<super::QueryRequest>,
972 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
973 async fn commit(
975 &self,
976 request: tonic::Request<super::CommitRequest>,
977 ) -> std::result::Result<tonic::Response<super::CommitResponse>, tonic::Status>;
978 async fn init_chain(
980 &self,
981 request: tonic::Request<super::InitChainRequest>,
982 ) -> std::result::Result<
983 tonic::Response<super::InitChainResponse>,
984 tonic::Status,
985 >;
986 async fn list_snapshots(
988 &self,
989 request: tonic::Request<super::ListSnapshotsRequest>,
990 ) -> std::result::Result<
991 tonic::Response<super::ListSnapshotsResponse>,
992 tonic::Status,
993 >;
994 async fn offer_snapshot(
996 &self,
997 request: tonic::Request<super::OfferSnapshotRequest>,
998 ) -> std::result::Result<
999 tonic::Response<super::OfferSnapshotResponse>,
1000 tonic::Status,
1001 >;
1002 async fn load_snapshot_chunk(
1004 &self,
1005 request: tonic::Request<super::LoadSnapshotChunkRequest>,
1006 ) -> std::result::Result<
1007 tonic::Response<super::LoadSnapshotChunkResponse>,
1008 tonic::Status,
1009 >;
1010 async fn apply_snapshot_chunk(
1012 &self,
1013 request: tonic::Request<super::ApplySnapshotChunkRequest>,
1014 ) -> std::result::Result<
1015 tonic::Response<super::ApplySnapshotChunkResponse>,
1016 tonic::Status,
1017 >;
1018 async fn prepare_proposal(
1020 &self,
1021 request: tonic::Request<super::PrepareProposalRequest>,
1022 ) -> std::result::Result<
1023 tonic::Response<super::PrepareProposalResponse>,
1024 tonic::Status,
1025 >;
1026 async fn process_proposal(
1028 &self,
1029 request: tonic::Request<super::ProcessProposalRequest>,
1030 ) -> std::result::Result<
1031 tonic::Response<super::ProcessProposalResponse>,
1032 tonic::Status,
1033 >;
1034 async fn extend_vote(
1036 &self,
1037 request: tonic::Request<super::ExtendVoteRequest>,
1038 ) -> std::result::Result<
1039 tonic::Response<super::ExtendVoteResponse>,
1040 tonic::Status,
1041 >;
1042 async fn verify_vote_extension(
1044 &self,
1045 request: tonic::Request<super::VerifyVoteExtensionRequest>,
1046 ) -> std::result::Result<
1047 tonic::Response<super::VerifyVoteExtensionResponse>,
1048 tonic::Status,
1049 >;
1050 async fn finalize_block(
1052 &self,
1053 request: tonic::Request<super::FinalizeBlockRequest>,
1054 ) -> std::result::Result<
1055 tonic::Response<super::FinalizeBlockResponse>,
1056 tonic::Status,
1057 >;
1058 }
1059 #[derive(Debug)]
1061 pub struct AbciServiceServer<T: AbciService> {
1062 inner: _Inner<T>,
1063 accept_compression_encodings: EnabledCompressionEncodings,
1064 send_compression_encodings: EnabledCompressionEncodings,
1065 max_decoding_message_size: Option<usize>,
1066 max_encoding_message_size: Option<usize>,
1067 }
1068 struct _Inner<T>(Arc<T>);
1069 impl<T: AbciService> AbciServiceServer<T> {
1070 pub fn new(inner: T) -> Self {
1071 Self::from_arc(Arc::new(inner))
1072 }
1073 pub fn from_arc(inner: Arc<T>) -> Self {
1074 let inner = _Inner(inner);
1075 Self {
1076 inner,
1077 accept_compression_encodings: Default::default(),
1078 send_compression_encodings: Default::default(),
1079 max_decoding_message_size: None,
1080 max_encoding_message_size: None,
1081 }
1082 }
1083 pub fn with_interceptor<F>(
1084 inner: T,
1085 interceptor: F,
1086 ) -> InterceptedService<Self, F>
1087 where
1088 F: tonic::service::Interceptor,
1089 {
1090 InterceptedService::new(Self::new(inner), interceptor)
1091 }
1092 #[must_use]
1094 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1095 self.accept_compression_encodings.enable(encoding);
1096 self
1097 }
1098 #[must_use]
1100 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1101 self.send_compression_encodings.enable(encoding);
1102 self
1103 }
1104 #[must_use]
1108 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1109 self.max_decoding_message_size = Some(limit);
1110 self
1111 }
1112 #[must_use]
1116 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1117 self.max_encoding_message_size = Some(limit);
1118 self
1119 }
1120 }
1121 impl<T, B> tonic::codegen::Service<http::Request<B>> for AbciServiceServer<T>
1122 where
1123 T: AbciService,
1124 B: Body + Send + 'static,
1125 B::Error: Into<StdError> + Send + 'static,
1126 {
1127 type Response = http::Response<tonic::body::BoxBody>;
1128 type Error = std::convert::Infallible;
1129 type Future = BoxFuture<Self::Response, Self::Error>;
1130 fn poll_ready(
1131 &mut self,
1132 _cx: &mut Context<'_>,
1133 ) -> Poll<std::result::Result<(), Self::Error>> {
1134 Poll::Ready(Ok(()))
1135 }
1136 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1137 let inner = self.inner.clone();
1138 match req.uri().path() {
1139 "/cometbft.abci.v1.ABCIService/Echo" => {
1140 #[allow(non_camel_case_types)]
1141 struct EchoSvc<T: AbciService>(pub Arc<T>);
1142 impl<T: AbciService> tonic::server::UnaryService<super::EchoRequest>
1143 for EchoSvc<T> {
1144 type Response = super::EchoResponse;
1145 type Future = BoxFuture<
1146 tonic::Response<Self::Response>,
1147 tonic::Status,
1148 >;
1149 fn call(
1150 &mut self,
1151 request: tonic::Request<super::EchoRequest>,
1152 ) -> Self::Future {
1153 let inner = Arc::clone(&self.0);
1154 let fut = async move {
1155 <T as AbciService>::echo(&inner, request).await
1156 };
1157 Box::pin(fut)
1158 }
1159 }
1160 let accept_compression_encodings = self.accept_compression_encodings;
1161 let send_compression_encodings = self.send_compression_encodings;
1162 let max_decoding_message_size = self.max_decoding_message_size;
1163 let max_encoding_message_size = self.max_encoding_message_size;
1164 let inner = self.inner.clone();
1165 let fut = async move {
1166 let inner = inner.0;
1167 let method = EchoSvc(inner);
1168 let codec = tonic::codec::ProstCodec::default();
1169 let mut grpc = tonic::server::Grpc::new(codec)
1170 .apply_compression_config(
1171 accept_compression_encodings,
1172 send_compression_encodings,
1173 )
1174 .apply_max_message_size_config(
1175 max_decoding_message_size,
1176 max_encoding_message_size,
1177 );
1178 let res = grpc.unary(method, req).await;
1179 Ok(res)
1180 };
1181 Box::pin(fut)
1182 }
1183 "/cometbft.abci.v1.ABCIService/Flush" => {
1184 #[allow(non_camel_case_types)]
1185 struct FlushSvc<T: AbciService>(pub Arc<T>);
1186 impl<T: AbciService> tonic::server::UnaryService<super::FlushRequest>
1187 for FlushSvc<T> {
1188 type Response = super::FlushResponse;
1189 type Future = BoxFuture<
1190 tonic::Response<Self::Response>,
1191 tonic::Status,
1192 >;
1193 fn call(
1194 &mut self,
1195 request: tonic::Request<super::FlushRequest>,
1196 ) -> Self::Future {
1197 let inner = Arc::clone(&self.0);
1198 let fut = async move {
1199 <T as AbciService>::flush(&inner, request).await
1200 };
1201 Box::pin(fut)
1202 }
1203 }
1204 let accept_compression_encodings = self.accept_compression_encodings;
1205 let send_compression_encodings = self.send_compression_encodings;
1206 let max_decoding_message_size = self.max_decoding_message_size;
1207 let max_encoding_message_size = self.max_encoding_message_size;
1208 let inner = self.inner.clone();
1209 let fut = async move {
1210 let inner = inner.0;
1211 let method = FlushSvc(inner);
1212 let codec = tonic::codec::ProstCodec::default();
1213 let mut grpc = tonic::server::Grpc::new(codec)
1214 .apply_compression_config(
1215 accept_compression_encodings,
1216 send_compression_encodings,
1217 )
1218 .apply_max_message_size_config(
1219 max_decoding_message_size,
1220 max_encoding_message_size,
1221 );
1222 let res = grpc.unary(method, req).await;
1223 Ok(res)
1224 };
1225 Box::pin(fut)
1226 }
1227 "/cometbft.abci.v1.ABCIService/Info" => {
1228 #[allow(non_camel_case_types)]
1229 struct InfoSvc<T: AbciService>(pub Arc<T>);
1230 impl<T: AbciService> tonic::server::UnaryService<super::InfoRequest>
1231 for InfoSvc<T> {
1232 type Response = super::InfoResponse;
1233 type Future = BoxFuture<
1234 tonic::Response<Self::Response>,
1235 tonic::Status,
1236 >;
1237 fn call(
1238 &mut self,
1239 request: tonic::Request<super::InfoRequest>,
1240 ) -> Self::Future {
1241 let inner = Arc::clone(&self.0);
1242 let fut = async move {
1243 <T as AbciService>::info(&inner, request).await
1244 };
1245 Box::pin(fut)
1246 }
1247 }
1248 let accept_compression_encodings = self.accept_compression_encodings;
1249 let send_compression_encodings = self.send_compression_encodings;
1250 let max_decoding_message_size = self.max_decoding_message_size;
1251 let max_encoding_message_size = self.max_encoding_message_size;
1252 let inner = self.inner.clone();
1253 let fut = async move {
1254 let inner = inner.0;
1255 let method = InfoSvc(inner);
1256 let codec = tonic::codec::ProstCodec::default();
1257 let mut grpc = tonic::server::Grpc::new(codec)
1258 .apply_compression_config(
1259 accept_compression_encodings,
1260 send_compression_encodings,
1261 )
1262 .apply_max_message_size_config(
1263 max_decoding_message_size,
1264 max_encoding_message_size,
1265 );
1266 let res = grpc.unary(method, req).await;
1267 Ok(res)
1268 };
1269 Box::pin(fut)
1270 }
1271 "/cometbft.abci.v1.ABCIService/CheckTx" => {
1272 #[allow(non_camel_case_types)]
1273 struct CheckTxSvc<T: AbciService>(pub Arc<T>);
1274 impl<
1275 T: AbciService,
1276 > tonic::server::UnaryService<super::CheckTxRequest>
1277 for CheckTxSvc<T> {
1278 type Response = super::CheckTxResponse;
1279 type Future = BoxFuture<
1280 tonic::Response<Self::Response>,
1281 tonic::Status,
1282 >;
1283 fn call(
1284 &mut self,
1285 request: tonic::Request<super::CheckTxRequest>,
1286 ) -> Self::Future {
1287 let inner = Arc::clone(&self.0);
1288 let fut = async move {
1289 <T as AbciService>::check_tx(&inner, request).await
1290 };
1291 Box::pin(fut)
1292 }
1293 }
1294 let accept_compression_encodings = self.accept_compression_encodings;
1295 let send_compression_encodings = self.send_compression_encodings;
1296 let max_decoding_message_size = self.max_decoding_message_size;
1297 let max_encoding_message_size = self.max_encoding_message_size;
1298 let inner = self.inner.clone();
1299 let fut = async move {
1300 let inner = inner.0;
1301 let method = CheckTxSvc(inner);
1302 let codec = tonic::codec::ProstCodec::default();
1303 let mut grpc = tonic::server::Grpc::new(codec)
1304 .apply_compression_config(
1305 accept_compression_encodings,
1306 send_compression_encodings,
1307 )
1308 .apply_max_message_size_config(
1309 max_decoding_message_size,
1310 max_encoding_message_size,
1311 );
1312 let res = grpc.unary(method, req).await;
1313 Ok(res)
1314 };
1315 Box::pin(fut)
1316 }
1317 "/cometbft.abci.v1.ABCIService/Query" => {
1318 #[allow(non_camel_case_types)]
1319 struct QuerySvc<T: AbciService>(pub Arc<T>);
1320 impl<T: AbciService> tonic::server::UnaryService<super::QueryRequest>
1321 for QuerySvc<T> {
1322 type Response = super::QueryResponse;
1323 type Future = BoxFuture<
1324 tonic::Response<Self::Response>,
1325 tonic::Status,
1326 >;
1327 fn call(
1328 &mut self,
1329 request: tonic::Request<super::QueryRequest>,
1330 ) -> Self::Future {
1331 let inner = Arc::clone(&self.0);
1332 let fut = async move {
1333 <T as AbciService>::query(&inner, request).await
1334 };
1335 Box::pin(fut)
1336 }
1337 }
1338 let accept_compression_encodings = self.accept_compression_encodings;
1339 let send_compression_encodings = self.send_compression_encodings;
1340 let max_decoding_message_size = self.max_decoding_message_size;
1341 let max_encoding_message_size = self.max_encoding_message_size;
1342 let inner = self.inner.clone();
1343 let fut = async move {
1344 let inner = inner.0;
1345 let method = QuerySvc(inner);
1346 let codec = tonic::codec::ProstCodec::default();
1347 let mut grpc = tonic::server::Grpc::new(codec)
1348 .apply_compression_config(
1349 accept_compression_encodings,
1350 send_compression_encodings,
1351 )
1352 .apply_max_message_size_config(
1353 max_decoding_message_size,
1354 max_encoding_message_size,
1355 );
1356 let res = grpc.unary(method, req).await;
1357 Ok(res)
1358 };
1359 Box::pin(fut)
1360 }
1361 "/cometbft.abci.v1.ABCIService/Commit" => {
1362 #[allow(non_camel_case_types)]
1363 struct CommitSvc<T: AbciService>(pub Arc<T>);
1364 impl<
1365 T: AbciService,
1366 > tonic::server::UnaryService<super::CommitRequest>
1367 for CommitSvc<T> {
1368 type Response = super::CommitResponse;
1369 type Future = BoxFuture<
1370 tonic::Response<Self::Response>,
1371 tonic::Status,
1372 >;
1373 fn call(
1374 &mut self,
1375 request: tonic::Request<super::CommitRequest>,
1376 ) -> Self::Future {
1377 let inner = Arc::clone(&self.0);
1378 let fut = async move {
1379 <T as AbciService>::commit(&inner, request).await
1380 };
1381 Box::pin(fut)
1382 }
1383 }
1384 let accept_compression_encodings = self.accept_compression_encodings;
1385 let send_compression_encodings = self.send_compression_encodings;
1386 let max_decoding_message_size = self.max_decoding_message_size;
1387 let max_encoding_message_size = self.max_encoding_message_size;
1388 let inner = self.inner.clone();
1389 let fut = async move {
1390 let inner = inner.0;
1391 let method = CommitSvc(inner);
1392 let codec = tonic::codec::ProstCodec::default();
1393 let mut grpc = tonic::server::Grpc::new(codec)
1394 .apply_compression_config(
1395 accept_compression_encodings,
1396 send_compression_encodings,
1397 )
1398 .apply_max_message_size_config(
1399 max_decoding_message_size,
1400 max_encoding_message_size,
1401 );
1402 let res = grpc.unary(method, req).await;
1403 Ok(res)
1404 };
1405 Box::pin(fut)
1406 }
1407 "/cometbft.abci.v1.ABCIService/InitChain" => {
1408 #[allow(non_camel_case_types)]
1409 struct InitChainSvc<T: AbciService>(pub Arc<T>);
1410 impl<
1411 T: AbciService,
1412 > tonic::server::UnaryService<super::InitChainRequest>
1413 for InitChainSvc<T> {
1414 type Response = super::InitChainResponse;
1415 type Future = BoxFuture<
1416 tonic::Response<Self::Response>,
1417 tonic::Status,
1418 >;
1419 fn call(
1420 &mut self,
1421 request: tonic::Request<super::InitChainRequest>,
1422 ) -> Self::Future {
1423 let inner = Arc::clone(&self.0);
1424 let fut = async move {
1425 <T as AbciService>::init_chain(&inner, request).await
1426 };
1427 Box::pin(fut)
1428 }
1429 }
1430 let accept_compression_encodings = self.accept_compression_encodings;
1431 let send_compression_encodings = self.send_compression_encodings;
1432 let max_decoding_message_size = self.max_decoding_message_size;
1433 let max_encoding_message_size = self.max_encoding_message_size;
1434 let inner = self.inner.clone();
1435 let fut = async move {
1436 let inner = inner.0;
1437 let method = InitChainSvc(inner);
1438 let codec = tonic::codec::ProstCodec::default();
1439 let mut grpc = tonic::server::Grpc::new(codec)
1440 .apply_compression_config(
1441 accept_compression_encodings,
1442 send_compression_encodings,
1443 )
1444 .apply_max_message_size_config(
1445 max_decoding_message_size,
1446 max_encoding_message_size,
1447 );
1448 let res = grpc.unary(method, req).await;
1449 Ok(res)
1450 };
1451 Box::pin(fut)
1452 }
1453 "/cometbft.abci.v1.ABCIService/ListSnapshots" => {
1454 #[allow(non_camel_case_types)]
1455 struct ListSnapshotsSvc<T: AbciService>(pub Arc<T>);
1456 impl<
1457 T: AbciService,
1458 > tonic::server::UnaryService<super::ListSnapshotsRequest>
1459 for ListSnapshotsSvc<T> {
1460 type Response = super::ListSnapshotsResponse;
1461 type Future = BoxFuture<
1462 tonic::Response<Self::Response>,
1463 tonic::Status,
1464 >;
1465 fn call(
1466 &mut self,
1467 request: tonic::Request<super::ListSnapshotsRequest>,
1468 ) -> Self::Future {
1469 let inner = Arc::clone(&self.0);
1470 let fut = async move {
1471 <T as AbciService>::list_snapshots(&inner, request).await
1472 };
1473 Box::pin(fut)
1474 }
1475 }
1476 let accept_compression_encodings = self.accept_compression_encodings;
1477 let send_compression_encodings = self.send_compression_encodings;
1478 let max_decoding_message_size = self.max_decoding_message_size;
1479 let max_encoding_message_size = self.max_encoding_message_size;
1480 let inner = self.inner.clone();
1481 let fut = async move {
1482 let inner = inner.0;
1483 let method = ListSnapshotsSvc(inner);
1484 let codec = tonic::codec::ProstCodec::default();
1485 let mut grpc = tonic::server::Grpc::new(codec)
1486 .apply_compression_config(
1487 accept_compression_encodings,
1488 send_compression_encodings,
1489 )
1490 .apply_max_message_size_config(
1491 max_decoding_message_size,
1492 max_encoding_message_size,
1493 );
1494 let res = grpc.unary(method, req).await;
1495 Ok(res)
1496 };
1497 Box::pin(fut)
1498 }
1499 "/cometbft.abci.v1.ABCIService/OfferSnapshot" => {
1500 #[allow(non_camel_case_types)]
1501 struct OfferSnapshotSvc<T: AbciService>(pub Arc<T>);
1502 impl<
1503 T: AbciService,
1504 > tonic::server::UnaryService<super::OfferSnapshotRequest>
1505 for OfferSnapshotSvc<T> {
1506 type Response = super::OfferSnapshotResponse;
1507 type Future = BoxFuture<
1508 tonic::Response<Self::Response>,
1509 tonic::Status,
1510 >;
1511 fn call(
1512 &mut self,
1513 request: tonic::Request<super::OfferSnapshotRequest>,
1514 ) -> Self::Future {
1515 let inner = Arc::clone(&self.0);
1516 let fut = async move {
1517 <T as AbciService>::offer_snapshot(&inner, request).await
1518 };
1519 Box::pin(fut)
1520 }
1521 }
1522 let accept_compression_encodings = self.accept_compression_encodings;
1523 let send_compression_encodings = self.send_compression_encodings;
1524 let max_decoding_message_size = self.max_decoding_message_size;
1525 let max_encoding_message_size = self.max_encoding_message_size;
1526 let inner = self.inner.clone();
1527 let fut = async move {
1528 let inner = inner.0;
1529 let method = OfferSnapshotSvc(inner);
1530 let codec = tonic::codec::ProstCodec::default();
1531 let mut grpc = tonic::server::Grpc::new(codec)
1532 .apply_compression_config(
1533 accept_compression_encodings,
1534 send_compression_encodings,
1535 )
1536 .apply_max_message_size_config(
1537 max_decoding_message_size,
1538 max_encoding_message_size,
1539 );
1540 let res = grpc.unary(method, req).await;
1541 Ok(res)
1542 };
1543 Box::pin(fut)
1544 }
1545 "/cometbft.abci.v1.ABCIService/LoadSnapshotChunk" => {
1546 #[allow(non_camel_case_types)]
1547 struct LoadSnapshotChunkSvc<T: AbciService>(pub Arc<T>);
1548 impl<
1549 T: AbciService,
1550 > tonic::server::UnaryService<super::LoadSnapshotChunkRequest>
1551 for LoadSnapshotChunkSvc<T> {
1552 type Response = super::LoadSnapshotChunkResponse;
1553 type Future = BoxFuture<
1554 tonic::Response<Self::Response>,
1555 tonic::Status,
1556 >;
1557 fn call(
1558 &mut self,
1559 request: tonic::Request<super::LoadSnapshotChunkRequest>,
1560 ) -> Self::Future {
1561 let inner = Arc::clone(&self.0);
1562 let fut = async move {
1563 <T as AbciService>::load_snapshot_chunk(&inner, request)
1564 .await
1565 };
1566 Box::pin(fut)
1567 }
1568 }
1569 let accept_compression_encodings = self.accept_compression_encodings;
1570 let send_compression_encodings = self.send_compression_encodings;
1571 let max_decoding_message_size = self.max_decoding_message_size;
1572 let max_encoding_message_size = self.max_encoding_message_size;
1573 let inner = self.inner.clone();
1574 let fut = async move {
1575 let inner = inner.0;
1576 let method = LoadSnapshotChunkSvc(inner);
1577 let codec = tonic::codec::ProstCodec::default();
1578 let mut grpc = tonic::server::Grpc::new(codec)
1579 .apply_compression_config(
1580 accept_compression_encodings,
1581 send_compression_encodings,
1582 )
1583 .apply_max_message_size_config(
1584 max_decoding_message_size,
1585 max_encoding_message_size,
1586 );
1587 let res = grpc.unary(method, req).await;
1588 Ok(res)
1589 };
1590 Box::pin(fut)
1591 }
1592 "/cometbft.abci.v1.ABCIService/ApplySnapshotChunk" => {
1593 #[allow(non_camel_case_types)]
1594 struct ApplySnapshotChunkSvc<T: AbciService>(pub Arc<T>);
1595 impl<
1596 T: AbciService,
1597 > tonic::server::UnaryService<super::ApplySnapshotChunkRequest>
1598 for ApplySnapshotChunkSvc<T> {
1599 type Response = super::ApplySnapshotChunkResponse;
1600 type Future = BoxFuture<
1601 tonic::Response<Self::Response>,
1602 tonic::Status,
1603 >;
1604 fn call(
1605 &mut self,
1606 request: tonic::Request<super::ApplySnapshotChunkRequest>,
1607 ) -> Self::Future {
1608 let inner = Arc::clone(&self.0);
1609 let fut = async move {
1610 <T as AbciService>::apply_snapshot_chunk(&inner, request)
1611 .await
1612 };
1613 Box::pin(fut)
1614 }
1615 }
1616 let accept_compression_encodings = self.accept_compression_encodings;
1617 let send_compression_encodings = self.send_compression_encodings;
1618 let max_decoding_message_size = self.max_decoding_message_size;
1619 let max_encoding_message_size = self.max_encoding_message_size;
1620 let inner = self.inner.clone();
1621 let fut = async move {
1622 let inner = inner.0;
1623 let method = ApplySnapshotChunkSvc(inner);
1624 let codec = tonic::codec::ProstCodec::default();
1625 let mut grpc = tonic::server::Grpc::new(codec)
1626 .apply_compression_config(
1627 accept_compression_encodings,
1628 send_compression_encodings,
1629 )
1630 .apply_max_message_size_config(
1631 max_decoding_message_size,
1632 max_encoding_message_size,
1633 );
1634 let res = grpc.unary(method, req).await;
1635 Ok(res)
1636 };
1637 Box::pin(fut)
1638 }
1639 "/cometbft.abci.v1.ABCIService/PrepareProposal" => {
1640 #[allow(non_camel_case_types)]
1641 struct PrepareProposalSvc<T: AbciService>(pub Arc<T>);
1642 impl<
1643 T: AbciService,
1644 > tonic::server::UnaryService<super::PrepareProposalRequest>
1645 for PrepareProposalSvc<T> {
1646 type Response = super::PrepareProposalResponse;
1647 type Future = BoxFuture<
1648 tonic::Response<Self::Response>,
1649 tonic::Status,
1650 >;
1651 fn call(
1652 &mut self,
1653 request: tonic::Request<super::PrepareProposalRequest>,
1654 ) -> Self::Future {
1655 let inner = Arc::clone(&self.0);
1656 let fut = async move {
1657 <T as AbciService>::prepare_proposal(&inner, request).await
1658 };
1659 Box::pin(fut)
1660 }
1661 }
1662 let accept_compression_encodings = self.accept_compression_encodings;
1663 let send_compression_encodings = self.send_compression_encodings;
1664 let max_decoding_message_size = self.max_decoding_message_size;
1665 let max_encoding_message_size = self.max_encoding_message_size;
1666 let inner = self.inner.clone();
1667 let fut = async move {
1668 let inner = inner.0;
1669 let method = PrepareProposalSvc(inner);
1670 let codec = tonic::codec::ProstCodec::default();
1671 let mut grpc = tonic::server::Grpc::new(codec)
1672 .apply_compression_config(
1673 accept_compression_encodings,
1674 send_compression_encodings,
1675 )
1676 .apply_max_message_size_config(
1677 max_decoding_message_size,
1678 max_encoding_message_size,
1679 );
1680 let res = grpc.unary(method, req).await;
1681 Ok(res)
1682 };
1683 Box::pin(fut)
1684 }
1685 "/cometbft.abci.v1.ABCIService/ProcessProposal" => {
1686 #[allow(non_camel_case_types)]
1687 struct ProcessProposalSvc<T: AbciService>(pub Arc<T>);
1688 impl<
1689 T: AbciService,
1690 > tonic::server::UnaryService<super::ProcessProposalRequest>
1691 for ProcessProposalSvc<T> {
1692 type Response = super::ProcessProposalResponse;
1693 type Future = BoxFuture<
1694 tonic::Response<Self::Response>,
1695 tonic::Status,
1696 >;
1697 fn call(
1698 &mut self,
1699 request: tonic::Request<super::ProcessProposalRequest>,
1700 ) -> Self::Future {
1701 let inner = Arc::clone(&self.0);
1702 let fut = async move {
1703 <T as AbciService>::process_proposal(&inner, request).await
1704 };
1705 Box::pin(fut)
1706 }
1707 }
1708 let accept_compression_encodings = self.accept_compression_encodings;
1709 let send_compression_encodings = self.send_compression_encodings;
1710 let max_decoding_message_size = self.max_decoding_message_size;
1711 let max_encoding_message_size = self.max_encoding_message_size;
1712 let inner = self.inner.clone();
1713 let fut = async move {
1714 let inner = inner.0;
1715 let method = ProcessProposalSvc(inner);
1716 let codec = tonic::codec::ProstCodec::default();
1717 let mut grpc = tonic::server::Grpc::new(codec)
1718 .apply_compression_config(
1719 accept_compression_encodings,
1720 send_compression_encodings,
1721 )
1722 .apply_max_message_size_config(
1723 max_decoding_message_size,
1724 max_encoding_message_size,
1725 );
1726 let res = grpc.unary(method, req).await;
1727 Ok(res)
1728 };
1729 Box::pin(fut)
1730 }
1731 "/cometbft.abci.v1.ABCIService/ExtendVote" => {
1732 #[allow(non_camel_case_types)]
1733 struct ExtendVoteSvc<T: AbciService>(pub Arc<T>);
1734 impl<
1735 T: AbciService,
1736 > tonic::server::UnaryService<super::ExtendVoteRequest>
1737 for ExtendVoteSvc<T> {
1738 type Response = super::ExtendVoteResponse;
1739 type Future = BoxFuture<
1740 tonic::Response<Self::Response>,
1741 tonic::Status,
1742 >;
1743 fn call(
1744 &mut self,
1745 request: tonic::Request<super::ExtendVoteRequest>,
1746 ) -> Self::Future {
1747 let inner = Arc::clone(&self.0);
1748 let fut = async move {
1749 <T as AbciService>::extend_vote(&inner, request).await
1750 };
1751 Box::pin(fut)
1752 }
1753 }
1754 let accept_compression_encodings = self.accept_compression_encodings;
1755 let send_compression_encodings = self.send_compression_encodings;
1756 let max_decoding_message_size = self.max_decoding_message_size;
1757 let max_encoding_message_size = self.max_encoding_message_size;
1758 let inner = self.inner.clone();
1759 let fut = async move {
1760 let inner = inner.0;
1761 let method = ExtendVoteSvc(inner);
1762 let codec = tonic::codec::ProstCodec::default();
1763 let mut grpc = tonic::server::Grpc::new(codec)
1764 .apply_compression_config(
1765 accept_compression_encodings,
1766 send_compression_encodings,
1767 )
1768 .apply_max_message_size_config(
1769 max_decoding_message_size,
1770 max_encoding_message_size,
1771 );
1772 let res = grpc.unary(method, req).await;
1773 Ok(res)
1774 };
1775 Box::pin(fut)
1776 }
1777 "/cometbft.abci.v1.ABCIService/VerifyVoteExtension" => {
1778 #[allow(non_camel_case_types)]
1779 struct VerifyVoteExtensionSvc<T: AbciService>(pub Arc<T>);
1780 impl<
1781 T: AbciService,
1782 > tonic::server::UnaryService<super::VerifyVoteExtensionRequest>
1783 for VerifyVoteExtensionSvc<T> {
1784 type Response = super::VerifyVoteExtensionResponse;
1785 type Future = BoxFuture<
1786 tonic::Response<Self::Response>,
1787 tonic::Status,
1788 >;
1789 fn call(
1790 &mut self,
1791 request: tonic::Request<super::VerifyVoteExtensionRequest>,
1792 ) -> Self::Future {
1793 let inner = Arc::clone(&self.0);
1794 let fut = async move {
1795 <T as AbciService>::verify_vote_extension(&inner, request)
1796 .await
1797 };
1798 Box::pin(fut)
1799 }
1800 }
1801 let accept_compression_encodings = self.accept_compression_encodings;
1802 let send_compression_encodings = self.send_compression_encodings;
1803 let max_decoding_message_size = self.max_decoding_message_size;
1804 let max_encoding_message_size = self.max_encoding_message_size;
1805 let inner = self.inner.clone();
1806 let fut = async move {
1807 let inner = inner.0;
1808 let method = VerifyVoteExtensionSvc(inner);
1809 let codec = tonic::codec::ProstCodec::default();
1810 let mut grpc = tonic::server::Grpc::new(codec)
1811 .apply_compression_config(
1812 accept_compression_encodings,
1813 send_compression_encodings,
1814 )
1815 .apply_max_message_size_config(
1816 max_decoding_message_size,
1817 max_encoding_message_size,
1818 );
1819 let res = grpc.unary(method, req).await;
1820 Ok(res)
1821 };
1822 Box::pin(fut)
1823 }
1824 "/cometbft.abci.v1.ABCIService/FinalizeBlock" => {
1825 #[allow(non_camel_case_types)]
1826 struct FinalizeBlockSvc<T: AbciService>(pub Arc<T>);
1827 impl<
1828 T: AbciService,
1829 > tonic::server::UnaryService<super::FinalizeBlockRequest>
1830 for FinalizeBlockSvc<T> {
1831 type Response = super::FinalizeBlockResponse;
1832 type Future = BoxFuture<
1833 tonic::Response<Self::Response>,
1834 tonic::Status,
1835 >;
1836 fn call(
1837 &mut self,
1838 request: tonic::Request<super::FinalizeBlockRequest>,
1839 ) -> Self::Future {
1840 let inner = Arc::clone(&self.0);
1841 let fut = async move {
1842 <T as AbciService>::finalize_block(&inner, request).await
1843 };
1844 Box::pin(fut)
1845 }
1846 }
1847 let accept_compression_encodings = self.accept_compression_encodings;
1848 let send_compression_encodings = self.send_compression_encodings;
1849 let max_decoding_message_size = self.max_decoding_message_size;
1850 let max_encoding_message_size = self.max_encoding_message_size;
1851 let inner = self.inner.clone();
1852 let fut = async move {
1853 let inner = inner.0;
1854 let method = FinalizeBlockSvc(inner);
1855 let codec = tonic::codec::ProstCodec::default();
1856 let mut grpc = tonic::server::Grpc::new(codec)
1857 .apply_compression_config(
1858 accept_compression_encodings,
1859 send_compression_encodings,
1860 )
1861 .apply_max_message_size_config(
1862 max_decoding_message_size,
1863 max_encoding_message_size,
1864 );
1865 let res = grpc.unary(method, req).await;
1866 Ok(res)
1867 };
1868 Box::pin(fut)
1869 }
1870 _ => {
1871 Box::pin(async move {
1872 Ok(
1873 http::Response::builder()
1874 .status(200)
1875 .header("grpc-status", "12")
1876 .header("content-type", "application/grpc")
1877 .body(empty_body())
1878 .unwrap(),
1879 )
1880 })
1881 }
1882 }
1883 }
1884 }
1885 impl<T: AbciService> Clone for AbciServiceServer<T> {
1886 fn clone(&self) -> Self {
1887 let inner = self.inner.clone();
1888 Self {
1889 inner,
1890 accept_compression_encodings: self.accept_compression_encodings,
1891 send_compression_encodings: self.send_compression_encodings,
1892 max_decoding_message_size: self.max_decoding_message_size,
1893 max_encoding_message_size: self.max_encoding_message_size,
1894 }
1895 }
1896 }
1897 impl<T: AbciService> Clone for _Inner<T> {
1898 fn clone(&self) -> Self {
1899 Self(Arc::clone(&self.0))
1900 }
1901 }
1902 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
1903 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1904 write!(f, "{:?}", self.0)
1905 }
1906 }
1907 impl<T: AbciService> tonic::server::NamedService for AbciServiceServer<T> {
1908 const NAME: &'static str = "cometbft.abci.v1.ABCIService";
1909 }
1910}