penumbra_sdk_proto/gen/
penumbra.core.component.governance.v1.rs

1// This file is @generated by prost-build.
2/// A Penumbra ZK delegator vote proof.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ZkDelegatorVoteProof {
5    #[prost(bytes = "vec", tag = "1")]
6    pub inner: ::prost::alloc::vec::Vec<u8>,
7}
8impl ::prost::Name for ZkDelegatorVoteProof {
9    const NAME: &'static str = "ZKDelegatorVoteProof";
10    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
11    fn full_name() -> ::prost::alloc::string::String {
12        "penumbra.core.component.governance.v1.ZKDelegatorVoteProof".into()
13    }
14    fn type_url() -> ::prost::alloc::string::String {
15        "/penumbra.core.component.governance.v1.ZKDelegatorVoteProof".into()
16    }
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct ProposalSubmit {
20    /// The proposal to be submitted.
21    #[prost(message, optional, tag = "1")]
22    pub proposal: ::core::option::Option<Proposal>,
23    /// The amount of the proposal deposit.
24    #[prost(message, optional, tag = "3")]
25    pub deposit_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
26}
27impl ::prost::Name for ProposalSubmit {
28    const NAME: &'static str = "ProposalSubmit";
29    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
30    fn full_name() -> ::prost::alloc::string::String {
31        "penumbra.core.component.governance.v1.ProposalSubmit".into()
32    }
33    fn type_url() -> ::prost::alloc::string::String {
34        "/penumbra.core.component.governance.v1.ProposalSubmit".into()
35    }
36}
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct ProposalWithdraw {
39    /// The proposal to be withdrawn.
40    #[prost(uint64, tag = "1")]
41    pub proposal: u64,
42    /// The reason for the proposal being withdrawn.
43    #[prost(string, tag = "2")]
44    pub reason: ::prost::alloc::string::String,
45}
46impl ::prost::Name for ProposalWithdraw {
47    const NAME: &'static str = "ProposalWithdraw";
48    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
49    fn full_name() -> ::prost::alloc::string::String {
50        "penumbra.core.component.governance.v1.ProposalWithdraw".into()
51    }
52    fn type_url() -> ::prost::alloc::string::String {
53        "/penumbra.core.component.governance.v1.ProposalWithdraw".into()
54    }
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct ProposalDepositClaim {
58    /// The proposal to claim the deposit for.
59    #[prost(uint64, tag = "1")]
60    pub proposal: u64,
61    /// The expected deposit amount.
62    #[prost(message, optional, tag = "2")]
63    pub deposit_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
64    /// The outcome of the proposal.
65    #[prost(message, optional, tag = "3")]
66    pub outcome: ::core::option::Option<ProposalOutcome>,
67}
68impl ::prost::Name for ProposalDepositClaim {
69    const NAME: &'static str = "ProposalDepositClaim";
70    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
71    fn full_name() -> ::prost::alloc::string::String {
72        "penumbra.core.component.governance.v1.ProposalDepositClaim".into()
73    }
74    fn type_url() -> ::prost::alloc::string::String {
75        "/penumbra.core.component.governance.v1.ProposalDepositClaim".into()
76    }
77}
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct ValidatorVote {
80    /// The effecting data for the vote.
81    #[prost(message, optional, tag = "1")]
82    pub body: ::core::option::Option<ValidatorVoteBody>,
83    /// The vote authorization signature is authorizing data.
84    #[prost(message, optional, tag = "2")]
85    pub auth_sig: ::core::option::Option<
86        super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
87    >,
88}
89impl ::prost::Name for ValidatorVote {
90    const NAME: &'static str = "ValidatorVote";
91    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
92    fn full_name() -> ::prost::alloc::string::String {
93        "penumbra.core.component.governance.v1.ValidatorVote".into()
94    }
95    fn type_url() -> ::prost::alloc::string::String {
96        "/penumbra.core.component.governance.v1.ValidatorVote".into()
97    }
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct ValidatorVoteReason {
101    #[prost(string, tag = "1")]
102    pub reason: ::prost::alloc::string::String,
103}
104impl ::prost::Name for ValidatorVoteReason {
105    const NAME: &'static str = "ValidatorVoteReason";
106    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
107    fn full_name() -> ::prost::alloc::string::String {
108        "penumbra.core.component.governance.v1.ValidatorVoteReason".into()
109    }
110    fn type_url() -> ::prost::alloc::string::String {
111        "/penumbra.core.component.governance.v1.ValidatorVoteReason".into()
112    }
113}
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct ValidatorVoteBody {
116    /// The proposal being voted on.
117    #[prost(uint64, tag = "1")]
118    pub proposal: u64,
119    /// The vote.
120    #[prost(message, optional, tag = "2")]
121    pub vote: ::core::option::Option<Vote>,
122    /// The validator identity.
123    #[prost(message, optional, tag = "3")]
124    pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
125    /// The validator governance key.
126    #[prost(message, optional, tag = "4")]
127    pub governance_key: ::core::option::Option<
128        super::super::super::keys::v1::GovernanceKey,
129    >,
130    /// A justification of the vote.
131    #[prost(message, optional, tag = "5")]
132    pub reason: ::core::option::Option<ValidatorVoteReason>,
133}
134impl ::prost::Name for ValidatorVoteBody {
135    const NAME: &'static str = "ValidatorVoteBody";
136    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
137    fn full_name() -> ::prost::alloc::string::String {
138        "penumbra.core.component.governance.v1.ValidatorVoteBody".into()
139    }
140    fn type_url() -> ::prost::alloc::string::String {
141        "/penumbra.core.component.governance.v1.ValidatorVoteBody".into()
142    }
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct DelegatorVote {
146    /// The effecting data for the vote.
147    #[prost(message, optional, tag = "1")]
148    pub body: ::core::option::Option<DelegatorVoteBody>,
149    /// The vote authorization signature is authorizing data.
150    #[prost(message, optional, tag = "2")]
151    pub auth_sig: ::core::option::Option<
152        super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
153    >,
154    /// The vote proof is authorizing data.
155    #[prost(message, optional, tag = "3")]
156    pub proof: ::core::option::Option<ZkDelegatorVoteProof>,
157}
158impl ::prost::Name for DelegatorVote {
159    const NAME: &'static str = "DelegatorVote";
160    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
161    fn full_name() -> ::prost::alloc::string::String {
162        "penumbra.core.component.governance.v1.DelegatorVote".into()
163    }
164    fn type_url() -> ::prost::alloc::string::String {
165        "/penumbra.core.component.governance.v1.DelegatorVote".into()
166    }
167}
168#[derive(Clone, PartialEq, ::prost::Message)]
169pub struct DelegatorVoteBody {
170    /// The proposal being voted on.
171    #[prost(uint64, tag = "1")]
172    pub proposal: u64,
173    /// The start position of the proposal in the TCT.
174    #[prost(uint64, tag = "2")]
175    pub start_position: u64,
176    /// The vote.
177    #[prost(message, optional, tag = "3")]
178    pub vote: ::core::option::Option<Vote>,
179    /// The value of the delegation note.
180    #[prost(message, optional, tag = "4")]
181    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
182    /// The amount of the delegation note, in unbonded penumbra.
183    #[prost(message, optional, tag = "5")]
184    pub unbonded_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
185    /// The nullifier of the input note.
186    #[prost(message, optional, tag = "6")]
187    pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
188    /// The randomized validating key for the spend authorization signature.
189    #[prost(message, optional, tag = "7")]
190    pub rk: ::core::option::Option<
191        super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
192    >,
193}
194impl ::prost::Name for DelegatorVoteBody {
195    const NAME: &'static str = "DelegatorVoteBody";
196    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
197    fn full_name() -> ::prost::alloc::string::String {
198        "penumbra.core.component.governance.v1.DelegatorVoteBody".into()
199    }
200    fn type_url() -> ::prost::alloc::string::String {
201        "/penumbra.core.component.governance.v1.DelegatorVoteBody".into()
202    }
203}
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct DelegatorVoteView {
206    #[prost(oneof = "delegator_vote_view::DelegatorVote", tags = "1, 2")]
207    pub delegator_vote: ::core::option::Option<delegator_vote_view::DelegatorVote>,
208}
209/// Nested message and enum types in `DelegatorVoteView`.
210pub mod delegator_vote_view {
211    #[derive(Clone, PartialEq, ::prost::Message)]
212    pub struct Visible {
213        #[prost(message, optional, tag = "1")]
214        pub delegator_vote: ::core::option::Option<super::DelegatorVote>,
215        #[prost(message, optional, tag = "2")]
216        pub note: ::core::option::Option<
217            super::super::super::shielded_pool::v1::NoteView,
218        >,
219    }
220    impl ::prost::Name for Visible {
221        const NAME: &'static str = "Visible";
222        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
223        fn full_name() -> ::prost::alloc::string::String {
224            "penumbra.core.component.governance.v1.DelegatorVoteView.Visible".into()
225        }
226        fn type_url() -> ::prost::alloc::string::String {
227            "/penumbra.core.component.governance.v1.DelegatorVoteView.Visible".into()
228        }
229    }
230    #[derive(Clone, PartialEq, ::prost::Message)]
231    pub struct Opaque {
232        #[prost(message, optional, tag = "1")]
233        pub delegator_vote: ::core::option::Option<super::DelegatorVote>,
234    }
235    impl ::prost::Name for Opaque {
236        const NAME: &'static str = "Opaque";
237        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
238        fn full_name() -> ::prost::alloc::string::String {
239            "penumbra.core.component.governance.v1.DelegatorVoteView.Opaque".into()
240        }
241        fn type_url() -> ::prost::alloc::string::String {
242            "/penumbra.core.component.governance.v1.DelegatorVoteView.Opaque".into()
243        }
244    }
245    #[derive(Clone, PartialEq, ::prost::Oneof)]
246    pub enum DelegatorVote {
247        #[prost(message, tag = "1")]
248        Visible(Visible),
249        #[prost(message, tag = "2")]
250        Opaque(Opaque),
251    }
252}
253impl ::prost::Name for DelegatorVoteView {
254    const NAME: &'static str = "DelegatorVoteView";
255    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
256    fn full_name() -> ::prost::alloc::string::String {
257        "penumbra.core.component.governance.v1.DelegatorVoteView".into()
258    }
259    fn type_url() -> ::prost::alloc::string::String {
260        "/penumbra.core.component.governance.v1.DelegatorVoteView".into()
261    }
262}
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct DelegatorVotePlan {
265    /// The proposal to vote on.
266    #[prost(uint64, tag = "1")]
267    pub proposal: u64,
268    /// The start position of the proposal in the TCT.
269    #[prost(uint64, tag = "2")]
270    pub start_position: u64,
271    /// The vote to cast.
272    #[prost(message, optional, tag = "3")]
273    pub vote: ::core::option::Option<Vote>,
274    /// The delegation note to prove that we can vote.
275    #[prost(message, optional, tag = "4")]
276    pub staked_note: ::core::option::Option<super::super::shielded_pool::v1::Note>,
277    /// The position of that delegation note.
278    #[prost(uint64, tag = "5")]
279    pub staked_note_position: u64,
280    /// The unbonded amount equivalent to the delegation note.
281    #[prost(message, optional, tag = "6")]
282    pub unbonded_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
283    /// The randomizer to use for the proof of spend capability.
284    #[prost(bytes = "vec", tag = "7")]
285    pub randomizer: ::prost::alloc::vec::Vec<u8>,
286    /// The first blinding factor to use for the ZK delegator vote proof.
287    #[prost(bytes = "vec", tag = "8")]
288    pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
289    /// The second blinding factor to use for the ZK delegator vote proof.
290    #[prost(bytes = "vec", tag = "9")]
291    pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
292}
293impl ::prost::Name for DelegatorVotePlan {
294    const NAME: &'static str = "DelegatorVotePlan";
295    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
296    fn full_name() -> ::prost::alloc::string::String {
297        "penumbra.core.component.governance.v1.DelegatorVotePlan".into()
298    }
299    fn type_url() -> ::prost::alloc::string::String {
300        "/penumbra.core.component.governance.v1.DelegatorVotePlan".into()
301    }
302}
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct CommunityPoolDeposit {
305    /// The value to deposit into the Community Pool.
306    #[prost(message, optional, tag = "1")]
307    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
308}
309impl ::prost::Name for CommunityPoolDeposit {
310    const NAME: &'static str = "CommunityPoolDeposit";
311    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
312    fn full_name() -> ::prost::alloc::string::String {
313        "penumbra.core.component.governance.v1.CommunityPoolDeposit".into()
314    }
315    fn type_url() -> ::prost::alloc::string::String {
316        "/penumbra.core.component.governance.v1.CommunityPoolDeposit".into()
317    }
318}
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct CommunityPoolSpend {
321    /// The value to spend from the Community Pool.
322    #[prost(message, optional, tag = "1")]
323    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
324}
325impl ::prost::Name for CommunityPoolSpend {
326    const NAME: &'static str = "CommunityPoolSpend";
327    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
328    fn full_name() -> ::prost::alloc::string::String {
329        "penumbra.core.component.governance.v1.CommunityPoolSpend".into()
330    }
331    fn type_url() -> ::prost::alloc::string::String {
332        "/penumbra.core.component.governance.v1.CommunityPoolSpend".into()
333    }
334}
335#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct CommunityPoolOutput {
337    /// The value to output from the Community Pool.
338    #[prost(message, optional, tag = "1")]
339    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
340    /// The address to send the output to.
341    #[prost(message, optional, tag = "2")]
342    pub address: ::core::option::Option<super::super::super::keys::v1::Address>,
343}
344impl ::prost::Name for CommunityPoolOutput {
345    const NAME: &'static str = "CommunityPoolOutput";
346    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
347    fn full_name() -> ::prost::alloc::string::String {
348        "penumbra.core.component.governance.v1.CommunityPoolOutput".into()
349    }
350    fn type_url() -> ::prost::alloc::string::String {
351        "/penumbra.core.component.governance.v1.CommunityPoolOutput".into()
352    }
353}
354/// A vote on a proposal.
355#[derive(Clone, Copy, PartialEq, ::prost::Message)]
356pub struct Vote {
357    /// The vote.
358    #[prost(enumeration = "vote::Vote", tag = "1")]
359    pub vote: i32,
360}
361/// Nested message and enum types in `Vote`.
362pub mod vote {
363    /// A vote.
364    #[derive(
365        Clone,
366        Copy,
367        Debug,
368        PartialEq,
369        Eq,
370        Hash,
371        PartialOrd,
372        Ord,
373        ::prost::Enumeration
374    )]
375    #[repr(i32)]
376    pub enum Vote {
377        Unspecified = 0,
378        Abstain = 1,
379        Yes = 2,
380        No = 3,
381    }
382    impl Vote {
383        /// String value of the enum field names used in the ProtoBuf definition.
384        ///
385        /// The values are not transformed in any way and thus are considered stable
386        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
387        pub fn as_str_name(&self) -> &'static str {
388            match self {
389                Self::Unspecified => "VOTE_UNSPECIFIED",
390                Self::Abstain => "VOTE_ABSTAIN",
391                Self::Yes => "VOTE_YES",
392                Self::No => "VOTE_NO",
393            }
394        }
395        /// Creates an enum from field names used in the ProtoBuf definition.
396        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
397            match value {
398                "VOTE_UNSPECIFIED" => Some(Self::Unspecified),
399                "VOTE_ABSTAIN" => Some(Self::Abstain),
400                "VOTE_YES" => Some(Self::Yes),
401                "VOTE_NO" => Some(Self::No),
402                _ => None,
403            }
404        }
405    }
406}
407impl ::prost::Name for Vote {
408    const NAME: &'static str = "Vote";
409    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
410    fn full_name() -> ::prost::alloc::string::String {
411        "penumbra.core.component.governance.v1.Vote".into()
412    }
413    fn type_url() -> ::prost::alloc::string::String {
414        "/penumbra.core.component.governance.v1.Vote".into()
415    }
416}
417/// The current state of a proposal.
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct ProposalState {
420    /// The state of the proposal.
421    #[prost(oneof = "proposal_state::State", tags = "2, 3, 4, 5")]
422    pub state: ::core::option::Option<proposal_state::State>,
423}
424/// Nested message and enum types in `ProposalState`.
425pub mod proposal_state {
426    /// Voting is in progress and the proposal has not yet concluded voting or been withdrawn.
427    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
428    pub struct Voting {}
429    impl ::prost::Name for Voting {
430        const NAME: &'static str = "Voting";
431        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
432        fn full_name() -> ::prost::alloc::string::String {
433            "penumbra.core.component.governance.v1.ProposalState.Voting".into()
434        }
435        fn type_url() -> ::prost::alloc::string::String {
436            "/penumbra.core.component.governance.v1.ProposalState.Voting".into()
437        }
438    }
439    /// The proposal has been withdrawn but the voting period is not yet concluded.
440    #[derive(Clone, PartialEq, ::prost::Message)]
441    pub struct Withdrawn {
442        /// The reason for the withdrawal.
443        #[prost(string, tag = "1")]
444        pub reason: ::prost::alloc::string::String,
445    }
446    impl ::prost::Name for Withdrawn {
447        const NAME: &'static str = "Withdrawn";
448        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
449        fn full_name() -> ::prost::alloc::string::String {
450            "penumbra.core.component.governance.v1.ProposalState.Withdrawn".into()
451        }
452        fn type_url() -> ::prost::alloc::string::String {
453            "/penumbra.core.component.governance.v1.ProposalState.Withdrawn".into()
454        }
455    }
456    /// The voting period has ended, and the proposal has been assigned an outcome.
457    #[derive(Clone, PartialEq, ::prost::Message)]
458    pub struct Finished {
459        #[prost(message, optional, tag = "1")]
460        pub outcome: ::core::option::Option<super::ProposalOutcome>,
461    }
462    impl ::prost::Name for Finished {
463        const NAME: &'static str = "Finished";
464        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
465        fn full_name() -> ::prost::alloc::string::String {
466            "penumbra.core.component.governance.v1.ProposalState.Finished".into()
467        }
468        fn type_url() -> ::prost::alloc::string::String {
469            "/penumbra.core.component.governance.v1.ProposalState.Finished".into()
470        }
471    }
472    /// The voting period has ended, and the original proposer has claimed their deposit.
473    #[derive(Clone, PartialEq, ::prost::Message)]
474    pub struct Claimed {
475        #[prost(message, optional, tag = "1")]
476        pub outcome: ::core::option::Option<super::ProposalOutcome>,
477    }
478    impl ::prost::Name for Claimed {
479        const NAME: &'static str = "Claimed";
480        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
481        fn full_name() -> ::prost::alloc::string::String {
482            "penumbra.core.component.governance.v1.ProposalState.Claimed".into()
483        }
484        fn type_url() -> ::prost::alloc::string::String {
485            "/penumbra.core.component.governance.v1.ProposalState.Claimed".into()
486        }
487    }
488    /// The state of the proposal.
489    #[derive(Clone, PartialEq, ::prost::Oneof)]
490    pub enum State {
491        #[prost(message, tag = "2")]
492        Voting(Voting),
493        #[prost(message, tag = "3")]
494        Withdrawn(Withdrawn),
495        #[prost(message, tag = "4")]
496        Finished(Finished),
497        #[prost(message, tag = "5")]
498        Claimed(Claimed),
499    }
500}
501impl ::prost::Name for ProposalState {
502    const NAME: &'static str = "ProposalState";
503    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
504    fn full_name() -> ::prost::alloc::string::String {
505        "penumbra.core.component.governance.v1.ProposalState".into()
506    }
507    fn type_url() -> ::prost::alloc::string::String {
508        "/penumbra.core.component.governance.v1.ProposalState".into()
509    }
510}
511/// The outcome of a concluded proposal.
512#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct ProposalOutcome {
514    #[prost(oneof = "proposal_outcome::Outcome", tags = "1, 2, 3")]
515    pub outcome: ::core::option::Option<proposal_outcome::Outcome>,
516}
517/// Nested message and enum types in `ProposalOutcome`.
518pub mod proposal_outcome {
519    /// Whether or not the proposal was withdrawn.
520    #[derive(Clone, PartialEq, ::prost::Message)]
521    pub struct Withdrawn {
522        /// The reason for withdrawing the proposal during the voting period.
523        #[prost(string, tag = "1")]
524        pub reason: ::prost::alloc::string::String,
525    }
526    impl ::prost::Name for Withdrawn {
527        const NAME: &'static str = "Withdrawn";
528        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
529        fn full_name() -> ::prost::alloc::string::String {
530            "penumbra.core.component.governance.v1.ProposalOutcome.Withdrawn".into()
531        }
532        fn type_url() -> ::prost::alloc::string::String {
533            "/penumbra.core.component.governance.v1.ProposalOutcome.Withdrawn".into()
534        }
535    }
536    /// The proposal was passed.
537    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
538    pub struct Passed {}
539    impl ::prost::Name for Passed {
540        const NAME: &'static str = "Passed";
541        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
542        fn full_name() -> ::prost::alloc::string::String {
543            "penumbra.core.component.governance.v1.ProposalOutcome.Passed".into()
544        }
545        fn type_url() -> ::prost::alloc::string::String {
546            "/penumbra.core.component.governance.v1.ProposalOutcome.Passed".into()
547        }
548    }
549    /// The proposal did not pass.
550    #[derive(Clone, PartialEq, ::prost::Message)]
551    pub struct Failed {
552        /// Present if the proposal was withdrawn during the voting period.
553        #[prost(message, optional, tag = "1")]
554        pub withdrawn: ::core::option::Option<Withdrawn>,
555    }
556    impl ::prost::Name for Failed {
557        const NAME: &'static str = "Failed";
558        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
559        fn full_name() -> ::prost::alloc::string::String {
560            "penumbra.core.component.governance.v1.ProposalOutcome.Failed".into()
561        }
562        fn type_url() -> ::prost::alloc::string::String {
563            "/penumbra.core.component.governance.v1.ProposalOutcome.Failed".into()
564        }
565    }
566    /// The proposal did not pass, and was slashed.
567    #[derive(Clone, PartialEq, ::prost::Message)]
568    pub struct Slashed {
569        /// Present if the proposal was withdrawn during the voting period.
570        #[prost(message, optional, tag = "1")]
571        pub withdrawn: ::core::option::Option<Withdrawn>,
572    }
573    impl ::prost::Name for Slashed {
574        const NAME: &'static str = "Slashed";
575        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
576        fn full_name() -> ::prost::alloc::string::String {
577            "penumbra.core.component.governance.v1.ProposalOutcome.Slashed".into()
578        }
579        fn type_url() -> ::prost::alloc::string::String {
580            "/penumbra.core.component.governance.v1.ProposalOutcome.Slashed".into()
581        }
582    }
583    #[derive(Clone, PartialEq, ::prost::Oneof)]
584    pub enum Outcome {
585        #[prost(message, tag = "1")]
586        Passed(Passed),
587        #[prost(message, tag = "2")]
588        Failed(Failed),
589        #[prost(message, tag = "3")]
590        Slashed(Slashed),
591    }
592}
593impl ::prost::Name for ProposalOutcome {
594    const NAME: &'static str = "ProposalOutcome";
595    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
596    fn full_name() -> ::prost::alloc::string::String {
597        "penumbra.core.component.governance.v1.ProposalOutcome".into()
598    }
599    fn type_url() -> ::prost::alloc::string::String {
600        "/penumbra.core.component.governance.v1.ProposalOutcome".into()
601    }
602}
603/// A tally of votes on a proposal.
604#[derive(Clone, Copy, PartialEq, ::prost::Message)]
605pub struct Tally {
606    /// The number of votes in favor of the proposal.
607    #[prost(uint64, tag = "1")]
608    pub yes: u64,
609    /// The number of votes against the proposal.
610    #[prost(uint64, tag = "2")]
611    pub no: u64,
612    /// The number of abstentions.
613    #[prost(uint64, tag = "3")]
614    pub abstain: u64,
615}
616impl ::prost::Name for Tally {
617    const NAME: &'static str = "Tally";
618    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
619    fn full_name() -> ::prost::alloc::string::String {
620        "penumbra.core.component.governance.v1.Tally".into()
621    }
622    fn type_url() -> ::prost::alloc::string::String {
623        "/penumbra.core.component.governance.v1.Tally".into()
624    }
625}
626/// A proposal to be voted upon.
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct Proposal {
629    /// The unique identifier of the proposal.
630    #[prost(uint64, tag = "4")]
631    pub id: u64,
632    /// A short title for the proposal.
633    #[prost(string, tag = "1")]
634    pub title: ::prost::alloc::string::String,
635    /// A natural-language description of the effect of the proposal and its justification.
636    #[prost(string, tag = "2")]
637    pub description: ::prost::alloc::string::String,
638    /// The proposal's payload.
639    #[prost(oneof = "proposal::Payload", tags = "5, 6, 7, 8, 9, 10, 11")]
640    pub payload: ::core::option::Option<proposal::Payload>,
641}
642/// Nested message and enum types in `Proposal`.
643pub mod proposal {
644    /// A signaling proposal is meant to register a vote on-chain, but does not have an automatic
645    /// effect when passed.
646    ///
647    /// It optionally contains a reference to a commit which contains code to upgrade the chain.
648    #[derive(Clone, PartialEq, ::prost::Message)]
649    pub struct Signaling {
650        /// The commit to be voted upon, if any is relevant.
651        #[prost(string, tag = "1")]
652        pub commit: ::prost::alloc::string::String,
653    }
654    impl ::prost::Name for Signaling {
655        const NAME: &'static str = "Signaling";
656        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
657        fn full_name() -> ::prost::alloc::string::String {
658            "penumbra.core.component.governance.v1.Proposal.Signaling".into()
659        }
660        fn type_url() -> ::prost::alloc::string::String {
661            "/penumbra.core.component.governance.v1.Proposal.Signaling".into()
662        }
663    }
664    /// An emergency proposal can be passed instantaneously by a 1/3 majority of validators, without
665    /// waiting for the voting period to expire.
666    ///
667    /// If the boolean `halt_chain` is set to `true`, then the chain will halt immediately when the
668    /// proposal is passed.
669    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
670    pub struct Emergency {
671        /// If `true`, the chain will halt immediately when the proposal is passed.
672        #[prost(bool, tag = "1")]
673        pub halt_chain: bool,
674    }
675    impl ::prost::Name for Emergency {
676        const NAME: &'static str = "Emergency";
677        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
678        fn full_name() -> ::prost::alloc::string::String {
679            "penumbra.core.component.governance.v1.Proposal.Emergency".into()
680        }
681        fn type_url() -> ::prost::alloc::string::String {
682            "/penumbra.core.component.governance.v1.Proposal.Emergency".into()
683        }
684    }
685    /// A parameter change proposal describes a replacement of the app parameters, which should take
686    /// effect when the proposal is passed.
687    #[derive(Clone, PartialEq, ::prost::Message)]
688    pub struct ParameterChange {
689        /// DEPRECATED
690        #[deprecated]
691        #[prost(message, optional, tag = "1")]
692        pub old_parameters: ::core::option::Option<super::ChangedAppParameters>,
693        /// DEPRECATED
694        #[deprecated]
695        #[prost(message, optional, tag = "2")]
696        pub new_parameters: ::core::option::Option<super::ChangedAppParameters>,
697        /// A list of encoded preconditions for the parameter change: even if the
698        /// proposal passes, the update will not be applied if the value of the
699        /// precondition does not match the proposal at the time it is enacted.
700        ///
701        /// This can be empty, in which case the changes will be applied
702        /// unconditionally.
703        #[prost(message, repeated, tag = "3")]
704        pub preconditions: ::prost::alloc::vec::Vec<super::EncodedParameter>,
705        /// A list of encoded changes to the application parameters.
706        #[prost(message, repeated, tag = "4")]
707        pub changes: ::prost::alloc::vec::Vec<super::EncodedParameter>,
708    }
709    impl ::prost::Name for ParameterChange {
710        const NAME: &'static str = "ParameterChange";
711        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
712        fn full_name() -> ::prost::alloc::string::String {
713            "penumbra.core.component.governance.v1.Proposal.ParameterChange".into()
714        }
715        fn type_url() -> ::prost::alloc::string::String {
716            "/penumbra.core.component.governance.v1.Proposal.ParameterChange".into()
717        }
718    }
719    /// A Community Pool spend proposal describes zero or more transactions to execute on behalf of the Community Pool, with
720    /// access to its funds, and zero or more scheduled transactions from previous passed proposals to
721    /// cancel.
722    #[derive(Clone, PartialEq, ::prost::Message)]
723    pub struct CommunityPoolSpend {
724        /// The transaction plan to be executed at the time the proposal is passed. This must be a
725        /// transaction plan which can be executed by the Community Pool, which means it can't require any witness
726        /// data or authorization signatures, but it may use the `CommunityPoolSpend` action.
727        #[prost(message, optional, tag = "2")]
728        pub transaction_plan: ::core::option::Option<::pbjson_types::Any>,
729    }
730    impl ::prost::Name for CommunityPoolSpend {
731        const NAME: &'static str = "CommunityPoolSpend";
732        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
733        fn full_name() -> ::prost::alloc::string::String {
734            "penumbra.core.component.governance.v1.Proposal.CommunityPoolSpend".into()
735        }
736        fn type_url() -> ::prost::alloc::string::String {
737            "/penumbra.core.component.governance.v1.Proposal.CommunityPoolSpend".into()
738        }
739    }
740    /// An upgrade plan describes a candidate upgrade to be executed at a certain height. If passed, the chain
741    /// will halt at the specified height.
742    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
743    pub struct UpgradePlan {
744        #[prost(uint64, tag = "1")]
745        pub height: u64,
746    }
747    impl ::prost::Name for UpgradePlan {
748        const NAME: &'static str = "UpgradePlan";
749        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
750        fn full_name() -> ::prost::alloc::string::String {
751            "penumbra.core.component.governance.v1.Proposal.UpgradePlan".into()
752        }
753        fn type_url() -> ::prost::alloc::string::String {
754            "/penumbra.core.component.governance.v1.Proposal.UpgradePlan".into()
755        }
756    }
757    /// Freeze an existing IBC client.
758    /// Like `Emergency` proposals, it is enacted immediately after receiving
759    /// +2/3 of validator votes.
760    #[derive(Clone, PartialEq, ::prost::Message)]
761    pub struct FreezeIbcClient {
762        #[prost(string, tag = "1")]
763        pub client_id: ::prost::alloc::string::String,
764    }
765    impl ::prost::Name for FreezeIbcClient {
766        const NAME: &'static str = "FreezeIbcClient";
767        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
768        fn full_name() -> ::prost::alloc::string::String {
769            "penumbra.core.component.governance.v1.Proposal.FreezeIbcClient".into()
770        }
771        fn type_url() -> ::prost::alloc::string::String {
772            "/penumbra.core.component.governance.v1.Proposal.FreezeIbcClient".into()
773        }
774    }
775    /// Unfreeze an existing IBC client.
776    /// Like `Emergency` proposals, it is enacted immediately after receiving
777    /// +2/3 of validator votes.
778    #[derive(Clone, PartialEq, ::prost::Message)]
779    pub struct UnfreezeIbcClient {
780        #[prost(string, tag = "1")]
781        pub client_id: ::prost::alloc::string::String,
782    }
783    impl ::prost::Name for UnfreezeIbcClient {
784        const NAME: &'static str = "UnfreezeIbcClient";
785        const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
786        fn full_name() -> ::prost::alloc::string::String {
787            "penumbra.core.component.governance.v1.Proposal.UnfreezeIbcClient".into()
788        }
789        fn type_url() -> ::prost::alloc::string::String {
790            "/penumbra.core.component.governance.v1.Proposal.UnfreezeIbcClient".into()
791        }
792    }
793    /// The proposal's payload.
794    #[derive(Clone, PartialEq, ::prost::Oneof)]
795    pub enum Payload {
796        #[prost(message, tag = "5")]
797        Signaling(Signaling),
798        #[prost(message, tag = "6")]
799        Emergency(Emergency),
800        #[prost(message, tag = "7")]
801        ParameterChange(ParameterChange),
802        #[prost(message, tag = "8")]
803        CommunityPoolSpend(CommunityPoolSpend),
804        #[prost(message, tag = "9")]
805        UpgradePlan(UpgradePlan),
806        #[prost(message, tag = "10")]
807        FreezeIbcClient(FreezeIbcClient),
808        #[prost(message, tag = "11")]
809        UnfreezeIbcClient(UnfreezeIbcClient),
810    }
811}
812impl ::prost::Name for Proposal {
813    const NAME: &'static str = "Proposal";
814    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
815    fn full_name() -> ::prost::alloc::string::String {
816        "penumbra.core.component.governance.v1.Proposal".into()
817    }
818    fn type_url() -> ::prost::alloc::string::String {
819        "/penumbra.core.component.governance.v1.Proposal".into()
820    }
821}
822#[derive(Clone, Copy, PartialEq, ::prost::Message)]
823pub struct ProposalInfoRequest {
824    /// The proposal id to request information on.
825    #[prost(uint64, tag = "2")]
826    pub proposal_id: u64,
827}
828impl ::prost::Name for ProposalInfoRequest {
829    const NAME: &'static str = "ProposalInfoRequest";
830    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
831    fn full_name() -> ::prost::alloc::string::String {
832        "penumbra.core.component.governance.v1.ProposalInfoRequest".into()
833    }
834    fn type_url() -> ::prost::alloc::string::String {
835        "/penumbra.core.component.governance.v1.ProposalInfoRequest".into()
836    }
837}
838#[derive(Clone, Copy, PartialEq, ::prost::Message)]
839pub struct ProposalInfoResponse {
840    /// The block height at which the proposal started voting.
841    #[prost(uint64, tag = "1")]
842    pub start_block_height: u64,
843    /// The position of the state commitment tree at which the proposal is considered to have started voting.
844    #[prost(uint64, tag = "2")]
845    pub start_position: u64,
846}
847impl ::prost::Name for ProposalInfoResponse {
848    const NAME: &'static str = "ProposalInfoResponse";
849    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
850    fn full_name() -> ::prost::alloc::string::String {
851        "penumbra.core.component.governance.v1.ProposalInfoResponse".into()
852    }
853    fn type_url() -> ::prost::alloc::string::String {
854        "/penumbra.core.component.governance.v1.ProposalInfoResponse".into()
855    }
856}
857#[derive(Clone, Copy, PartialEq, ::prost::Message)]
858pub struct ProposalDataRequest {
859    /// The proposal id to request information on.
860    #[prost(uint64, tag = "2")]
861    pub proposal_id: u64,
862}
863impl ::prost::Name for ProposalDataRequest {
864    const NAME: &'static str = "ProposalDataRequest";
865    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
866    fn full_name() -> ::prost::alloc::string::String {
867        "penumbra.core.component.governance.v1.ProposalDataRequest".into()
868    }
869    fn type_url() -> ::prost::alloc::string::String {
870        "/penumbra.core.component.governance.v1.ProposalDataRequest".into()
871    }
872}
873#[derive(Clone, PartialEq, ::prost::Message)]
874pub struct ProposalDataResponse {
875    /// The proposal metadata.
876    #[prost(message, optional, tag = "1")]
877    pub proposal: ::core::option::Option<Proposal>,
878    /// The block height at which the proposal started voting.
879    #[prost(uint64, tag = "2")]
880    pub start_block_height: u64,
881    /// The block height at which the proposal ends voting.
882    #[prost(uint64, tag = "3")]
883    pub end_block_height: u64,
884    /// The position of the state commitment tree at which the proposal is considered to have started voting.
885    #[prost(uint64, tag = "4")]
886    pub start_position: u64,
887    /// The current state of the proposal.
888    #[prost(message, optional, tag = "5")]
889    pub state: ::core::option::Option<ProposalState>,
890    /// The deposit amount paid for the proposal.
891    #[prost(message, optional, tag = "6")]
892    pub proposal_deposit_amount: ::core::option::Option<
893        super::super::super::num::v1::Amount,
894    >,
895}
896impl ::prost::Name for ProposalDataResponse {
897    const NAME: &'static str = "ProposalDataResponse";
898    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
899    fn full_name() -> ::prost::alloc::string::String {
900        "penumbra.core.component.governance.v1.ProposalDataResponse".into()
901    }
902    fn type_url() -> ::prost::alloc::string::String {
903        "/penumbra.core.component.governance.v1.ProposalDataResponse".into()
904    }
905}
906/// Requests the validator rate data for a proposal.
907#[derive(Clone, Copy, PartialEq, ::prost::Message)]
908pub struct ProposalRateDataRequest {
909    /// The proposal id to request information on.
910    #[prost(uint64, tag = "2")]
911    pub proposal_id: u64,
912}
913impl ::prost::Name for ProposalRateDataRequest {
914    const NAME: &'static str = "ProposalRateDataRequest";
915    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
916    fn full_name() -> ::prost::alloc::string::String {
917        "penumbra.core.component.governance.v1.ProposalRateDataRequest".into()
918    }
919    fn type_url() -> ::prost::alloc::string::String {
920        "/penumbra.core.component.governance.v1.ProposalRateDataRequest".into()
921    }
922}
923/// The rate data for a single validator.
924#[derive(Clone, PartialEq, ::prost::Message)]
925pub struct ProposalRateDataResponse {
926    #[prost(message, optional, tag = "1")]
927    pub rate_data: ::core::option::Option<super::super::stake::v1::RateData>,
928}
929impl ::prost::Name for ProposalRateDataResponse {
930    const NAME: &'static str = "ProposalRateDataResponse";
931    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
932    fn full_name() -> ::prost::alloc::string::String {
933        "penumbra.core.component.governance.v1.ProposalRateDataResponse".into()
934    }
935    fn type_url() -> ::prost::alloc::string::String {
936        "/penumbra.core.component.governance.v1.ProposalRateDataResponse".into()
937    }
938}
939/// Requests the list of all proposals.
940#[derive(Clone, Copy, PartialEq, ::prost::Message)]
941pub struct ProposalListRequest {
942    /// Whether to include proposals that are no longer active.;
943    ///
944    /// TODO: we could filter by starting block height here?
945    #[prost(bool, tag = "2")]
946    pub inactive: bool,
947}
948impl ::prost::Name for ProposalListRequest {
949    const NAME: &'static str = "ProposalListRequest";
950    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
951    fn full_name() -> ::prost::alloc::string::String {
952        "penumbra.core.component.governance.v1.ProposalListRequest".into()
953    }
954    fn type_url() -> ::prost::alloc::string::String {
955        "/penumbra.core.component.governance.v1.ProposalListRequest".into()
956    }
957}
958/// The data for a single proposal.
959#[derive(Clone, PartialEq, ::prost::Message)]
960pub struct ProposalListResponse {
961    /// The proposal metadata.
962    #[prost(message, optional, tag = "1")]
963    pub proposal: ::core::option::Option<Proposal>,
964    /// The block height at which the proposal started voting.
965    #[prost(uint64, tag = "2")]
966    pub start_block_height: u64,
967    /// The block height at which the proposal ends voting.
968    #[prost(uint64, tag = "3")]
969    pub end_block_height: u64,
970    /// The position of the state commitment tree at which the proposal is considered to have started voting.
971    #[prost(uint64, tag = "4")]
972    pub start_position: u64,
973    /// The current state of the proposal.
974    #[prost(message, optional, tag = "5")]
975    pub state: ::core::option::Option<ProposalState>,
976}
977impl ::prost::Name for ProposalListResponse {
978    const NAME: &'static str = "ProposalListResponse";
979    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
980    fn full_name() -> ::prost::alloc::string::String {
981        "penumbra.core.component.governance.v1.ProposalListResponse".into()
982    }
983    fn type_url() -> ::prost::alloc::string::String {
984        "/penumbra.core.component.governance.v1.ProposalListResponse".into()
985    }
986}
987/// Requests the list of all validator votes for a given proposal.
988#[derive(Clone, Copy, PartialEq, ::prost::Message)]
989pub struct ValidatorVotesRequest {
990    /// The proposal id to request information on.
991    #[prost(uint64, tag = "2")]
992    pub proposal_id: u64,
993}
994impl ::prost::Name for ValidatorVotesRequest {
995    const NAME: &'static str = "ValidatorVotesRequest";
996    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
997    fn full_name() -> ::prost::alloc::string::String {
998        "penumbra.core.component.governance.v1.ValidatorVotesRequest".into()
999    }
1000    fn type_url() -> ::prost::alloc::string::String {
1001        "/penumbra.core.component.governance.v1.ValidatorVotesRequest".into()
1002    }
1003}
1004/// The data for a single validator vote.
1005#[derive(Clone, PartialEq, ::prost::Message)]
1006pub struct ValidatorVotesResponse {
1007    /// The vote.
1008    #[prost(message, optional, tag = "1")]
1009    pub vote: ::core::option::Option<Vote>,
1010    /// The validator identity.
1011    #[prost(message, optional, tag = "2")]
1012    pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
1013}
1014impl ::prost::Name for ValidatorVotesResponse {
1015    const NAME: &'static str = "ValidatorVotesResponse";
1016    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1017    fn full_name() -> ::prost::alloc::string::String {
1018        "penumbra.core.component.governance.v1.ValidatorVotesResponse".into()
1019    }
1020    fn type_url() -> ::prost::alloc::string::String {
1021        "/penumbra.core.component.governance.v1.ValidatorVotesResponse".into()
1022    }
1023}
1024/// Governance configuration data.
1025#[derive(Clone, PartialEq, ::prost::Message)]
1026pub struct GovernanceParameters {
1027    /// The number of blocks during which a proposal is voted on.
1028    #[prost(uint64, tag = "1")]
1029    pub proposal_voting_blocks: u64,
1030    /// The deposit required to create a proposal.
1031    #[prost(message, optional, tag = "2")]
1032    pub proposal_deposit_amount: ::core::option::Option<
1033        super::super::super::num::v1::Amount,
1034    >,
1035    /// The quorum required for a proposal to be considered valid, as a fraction of the total stake
1036    /// weight of the network.
1037    #[prost(string, tag = "3")]
1038    pub proposal_valid_quorum: ::prost::alloc::string::String,
1039    /// The threshold for a proposal to pass voting, as a ratio of "yes" votes over "no" votes.
1040    #[prost(string, tag = "4")]
1041    pub proposal_pass_threshold: ::prost::alloc::string::String,
1042    /// The threshold for a proposal to be slashed, regardless of whether the "yes" and "no" votes
1043    /// would have passed it, as a ratio of "no" votes over all total votes.
1044    #[prost(string, tag = "5")]
1045    pub proposal_slash_threshold: ::prost::alloc::string::String,
1046}
1047impl ::prost::Name for GovernanceParameters {
1048    const NAME: &'static str = "GovernanceParameters";
1049    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1050    fn full_name() -> ::prost::alloc::string::String {
1051        "penumbra.core.component.governance.v1.GovernanceParameters".into()
1052    }
1053    fn type_url() -> ::prost::alloc::string::String {
1054        "/penumbra.core.component.governance.v1.GovernanceParameters".into()
1055    }
1056}
1057/// Governance genesis state.
1058#[derive(Clone, PartialEq, ::prost::Message)]
1059pub struct GenesisContent {
1060    /// Governance parameters.
1061    #[prost(message, optional, tag = "1")]
1062    pub governance_params: ::core::option::Option<GovernanceParameters>,
1063}
1064impl ::prost::Name for GenesisContent {
1065    const NAME: &'static str = "GenesisContent";
1066    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1067    fn full_name() -> ::prost::alloc::string::String {
1068        "penumbra.core.component.governance.v1.GenesisContent".into()
1069    }
1070    fn type_url() -> ::prost::alloc::string::String {
1071        "/penumbra.core.component.governance.v1.GenesisContent".into()
1072    }
1073}
1074#[derive(Clone, PartialEq, ::prost::Message)]
1075pub struct EncodedParameter {
1076    /// The component name in the `AppParameters`.
1077    ///
1078    /// This is the ProtoJSON-produced key in the `AppParameters` structure.
1079    #[prost(string, tag = "1")]
1080    pub component: ::prost::alloc::string::String,
1081    /// The parameter key in the component parameters.
1082    ///
1083    /// This is the ProtoJSON-produced field name in the component's substructure.
1084    #[prost(string, tag = "2")]
1085    pub key: ::prost::alloc::string::String,
1086    /// The parameter value.
1087    ///
1088    /// This is the ProtoJSON-encoded value of the parameter.
1089    #[prost(string, tag = "3")]
1090    pub value: ::prost::alloc::string::String,
1091}
1092impl ::prost::Name for EncodedParameter {
1093    const NAME: &'static str = "EncodedParameter";
1094    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1095    fn full_name() -> ::prost::alloc::string::String {
1096        "penumbra.core.component.governance.v1.EncodedParameter".into()
1097    }
1098    fn type_url() -> ::prost::alloc::string::String {
1099        "/penumbra.core.component.governance.v1.EncodedParameter".into()
1100    }
1101}
1102/// DEPRECATED
1103#[derive(Clone, PartialEq, ::prost::Message)]
1104pub struct ChangedAppParameters {
1105    /// Sct module parameters.
1106    #[prost(message, optional, tag = "1")]
1107    pub sct_params: ::core::option::Option<super::super::sct::v1::SctParameters>,
1108    /// Community Pool module parameters.
1109    #[prost(message, optional, tag = "2")]
1110    pub community_pool_params: ::core::option::Option<
1111        super::super::community_pool::v1::CommunityPoolParameters,
1112    >,
1113    /// Governance module parameters.
1114    #[prost(message, optional, tag = "3")]
1115    pub governance_params: ::core::option::Option<GovernanceParameters>,
1116    /// IBC module parameters.
1117    #[prost(message, optional, tag = "4")]
1118    pub ibc_params: ::core::option::Option<super::super::ibc::v1::IbcParameters>,
1119    /// Stake module parameters.
1120    #[prost(message, optional, tag = "5")]
1121    pub stake_params: ::core::option::Option<super::super::stake::v1::StakeParameters>,
1122    /// Fee module parameters.
1123    #[prost(message, optional, tag = "6")]
1124    pub fee_params: ::core::option::Option<super::super::fee::v1::FeeParameters>,
1125    /// Distributions module parameters.
1126    #[prost(message, optional, tag = "7")]
1127    pub distributions_params: ::core::option::Option<
1128        super::super::distributions::v1::DistributionsParameters,
1129    >,
1130    /// Funding module parameters.
1131    #[prost(message, optional, tag = "8")]
1132    pub funding_params: ::core::option::Option<
1133        super::super::funding::v1::FundingParameters,
1134    >,
1135    /// Shielded pool module parameters
1136    #[prost(message, optional, tag = "9")]
1137    pub shielded_pool_params: ::core::option::Option<
1138        super::super::shielded_pool::v1::ShieldedPoolParameters,
1139    >,
1140    /// DEX component parameters
1141    #[prost(message, optional, tag = "10")]
1142    pub dex_params: ::core::option::Option<super::super::dex::v1::DexParameters>,
1143    /// Auction module parameters.
1144    #[prost(message, optional, tag = "11")]
1145    pub auction_params: ::core::option::Option<
1146        super::super::auction::v1::AuctionParameters,
1147    >,
1148}
1149impl ::prost::Name for ChangedAppParameters {
1150    const NAME: &'static str = "ChangedAppParameters";
1151    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1152    fn full_name() -> ::prost::alloc::string::String {
1153        "penumbra.core.component.governance.v1.ChangedAppParameters".into()
1154    }
1155    fn type_url() -> ::prost::alloc::string::String {
1156        "/penumbra.core.component.governance.v1.ChangedAppParameters".into()
1157    }
1158}
1159/// DEPRECATED
1160#[derive(Clone, PartialEq, ::prost::Message)]
1161pub struct ChangedAppParametersSet {
1162    /// The set of app parameters at the time the proposal was submitted.
1163    #[prost(message, optional, tag = "1")]
1164    pub old: ::core::option::Option<ChangedAppParameters>,
1165    /// The new set of parameters the proposal is trying to enact.
1166    #[prost(message, optional, tag = "2")]
1167    pub new: ::core::option::Option<ChangedAppParameters>,
1168}
1169impl ::prost::Name for ChangedAppParametersSet {
1170    const NAME: &'static str = "ChangedAppParametersSet";
1171    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1172    fn full_name() -> ::prost::alloc::string::String {
1173        "penumbra.core.component.governance.v1.ChangedAppParametersSet".into()
1174    }
1175    fn type_url() -> ::prost::alloc::string::String {
1176        "/penumbra.core.component.governance.v1.ChangedAppParametersSet".into()
1177    }
1178}
1179#[derive(Clone, PartialEq, ::prost::Message)]
1180pub struct VotingPowerAtProposalStartRequest {
1181    /// The proposal id to request information on.
1182    #[prost(uint64, tag = "2")]
1183    pub proposal_id: u64,
1184    /// The validator identity key to request information on.
1185    #[prost(message, optional, tag = "3")]
1186    pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
1187}
1188impl ::prost::Name for VotingPowerAtProposalStartRequest {
1189    const NAME: &'static str = "VotingPowerAtProposalStartRequest";
1190    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1191    fn full_name() -> ::prost::alloc::string::String {
1192        "penumbra.core.component.governance.v1.VotingPowerAtProposalStartRequest".into()
1193    }
1194    fn type_url() -> ::prost::alloc::string::String {
1195        "/penumbra.core.component.governance.v1.VotingPowerAtProposalStartRequest".into()
1196    }
1197}
1198#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1199pub struct VotingPowerAtProposalStartResponse {
1200    /// The voting power for the given identity key at the start of the proposal.
1201    /// TODO: since we don't support optional fields in our protos any more,
1202    /// this will be set to 0 if the validator was not active at the start of the proposal.
1203    /// Is this potentially an issue?
1204    #[prost(uint64, tag = "1")]
1205    pub voting_power: u64,
1206}
1207impl ::prost::Name for VotingPowerAtProposalStartResponse {
1208    const NAME: &'static str = "VotingPowerAtProposalStartResponse";
1209    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1210    fn full_name() -> ::prost::alloc::string::String {
1211        "penumbra.core.component.governance.v1.VotingPowerAtProposalStartResponse".into()
1212    }
1213    fn type_url() -> ::prost::alloc::string::String {
1214        "/penumbra.core.component.governance.v1.VotingPowerAtProposalStartResponse"
1215            .into()
1216    }
1217}
1218#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1219pub struct AllTalliedDelegatorVotesForProposalRequest {
1220    /// The proposal id to request information on.
1221    #[prost(uint64, tag = "2")]
1222    pub proposal_id: u64,
1223}
1224impl ::prost::Name for AllTalliedDelegatorVotesForProposalRequest {
1225    const NAME: &'static str = "AllTalliedDelegatorVotesForProposalRequest";
1226    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1227    fn full_name() -> ::prost::alloc::string::String {
1228        "penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalRequest"
1229            .into()
1230    }
1231    fn type_url() -> ::prost::alloc::string::String {
1232        "/penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalRequest"
1233            .into()
1234    }
1235}
1236#[derive(Clone, PartialEq, ::prost::Message)]
1237pub struct AllTalliedDelegatorVotesForProposalResponse {
1238    /// The tally of delegator votes for a given validator for the proposal.
1239    #[prost(message, optional, tag = "1")]
1240    pub tally: ::core::option::Option<Tally>,
1241    /// The validator identity associated with the tally.
1242    #[prost(message, optional, tag = "2")]
1243    pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
1244}
1245impl ::prost::Name for AllTalliedDelegatorVotesForProposalResponse {
1246    const NAME: &'static str = "AllTalliedDelegatorVotesForProposalResponse";
1247    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1248    fn full_name() -> ::prost::alloc::string::String {
1249        "penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalResponse"
1250            .into()
1251    }
1252    fn type_url() -> ::prost::alloc::string::String {
1253        "/penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalResponse"
1254            .into()
1255    }
1256}
1257#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1258pub struct NextProposalIdRequest {}
1259impl ::prost::Name for NextProposalIdRequest {
1260    const NAME: &'static str = "NextProposalIdRequest";
1261    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1262    fn full_name() -> ::prost::alloc::string::String {
1263        "penumbra.core.component.governance.v1.NextProposalIdRequest".into()
1264    }
1265    fn type_url() -> ::prost::alloc::string::String {
1266        "/penumbra.core.component.governance.v1.NextProposalIdRequest".into()
1267    }
1268}
1269#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1270pub struct NextProposalIdResponse {
1271    /// The next proposal ID.
1272    #[prost(uint64, tag = "1")]
1273    pub next_proposal_id: u64,
1274}
1275impl ::prost::Name for NextProposalIdResponse {
1276    const NAME: &'static str = "NextProposalIdResponse";
1277    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1278    fn full_name() -> ::prost::alloc::string::String {
1279        "penumbra.core.component.governance.v1.NextProposalIdResponse".into()
1280    }
1281    fn type_url() -> ::prost::alloc::string::String {
1282        "/penumbra.core.component.governance.v1.NextProposalIdResponse".into()
1283    }
1284}
1285/// The ratio between two numbers, used in governance to describe vote thresholds and quorums.
1286#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1287pub struct Ratio {
1288    /// The numerator.
1289    #[prost(uint64, tag = "1")]
1290    pub numerator: u64,
1291    /// The denominator.
1292    #[prost(uint64, tag = "2")]
1293    pub denominator: u64,
1294}
1295impl ::prost::Name for Ratio {
1296    const NAME: &'static str = "Ratio";
1297    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1298    fn full_name() -> ::prost::alloc::string::String {
1299        "penumbra.core.component.governance.v1.Ratio".into()
1300    }
1301    fn type_url() -> ::prost::alloc::string::String {
1302        "/penumbra.core.component.governance.v1.Ratio".into()
1303    }
1304}
1305#[derive(Clone, PartialEq, ::prost::Message)]
1306pub struct EventDelegatorVote {
1307    /// The delegator vote.
1308    #[prost(message, optional, tag = "1")]
1309    pub vote: ::core::option::Option<DelegatorVote>,
1310    /// The corresponding validator's identity key.
1311    #[prost(message, optional, tag = "2")]
1312    pub validator_identity_key: ::core::option::Option<
1313        super::super::super::keys::v1::IdentityKey,
1314    >,
1315}
1316impl ::prost::Name for EventDelegatorVote {
1317    const NAME: &'static str = "EventDelegatorVote";
1318    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1319    fn full_name() -> ::prost::alloc::string::String {
1320        "penumbra.core.component.governance.v1.EventDelegatorVote".into()
1321    }
1322    fn type_url() -> ::prost::alloc::string::String {
1323        "/penumbra.core.component.governance.v1.EventDelegatorVote".into()
1324    }
1325}
1326#[derive(Clone, PartialEq, ::prost::Message)]
1327pub struct EventProposalDepositClaim {
1328    /// The deposit claim body.
1329    #[prost(message, optional, tag = "1")]
1330    pub deposit_claim: ::core::option::Option<ProposalDepositClaim>,
1331}
1332impl ::prost::Name for EventProposalDepositClaim {
1333    const NAME: &'static str = "EventProposalDepositClaim";
1334    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1335    fn full_name() -> ::prost::alloc::string::String {
1336        "penumbra.core.component.governance.v1.EventProposalDepositClaim".into()
1337    }
1338    fn type_url() -> ::prost::alloc::string::String {
1339        "/penumbra.core.component.governance.v1.EventProposalDepositClaim".into()
1340    }
1341}
1342#[derive(Clone, PartialEq, ::prost::Message)]
1343pub struct EventValidatorVote {
1344    /// The validator vote.
1345    #[prost(message, optional, tag = "1")]
1346    pub vote: ::core::option::Option<ValidatorVote>,
1347    /// The validator's voting power at the time of the proposal's start.
1348    #[prost(uint64, tag = "2")]
1349    pub voting_power: u64,
1350}
1351impl ::prost::Name for EventValidatorVote {
1352    const NAME: &'static str = "EventValidatorVote";
1353    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1354    fn full_name() -> ::prost::alloc::string::String {
1355        "penumbra.core.component.governance.v1.EventValidatorVote".into()
1356    }
1357    fn type_url() -> ::prost::alloc::string::String {
1358        "/penumbra.core.component.governance.v1.EventValidatorVote".into()
1359    }
1360}
1361#[derive(Clone, PartialEq, ::prost::Message)]
1362pub struct EventProposalWithdraw {
1363    /// Details on the withdrawn proposal.
1364    #[prost(message, optional, tag = "1")]
1365    pub withdraw: ::core::option::Option<ProposalWithdraw>,
1366}
1367impl ::prost::Name for EventProposalWithdraw {
1368    const NAME: &'static str = "EventProposalWithdraw";
1369    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1370    fn full_name() -> ::prost::alloc::string::String {
1371        "penumbra.core.component.governance.v1.EventProposalWithdraw".into()
1372    }
1373    fn type_url() -> ::prost::alloc::string::String {
1374        "/penumbra.core.component.governance.v1.EventProposalWithdraw".into()
1375    }
1376}
1377#[derive(Clone, PartialEq, ::prost::Message)]
1378pub struct EventProposalSubmit {
1379    /// Details on the submitted proposal.
1380    #[prost(message, optional, tag = "1")]
1381    pub submit: ::core::option::Option<ProposalSubmit>,
1382    /// The start height for the proposal.
1383    #[prost(uint64, tag = "2")]
1384    pub start_height: u64,
1385    /// The end height for the proposal.
1386    #[prost(uint64, tag = "3")]
1387    pub end_height: u64,
1388}
1389impl ::prost::Name for EventProposalSubmit {
1390    const NAME: &'static str = "EventProposalSubmit";
1391    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1392    fn full_name() -> ::prost::alloc::string::String {
1393        "penumbra.core.component.governance.v1.EventProposalSubmit".into()
1394    }
1395    fn type_url() -> ::prost::alloc::string::String {
1396        "/penumbra.core.component.governance.v1.EventProposalSubmit".into()
1397    }
1398}
1399#[derive(Clone, PartialEq, ::prost::Message)]
1400pub struct EventProposalPassed {
1401    /// The passed proposal.
1402    #[prost(message, optional, tag = "1")]
1403    pub proposal: ::core::option::Option<Proposal>,
1404}
1405impl ::prost::Name for EventProposalPassed {
1406    const NAME: &'static str = "EventProposalPassed";
1407    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1408    fn full_name() -> ::prost::alloc::string::String {
1409        "penumbra.core.component.governance.v1.EventProposalPassed".into()
1410    }
1411    fn type_url() -> ::prost::alloc::string::String {
1412        "/penumbra.core.component.governance.v1.EventProposalPassed".into()
1413    }
1414}
1415#[derive(Clone, PartialEq, ::prost::Message)]
1416pub struct EventProposalFailed {
1417    /// The failed proposal.
1418    #[prost(message, optional, tag = "1")]
1419    pub proposal: ::core::option::Option<Proposal>,
1420}
1421impl ::prost::Name for EventProposalFailed {
1422    const NAME: &'static str = "EventProposalFailed";
1423    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1424    fn full_name() -> ::prost::alloc::string::String {
1425        "penumbra.core.component.governance.v1.EventProposalFailed".into()
1426    }
1427    fn type_url() -> ::prost::alloc::string::String {
1428        "/penumbra.core.component.governance.v1.EventProposalFailed".into()
1429    }
1430}
1431#[derive(Clone, PartialEq, ::prost::Message)]
1432pub struct EventProposalSlashed {
1433    /// The slashed proposal.
1434    #[prost(message, optional, tag = "1")]
1435    pub proposal: ::core::option::Option<Proposal>,
1436}
1437impl ::prost::Name for EventProposalSlashed {
1438    const NAME: &'static str = "EventProposalSlashed";
1439    const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
1440    fn full_name() -> ::prost::alloc::string::String {
1441        "penumbra.core.component.governance.v1.EventProposalSlashed".into()
1442    }
1443    fn type_url() -> ::prost::alloc::string::String {
1444        "/penumbra.core.component.governance.v1.EventProposalSlashed".into()
1445    }
1446}
1447/// All the different kinds of proposals.
1448#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1449#[repr(i32)]
1450pub enum ProposalKind {
1451    /// To make the linter happy
1452    Unspecified = 0,
1453    Signaling = 1,
1454    Emergency = 2,
1455    ParameterChange = 3,
1456    CommunityPoolSpend = 4,
1457    UpgradePlan = 5,
1458    FreezeIbcClient = 6,
1459    UnfreezeIbcClient = 7,
1460}
1461impl ProposalKind {
1462    /// String value of the enum field names used in the ProtoBuf definition.
1463    ///
1464    /// The values are not transformed in any way and thus are considered stable
1465    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1466    pub fn as_str_name(&self) -> &'static str {
1467        match self {
1468            Self::Unspecified => "PROPOSAL_KIND_UNSPECIFIED",
1469            Self::Signaling => "PROPOSAL_KIND_SIGNALING",
1470            Self::Emergency => "PROPOSAL_KIND_EMERGENCY",
1471            Self::ParameterChange => "PROPOSAL_KIND_PARAMETER_CHANGE",
1472            Self::CommunityPoolSpend => "PROPOSAL_KIND_COMMUNITY_POOL_SPEND",
1473            Self::UpgradePlan => "PROPOSAL_KIND_UPGRADE_PLAN",
1474            Self::FreezeIbcClient => "PROPOSAL_KIND_FREEZE_IBC_CLIENT",
1475            Self::UnfreezeIbcClient => "PROPOSAL_KIND_UNFREEZE_IBC_CLIENT",
1476        }
1477    }
1478    /// Creates an enum from field names used in the ProtoBuf definition.
1479    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1480        match value {
1481            "PROPOSAL_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1482            "PROPOSAL_KIND_SIGNALING" => Some(Self::Signaling),
1483            "PROPOSAL_KIND_EMERGENCY" => Some(Self::Emergency),
1484            "PROPOSAL_KIND_PARAMETER_CHANGE" => Some(Self::ParameterChange),
1485            "PROPOSAL_KIND_COMMUNITY_POOL_SPEND" => Some(Self::CommunityPoolSpend),
1486            "PROPOSAL_KIND_UPGRADE_PLAN" => Some(Self::UpgradePlan),
1487            "PROPOSAL_KIND_FREEZE_IBC_CLIENT" => Some(Self::FreezeIbcClient),
1488            "PROPOSAL_KIND_UNFREEZE_IBC_CLIENT" => Some(Self::UnfreezeIbcClient),
1489            _ => None,
1490        }
1491    }
1492}
1493/// Generated client implementations.
1494#[cfg(feature = "rpc")]
1495pub mod query_service_client {
1496    #![allow(
1497        unused_variables,
1498        dead_code,
1499        missing_docs,
1500        clippy::wildcard_imports,
1501        clippy::let_unit_value,
1502    )]
1503    use tonic::codegen::*;
1504    use tonic::codegen::http::Uri;
1505    /// Query operations for the governance component.
1506    #[derive(Debug, Clone)]
1507    pub struct QueryServiceClient<T> {
1508        inner: tonic::client::Grpc<T>,
1509    }
1510    impl QueryServiceClient<tonic::transport::Channel> {
1511        /// Attempt to create a new client by connecting to a given endpoint.
1512        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1513        where
1514            D: TryInto<tonic::transport::Endpoint>,
1515            D::Error: Into<StdError>,
1516        {
1517            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1518            Ok(Self::new(conn))
1519        }
1520    }
1521    impl<T> QueryServiceClient<T>
1522    where
1523        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1524        T::Error: Into<StdError>,
1525        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1526        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1527    {
1528        pub fn new(inner: T) -> Self {
1529            let inner = tonic::client::Grpc::new(inner);
1530            Self { inner }
1531        }
1532        pub fn with_origin(inner: T, origin: Uri) -> Self {
1533            let inner = tonic::client::Grpc::with_origin(inner, origin);
1534            Self { inner }
1535        }
1536        pub fn with_interceptor<F>(
1537            inner: T,
1538            interceptor: F,
1539        ) -> QueryServiceClient<InterceptedService<T, F>>
1540        where
1541            F: tonic::service::Interceptor,
1542            T::ResponseBody: Default,
1543            T: tonic::codegen::Service<
1544                http::Request<tonic::body::BoxBody>,
1545                Response = http::Response<
1546                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1547                >,
1548            >,
1549            <T as tonic::codegen::Service<
1550                http::Request<tonic::body::BoxBody>,
1551            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1552        {
1553            QueryServiceClient::new(InterceptedService::new(inner, interceptor))
1554        }
1555        /// Compress requests with the given encoding.
1556        ///
1557        /// This requires the server to support it otherwise it might respond with an
1558        /// error.
1559        #[must_use]
1560        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1561            self.inner = self.inner.send_compressed(encoding);
1562            self
1563        }
1564        /// Enable decompressing responses.
1565        #[must_use]
1566        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1567            self.inner = self.inner.accept_compressed(encoding);
1568            self
1569        }
1570        /// Limits the maximum size of a decoded message.
1571        ///
1572        /// Default: `4MB`
1573        #[must_use]
1574        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1575            self.inner = self.inner.max_decoding_message_size(limit);
1576            self
1577        }
1578        /// Limits the maximum size of an encoded message.
1579        ///
1580        /// Default: `usize::MAX`
1581        #[must_use]
1582        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1583            self.inner = self.inner.max_encoding_message_size(limit);
1584            self
1585        }
1586        pub async fn proposal_info(
1587            &mut self,
1588            request: impl tonic::IntoRequest<super::ProposalInfoRequest>,
1589        ) -> std::result::Result<
1590            tonic::Response<super::ProposalInfoResponse>,
1591            tonic::Status,
1592        > {
1593            self.inner
1594                .ready()
1595                .await
1596                .map_err(|e| {
1597                    tonic::Status::unknown(
1598                        format!("Service was not ready: {}", e.into()),
1599                    )
1600                })?;
1601            let codec = tonic::codec::ProstCodec::default();
1602            let path = http::uri::PathAndQuery::from_static(
1603                "/penumbra.core.component.governance.v1.QueryService/ProposalInfo",
1604            );
1605            let mut req = request.into_request();
1606            req.extensions_mut()
1607                .insert(
1608                    GrpcMethod::new(
1609                        "penumbra.core.component.governance.v1.QueryService",
1610                        "ProposalInfo",
1611                    ),
1612                );
1613            self.inner.unary(req, path, codec).await
1614        }
1615        pub async fn proposal_list(
1616            &mut self,
1617            request: impl tonic::IntoRequest<super::ProposalListRequest>,
1618        ) -> std::result::Result<
1619            tonic::Response<tonic::codec::Streaming<super::ProposalListResponse>>,
1620            tonic::Status,
1621        > {
1622            self.inner
1623                .ready()
1624                .await
1625                .map_err(|e| {
1626                    tonic::Status::unknown(
1627                        format!("Service was not ready: {}", e.into()),
1628                    )
1629                })?;
1630            let codec = tonic::codec::ProstCodec::default();
1631            let path = http::uri::PathAndQuery::from_static(
1632                "/penumbra.core.component.governance.v1.QueryService/ProposalList",
1633            );
1634            let mut req = request.into_request();
1635            req.extensions_mut()
1636                .insert(
1637                    GrpcMethod::new(
1638                        "penumbra.core.component.governance.v1.QueryService",
1639                        "ProposalList",
1640                    ),
1641                );
1642            self.inner.server_streaming(req, path, codec).await
1643        }
1644        pub async fn proposal_data(
1645            &mut self,
1646            request: impl tonic::IntoRequest<super::ProposalDataRequest>,
1647        ) -> std::result::Result<
1648            tonic::Response<super::ProposalDataResponse>,
1649            tonic::Status,
1650        > {
1651            self.inner
1652                .ready()
1653                .await
1654                .map_err(|e| {
1655                    tonic::Status::unknown(
1656                        format!("Service was not ready: {}", e.into()),
1657                    )
1658                })?;
1659            let codec = tonic::codec::ProstCodec::default();
1660            let path = http::uri::PathAndQuery::from_static(
1661                "/penumbra.core.component.governance.v1.QueryService/ProposalData",
1662            );
1663            let mut req = request.into_request();
1664            req.extensions_mut()
1665                .insert(
1666                    GrpcMethod::new(
1667                        "penumbra.core.component.governance.v1.QueryService",
1668                        "ProposalData",
1669                    ),
1670                );
1671            self.inner.unary(req, path, codec).await
1672        }
1673        pub async fn next_proposal_id(
1674            &mut self,
1675            request: impl tonic::IntoRequest<super::NextProposalIdRequest>,
1676        ) -> std::result::Result<
1677            tonic::Response<super::NextProposalIdResponse>,
1678            tonic::Status,
1679        > {
1680            self.inner
1681                .ready()
1682                .await
1683                .map_err(|e| {
1684                    tonic::Status::unknown(
1685                        format!("Service was not ready: {}", e.into()),
1686                    )
1687                })?;
1688            let codec = tonic::codec::ProstCodec::default();
1689            let path = http::uri::PathAndQuery::from_static(
1690                "/penumbra.core.component.governance.v1.QueryService/NextProposalId",
1691            );
1692            let mut req = request.into_request();
1693            req.extensions_mut()
1694                .insert(
1695                    GrpcMethod::new(
1696                        "penumbra.core.component.governance.v1.QueryService",
1697                        "NextProposalId",
1698                    ),
1699                );
1700            self.inner.unary(req, path, codec).await
1701        }
1702        pub async fn validator_votes(
1703            &mut self,
1704            request: impl tonic::IntoRequest<super::ValidatorVotesRequest>,
1705        ) -> std::result::Result<
1706            tonic::Response<tonic::codec::Streaming<super::ValidatorVotesResponse>>,
1707            tonic::Status,
1708        > {
1709            self.inner
1710                .ready()
1711                .await
1712                .map_err(|e| {
1713                    tonic::Status::unknown(
1714                        format!("Service was not ready: {}", e.into()),
1715                    )
1716                })?;
1717            let codec = tonic::codec::ProstCodec::default();
1718            let path = http::uri::PathAndQuery::from_static(
1719                "/penumbra.core.component.governance.v1.QueryService/ValidatorVotes",
1720            );
1721            let mut req = request.into_request();
1722            req.extensions_mut()
1723                .insert(
1724                    GrpcMethod::new(
1725                        "penumbra.core.component.governance.v1.QueryService",
1726                        "ValidatorVotes",
1727                    ),
1728                );
1729            self.inner.server_streaming(req, path, codec).await
1730        }
1731        pub async fn voting_power_at_proposal_start(
1732            &mut self,
1733            request: impl tonic::IntoRequest<super::VotingPowerAtProposalStartRequest>,
1734        ) -> std::result::Result<
1735            tonic::Response<super::VotingPowerAtProposalStartResponse>,
1736            tonic::Status,
1737        > {
1738            self.inner
1739                .ready()
1740                .await
1741                .map_err(|e| {
1742                    tonic::Status::unknown(
1743                        format!("Service was not ready: {}", e.into()),
1744                    )
1745                })?;
1746            let codec = tonic::codec::ProstCodec::default();
1747            let path = http::uri::PathAndQuery::from_static(
1748                "/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart",
1749            );
1750            let mut req = request.into_request();
1751            req.extensions_mut()
1752                .insert(
1753                    GrpcMethod::new(
1754                        "penumbra.core.component.governance.v1.QueryService",
1755                        "VotingPowerAtProposalStart",
1756                    ),
1757                );
1758            self.inner.unary(req, path, codec).await
1759        }
1760        pub async fn all_tallied_delegator_votes_for_proposal(
1761            &mut self,
1762            request: impl tonic::IntoRequest<
1763                super::AllTalliedDelegatorVotesForProposalRequest,
1764            >,
1765        ) -> std::result::Result<
1766            tonic::Response<
1767                tonic::codec::Streaming<
1768                    super::AllTalliedDelegatorVotesForProposalResponse,
1769                >,
1770            >,
1771            tonic::Status,
1772        > {
1773            self.inner
1774                .ready()
1775                .await
1776                .map_err(|e| {
1777                    tonic::Status::unknown(
1778                        format!("Service was not ready: {}", e.into()),
1779                    )
1780                })?;
1781            let codec = tonic::codec::ProstCodec::default();
1782            let path = http::uri::PathAndQuery::from_static(
1783                "/penumbra.core.component.governance.v1.QueryService/AllTalliedDelegatorVotesForProposal",
1784            );
1785            let mut req = request.into_request();
1786            req.extensions_mut()
1787                .insert(
1788                    GrpcMethod::new(
1789                        "penumbra.core.component.governance.v1.QueryService",
1790                        "AllTalliedDelegatorVotesForProposal",
1791                    ),
1792                );
1793            self.inner.server_streaming(req, path, codec).await
1794        }
1795        /// Used for computing voting power ?
1796        pub async fn proposal_rate_data(
1797            &mut self,
1798            request: impl tonic::IntoRequest<super::ProposalRateDataRequest>,
1799        ) -> std::result::Result<
1800            tonic::Response<tonic::codec::Streaming<super::ProposalRateDataResponse>>,
1801            tonic::Status,
1802        > {
1803            self.inner
1804                .ready()
1805                .await
1806                .map_err(|e| {
1807                    tonic::Status::unknown(
1808                        format!("Service was not ready: {}", e.into()),
1809                    )
1810                })?;
1811            let codec = tonic::codec::ProstCodec::default();
1812            let path = http::uri::PathAndQuery::from_static(
1813                "/penumbra.core.component.governance.v1.QueryService/ProposalRateData",
1814            );
1815            let mut req = request.into_request();
1816            req.extensions_mut()
1817                .insert(
1818                    GrpcMethod::new(
1819                        "penumbra.core.component.governance.v1.QueryService",
1820                        "ProposalRateData",
1821                    ),
1822                );
1823            self.inner.server_streaming(req, path, codec).await
1824        }
1825    }
1826}
1827/// Generated server implementations.
1828#[cfg(feature = "rpc")]
1829pub mod query_service_server {
1830    #![allow(
1831        unused_variables,
1832        dead_code,
1833        missing_docs,
1834        clippy::wildcard_imports,
1835        clippy::let_unit_value,
1836    )]
1837    use tonic::codegen::*;
1838    /// Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.
1839    #[async_trait]
1840    pub trait QueryService: std::marker::Send + std::marker::Sync + 'static {
1841        async fn proposal_info(
1842            &self,
1843            request: tonic::Request<super::ProposalInfoRequest>,
1844        ) -> std::result::Result<
1845            tonic::Response<super::ProposalInfoResponse>,
1846            tonic::Status,
1847        >;
1848        /// Server streaming response type for the ProposalList method.
1849        type ProposalListStream: tonic::codegen::tokio_stream::Stream<
1850                Item = std::result::Result<super::ProposalListResponse, tonic::Status>,
1851            >
1852            + std::marker::Send
1853            + 'static;
1854        async fn proposal_list(
1855            &self,
1856            request: tonic::Request<super::ProposalListRequest>,
1857        ) -> std::result::Result<
1858            tonic::Response<Self::ProposalListStream>,
1859            tonic::Status,
1860        >;
1861        async fn proposal_data(
1862            &self,
1863            request: tonic::Request<super::ProposalDataRequest>,
1864        ) -> std::result::Result<
1865            tonic::Response<super::ProposalDataResponse>,
1866            tonic::Status,
1867        >;
1868        async fn next_proposal_id(
1869            &self,
1870            request: tonic::Request<super::NextProposalIdRequest>,
1871        ) -> std::result::Result<
1872            tonic::Response<super::NextProposalIdResponse>,
1873            tonic::Status,
1874        >;
1875        /// Server streaming response type for the ValidatorVotes method.
1876        type ValidatorVotesStream: tonic::codegen::tokio_stream::Stream<
1877                Item = std::result::Result<super::ValidatorVotesResponse, tonic::Status>,
1878            >
1879            + std::marker::Send
1880            + 'static;
1881        async fn validator_votes(
1882            &self,
1883            request: tonic::Request<super::ValidatorVotesRequest>,
1884        ) -> std::result::Result<
1885            tonic::Response<Self::ValidatorVotesStream>,
1886            tonic::Status,
1887        >;
1888        async fn voting_power_at_proposal_start(
1889            &self,
1890            request: tonic::Request<super::VotingPowerAtProposalStartRequest>,
1891        ) -> std::result::Result<
1892            tonic::Response<super::VotingPowerAtProposalStartResponse>,
1893            tonic::Status,
1894        >;
1895        /// Server streaming response type for the AllTalliedDelegatorVotesForProposal method.
1896        type AllTalliedDelegatorVotesForProposalStream: tonic::codegen::tokio_stream::Stream<
1897                Item = std::result::Result<
1898                    super::AllTalliedDelegatorVotesForProposalResponse,
1899                    tonic::Status,
1900                >,
1901            >
1902            + std::marker::Send
1903            + 'static;
1904        async fn all_tallied_delegator_votes_for_proposal(
1905            &self,
1906            request: tonic::Request<super::AllTalliedDelegatorVotesForProposalRequest>,
1907        ) -> std::result::Result<
1908            tonic::Response<Self::AllTalliedDelegatorVotesForProposalStream>,
1909            tonic::Status,
1910        >;
1911        /// Server streaming response type for the ProposalRateData method.
1912        type ProposalRateDataStream: tonic::codegen::tokio_stream::Stream<
1913                Item = std::result::Result<
1914                    super::ProposalRateDataResponse,
1915                    tonic::Status,
1916                >,
1917            >
1918            + std::marker::Send
1919            + 'static;
1920        /// Used for computing voting power ?
1921        async fn proposal_rate_data(
1922            &self,
1923            request: tonic::Request<super::ProposalRateDataRequest>,
1924        ) -> std::result::Result<
1925            tonic::Response<Self::ProposalRateDataStream>,
1926            tonic::Status,
1927        >;
1928    }
1929    /// Query operations for the governance component.
1930    #[derive(Debug)]
1931    pub struct QueryServiceServer<T> {
1932        inner: Arc<T>,
1933        accept_compression_encodings: EnabledCompressionEncodings,
1934        send_compression_encodings: EnabledCompressionEncodings,
1935        max_decoding_message_size: Option<usize>,
1936        max_encoding_message_size: Option<usize>,
1937    }
1938    impl<T> QueryServiceServer<T> {
1939        pub fn new(inner: T) -> Self {
1940            Self::from_arc(Arc::new(inner))
1941        }
1942        pub fn from_arc(inner: Arc<T>) -> Self {
1943            Self {
1944                inner,
1945                accept_compression_encodings: Default::default(),
1946                send_compression_encodings: Default::default(),
1947                max_decoding_message_size: None,
1948                max_encoding_message_size: None,
1949            }
1950        }
1951        pub fn with_interceptor<F>(
1952            inner: T,
1953            interceptor: F,
1954        ) -> InterceptedService<Self, F>
1955        where
1956            F: tonic::service::Interceptor,
1957        {
1958            InterceptedService::new(Self::new(inner), interceptor)
1959        }
1960        /// Enable decompressing requests with the given encoding.
1961        #[must_use]
1962        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1963            self.accept_compression_encodings.enable(encoding);
1964            self
1965        }
1966        /// Compress responses with the given encoding, if the client supports it.
1967        #[must_use]
1968        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1969            self.send_compression_encodings.enable(encoding);
1970            self
1971        }
1972        /// Limits the maximum size of a decoded message.
1973        ///
1974        /// Default: `4MB`
1975        #[must_use]
1976        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1977            self.max_decoding_message_size = Some(limit);
1978            self
1979        }
1980        /// Limits the maximum size of an encoded message.
1981        ///
1982        /// Default: `usize::MAX`
1983        #[must_use]
1984        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1985            self.max_encoding_message_size = Some(limit);
1986            self
1987        }
1988    }
1989    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServiceServer<T>
1990    where
1991        T: QueryService,
1992        B: Body + std::marker::Send + 'static,
1993        B::Error: Into<StdError> + std::marker::Send + 'static,
1994    {
1995        type Response = http::Response<tonic::body::BoxBody>;
1996        type Error = std::convert::Infallible;
1997        type Future = BoxFuture<Self::Response, Self::Error>;
1998        fn poll_ready(
1999            &mut self,
2000            _cx: &mut Context<'_>,
2001        ) -> Poll<std::result::Result<(), Self::Error>> {
2002            Poll::Ready(Ok(()))
2003        }
2004        fn call(&mut self, req: http::Request<B>) -> Self::Future {
2005            match req.uri().path() {
2006                "/penumbra.core.component.governance.v1.QueryService/ProposalInfo" => {
2007                    #[allow(non_camel_case_types)]
2008                    struct ProposalInfoSvc<T: QueryService>(pub Arc<T>);
2009                    impl<
2010                        T: QueryService,
2011                    > tonic::server::UnaryService<super::ProposalInfoRequest>
2012                    for ProposalInfoSvc<T> {
2013                        type Response = super::ProposalInfoResponse;
2014                        type Future = BoxFuture<
2015                            tonic::Response<Self::Response>,
2016                            tonic::Status,
2017                        >;
2018                        fn call(
2019                            &mut self,
2020                            request: tonic::Request<super::ProposalInfoRequest>,
2021                        ) -> Self::Future {
2022                            let inner = Arc::clone(&self.0);
2023                            let fut = async move {
2024                                <T as QueryService>::proposal_info(&inner, request).await
2025                            };
2026                            Box::pin(fut)
2027                        }
2028                    }
2029                    let accept_compression_encodings = self.accept_compression_encodings;
2030                    let send_compression_encodings = self.send_compression_encodings;
2031                    let max_decoding_message_size = self.max_decoding_message_size;
2032                    let max_encoding_message_size = self.max_encoding_message_size;
2033                    let inner = self.inner.clone();
2034                    let fut = async move {
2035                        let method = ProposalInfoSvc(inner);
2036                        let codec = tonic::codec::ProstCodec::default();
2037                        let mut grpc = tonic::server::Grpc::new(codec)
2038                            .apply_compression_config(
2039                                accept_compression_encodings,
2040                                send_compression_encodings,
2041                            )
2042                            .apply_max_message_size_config(
2043                                max_decoding_message_size,
2044                                max_encoding_message_size,
2045                            );
2046                        let res = grpc.unary(method, req).await;
2047                        Ok(res)
2048                    };
2049                    Box::pin(fut)
2050                }
2051                "/penumbra.core.component.governance.v1.QueryService/ProposalList" => {
2052                    #[allow(non_camel_case_types)]
2053                    struct ProposalListSvc<T: QueryService>(pub Arc<T>);
2054                    impl<
2055                        T: QueryService,
2056                    > tonic::server::ServerStreamingService<super::ProposalListRequest>
2057                    for ProposalListSvc<T> {
2058                        type Response = super::ProposalListResponse;
2059                        type ResponseStream = T::ProposalListStream;
2060                        type Future = BoxFuture<
2061                            tonic::Response<Self::ResponseStream>,
2062                            tonic::Status,
2063                        >;
2064                        fn call(
2065                            &mut self,
2066                            request: tonic::Request<super::ProposalListRequest>,
2067                        ) -> Self::Future {
2068                            let inner = Arc::clone(&self.0);
2069                            let fut = async move {
2070                                <T as QueryService>::proposal_list(&inner, request).await
2071                            };
2072                            Box::pin(fut)
2073                        }
2074                    }
2075                    let accept_compression_encodings = self.accept_compression_encodings;
2076                    let send_compression_encodings = self.send_compression_encodings;
2077                    let max_decoding_message_size = self.max_decoding_message_size;
2078                    let max_encoding_message_size = self.max_encoding_message_size;
2079                    let inner = self.inner.clone();
2080                    let fut = async move {
2081                        let method = ProposalListSvc(inner);
2082                        let codec = tonic::codec::ProstCodec::default();
2083                        let mut grpc = tonic::server::Grpc::new(codec)
2084                            .apply_compression_config(
2085                                accept_compression_encodings,
2086                                send_compression_encodings,
2087                            )
2088                            .apply_max_message_size_config(
2089                                max_decoding_message_size,
2090                                max_encoding_message_size,
2091                            );
2092                        let res = grpc.server_streaming(method, req).await;
2093                        Ok(res)
2094                    };
2095                    Box::pin(fut)
2096                }
2097                "/penumbra.core.component.governance.v1.QueryService/ProposalData" => {
2098                    #[allow(non_camel_case_types)]
2099                    struct ProposalDataSvc<T: QueryService>(pub Arc<T>);
2100                    impl<
2101                        T: QueryService,
2102                    > tonic::server::UnaryService<super::ProposalDataRequest>
2103                    for ProposalDataSvc<T> {
2104                        type Response = super::ProposalDataResponse;
2105                        type Future = BoxFuture<
2106                            tonic::Response<Self::Response>,
2107                            tonic::Status,
2108                        >;
2109                        fn call(
2110                            &mut self,
2111                            request: tonic::Request<super::ProposalDataRequest>,
2112                        ) -> Self::Future {
2113                            let inner = Arc::clone(&self.0);
2114                            let fut = async move {
2115                                <T as QueryService>::proposal_data(&inner, request).await
2116                            };
2117                            Box::pin(fut)
2118                        }
2119                    }
2120                    let accept_compression_encodings = self.accept_compression_encodings;
2121                    let send_compression_encodings = self.send_compression_encodings;
2122                    let max_decoding_message_size = self.max_decoding_message_size;
2123                    let max_encoding_message_size = self.max_encoding_message_size;
2124                    let inner = self.inner.clone();
2125                    let fut = async move {
2126                        let method = ProposalDataSvc(inner);
2127                        let codec = tonic::codec::ProstCodec::default();
2128                        let mut grpc = tonic::server::Grpc::new(codec)
2129                            .apply_compression_config(
2130                                accept_compression_encodings,
2131                                send_compression_encodings,
2132                            )
2133                            .apply_max_message_size_config(
2134                                max_decoding_message_size,
2135                                max_encoding_message_size,
2136                            );
2137                        let res = grpc.unary(method, req).await;
2138                        Ok(res)
2139                    };
2140                    Box::pin(fut)
2141                }
2142                "/penumbra.core.component.governance.v1.QueryService/NextProposalId" => {
2143                    #[allow(non_camel_case_types)]
2144                    struct NextProposalIdSvc<T: QueryService>(pub Arc<T>);
2145                    impl<
2146                        T: QueryService,
2147                    > tonic::server::UnaryService<super::NextProposalIdRequest>
2148                    for NextProposalIdSvc<T> {
2149                        type Response = super::NextProposalIdResponse;
2150                        type Future = BoxFuture<
2151                            tonic::Response<Self::Response>,
2152                            tonic::Status,
2153                        >;
2154                        fn call(
2155                            &mut self,
2156                            request: tonic::Request<super::NextProposalIdRequest>,
2157                        ) -> Self::Future {
2158                            let inner = Arc::clone(&self.0);
2159                            let fut = async move {
2160                                <T as QueryService>::next_proposal_id(&inner, request).await
2161                            };
2162                            Box::pin(fut)
2163                        }
2164                    }
2165                    let accept_compression_encodings = self.accept_compression_encodings;
2166                    let send_compression_encodings = self.send_compression_encodings;
2167                    let max_decoding_message_size = self.max_decoding_message_size;
2168                    let max_encoding_message_size = self.max_encoding_message_size;
2169                    let inner = self.inner.clone();
2170                    let fut = async move {
2171                        let method = NextProposalIdSvc(inner);
2172                        let codec = tonic::codec::ProstCodec::default();
2173                        let mut grpc = tonic::server::Grpc::new(codec)
2174                            .apply_compression_config(
2175                                accept_compression_encodings,
2176                                send_compression_encodings,
2177                            )
2178                            .apply_max_message_size_config(
2179                                max_decoding_message_size,
2180                                max_encoding_message_size,
2181                            );
2182                        let res = grpc.unary(method, req).await;
2183                        Ok(res)
2184                    };
2185                    Box::pin(fut)
2186                }
2187                "/penumbra.core.component.governance.v1.QueryService/ValidatorVotes" => {
2188                    #[allow(non_camel_case_types)]
2189                    struct ValidatorVotesSvc<T: QueryService>(pub Arc<T>);
2190                    impl<
2191                        T: QueryService,
2192                    > tonic::server::ServerStreamingService<super::ValidatorVotesRequest>
2193                    for ValidatorVotesSvc<T> {
2194                        type Response = super::ValidatorVotesResponse;
2195                        type ResponseStream = T::ValidatorVotesStream;
2196                        type Future = BoxFuture<
2197                            tonic::Response<Self::ResponseStream>,
2198                            tonic::Status,
2199                        >;
2200                        fn call(
2201                            &mut self,
2202                            request: tonic::Request<super::ValidatorVotesRequest>,
2203                        ) -> Self::Future {
2204                            let inner = Arc::clone(&self.0);
2205                            let fut = async move {
2206                                <T as QueryService>::validator_votes(&inner, request).await
2207                            };
2208                            Box::pin(fut)
2209                        }
2210                    }
2211                    let accept_compression_encodings = self.accept_compression_encodings;
2212                    let send_compression_encodings = self.send_compression_encodings;
2213                    let max_decoding_message_size = self.max_decoding_message_size;
2214                    let max_encoding_message_size = self.max_encoding_message_size;
2215                    let inner = self.inner.clone();
2216                    let fut = async move {
2217                        let method = ValidatorVotesSvc(inner);
2218                        let codec = tonic::codec::ProstCodec::default();
2219                        let mut grpc = tonic::server::Grpc::new(codec)
2220                            .apply_compression_config(
2221                                accept_compression_encodings,
2222                                send_compression_encodings,
2223                            )
2224                            .apply_max_message_size_config(
2225                                max_decoding_message_size,
2226                                max_encoding_message_size,
2227                            );
2228                        let res = grpc.server_streaming(method, req).await;
2229                        Ok(res)
2230                    };
2231                    Box::pin(fut)
2232                }
2233                "/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart" => {
2234                    #[allow(non_camel_case_types)]
2235                    struct VotingPowerAtProposalStartSvc<T: QueryService>(pub Arc<T>);
2236                    impl<
2237                        T: QueryService,
2238                    > tonic::server::UnaryService<
2239                        super::VotingPowerAtProposalStartRequest,
2240                    > for VotingPowerAtProposalStartSvc<T> {
2241                        type Response = super::VotingPowerAtProposalStartResponse;
2242                        type Future = BoxFuture<
2243                            tonic::Response<Self::Response>,
2244                            tonic::Status,
2245                        >;
2246                        fn call(
2247                            &mut self,
2248                            request: tonic::Request<
2249                                super::VotingPowerAtProposalStartRequest,
2250                            >,
2251                        ) -> Self::Future {
2252                            let inner = Arc::clone(&self.0);
2253                            let fut = async move {
2254                                <T as QueryService>::voting_power_at_proposal_start(
2255                                        &inner,
2256                                        request,
2257                                    )
2258                                    .await
2259                            };
2260                            Box::pin(fut)
2261                        }
2262                    }
2263                    let accept_compression_encodings = self.accept_compression_encodings;
2264                    let send_compression_encodings = self.send_compression_encodings;
2265                    let max_decoding_message_size = self.max_decoding_message_size;
2266                    let max_encoding_message_size = self.max_encoding_message_size;
2267                    let inner = self.inner.clone();
2268                    let fut = async move {
2269                        let method = VotingPowerAtProposalStartSvc(inner);
2270                        let codec = tonic::codec::ProstCodec::default();
2271                        let mut grpc = tonic::server::Grpc::new(codec)
2272                            .apply_compression_config(
2273                                accept_compression_encodings,
2274                                send_compression_encodings,
2275                            )
2276                            .apply_max_message_size_config(
2277                                max_decoding_message_size,
2278                                max_encoding_message_size,
2279                            );
2280                        let res = grpc.unary(method, req).await;
2281                        Ok(res)
2282                    };
2283                    Box::pin(fut)
2284                }
2285                "/penumbra.core.component.governance.v1.QueryService/AllTalliedDelegatorVotesForProposal" => {
2286                    #[allow(non_camel_case_types)]
2287                    struct AllTalliedDelegatorVotesForProposalSvc<T: QueryService>(
2288                        pub Arc<T>,
2289                    );
2290                    impl<
2291                        T: QueryService,
2292                    > tonic::server::ServerStreamingService<
2293                        super::AllTalliedDelegatorVotesForProposalRequest,
2294                    > for AllTalliedDelegatorVotesForProposalSvc<T> {
2295                        type Response = super::AllTalliedDelegatorVotesForProposalResponse;
2296                        type ResponseStream = T::AllTalliedDelegatorVotesForProposalStream;
2297                        type Future = BoxFuture<
2298                            tonic::Response<Self::ResponseStream>,
2299                            tonic::Status,
2300                        >;
2301                        fn call(
2302                            &mut self,
2303                            request: tonic::Request<
2304                                super::AllTalliedDelegatorVotesForProposalRequest,
2305                            >,
2306                        ) -> Self::Future {
2307                            let inner = Arc::clone(&self.0);
2308                            let fut = async move {
2309                                <T as QueryService>::all_tallied_delegator_votes_for_proposal(
2310                                        &inner,
2311                                        request,
2312                                    )
2313                                    .await
2314                            };
2315                            Box::pin(fut)
2316                        }
2317                    }
2318                    let accept_compression_encodings = self.accept_compression_encodings;
2319                    let send_compression_encodings = self.send_compression_encodings;
2320                    let max_decoding_message_size = self.max_decoding_message_size;
2321                    let max_encoding_message_size = self.max_encoding_message_size;
2322                    let inner = self.inner.clone();
2323                    let fut = async move {
2324                        let method = AllTalliedDelegatorVotesForProposalSvc(inner);
2325                        let codec = tonic::codec::ProstCodec::default();
2326                        let mut grpc = tonic::server::Grpc::new(codec)
2327                            .apply_compression_config(
2328                                accept_compression_encodings,
2329                                send_compression_encodings,
2330                            )
2331                            .apply_max_message_size_config(
2332                                max_decoding_message_size,
2333                                max_encoding_message_size,
2334                            );
2335                        let res = grpc.server_streaming(method, req).await;
2336                        Ok(res)
2337                    };
2338                    Box::pin(fut)
2339                }
2340                "/penumbra.core.component.governance.v1.QueryService/ProposalRateData" => {
2341                    #[allow(non_camel_case_types)]
2342                    struct ProposalRateDataSvc<T: QueryService>(pub Arc<T>);
2343                    impl<
2344                        T: QueryService,
2345                    > tonic::server::ServerStreamingService<
2346                        super::ProposalRateDataRequest,
2347                    > for ProposalRateDataSvc<T> {
2348                        type Response = super::ProposalRateDataResponse;
2349                        type ResponseStream = T::ProposalRateDataStream;
2350                        type Future = BoxFuture<
2351                            tonic::Response<Self::ResponseStream>,
2352                            tonic::Status,
2353                        >;
2354                        fn call(
2355                            &mut self,
2356                            request: tonic::Request<super::ProposalRateDataRequest>,
2357                        ) -> Self::Future {
2358                            let inner = Arc::clone(&self.0);
2359                            let fut = async move {
2360                                <T as QueryService>::proposal_rate_data(&inner, request)
2361                                    .await
2362                            };
2363                            Box::pin(fut)
2364                        }
2365                    }
2366                    let accept_compression_encodings = self.accept_compression_encodings;
2367                    let send_compression_encodings = self.send_compression_encodings;
2368                    let max_decoding_message_size = self.max_decoding_message_size;
2369                    let max_encoding_message_size = self.max_encoding_message_size;
2370                    let inner = self.inner.clone();
2371                    let fut = async move {
2372                        let method = ProposalRateDataSvc(inner);
2373                        let codec = tonic::codec::ProstCodec::default();
2374                        let mut grpc = tonic::server::Grpc::new(codec)
2375                            .apply_compression_config(
2376                                accept_compression_encodings,
2377                                send_compression_encodings,
2378                            )
2379                            .apply_max_message_size_config(
2380                                max_decoding_message_size,
2381                                max_encoding_message_size,
2382                            );
2383                        let res = grpc.server_streaming(method, req).await;
2384                        Ok(res)
2385                    };
2386                    Box::pin(fut)
2387                }
2388                _ => {
2389                    Box::pin(async move {
2390                        let mut response = http::Response::new(empty_body());
2391                        let headers = response.headers_mut();
2392                        headers
2393                            .insert(
2394                                tonic::Status::GRPC_STATUS,
2395                                (tonic::Code::Unimplemented as i32).into(),
2396                            );
2397                        headers
2398                            .insert(
2399                                http::header::CONTENT_TYPE,
2400                                tonic::metadata::GRPC_CONTENT_TYPE,
2401                            );
2402                        Ok(response)
2403                    })
2404                }
2405            }
2406        }
2407    }
2408    impl<T> Clone for QueryServiceServer<T> {
2409        fn clone(&self) -> Self {
2410            let inner = self.inner.clone();
2411            Self {
2412                inner,
2413                accept_compression_encodings: self.accept_compression_encodings,
2414                send_compression_encodings: self.send_compression_encodings,
2415                max_decoding_message_size: self.max_decoding_message_size,
2416                max_encoding_message_size: self.max_encoding_message_size,
2417            }
2418        }
2419    }
2420    /// Generated gRPC service name
2421    pub const SERVICE_NAME: &str = "penumbra.core.component.governance.v1.QueryService";
2422    impl<T> tonic::server::NamedService for QueryServiceServer<T> {
2423        const NAME: &'static str = SERVICE_NAME;
2424    }
2425}