cometbft_proto/prost/
cometbft.abci.v1beta2.rs

1/// Request represents a request to the ABCI application.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Request {
5    /// Sum of all possible messages.
6    #[prost(
7        oneof = "request::Value",
8        tags = "1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17"
9    )]
10    pub value: ::core::option::Option<request::Value>,
11}
12/// Nested message and enum types in `Request`.
13pub mod request {
14    /// Sum of all possible messages.
15    #[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::super::v1beta1::RequestEcho),
20        #[prost(message, tag = "2")]
21        Flush(super::super::v1beta1::RequestFlush),
22        #[prost(message, tag = "3")]
23        Info(super::RequestInfo),
24        #[prost(message, tag = "5")]
25        InitChain(super::RequestInitChain),
26        #[prost(message, tag = "6")]
27        Query(super::super::v1beta1::RequestQuery),
28        #[prost(message, tag = "7")]
29        BeginBlock(super::RequestBeginBlock),
30        #[prost(message, tag = "8")]
31        CheckTx(super::super::v1beta1::RequestCheckTx),
32        #[prost(message, tag = "9")]
33        DeliverTx(super::super::v1beta1::RequestDeliverTx),
34        #[prost(message, tag = "10")]
35        EndBlock(super::super::v1beta1::RequestEndBlock),
36        #[prost(message, tag = "11")]
37        Commit(super::super::v1beta1::RequestCommit),
38        #[prost(message, tag = "12")]
39        ListSnapshots(super::super::v1beta1::RequestListSnapshots),
40        #[prost(message, tag = "13")]
41        OfferSnapshot(super::super::v1beta1::RequestOfferSnapshot),
42        #[prost(message, tag = "14")]
43        LoadSnapshotChunk(super::super::v1beta1::RequestLoadSnapshotChunk),
44        #[prost(message, tag = "15")]
45        ApplySnapshotChunk(super::super::v1beta1::RequestApplySnapshotChunk),
46        #[prost(message, tag = "16")]
47        PrepareProposal(super::RequestPrepareProposal),
48        #[prost(message, tag = "17")]
49        ProcessProposal(super::RequestProcessProposal),
50    }
51}
52/// RequestInfo is a request for the ABCI application version.
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct RequestInfo {
56    #[prost(string, tag = "1")]
57    pub version: ::prost::alloc::string::String,
58    #[prost(uint64, tag = "2")]
59    pub block_version: u64,
60    #[prost(uint64, tag = "3")]
61    pub p2p_version: u64,
62    #[prost(string, tag = "4")]
63    pub abci_version: ::prost::alloc::string::String,
64}
65/// RequestInitChain is a request to initialize the blockchain.
66#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct RequestInitChain {
69    #[prost(message, optional, tag = "1")]
70    pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
71    #[prost(string, tag = "2")]
72    pub chain_id: ::prost::alloc::string::String,
73    #[prost(message, optional, tag = "3")]
74    pub consensus_params: ::core::option::Option<
75        super::super::types::v1beta2::ConsensusParams,
76    >,
77    #[prost(message, repeated, tag = "4")]
78    pub validators: ::prost::alloc::vec::Vec<super::v1beta1::ValidatorUpdate>,
79    #[prost(bytes = "bytes", tag = "5")]
80    pub app_state_bytes: ::prost::bytes::Bytes,
81    #[prost(int64, tag = "6")]
82    pub initial_height: i64,
83}
84/// RequestBeginBlock indicates the beginning of commiting the block.
85#[allow(clippy::derive_partial_eq_without_eq)]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct RequestBeginBlock {
88    #[prost(bytes = "bytes", tag = "1")]
89    pub hash: ::prost::bytes::Bytes,
90    #[prost(message, optional, tag = "2")]
91    pub header: ::core::option::Option<super::super::types::v1beta1::Header>,
92    #[prost(message, optional, tag = "3")]
93    pub last_commit_info: ::core::option::Option<CommitInfo>,
94    #[prost(message, repeated, tag = "4")]
95    pub byzantine_validators: ::prost::alloc::vec::Vec<Misbehavior>,
96}
97/// RequestPrepareProposal is a request for the ABCI application to prepare a new
98/// block proposal.
99#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct RequestPrepareProposal {
102    /// the modified transactions cannot exceed this size.
103    #[prost(int64, tag = "1")]
104    pub max_tx_bytes: i64,
105    /// txs is an array of transactions that will be included in a block,
106    /// sent to the app for possible modifications.
107    #[prost(bytes = "bytes", repeated, tag = "2")]
108    pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
109    #[prost(message, optional, tag = "3")]
110    pub local_last_commit: ::core::option::Option<ExtendedCommitInfo>,
111    #[prost(message, repeated, tag = "4")]
112    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
113    #[prost(int64, tag = "5")]
114    pub height: i64,
115    #[prost(message, optional, tag = "6")]
116    pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
117    #[prost(bytes = "bytes", tag = "7")]
118    pub next_validators_hash: ::prost::bytes::Bytes,
119    /// address of the public key of the validator proposing the block.
120    #[prost(bytes = "bytes", tag = "8")]
121    pub proposer_address: ::prost::bytes::Bytes,
122}
123/// RequestProcessProposal is a request for the ABCI application to process proposal.
124#[allow(clippy::derive_partial_eq_without_eq)]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct RequestProcessProposal {
127    #[prost(bytes = "bytes", repeated, tag = "1")]
128    pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
129    #[prost(message, optional, tag = "2")]
130    pub proposed_last_commit: ::core::option::Option<CommitInfo>,
131    #[prost(message, repeated, tag = "3")]
132    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
133    /// hash is the merkle root hash of the fields of the proposed block.
134    #[prost(bytes = "bytes", tag = "4")]
135    pub hash: ::prost::bytes::Bytes,
136    #[prost(int64, tag = "5")]
137    pub height: i64,
138    #[prost(message, optional, tag = "6")]
139    pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
140    #[prost(bytes = "bytes", tag = "7")]
141    pub next_validators_hash: ::prost::bytes::Bytes,
142    /// address of the public key of the original proposer of the block.
143    #[prost(bytes = "bytes", tag = "8")]
144    pub proposer_address: ::prost::bytes::Bytes,
145}
146/// Response represents a response from the ABCI application.
147#[allow(clippy::derive_partial_eq_without_eq)]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct Response {
150    /// Sum of all possible messages.
151    #[prost(
152        oneof = "response::Value",
153        tags = "1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
154    )]
155    pub value: ::core::option::Option<response::Value>,
156}
157/// Nested message and enum types in `Response`.
158pub mod response {
159    /// Sum of all possible messages.
160    #[allow(clippy::derive_partial_eq_without_eq)]
161    #[derive(Clone, PartialEq, ::prost::Oneof)]
162    pub enum Value {
163        #[prost(message, tag = "1")]
164        Exception(super::super::v1beta1::ResponseException),
165        #[prost(message, tag = "2")]
166        Echo(super::super::v1beta1::ResponseEcho),
167        #[prost(message, tag = "3")]
168        Flush(super::super::v1beta1::ResponseFlush),
169        #[prost(message, tag = "4")]
170        Info(super::super::v1beta1::ResponseInfo),
171        #[prost(message, tag = "6")]
172        InitChain(super::ResponseInitChain),
173        #[prost(message, tag = "7")]
174        Query(super::super::v1beta1::ResponseQuery),
175        #[prost(message, tag = "8")]
176        BeginBlock(super::ResponseBeginBlock),
177        #[prost(message, tag = "9")]
178        CheckTx(super::ResponseCheckTx),
179        #[prost(message, tag = "10")]
180        DeliverTx(super::ResponseDeliverTx),
181        #[prost(message, tag = "11")]
182        EndBlock(super::ResponseEndBlock),
183        #[prost(message, tag = "12")]
184        Commit(super::super::v1beta1::ResponseCommit),
185        #[prost(message, tag = "13")]
186        ListSnapshots(super::super::v1beta1::ResponseListSnapshots),
187        #[prost(message, tag = "14")]
188        OfferSnapshot(super::super::v1beta1::ResponseOfferSnapshot),
189        #[prost(message, tag = "15")]
190        LoadSnapshotChunk(super::super::v1beta1::ResponseLoadSnapshotChunk),
191        #[prost(message, tag = "16")]
192        ApplySnapshotChunk(super::super::v1beta1::ResponseApplySnapshotChunk),
193        #[prost(message, tag = "17")]
194        PrepareProposal(super::ResponsePrepareProposal),
195        #[prost(message, tag = "18")]
196        ProcessProposal(super::ResponseProcessProposal),
197    }
198}
199/// ResponseInitChain contains the ABCI application's hash and updates to the
200/// validator set and/or the consensus params, if any.
201#[allow(clippy::derive_partial_eq_without_eq)]
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct ResponseInitChain {
204    #[prost(message, optional, tag = "1")]
205    pub consensus_params: ::core::option::Option<
206        super::super::types::v1beta2::ConsensusParams,
207    >,
208    #[prost(message, repeated, tag = "2")]
209    pub validators: ::prost::alloc::vec::Vec<super::v1beta1::ValidatorUpdate>,
210    #[prost(bytes = "bytes", tag = "3")]
211    pub app_hash: ::prost::bytes::Bytes,
212}
213/// ResponseBeginBlock contains a list of block-level events.
214#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct ResponseBeginBlock {
217    #[prost(message, repeated, tag = "1")]
218    pub events: ::prost::alloc::vec::Vec<Event>,
219}
220/// ResponseCheckTx shows if the transaction was deemed valid by the ABCI
221/// application.
222#[allow(clippy::derive_partial_eq_without_eq)]
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct ResponseCheckTx {
225    #[prost(uint32, tag = "1")]
226    pub code: u32,
227    #[prost(bytes = "bytes", tag = "2")]
228    pub data: ::prost::bytes::Bytes,
229    /// nondeterministic
230    #[prost(string, tag = "3")]
231    pub log: ::prost::alloc::string::String,
232    /// nondeterministic
233    #[prost(string, tag = "4")]
234    pub info: ::prost::alloc::string::String,
235    #[prost(int64, tag = "5")]
236    pub gas_wanted: i64,
237    #[prost(int64, tag = "6")]
238    pub gas_used: i64,
239    #[prost(message, repeated, tag = "7")]
240    pub events: ::prost::alloc::vec::Vec<Event>,
241    #[prost(string, tag = "8")]
242    pub codespace: ::prost::alloc::string::String,
243    #[prost(string, tag = "9")]
244    pub sender: ::prost::alloc::string::String,
245    #[prost(int64, tag = "10")]
246    pub priority: i64,
247    /// mempool_error is set by CometBFT.
248    /// ABCI applictions creating a ResponseCheckTX should not set mempool_error.
249    #[prost(string, tag = "11")]
250    pub mempool_error: ::prost::alloc::string::String,
251}
252/// ResponseDeliverTx contains a result of committing the given transaction and a
253/// list of events.
254#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct ResponseDeliverTx {
257    #[prost(uint32, tag = "1")]
258    pub code: u32,
259    #[prost(bytes = "bytes", tag = "2")]
260    pub data: ::prost::bytes::Bytes,
261    /// nondeterministic
262    #[prost(string, tag = "3")]
263    pub log: ::prost::alloc::string::String,
264    /// nondeterministic
265    #[prost(string, tag = "4")]
266    pub info: ::prost::alloc::string::String,
267    #[prost(int64, tag = "5")]
268    pub gas_wanted: i64,
269    #[prost(int64, tag = "6")]
270    pub gas_used: i64,
271    /// nondeterministic
272    #[prost(message, repeated, tag = "7")]
273    pub events: ::prost::alloc::vec::Vec<Event>,
274    #[prost(string, tag = "8")]
275    pub codespace: ::prost::alloc::string::String,
276}
277/// ResponseEndBlock contains updates to consensus params and/or validator set changes, if any.
278#[allow(clippy::derive_partial_eq_without_eq)]
279#[derive(Clone, PartialEq, ::prost::Message)]
280pub struct ResponseEndBlock {
281    #[prost(message, repeated, tag = "1")]
282    pub validator_updates: ::prost::alloc::vec::Vec<super::v1beta1::ValidatorUpdate>,
283    #[prost(message, optional, tag = "2")]
284    pub consensus_param_updates: ::core::option::Option<
285        super::super::types::v1beta2::ConsensusParams,
286    >,
287    #[prost(message, repeated, tag = "3")]
288    pub events: ::prost::alloc::vec::Vec<Event>,
289}
290/// ResponsePrepareProposal contains the list of transactions that will be included in the proposal.
291#[allow(clippy::derive_partial_eq_without_eq)]
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct ResponsePrepareProposal {
294    #[prost(bytes = "bytes", repeated, tag = "1")]
295    pub txs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
296}
297/// ResponseProcessProposal contains the result of processing a proposal.
298#[allow(clippy::derive_partial_eq_without_eq)]
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct ResponseProcessProposal {
301    #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")]
302    pub status: i32,
303}
304/// Nested message and enum types in `ResponseProcessProposal`.
305pub mod response_process_proposal {
306    /// The status.
307    #[derive(
308        Clone,
309        Copy,
310        Debug,
311        PartialEq,
312        Eq,
313        Hash,
314        PartialOrd,
315        Ord,
316        ::prost::Enumeration
317    )]
318    #[repr(i32)]
319    pub enum ProposalStatus {
320        /// Unknown
321        Unknown = 0,
322        /// Accepted
323        Accept = 1,
324        /// Rejected
325        Reject = 2,
326    }
327    impl ProposalStatus {
328        /// String value of the enum field names used in the ProtoBuf definition.
329        ///
330        /// The values are not transformed in any way and thus are considered stable
331        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
332        pub fn as_str_name(&self) -> &'static str {
333            match self {
334                ProposalStatus::Unknown => "UNKNOWN",
335                ProposalStatus::Accept => "ACCEPT",
336                ProposalStatus::Reject => "REJECT",
337            }
338        }
339        /// Creates an enum from field names used in the ProtoBuf definition.
340        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
341            match value {
342                "UNKNOWN" => Some(Self::Unknown),
343                "ACCEPT" => Some(Self::Accept),
344                "REJECT" => Some(Self::Reject),
345                _ => None,
346            }
347        }
348    }
349}
350/// CommitInfo contains votes for the particular round.
351#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct CommitInfo {
354    #[prost(int32, tag = "1")]
355    pub round: i32,
356    #[prost(message, repeated, tag = "2")]
357    pub votes: ::prost::alloc::vec::Vec<super::v1beta1::VoteInfo>,
358}
359/// ExtendedCommitInfo is similar to CommitInfo except that it is only used in
360/// the PrepareProposal request such that Tendermint can provide vote extensions
361/// to the application.
362#[allow(clippy::derive_partial_eq_without_eq)]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct ExtendedCommitInfo {
365    /// The round at which the block proposer decided in the previous height.
366    #[prost(int32, tag = "1")]
367    pub round: i32,
368    /// List of validators' addresses in the last validator set with their voting
369    /// information, including vote extensions.
370    #[prost(message, repeated, tag = "2")]
371    pub votes: ::prost::alloc::vec::Vec<ExtendedVoteInfo>,
372}
373/// Event allows application developers to attach additional information to
374/// ResponseFinalizeBlock (defined in .v1beta3) and ResponseCheckTx.
375/// Up to 0.37, this could also be used in ResponseBeginBlock, ResponseEndBlock,
376/// and ResponseDeliverTx.
377/// Later, transactions may be queried using these events.
378#[allow(clippy::derive_partial_eq_without_eq)]
379#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct Event {
381    #[prost(string, tag = "1")]
382    pub r#type: ::prost::alloc::string::String,
383    #[prost(message, repeated, tag = "2")]
384    pub attributes: ::prost::alloc::vec::Vec<EventAttribute>,
385}
386/// EventAttribute is a single key-value pair, associated with an event.
387#[allow(clippy::derive_partial_eq_without_eq)]
388#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct EventAttribute {
390    #[prost(string, tag = "1")]
391    pub key: ::prost::alloc::string::String,
392    #[prost(string, tag = "2")]
393    pub value: ::prost::alloc::string::String,
394    /// nondeterministic
395    #[prost(bool, tag = "3")]
396    pub index: bool,
397}
398/// ExtendedVoteInfo extends VoteInfo with the vote extentions (non-deterministic).
399#[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(Clone, PartialEq, ::prost::Message)]
401pub struct ExtendedVoteInfo {
402    /// The validator that sent the vote.
403    #[prost(message, optional, tag = "1")]
404    pub validator: ::core::option::Option<super::v1beta1::Validator>,
405    /// Indicates whether the validator signed the last block, allowing for rewards based on validator availability.
406    #[prost(bool, tag = "2")]
407    pub signed_last_block: bool,
408    /// Non-deterministic extension provided by the sending validator's application.
409    #[prost(bytes = "bytes", tag = "3")]
410    pub vote_extension: ::prost::bytes::Bytes,
411}
412/// Misbehavior is a type of misbehavior committed by a validator.
413#[allow(clippy::derive_partial_eq_without_eq)]
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct Misbehavior {
416    #[prost(enumeration = "MisbehaviorType", tag = "1")]
417    pub r#type: i32,
418    /// The offending validator
419    #[prost(message, optional, tag = "2")]
420    pub validator: ::core::option::Option<super::v1beta1::Validator>,
421    /// The height when the offense occurred
422    #[prost(int64, tag = "3")]
423    pub height: i64,
424    /// The corresponding time where the offense occurred
425    #[prost(message, optional, tag = "4")]
426    pub time: ::core::option::Option<crate::google::protobuf::Timestamp>,
427    /// Total voting power of the validator set in case the ABCI application does
428    /// not store historical validators.
429    /// <https://github.com/tendermint/tendermint/issues/4581>
430    #[prost(int64, tag = "5")]
431    pub total_voting_power: i64,
432}
433/// The type of misbehavior committed by a validator.
434#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
435#[repr(i32)]
436pub enum MisbehaviorType {
437    /// Unknown
438    Unknown = 0,
439    /// Duplicate vote
440    DuplicateVote = 1,
441    /// Light client attack
442    LightClientAttack = 2,
443}
444impl MisbehaviorType {
445    /// String value of the enum field names used in the ProtoBuf definition.
446    ///
447    /// The values are not transformed in any way and thus are considered stable
448    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
449    pub fn as_str_name(&self) -> &'static str {
450        match self {
451            MisbehaviorType::Unknown => "UNKNOWN",
452            MisbehaviorType::DuplicateVote => "DUPLICATE_VOTE",
453            MisbehaviorType::LightClientAttack => "LIGHT_CLIENT_ATTACK",
454        }
455    }
456    /// Creates an enum from field names used in the ProtoBuf definition.
457    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
458        match value {
459            "UNKNOWN" => Some(Self::Unknown),
460            "DUPLICATE_VOTE" => Some(Self::DuplicateVote),
461            "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack),
462            _ => None,
463        }
464    }
465}
466/// Generated server implementations.
467#[cfg(feature = "grpc-server")]
468pub mod abci_application_server {
469    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
470    use tonic::codegen::*;
471    /// Generated trait containing gRPC methods that should be implemented for use with AbciApplicationServer.
472    #[async_trait]
473    pub trait AbciApplication: Send + Sync + 'static {
474        /// Echo returns back the same message it is sent.
475        async fn echo(
476            &self,
477            request: tonic::Request<super::super::v1beta1::RequestEcho>,
478        ) -> std::result::Result<
479            tonic::Response<super::super::v1beta1::ResponseEcho>,
480            tonic::Status,
481        >;
482        /// Flush flushes the write buffer.
483        async fn flush(
484            &self,
485            request: tonic::Request<super::super::v1beta1::RequestFlush>,
486        ) -> std::result::Result<
487            tonic::Response<super::super::v1beta1::ResponseFlush>,
488            tonic::Status,
489        >;
490        /// Info returns information about the application state.
491        async fn info(
492            &self,
493            request: tonic::Request<super::RequestInfo>,
494        ) -> std::result::Result<
495            tonic::Response<super::super::v1beta1::ResponseInfo>,
496            tonic::Status,
497        >;
498        /// DeliverTx applies a transaction.
499        async fn deliver_tx(
500            &self,
501            request: tonic::Request<super::super::v1beta1::RequestDeliverTx>,
502        ) -> std::result::Result<
503            tonic::Response<super::ResponseDeliverTx>,
504            tonic::Status,
505        >;
506        /// CheckTx validates a transaction.
507        async fn check_tx(
508            &self,
509            request: tonic::Request<super::super::v1beta1::RequestCheckTx>,
510        ) -> std::result::Result<tonic::Response<super::ResponseCheckTx>, tonic::Status>;
511        /// Query queries the application state.
512        async fn query(
513            &self,
514            request: tonic::Request<super::super::v1beta1::RequestQuery>,
515        ) -> std::result::Result<
516            tonic::Response<super::super::v1beta1::ResponseQuery>,
517            tonic::Status,
518        >;
519        /// Commit commits a block of transactions.
520        async fn commit(
521            &self,
522            request: tonic::Request<super::super::v1beta1::RequestCommit>,
523        ) -> std::result::Result<
524            tonic::Response<super::super::v1beta1::ResponseCommit>,
525            tonic::Status,
526        >;
527        /// InitChain initializes the blockchain.
528        async fn init_chain(
529            &self,
530            request: tonic::Request<super::RequestInitChain>,
531        ) -> std::result::Result<
532            tonic::Response<super::ResponseInitChain>,
533            tonic::Status,
534        >;
535        /// BeginBlock signals the beginning of a block.
536        async fn begin_block(
537            &self,
538            request: tonic::Request<super::RequestBeginBlock>,
539        ) -> std::result::Result<
540            tonic::Response<super::ResponseBeginBlock>,
541            tonic::Status,
542        >;
543        /// EndBlock signals the end of a block, returns changes to the validator set.
544        async fn end_block(
545            &self,
546            request: tonic::Request<super::super::v1beta1::RequestEndBlock>,
547        ) -> std::result::Result<
548            tonic::Response<super::ResponseEndBlock>,
549            tonic::Status,
550        >;
551        /// ListSnapshots lists all the available snapshots.
552        async fn list_snapshots(
553            &self,
554            request: tonic::Request<super::super::v1beta1::RequestListSnapshots>,
555        ) -> std::result::Result<
556            tonic::Response<super::super::v1beta1::ResponseListSnapshots>,
557            tonic::Status,
558        >;
559        /// OfferSnapshot sends a snapshot offer.
560        async fn offer_snapshot(
561            &self,
562            request: tonic::Request<super::super::v1beta1::RequestOfferSnapshot>,
563        ) -> std::result::Result<
564            tonic::Response<super::super::v1beta1::ResponseOfferSnapshot>,
565            tonic::Status,
566        >;
567        /// LoadSnapshotChunk returns a chunk of snapshot.
568        async fn load_snapshot_chunk(
569            &self,
570            request: tonic::Request<super::super::v1beta1::RequestLoadSnapshotChunk>,
571        ) -> std::result::Result<
572            tonic::Response<super::super::v1beta1::ResponseLoadSnapshotChunk>,
573            tonic::Status,
574        >;
575        /// ApplySnapshotChunk applies a chunk of snapshot.
576        async fn apply_snapshot_chunk(
577            &self,
578            request: tonic::Request<super::super::v1beta1::RequestApplySnapshotChunk>,
579        ) -> std::result::Result<
580            tonic::Response<super::super::v1beta1::ResponseApplySnapshotChunk>,
581            tonic::Status,
582        >;
583        /// PrepareProposal returns a proposal for the next block.
584        async fn prepare_proposal(
585            &self,
586            request: tonic::Request<super::RequestPrepareProposal>,
587        ) -> std::result::Result<
588            tonic::Response<super::ResponsePrepareProposal>,
589            tonic::Status,
590        >;
591        /// ProcessProposal validates a proposal.
592        async fn process_proposal(
593            &self,
594            request: tonic::Request<super::RequestProcessProposal>,
595        ) -> std::result::Result<
596            tonic::Response<super::ResponseProcessProposal>,
597            tonic::Status,
598        >;
599    }
600    /// ABCIApplication is a service for an ABCI application.
601    #[derive(Debug)]
602    pub struct AbciApplicationServer<T: AbciApplication> {
603        inner: _Inner<T>,
604        accept_compression_encodings: EnabledCompressionEncodings,
605        send_compression_encodings: EnabledCompressionEncodings,
606        max_decoding_message_size: Option<usize>,
607        max_encoding_message_size: Option<usize>,
608    }
609    struct _Inner<T>(Arc<T>);
610    impl<T: AbciApplication> AbciApplicationServer<T> {
611        pub fn new(inner: T) -> Self {
612            Self::from_arc(Arc::new(inner))
613        }
614        pub fn from_arc(inner: Arc<T>) -> Self {
615            let inner = _Inner(inner);
616            Self {
617                inner,
618                accept_compression_encodings: Default::default(),
619                send_compression_encodings: Default::default(),
620                max_decoding_message_size: None,
621                max_encoding_message_size: None,
622            }
623        }
624        pub fn with_interceptor<F>(
625            inner: T,
626            interceptor: F,
627        ) -> InterceptedService<Self, F>
628        where
629            F: tonic::service::Interceptor,
630        {
631            InterceptedService::new(Self::new(inner), interceptor)
632        }
633        /// Enable decompressing requests with the given encoding.
634        #[must_use]
635        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
636            self.accept_compression_encodings.enable(encoding);
637            self
638        }
639        /// Compress responses with the given encoding, if the client supports it.
640        #[must_use]
641        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
642            self.send_compression_encodings.enable(encoding);
643            self
644        }
645        /// Limits the maximum size of a decoded message.
646        ///
647        /// Default: `4MB`
648        #[must_use]
649        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
650            self.max_decoding_message_size = Some(limit);
651            self
652        }
653        /// Limits the maximum size of an encoded message.
654        ///
655        /// Default: `usize::MAX`
656        #[must_use]
657        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
658            self.max_encoding_message_size = Some(limit);
659            self
660        }
661    }
662    impl<T, B> tonic::codegen::Service<http::Request<B>> for AbciApplicationServer<T>
663    where
664        T: AbciApplication,
665        B: Body + Send + 'static,
666        B::Error: Into<StdError> + Send + 'static,
667    {
668        type Response = http::Response<tonic::body::BoxBody>;
669        type Error = std::convert::Infallible;
670        type Future = BoxFuture<Self::Response, Self::Error>;
671        fn poll_ready(
672            &mut self,
673            _cx: &mut Context<'_>,
674        ) -> Poll<std::result::Result<(), Self::Error>> {
675            Poll::Ready(Ok(()))
676        }
677        fn call(&mut self, req: http::Request<B>) -> Self::Future {
678            let inner = self.inner.clone();
679            match req.uri().path() {
680                "/cometbft.abci.v1beta2.ABCIApplication/Echo" => {
681                    #[allow(non_camel_case_types)]
682                    struct EchoSvc<T: AbciApplication>(pub Arc<T>);
683                    impl<
684                        T: AbciApplication,
685                    > tonic::server::UnaryService<super::super::v1beta1::RequestEcho>
686                    for EchoSvc<T> {
687                        type Response = super::super::v1beta1::ResponseEcho;
688                        type Future = BoxFuture<
689                            tonic::Response<Self::Response>,
690                            tonic::Status,
691                        >;
692                        fn call(
693                            &mut self,
694                            request: tonic::Request<super::super::v1beta1::RequestEcho>,
695                        ) -> Self::Future {
696                            let inner = Arc::clone(&self.0);
697                            let fut = async move {
698                                <T as AbciApplication>::echo(&inner, request).await
699                            };
700                            Box::pin(fut)
701                        }
702                    }
703                    let accept_compression_encodings = self.accept_compression_encodings;
704                    let send_compression_encodings = self.send_compression_encodings;
705                    let max_decoding_message_size = self.max_decoding_message_size;
706                    let max_encoding_message_size = self.max_encoding_message_size;
707                    let inner = self.inner.clone();
708                    let fut = async move {
709                        let inner = inner.0;
710                        let method = EchoSvc(inner);
711                        let codec = tonic::codec::ProstCodec::default();
712                        let mut grpc = tonic::server::Grpc::new(codec)
713                            .apply_compression_config(
714                                accept_compression_encodings,
715                                send_compression_encodings,
716                            )
717                            .apply_max_message_size_config(
718                                max_decoding_message_size,
719                                max_encoding_message_size,
720                            );
721                        let res = grpc.unary(method, req).await;
722                        Ok(res)
723                    };
724                    Box::pin(fut)
725                }
726                "/cometbft.abci.v1beta2.ABCIApplication/Flush" => {
727                    #[allow(non_camel_case_types)]
728                    struct FlushSvc<T: AbciApplication>(pub Arc<T>);
729                    impl<
730                        T: AbciApplication,
731                    > tonic::server::UnaryService<super::super::v1beta1::RequestFlush>
732                    for FlushSvc<T> {
733                        type Response = super::super::v1beta1::ResponseFlush;
734                        type Future = BoxFuture<
735                            tonic::Response<Self::Response>,
736                            tonic::Status,
737                        >;
738                        fn call(
739                            &mut self,
740                            request: tonic::Request<super::super::v1beta1::RequestFlush>,
741                        ) -> Self::Future {
742                            let inner = Arc::clone(&self.0);
743                            let fut = async move {
744                                <T as AbciApplication>::flush(&inner, request).await
745                            };
746                            Box::pin(fut)
747                        }
748                    }
749                    let accept_compression_encodings = self.accept_compression_encodings;
750                    let send_compression_encodings = self.send_compression_encodings;
751                    let max_decoding_message_size = self.max_decoding_message_size;
752                    let max_encoding_message_size = self.max_encoding_message_size;
753                    let inner = self.inner.clone();
754                    let fut = async move {
755                        let inner = inner.0;
756                        let method = FlushSvc(inner);
757                        let codec = tonic::codec::ProstCodec::default();
758                        let mut grpc = tonic::server::Grpc::new(codec)
759                            .apply_compression_config(
760                                accept_compression_encodings,
761                                send_compression_encodings,
762                            )
763                            .apply_max_message_size_config(
764                                max_decoding_message_size,
765                                max_encoding_message_size,
766                            );
767                        let res = grpc.unary(method, req).await;
768                        Ok(res)
769                    };
770                    Box::pin(fut)
771                }
772                "/cometbft.abci.v1beta2.ABCIApplication/Info" => {
773                    #[allow(non_camel_case_types)]
774                    struct InfoSvc<T: AbciApplication>(pub Arc<T>);
775                    impl<
776                        T: AbciApplication,
777                    > tonic::server::UnaryService<super::RequestInfo> for InfoSvc<T> {
778                        type Response = super::super::v1beta1::ResponseInfo;
779                        type Future = BoxFuture<
780                            tonic::Response<Self::Response>,
781                            tonic::Status,
782                        >;
783                        fn call(
784                            &mut self,
785                            request: tonic::Request<super::RequestInfo>,
786                        ) -> Self::Future {
787                            let inner = Arc::clone(&self.0);
788                            let fut = async move {
789                                <T as AbciApplication>::info(&inner, request).await
790                            };
791                            Box::pin(fut)
792                        }
793                    }
794                    let accept_compression_encodings = self.accept_compression_encodings;
795                    let send_compression_encodings = self.send_compression_encodings;
796                    let max_decoding_message_size = self.max_decoding_message_size;
797                    let max_encoding_message_size = self.max_encoding_message_size;
798                    let inner = self.inner.clone();
799                    let fut = async move {
800                        let inner = inner.0;
801                        let method = InfoSvc(inner);
802                        let codec = tonic::codec::ProstCodec::default();
803                        let mut grpc = tonic::server::Grpc::new(codec)
804                            .apply_compression_config(
805                                accept_compression_encodings,
806                                send_compression_encodings,
807                            )
808                            .apply_max_message_size_config(
809                                max_decoding_message_size,
810                                max_encoding_message_size,
811                            );
812                        let res = grpc.unary(method, req).await;
813                        Ok(res)
814                    };
815                    Box::pin(fut)
816                }
817                "/cometbft.abci.v1beta2.ABCIApplication/DeliverTx" => {
818                    #[allow(non_camel_case_types)]
819                    struct DeliverTxSvc<T: AbciApplication>(pub Arc<T>);
820                    impl<
821                        T: AbciApplication,
822                    > tonic::server::UnaryService<
823                        super::super::v1beta1::RequestDeliverTx,
824                    > for DeliverTxSvc<T> {
825                        type Response = super::ResponseDeliverTx;
826                        type Future = BoxFuture<
827                            tonic::Response<Self::Response>,
828                            tonic::Status,
829                        >;
830                        fn call(
831                            &mut self,
832                            request: tonic::Request<
833                                super::super::v1beta1::RequestDeliverTx,
834                            >,
835                        ) -> Self::Future {
836                            let inner = Arc::clone(&self.0);
837                            let fut = async move {
838                                <T as AbciApplication>::deliver_tx(&inner, request).await
839                            };
840                            Box::pin(fut)
841                        }
842                    }
843                    let accept_compression_encodings = self.accept_compression_encodings;
844                    let send_compression_encodings = self.send_compression_encodings;
845                    let max_decoding_message_size = self.max_decoding_message_size;
846                    let max_encoding_message_size = self.max_encoding_message_size;
847                    let inner = self.inner.clone();
848                    let fut = async move {
849                        let inner = inner.0;
850                        let method = DeliverTxSvc(inner);
851                        let codec = tonic::codec::ProstCodec::default();
852                        let mut grpc = tonic::server::Grpc::new(codec)
853                            .apply_compression_config(
854                                accept_compression_encodings,
855                                send_compression_encodings,
856                            )
857                            .apply_max_message_size_config(
858                                max_decoding_message_size,
859                                max_encoding_message_size,
860                            );
861                        let res = grpc.unary(method, req).await;
862                        Ok(res)
863                    };
864                    Box::pin(fut)
865                }
866                "/cometbft.abci.v1beta2.ABCIApplication/CheckTx" => {
867                    #[allow(non_camel_case_types)]
868                    struct CheckTxSvc<T: AbciApplication>(pub Arc<T>);
869                    impl<
870                        T: AbciApplication,
871                    > tonic::server::UnaryService<super::super::v1beta1::RequestCheckTx>
872                    for CheckTxSvc<T> {
873                        type Response = super::ResponseCheckTx;
874                        type Future = BoxFuture<
875                            tonic::Response<Self::Response>,
876                            tonic::Status,
877                        >;
878                        fn call(
879                            &mut self,
880                            request: tonic::Request<
881                                super::super::v1beta1::RequestCheckTx,
882                            >,
883                        ) -> Self::Future {
884                            let inner = Arc::clone(&self.0);
885                            let fut = async move {
886                                <T as AbciApplication>::check_tx(&inner, request).await
887                            };
888                            Box::pin(fut)
889                        }
890                    }
891                    let accept_compression_encodings = self.accept_compression_encodings;
892                    let send_compression_encodings = self.send_compression_encodings;
893                    let max_decoding_message_size = self.max_decoding_message_size;
894                    let max_encoding_message_size = self.max_encoding_message_size;
895                    let inner = self.inner.clone();
896                    let fut = async move {
897                        let inner = inner.0;
898                        let method = CheckTxSvc(inner);
899                        let codec = tonic::codec::ProstCodec::default();
900                        let mut grpc = tonic::server::Grpc::new(codec)
901                            .apply_compression_config(
902                                accept_compression_encodings,
903                                send_compression_encodings,
904                            )
905                            .apply_max_message_size_config(
906                                max_decoding_message_size,
907                                max_encoding_message_size,
908                            );
909                        let res = grpc.unary(method, req).await;
910                        Ok(res)
911                    };
912                    Box::pin(fut)
913                }
914                "/cometbft.abci.v1beta2.ABCIApplication/Query" => {
915                    #[allow(non_camel_case_types)]
916                    struct QuerySvc<T: AbciApplication>(pub Arc<T>);
917                    impl<
918                        T: AbciApplication,
919                    > tonic::server::UnaryService<super::super::v1beta1::RequestQuery>
920                    for QuerySvc<T> {
921                        type Response = super::super::v1beta1::ResponseQuery;
922                        type Future = BoxFuture<
923                            tonic::Response<Self::Response>,
924                            tonic::Status,
925                        >;
926                        fn call(
927                            &mut self,
928                            request: tonic::Request<super::super::v1beta1::RequestQuery>,
929                        ) -> Self::Future {
930                            let inner = Arc::clone(&self.0);
931                            let fut = async move {
932                                <T as AbciApplication>::query(&inner, request).await
933                            };
934                            Box::pin(fut)
935                        }
936                    }
937                    let accept_compression_encodings = self.accept_compression_encodings;
938                    let send_compression_encodings = self.send_compression_encodings;
939                    let max_decoding_message_size = self.max_decoding_message_size;
940                    let max_encoding_message_size = self.max_encoding_message_size;
941                    let inner = self.inner.clone();
942                    let fut = async move {
943                        let inner = inner.0;
944                        let method = QuerySvc(inner);
945                        let codec = tonic::codec::ProstCodec::default();
946                        let mut grpc = tonic::server::Grpc::new(codec)
947                            .apply_compression_config(
948                                accept_compression_encodings,
949                                send_compression_encodings,
950                            )
951                            .apply_max_message_size_config(
952                                max_decoding_message_size,
953                                max_encoding_message_size,
954                            );
955                        let res = grpc.unary(method, req).await;
956                        Ok(res)
957                    };
958                    Box::pin(fut)
959                }
960                "/cometbft.abci.v1beta2.ABCIApplication/Commit" => {
961                    #[allow(non_camel_case_types)]
962                    struct CommitSvc<T: AbciApplication>(pub Arc<T>);
963                    impl<
964                        T: AbciApplication,
965                    > tonic::server::UnaryService<super::super::v1beta1::RequestCommit>
966                    for CommitSvc<T> {
967                        type Response = super::super::v1beta1::ResponseCommit;
968                        type Future = BoxFuture<
969                            tonic::Response<Self::Response>,
970                            tonic::Status,
971                        >;
972                        fn call(
973                            &mut self,
974                            request: tonic::Request<super::super::v1beta1::RequestCommit>,
975                        ) -> Self::Future {
976                            let inner = Arc::clone(&self.0);
977                            let fut = async move {
978                                <T as AbciApplication>::commit(&inner, request).await
979                            };
980                            Box::pin(fut)
981                        }
982                    }
983                    let accept_compression_encodings = self.accept_compression_encodings;
984                    let send_compression_encodings = self.send_compression_encodings;
985                    let max_decoding_message_size = self.max_decoding_message_size;
986                    let max_encoding_message_size = self.max_encoding_message_size;
987                    let inner = self.inner.clone();
988                    let fut = async move {
989                        let inner = inner.0;
990                        let method = CommitSvc(inner);
991                        let codec = tonic::codec::ProstCodec::default();
992                        let mut grpc = tonic::server::Grpc::new(codec)
993                            .apply_compression_config(
994                                accept_compression_encodings,
995                                send_compression_encodings,
996                            )
997                            .apply_max_message_size_config(
998                                max_decoding_message_size,
999                                max_encoding_message_size,
1000                            );
1001                        let res = grpc.unary(method, req).await;
1002                        Ok(res)
1003                    };
1004                    Box::pin(fut)
1005                }
1006                "/cometbft.abci.v1beta2.ABCIApplication/InitChain" => {
1007                    #[allow(non_camel_case_types)]
1008                    struct InitChainSvc<T: AbciApplication>(pub Arc<T>);
1009                    impl<
1010                        T: AbciApplication,
1011                    > tonic::server::UnaryService<super::RequestInitChain>
1012                    for InitChainSvc<T> {
1013                        type Response = super::ResponseInitChain;
1014                        type Future = BoxFuture<
1015                            tonic::Response<Self::Response>,
1016                            tonic::Status,
1017                        >;
1018                        fn call(
1019                            &mut self,
1020                            request: tonic::Request<super::RequestInitChain>,
1021                        ) -> Self::Future {
1022                            let inner = Arc::clone(&self.0);
1023                            let fut = async move {
1024                                <T as AbciApplication>::init_chain(&inner, request).await
1025                            };
1026                            Box::pin(fut)
1027                        }
1028                    }
1029                    let accept_compression_encodings = self.accept_compression_encodings;
1030                    let send_compression_encodings = self.send_compression_encodings;
1031                    let max_decoding_message_size = self.max_decoding_message_size;
1032                    let max_encoding_message_size = self.max_encoding_message_size;
1033                    let inner = self.inner.clone();
1034                    let fut = async move {
1035                        let inner = inner.0;
1036                        let method = InitChainSvc(inner);
1037                        let codec = tonic::codec::ProstCodec::default();
1038                        let mut grpc = tonic::server::Grpc::new(codec)
1039                            .apply_compression_config(
1040                                accept_compression_encodings,
1041                                send_compression_encodings,
1042                            )
1043                            .apply_max_message_size_config(
1044                                max_decoding_message_size,
1045                                max_encoding_message_size,
1046                            );
1047                        let res = grpc.unary(method, req).await;
1048                        Ok(res)
1049                    };
1050                    Box::pin(fut)
1051                }
1052                "/cometbft.abci.v1beta2.ABCIApplication/BeginBlock" => {
1053                    #[allow(non_camel_case_types)]
1054                    struct BeginBlockSvc<T: AbciApplication>(pub Arc<T>);
1055                    impl<
1056                        T: AbciApplication,
1057                    > tonic::server::UnaryService<super::RequestBeginBlock>
1058                    for BeginBlockSvc<T> {
1059                        type Response = super::ResponseBeginBlock;
1060                        type Future = BoxFuture<
1061                            tonic::Response<Self::Response>,
1062                            tonic::Status,
1063                        >;
1064                        fn call(
1065                            &mut self,
1066                            request: tonic::Request<super::RequestBeginBlock>,
1067                        ) -> Self::Future {
1068                            let inner = Arc::clone(&self.0);
1069                            let fut = async move {
1070                                <T as AbciApplication>::begin_block(&inner, request).await
1071                            };
1072                            Box::pin(fut)
1073                        }
1074                    }
1075                    let accept_compression_encodings = self.accept_compression_encodings;
1076                    let send_compression_encodings = self.send_compression_encodings;
1077                    let max_decoding_message_size = self.max_decoding_message_size;
1078                    let max_encoding_message_size = self.max_encoding_message_size;
1079                    let inner = self.inner.clone();
1080                    let fut = async move {
1081                        let inner = inner.0;
1082                        let method = BeginBlockSvc(inner);
1083                        let codec = tonic::codec::ProstCodec::default();
1084                        let mut grpc = tonic::server::Grpc::new(codec)
1085                            .apply_compression_config(
1086                                accept_compression_encodings,
1087                                send_compression_encodings,
1088                            )
1089                            .apply_max_message_size_config(
1090                                max_decoding_message_size,
1091                                max_encoding_message_size,
1092                            );
1093                        let res = grpc.unary(method, req).await;
1094                        Ok(res)
1095                    };
1096                    Box::pin(fut)
1097                }
1098                "/cometbft.abci.v1beta2.ABCIApplication/EndBlock" => {
1099                    #[allow(non_camel_case_types)]
1100                    struct EndBlockSvc<T: AbciApplication>(pub Arc<T>);
1101                    impl<
1102                        T: AbciApplication,
1103                    > tonic::server::UnaryService<super::super::v1beta1::RequestEndBlock>
1104                    for EndBlockSvc<T> {
1105                        type Response = super::ResponseEndBlock;
1106                        type Future = BoxFuture<
1107                            tonic::Response<Self::Response>,
1108                            tonic::Status,
1109                        >;
1110                        fn call(
1111                            &mut self,
1112                            request: tonic::Request<
1113                                super::super::v1beta1::RequestEndBlock,
1114                            >,
1115                        ) -> Self::Future {
1116                            let inner = Arc::clone(&self.0);
1117                            let fut = async move {
1118                                <T as AbciApplication>::end_block(&inner, request).await
1119                            };
1120                            Box::pin(fut)
1121                        }
1122                    }
1123                    let accept_compression_encodings = self.accept_compression_encodings;
1124                    let send_compression_encodings = self.send_compression_encodings;
1125                    let max_decoding_message_size = self.max_decoding_message_size;
1126                    let max_encoding_message_size = self.max_encoding_message_size;
1127                    let inner = self.inner.clone();
1128                    let fut = async move {
1129                        let inner = inner.0;
1130                        let method = EndBlockSvc(inner);
1131                        let codec = tonic::codec::ProstCodec::default();
1132                        let mut grpc = tonic::server::Grpc::new(codec)
1133                            .apply_compression_config(
1134                                accept_compression_encodings,
1135                                send_compression_encodings,
1136                            )
1137                            .apply_max_message_size_config(
1138                                max_decoding_message_size,
1139                                max_encoding_message_size,
1140                            );
1141                        let res = grpc.unary(method, req).await;
1142                        Ok(res)
1143                    };
1144                    Box::pin(fut)
1145                }
1146                "/cometbft.abci.v1beta2.ABCIApplication/ListSnapshots" => {
1147                    #[allow(non_camel_case_types)]
1148                    struct ListSnapshotsSvc<T: AbciApplication>(pub Arc<T>);
1149                    impl<
1150                        T: AbciApplication,
1151                    > tonic::server::UnaryService<
1152                        super::super::v1beta1::RequestListSnapshots,
1153                    > for ListSnapshotsSvc<T> {
1154                        type Response = super::super::v1beta1::ResponseListSnapshots;
1155                        type Future = BoxFuture<
1156                            tonic::Response<Self::Response>,
1157                            tonic::Status,
1158                        >;
1159                        fn call(
1160                            &mut self,
1161                            request: tonic::Request<
1162                                super::super::v1beta1::RequestListSnapshots,
1163                            >,
1164                        ) -> Self::Future {
1165                            let inner = Arc::clone(&self.0);
1166                            let fut = async move {
1167                                <T as AbciApplication>::list_snapshots(&inner, request)
1168                                    .await
1169                            };
1170                            Box::pin(fut)
1171                        }
1172                    }
1173                    let accept_compression_encodings = self.accept_compression_encodings;
1174                    let send_compression_encodings = self.send_compression_encodings;
1175                    let max_decoding_message_size = self.max_decoding_message_size;
1176                    let max_encoding_message_size = self.max_encoding_message_size;
1177                    let inner = self.inner.clone();
1178                    let fut = async move {
1179                        let inner = inner.0;
1180                        let method = ListSnapshotsSvc(inner);
1181                        let codec = tonic::codec::ProstCodec::default();
1182                        let mut grpc = tonic::server::Grpc::new(codec)
1183                            .apply_compression_config(
1184                                accept_compression_encodings,
1185                                send_compression_encodings,
1186                            )
1187                            .apply_max_message_size_config(
1188                                max_decoding_message_size,
1189                                max_encoding_message_size,
1190                            );
1191                        let res = grpc.unary(method, req).await;
1192                        Ok(res)
1193                    };
1194                    Box::pin(fut)
1195                }
1196                "/cometbft.abci.v1beta2.ABCIApplication/OfferSnapshot" => {
1197                    #[allow(non_camel_case_types)]
1198                    struct OfferSnapshotSvc<T: AbciApplication>(pub Arc<T>);
1199                    impl<
1200                        T: AbciApplication,
1201                    > tonic::server::UnaryService<
1202                        super::super::v1beta1::RequestOfferSnapshot,
1203                    > for OfferSnapshotSvc<T> {
1204                        type Response = super::super::v1beta1::ResponseOfferSnapshot;
1205                        type Future = BoxFuture<
1206                            tonic::Response<Self::Response>,
1207                            tonic::Status,
1208                        >;
1209                        fn call(
1210                            &mut self,
1211                            request: tonic::Request<
1212                                super::super::v1beta1::RequestOfferSnapshot,
1213                            >,
1214                        ) -> Self::Future {
1215                            let inner = Arc::clone(&self.0);
1216                            let fut = async move {
1217                                <T as AbciApplication>::offer_snapshot(&inner, request)
1218                                    .await
1219                            };
1220                            Box::pin(fut)
1221                        }
1222                    }
1223                    let accept_compression_encodings = self.accept_compression_encodings;
1224                    let send_compression_encodings = self.send_compression_encodings;
1225                    let max_decoding_message_size = self.max_decoding_message_size;
1226                    let max_encoding_message_size = self.max_encoding_message_size;
1227                    let inner = self.inner.clone();
1228                    let fut = async move {
1229                        let inner = inner.0;
1230                        let method = OfferSnapshotSvc(inner);
1231                        let codec = tonic::codec::ProstCodec::default();
1232                        let mut grpc = tonic::server::Grpc::new(codec)
1233                            .apply_compression_config(
1234                                accept_compression_encodings,
1235                                send_compression_encodings,
1236                            )
1237                            .apply_max_message_size_config(
1238                                max_decoding_message_size,
1239                                max_encoding_message_size,
1240                            );
1241                        let res = grpc.unary(method, req).await;
1242                        Ok(res)
1243                    };
1244                    Box::pin(fut)
1245                }
1246                "/cometbft.abci.v1beta2.ABCIApplication/LoadSnapshotChunk" => {
1247                    #[allow(non_camel_case_types)]
1248                    struct LoadSnapshotChunkSvc<T: AbciApplication>(pub Arc<T>);
1249                    impl<
1250                        T: AbciApplication,
1251                    > tonic::server::UnaryService<
1252                        super::super::v1beta1::RequestLoadSnapshotChunk,
1253                    > for LoadSnapshotChunkSvc<T> {
1254                        type Response = super::super::v1beta1::ResponseLoadSnapshotChunk;
1255                        type Future = BoxFuture<
1256                            tonic::Response<Self::Response>,
1257                            tonic::Status,
1258                        >;
1259                        fn call(
1260                            &mut self,
1261                            request: tonic::Request<
1262                                super::super::v1beta1::RequestLoadSnapshotChunk,
1263                            >,
1264                        ) -> Self::Future {
1265                            let inner = Arc::clone(&self.0);
1266                            let fut = async move {
1267                                <T as AbciApplication>::load_snapshot_chunk(&inner, request)
1268                                    .await
1269                            };
1270                            Box::pin(fut)
1271                        }
1272                    }
1273                    let accept_compression_encodings = self.accept_compression_encodings;
1274                    let send_compression_encodings = self.send_compression_encodings;
1275                    let max_decoding_message_size = self.max_decoding_message_size;
1276                    let max_encoding_message_size = self.max_encoding_message_size;
1277                    let inner = self.inner.clone();
1278                    let fut = async move {
1279                        let inner = inner.0;
1280                        let method = LoadSnapshotChunkSvc(inner);
1281                        let codec = tonic::codec::ProstCodec::default();
1282                        let mut grpc = tonic::server::Grpc::new(codec)
1283                            .apply_compression_config(
1284                                accept_compression_encodings,
1285                                send_compression_encodings,
1286                            )
1287                            .apply_max_message_size_config(
1288                                max_decoding_message_size,
1289                                max_encoding_message_size,
1290                            );
1291                        let res = grpc.unary(method, req).await;
1292                        Ok(res)
1293                    };
1294                    Box::pin(fut)
1295                }
1296                "/cometbft.abci.v1beta2.ABCIApplication/ApplySnapshotChunk" => {
1297                    #[allow(non_camel_case_types)]
1298                    struct ApplySnapshotChunkSvc<T: AbciApplication>(pub Arc<T>);
1299                    impl<
1300                        T: AbciApplication,
1301                    > tonic::server::UnaryService<
1302                        super::super::v1beta1::RequestApplySnapshotChunk,
1303                    > for ApplySnapshotChunkSvc<T> {
1304                        type Response = super::super::v1beta1::ResponseApplySnapshotChunk;
1305                        type Future = BoxFuture<
1306                            tonic::Response<Self::Response>,
1307                            tonic::Status,
1308                        >;
1309                        fn call(
1310                            &mut self,
1311                            request: tonic::Request<
1312                                super::super::v1beta1::RequestApplySnapshotChunk,
1313                            >,
1314                        ) -> Self::Future {
1315                            let inner = Arc::clone(&self.0);
1316                            let fut = async move {
1317                                <T as AbciApplication>::apply_snapshot_chunk(
1318                                        &inner,
1319                                        request,
1320                                    )
1321                                    .await
1322                            };
1323                            Box::pin(fut)
1324                        }
1325                    }
1326                    let accept_compression_encodings = self.accept_compression_encodings;
1327                    let send_compression_encodings = self.send_compression_encodings;
1328                    let max_decoding_message_size = self.max_decoding_message_size;
1329                    let max_encoding_message_size = self.max_encoding_message_size;
1330                    let inner = self.inner.clone();
1331                    let fut = async move {
1332                        let inner = inner.0;
1333                        let method = ApplySnapshotChunkSvc(inner);
1334                        let codec = tonic::codec::ProstCodec::default();
1335                        let mut grpc = tonic::server::Grpc::new(codec)
1336                            .apply_compression_config(
1337                                accept_compression_encodings,
1338                                send_compression_encodings,
1339                            )
1340                            .apply_max_message_size_config(
1341                                max_decoding_message_size,
1342                                max_encoding_message_size,
1343                            );
1344                        let res = grpc.unary(method, req).await;
1345                        Ok(res)
1346                    };
1347                    Box::pin(fut)
1348                }
1349                "/cometbft.abci.v1beta2.ABCIApplication/PrepareProposal" => {
1350                    #[allow(non_camel_case_types)]
1351                    struct PrepareProposalSvc<T: AbciApplication>(pub Arc<T>);
1352                    impl<
1353                        T: AbciApplication,
1354                    > tonic::server::UnaryService<super::RequestPrepareProposal>
1355                    for PrepareProposalSvc<T> {
1356                        type Response = super::ResponsePrepareProposal;
1357                        type Future = BoxFuture<
1358                            tonic::Response<Self::Response>,
1359                            tonic::Status,
1360                        >;
1361                        fn call(
1362                            &mut self,
1363                            request: tonic::Request<super::RequestPrepareProposal>,
1364                        ) -> Self::Future {
1365                            let inner = Arc::clone(&self.0);
1366                            let fut = async move {
1367                                <T as AbciApplication>::prepare_proposal(&inner, request)
1368                                    .await
1369                            };
1370                            Box::pin(fut)
1371                        }
1372                    }
1373                    let accept_compression_encodings = self.accept_compression_encodings;
1374                    let send_compression_encodings = self.send_compression_encodings;
1375                    let max_decoding_message_size = self.max_decoding_message_size;
1376                    let max_encoding_message_size = self.max_encoding_message_size;
1377                    let inner = self.inner.clone();
1378                    let fut = async move {
1379                        let inner = inner.0;
1380                        let method = PrepareProposalSvc(inner);
1381                        let codec = tonic::codec::ProstCodec::default();
1382                        let mut grpc = tonic::server::Grpc::new(codec)
1383                            .apply_compression_config(
1384                                accept_compression_encodings,
1385                                send_compression_encodings,
1386                            )
1387                            .apply_max_message_size_config(
1388                                max_decoding_message_size,
1389                                max_encoding_message_size,
1390                            );
1391                        let res = grpc.unary(method, req).await;
1392                        Ok(res)
1393                    };
1394                    Box::pin(fut)
1395                }
1396                "/cometbft.abci.v1beta2.ABCIApplication/ProcessProposal" => {
1397                    #[allow(non_camel_case_types)]
1398                    struct ProcessProposalSvc<T: AbciApplication>(pub Arc<T>);
1399                    impl<
1400                        T: AbciApplication,
1401                    > tonic::server::UnaryService<super::RequestProcessProposal>
1402                    for ProcessProposalSvc<T> {
1403                        type Response = super::ResponseProcessProposal;
1404                        type Future = BoxFuture<
1405                            tonic::Response<Self::Response>,
1406                            tonic::Status,
1407                        >;
1408                        fn call(
1409                            &mut self,
1410                            request: tonic::Request<super::RequestProcessProposal>,
1411                        ) -> Self::Future {
1412                            let inner = Arc::clone(&self.0);
1413                            let fut = async move {
1414                                <T as AbciApplication>::process_proposal(&inner, request)
1415                                    .await
1416                            };
1417                            Box::pin(fut)
1418                        }
1419                    }
1420                    let accept_compression_encodings = self.accept_compression_encodings;
1421                    let send_compression_encodings = self.send_compression_encodings;
1422                    let max_decoding_message_size = self.max_decoding_message_size;
1423                    let max_encoding_message_size = self.max_encoding_message_size;
1424                    let inner = self.inner.clone();
1425                    let fut = async move {
1426                        let inner = inner.0;
1427                        let method = ProcessProposalSvc(inner);
1428                        let codec = tonic::codec::ProstCodec::default();
1429                        let mut grpc = tonic::server::Grpc::new(codec)
1430                            .apply_compression_config(
1431                                accept_compression_encodings,
1432                                send_compression_encodings,
1433                            )
1434                            .apply_max_message_size_config(
1435                                max_decoding_message_size,
1436                                max_encoding_message_size,
1437                            );
1438                        let res = grpc.unary(method, req).await;
1439                        Ok(res)
1440                    };
1441                    Box::pin(fut)
1442                }
1443                _ => {
1444                    Box::pin(async move {
1445                        Ok(
1446                            http::Response::builder()
1447                                .status(200)
1448                                .header("grpc-status", "12")
1449                                .header("content-type", "application/grpc")
1450                                .body(empty_body())
1451                                .unwrap(),
1452                        )
1453                    })
1454                }
1455            }
1456        }
1457    }
1458    impl<T: AbciApplication> Clone for AbciApplicationServer<T> {
1459        fn clone(&self) -> Self {
1460            let inner = self.inner.clone();
1461            Self {
1462                inner,
1463                accept_compression_encodings: self.accept_compression_encodings,
1464                send_compression_encodings: self.send_compression_encodings,
1465                max_decoding_message_size: self.max_decoding_message_size,
1466                max_encoding_message_size: self.max_encoding_message_size,
1467            }
1468        }
1469    }
1470    impl<T: AbciApplication> Clone for _Inner<T> {
1471        fn clone(&self) -> Self {
1472            Self(Arc::clone(&self.0))
1473        }
1474    }
1475    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
1476        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1477            write!(f, "{:?}", self.0)
1478        }
1479    }
1480    impl<T: AbciApplication> tonic::server::NamedService for AbciApplicationServer<T> {
1481        const NAME: &'static str = "cometbft.abci.v1beta2.ABCIApplication";
1482    }
1483}