#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZkDelegatorVoteProof {
#[prost(bytes = "vec", tag = "1")]
pub inner: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for ZkDelegatorVoteProof {
const NAME: &'static str = "ZKDelegatorVoteProof";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalSubmit {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
#[prost(message, optional, tag = "3")]
pub deposit_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
}
impl ::prost::Name for ProposalSubmit {
const NAME: &'static str = "ProposalSubmit";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalWithdraw {
#[prost(uint64, tag = "1")]
pub proposal: u64,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
impl ::prost::Name for ProposalWithdraw {
const NAME: &'static str = "ProposalWithdraw";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalDepositClaim {
#[prost(uint64, tag = "1")]
pub proposal: u64,
#[prost(message, optional, tag = "2")]
pub deposit_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
#[prost(message, optional, tag = "3")]
pub outcome: ::core::option::Option<ProposalOutcome>,
}
impl ::prost::Name for ProposalDepositClaim {
const NAME: &'static str = "ProposalDepositClaim";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVote {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<ValidatorVoteBody>,
#[prost(message, optional, tag = "2")]
pub auth_sig: ::core::option::Option<
super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
>,
}
impl ::prost::Name for ValidatorVote {
const NAME: &'static str = "ValidatorVote";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVoteReason {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
}
impl ::prost::Name for ValidatorVoteReason {
const NAME: &'static str = "ValidatorVoteReason";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVoteBody {
#[prost(uint64, tag = "1")]
pub proposal: u64,
#[prost(message, optional, tag = "2")]
pub vote: ::core::option::Option<Vote>,
#[prost(message, optional, tag = "3")]
pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
#[prost(message, optional, tag = "4")]
pub governance_key: ::core::option::Option<
super::super::super::keys::v1::GovernanceKey,
>,
#[prost(message, optional, tag = "5")]
pub reason: ::core::option::Option<ValidatorVoteReason>,
}
impl ::prost::Name for ValidatorVoteBody {
const NAME: &'static str = "ValidatorVoteBody";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorVote {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<DelegatorVoteBody>,
#[prost(message, optional, tag = "2")]
pub auth_sig: ::core::option::Option<
super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
>,
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<ZkDelegatorVoteProof>,
}
impl ::prost::Name for DelegatorVote {
const NAME: &'static str = "DelegatorVote";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorVoteBody {
#[prost(uint64, tag = "1")]
pub proposal: u64,
#[prost(uint64, tag = "2")]
pub start_position: u64,
#[prost(message, optional, tag = "3")]
pub vote: ::core::option::Option<Vote>,
#[prost(message, optional, tag = "4")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(message, optional, tag = "5")]
pub unbonded_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
#[prost(message, optional, tag = "6")]
pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
#[prost(message, optional, tag = "7")]
pub rk: ::core::option::Option<
super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
>,
}
impl ::prost::Name for DelegatorVoteBody {
const NAME: &'static str = "DelegatorVoteBody";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorVoteView {
#[prost(oneof = "delegator_vote_view::DelegatorVote", tags = "1, 2")]
pub delegator_vote: ::core::option::Option<delegator_vote_view::DelegatorVote>,
}
pub mod delegator_vote_view {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Visible {
#[prost(message, optional, tag = "1")]
pub delegator_vote: ::core::option::Option<super::DelegatorVote>,
#[prost(message, optional, tag = "2")]
pub note: ::core::option::Option<
super::super::super::shielded_pool::v1::NoteView,
>,
}
impl ::prost::Name for Visible {
const NAME: &'static str = "Visible";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.DelegatorVoteView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Opaque {
#[prost(message, optional, tag = "1")]
pub delegator_vote: ::core::option::Option<super::DelegatorVote>,
}
impl ::prost::Name for Opaque {
const NAME: &'static str = "Opaque";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.DelegatorVoteView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DelegatorVote {
#[prost(message, tag = "1")]
Visible(Visible),
#[prost(message, tag = "2")]
Opaque(Opaque),
}
}
impl ::prost::Name for DelegatorVoteView {
const NAME: &'static str = "DelegatorVoteView";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorVotePlan {
#[prost(uint64, tag = "1")]
pub proposal: u64,
#[prost(uint64, tag = "2")]
pub start_position: u64,
#[prost(message, optional, tag = "3")]
pub vote: ::core::option::Option<Vote>,
#[prost(message, optional, tag = "4")]
pub staked_note: ::core::option::Option<super::super::shielded_pool::v1::Note>,
#[prost(uint64, tag = "5")]
pub staked_note_position: u64,
#[prost(message, optional, tag = "6")]
pub unbonded_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
#[prost(bytes = "vec", tag = "7")]
pub randomizer: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "8")]
pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "9")]
pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for DelegatorVotePlan {
const NAME: &'static str = "DelegatorVotePlan";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolDeposit {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
}
impl ::prost::Name for CommunityPoolDeposit {
const NAME: &'static str = "CommunityPoolDeposit";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolSpend {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
}
impl ::prost::Name for CommunityPoolSpend {
const NAME: &'static str = "CommunityPoolSpend";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolOutput {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(message, optional, tag = "2")]
pub address: ::core::option::Option<super::super::super::keys::v1::Address>,
}
impl ::prost::Name for CommunityPoolOutput {
const NAME: &'static str = "CommunityPoolOutput";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vote {
#[prost(enumeration = "vote::Vote", tag = "1")]
pub vote: i32,
}
pub mod vote {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Vote {
Unspecified = 0,
Abstain = 1,
Yes = 2,
No = 3,
}
impl Vote {
pub fn as_str_name(&self) -> &'static str {
match self {
Vote::Unspecified => "VOTE_UNSPECIFIED",
Vote::Abstain => "VOTE_ABSTAIN",
Vote::Yes => "VOTE_YES",
Vote::No => "VOTE_NO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VOTE_UNSPECIFIED" => Some(Self::Unspecified),
"VOTE_ABSTAIN" => Some(Self::Abstain),
"VOTE_YES" => Some(Self::Yes),
"VOTE_NO" => Some(Self::No),
_ => None,
}
}
}
}
impl ::prost::Name for Vote {
const NAME: &'static str = "Vote";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalState {
#[prost(oneof = "proposal_state::State", tags = "2, 3, 4, 5")]
pub state: ::core::option::Option<proposal_state::State>,
}
pub mod proposal_state {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Voting {}
impl ::prost::Name for Voting {
const NAME: &'static str = "Voting";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalState.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Withdrawn {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
}
impl ::prost::Name for Withdrawn {
const NAME: &'static str = "Withdrawn";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalState.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Finished {
#[prost(message, optional, tag = "1")]
pub outcome: ::core::option::Option<super::ProposalOutcome>,
}
impl ::prost::Name for Finished {
const NAME: &'static str = "Finished";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalState.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Claimed {
#[prost(message, optional, tag = "1")]
pub outcome: ::core::option::Option<super::ProposalOutcome>,
}
impl ::prost::Name for Claimed {
const NAME: &'static str = "Claimed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalState.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum State {
#[prost(message, tag = "2")]
Voting(Voting),
#[prost(message, tag = "3")]
Withdrawn(Withdrawn),
#[prost(message, tag = "4")]
Finished(Finished),
#[prost(message, tag = "5")]
Claimed(Claimed),
}
}
impl ::prost::Name for ProposalState {
const NAME: &'static str = "ProposalState";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalOutcome {
#[prost(oneof = "proposal_outcome::Outcome", tags = "1, 2, 3")]
pub outcome: ::core::option::Option<proposal_outcome::Outcome>,
}
pub mod proposal_outcome {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Withdrawn {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
}
impl ::prost::Name for Withdrawn {
const NAME: &'static str = "Withdrawn";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalOutcome.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Passed {}
impl ::prost::Name for Passed {
const NAME: &'static str = "Passed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalOutcome.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failed {
#[prost(message, optional, tag = "1")]
pub withdrawn: ::core::option::Option<Withdrawn>,
}
impl ::prost::Name for Failed {
const NAME: &'static str = "Failed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalOutcome.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Slashed {
#[prost(message, optional, tag = "1")]
pub withdrawn: ::core::option::Option<Withdrawn>,
}
impl ::prost::Name for Slashed {
const NAME: &'static str = "Slashed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.ProposalOutcome.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "1")]
Passed(Passed),
#[prost(message, tag = "2")]
Failed(Failed),
#[prost(message, tag = "3")]
Slashed(Slashed),
}
}
impl ::prost::Name for ProposalOutcome {
const NAME: &'static str = "ProposalOutcome";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tally {
#[prost(uint64, tag = "1")]
pub yes: u64,
#[prost(uint64, tag = "2")]
pub no: u64,
#[prost(uint64, tag = "3")]
pub abstain: u64,
}
impl ::prost::Name for Tally {
const NAME: &'static str = "Tally";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Proposal {
#[prost(uint64, tag = "4")]
pub id: u64,
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(oneof = "proposal::Payload", tags = "5, 6, 7, 8, 9, 10, 11")]
pub payload: ::core::option::Option<proposal::Payload>,
}
pub mod proposal {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Signaling {
#[prost(string, tag = "1")]
pub commit: ::prost::alloc::string::String,
}
impl ::prost::Name for Signaling {
const NAME: &'static str = "Signaling";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Emergency {
#[prost(bool, tag = "1")]
pub halt_chain: bool,
}
impl ::prost::Name for Emergency {
const NAME: &'static str = "Emergency";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ParameterChange {
#[deprecated]
#[prost(message, optional, tag = "1")]
pub old_parameters: ::core::option::Option<super::ChangedAppParameters>,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub new_parameters: ::core::option::Option<super::ChangedAppParameters>,
#[prost(message, repeated, tag = "3")]
pub preconditions: ::prost::alloc::vec::Vec<super::EncodedParameter>,
#[prost(message, repeated, tag = "4")]
pub changes: ::prost::alloc::vec::Vec<super::EncodedParameter>,
}
impl ::prost::Name for ParameterChange {
const NAME: &'static str = "ParameterChange";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolSpend {
#[prost(message, optional, tag = "2")]
pub transaction_plan: ::core::option::Option<::pbjson_types::Any>,
}
impl ::prost::Name for CommunityPoolSpend {
const NAME: &'static str = "CommunityPoolSpend";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradePlan {
#[prost(uint64, tag = "1")]
pub height: u64,
}
impl ::prost::Name for UpgradePlan {
const NAME: &'static str = "UpgradePlan";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FreezeIbcClient {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for FreezeIbcClient {
const NAME: &'static str = "FreezeIbcClient";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnfreezeIbcClient {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for UnfreezeIbcClient {
const NAME: &'static str = "UnfreezeIbcClient";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.governance.v1.Proposal.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "5")]
Signaling(Signaling),
#[prost(message, tag = "6")]
Emergency(Emergency),
#[prost(message, tag = "7")]
ParameterChange(ParameterChange),
#[prost(message, tag = "8")]
CommunityPoolSpend(CommunityPoolSpend),
#[prost(message, tag = "9")]
UpgradePlan(UpgradePlan),
#[prost(message, tag = "10")]
FreezeIbcClient(FreezeIbcClient),
#[prost(message, tag = "11")]
UnfreezeIbcClient(UnfreezeIbcClient),
}
}
impl ::prost::Name for Proposal {
const NAME: &'static str = "Proposal";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalInfoRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
}
impl ::prost::Name for ProposalInfoRequest {
const NAME: &'static str = "ProposalInfoRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalInfoResponse {
#[prost(uint64, tag = "1")]
pub start_block_height: u64,
#[prost(uint64, tag = "2")]
pub start_position: u64,
}
impl ::prost::Name for ProposalInfoResponse {
const NAME: &'static str = "ProposalInfoResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalDataRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
}
impl ::prost::Name for ProposalDataRequest {
const NAME: &'static str = "ProposalDataRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalDataResponse {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
#[prost(uint64, tag = "2")]
pub start_block_height: u64,
#[prost(uint64, tag = "3")]
pub end_block_height: u64,
#[prost(uint64, tag = "4")]
pub start_position: u64,
#[prost(message, optional, tag = "5")]
pub state: ::core::option::Option<ProposalState>,
#[prost(message, optional, tag = "6")]
pub proposal_deposit_amount: ::core::option::Option<
super::super::super::num::v1::Amount,
>,
}
impl ::prost::Name for ProposalDataResponse {
const NAME: &'static str = "ProposalDataResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalRateDataRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
}
impl ::prost::Name for ProposalRateDataRequest {
const NAME: &'static str = "ProposalRateDataRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalRateDataResponse {
#[prost(message, optional, tag = "1")]
pub rate_data: ::core::option::Option<super::super::stake::v1::RateData>,
}
impl ::prost::Name for ProposalRateDataResponse {
const NAME: &'static str = "ProposalRateDataResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalListRequest {
#[prost(bool, tag = "2")]
pub inactive: bool,
}
impl ::prost::Name for ProposalListRequest {
const NAME: &'static str = "ProposalListRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalListResponse {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
#[prost(uint64, tag = "2")]
pub start_block_height: u64,
#[prost(uint64, tag = "3")]
pub end_block_height: u64,
#[prost(uint64, tag = "4")]
pub start_position: u64,
#[prost(message, optional, tag = "5")]
pub state: ::core::option::Option<ProposalState>,
}
impl ::prost::Name for ProposalListResponse {
const NAME: &'static str = "ProposalListResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVotesRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
}
impl ::prost::Name for ValidatorVotesRequest {
const NAME: &'static str = "ValidatorVotesRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVotesResponse {
#[prost(message, optional, tag = "1")]
pub vote: ::core::option::Option<Vote>,
#[prost(message, optional, tag = "2")]
pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
}
impl ::prost::Name for ValidatorVotesResponse {
const NAME: &'static str = "ValidatorVotesResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GovernanceParameters {
#[prost(uint64, tag = "1")]
pub proposal_voting_blocks: u64,
#[prost(message, optional, tag = "2")]
pub proposal_deposit_amount: ::core::option::Option<
super::super::super::num::v1::Amount,
>,
#[prost(string, tag = "3")]
pub proposal_valid_quorum: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub proposal_pass_threshold: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub proposal_slash_threshold: ::prost::alloc::string::String,
}
impl ::prost::Name for GovernanceParameters {
const NAME: &'static str = "GovernanceParameters";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisContent {
#[prost(message, optional, tag = "1")]
pub governance_params: ::core::option::Option<GovernanceParameters>,
}
impl ::prost::Name for GenesisContent {
const NAME: &'static str = "GenesisContent";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncodedParameter {
#[prost(string, tag = "1")]
pub component: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub value: ::prost::alloc::string::String,
}
impl ::prost::Name for EncodedParameter {
const NAME: &'static str = "EncodedParameter";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangedAppParameters {
#[prost(message, optional, tag = "1")]
pub sct_params: ::core::option::Option<super::super::sct::v1::SctParameters>,
#[prost(message, optional, tag = "2")]
pub community_pool_params: ::core::option::Option<
super::super::community_pool::v1::CommunityPoolParameters,
>,
#[prost(message, optional, tag = "3")]
pub governance_params: ::core::option::Option<GovernanceParameters>,
#[prost(message, optional, tag = "4")]
pub ibc_params: ::core::option::Option<super::super::ibc::v1::IbcParameters>,
#[prost(message, optional, tag = "5")]
pub stake_params: ::core::option::Option<super::super::stake::v1::StakeParameters>,
#[prost(message, optional, tag = "6")]
pub fee_params: ::core::option::Option<super::super::fee::v1::FeeParameters>,
#[prost(message, optional, tag = "7")]
pub distributions_params: ::core::option::Option<
super::super::distributions::v1::DistributionsParameters,
>,
#[prost(message, optional, tag = "8")]
pub funding_params: ::core::option::Option<
super::super::funding::v1::FundingParameters,
>,
#[prost(message, optional, tag = "9")]
pub shielded_pool_params: ::core::option::Option<
super::super::shielded_pool::v1::ShieldedPoolParameters,
>,
#[prost(message, optional, tag = "10")]
pub dex_params: ::core::option::Option<super::super::dex::v1::DexParameters>,
#[prost(message, optional, tag = "11")]
pub auction_params: ::core::option::Option<
super::super::auction::v1::AuctionParameters,
>,
}
impl ::prost::Name for ChangedAppParameters {
const NAME: &'static str = "ChangedAppParameters";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangedAppParametersSet {
#[prost(message, optional, tag = "1")]
pub old: ::core::option::Option<ChangedAppParameters>,
#[prost(message, optional, tag = "2")]
pub new: ::core::option::Option<ChangedAppParameters>,
}
impl ::prost::Name for ChangedAppParametersSet {
const NAME: &'static str = "ChangedAppParametersSet";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VotingPowerAtProposalStartRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
#[prost(message, optional, tag = "3")]
pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
}
impl ::prost::Name for VotingPowerAtProposalStartRequest {
const NAME: &'static str = "VotingPowerAtProposalStartRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VotingPowerAtProposalStartResponse {
#[prost(uint64, tag = "1")]
pub voting_power: u64,
}
impl ::prost::Name for VotingPowerAtProposalStartResponse {
const NAME: &'static str = "VotingPowerAtProposalStartResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllTalliedDelegatorVotesForProposalRequest {
#[prost(uint64, tag = "2")]
pub proposal_id: u64,
}
impl ::prost::Name for AllTalliedDelegatorVotesForProposalRequest {
const NAME: &'static str = "AllTalliedDelegatorVotesForProposalRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllTalliedDelegatorVotesForProposalResponse {
#[prost(message, optional, tag = "1")]
pub tally: ::core::option::Option<Tally>,
#[prost(message, optional, tag = "2")]
pub identity_key: ::core::option::Option<super::super::super::keys::v1::IdentityKey>,
}
impl ::prost::Name for AllTalliedDelegatorVotesForProposalResponse {
const NAME: &'static str = "AllTalliedDelegatorVotesForProposalResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NextProposalIdRequest {}
impl ::prost::Name for NextProposalIdRequest {
const NAME: &'static str = "NextProposalIdRequest";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NextProposalIdResponse {
#[prost(uint64, tag = "1")]
pub next_proposal_id: u64,
}
impl ::prost::Name for NextProposalIdResponse {
const NAME: &'static str = "NextProposalIdResponse";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ratio {
#[prost(uint64, tag = "1")]
pub numerator: u64,
#[prost(uint64, tag = "2")]
pub denominator: u64,
}
impl ::prost::Name for Ratio {
const NAME: &'static str = "Ratio";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDelegatorVote {
#[prost(message, optional, tag = "1")]
pub vote: ::core::option::Option<DelegatorVote>,
#[prost(message, optional, tag = "2")]
pub validator_identity_key: ::core::option::Option<
super::super::super::keys::v1::IdentityKey,
>,
}
impl ::prost::Name for EventDelegatorVote {
const NAME: &'static str = "EventDelegatorVote";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalDepositClaim {
#[prost(message, optional, tag = "1")]
pub deposit_claim: ::core::option::Option<ProposalDepositClaim>,
}
impl ::prost::Name for EventProposalDepositClaim {
const NAME: &'static str = "EventProposalDepositClaim";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventValidatorVote {
#[prost(message, optional, tag = "1")]
pub vote: ::core::option::Option<ValidatorVote>,
#[prost(uint64, tag = "2")]
pub voting_power: u64,
}
impl ::prost::Name for EventValidatorVote {
const NAME: &'static str = "EventValidatorVote";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalWithdraw {
#[prost(message, optional, tag = "1")]
pub withdraw: ::core::option::Option<ProposalWithdraw>,
}
impl ::prost::Name for EventProposalWithdraw {
const NAME: &'static str = "EventProposalWithdraw";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalSubmit {
#[prost(message, optional, tag = "1")]
pub submit: ::core::option::Option<ProposalSubmit>,
#[prost(uint64, tag = "2")]
pub start_height: u64,
#[prost(uint64, tag = "3")]
pub end_height: u64,
}
impl ::prost::Name for EventProposalSubmit {
const NAME: &'static str = "EventProposalSubmit";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalPassed {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
}
impl ::prost::Name for EventProposalPassed {
const NAME: &'static str = "EventProposalPassed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalFailed {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
}
impl ::prost::Name for EventProposalFailed {
const NAME: &'static str = "EventProposalFailed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventProposalSlashed {
#[prost(message, optional, tag = "1")]
pub proposal: ::core::option::Option<Proposal>,
}
impl ::prost::Name for EventProposalSlashed {
const NAME: &'static str = "EventProposalSlashed";
const PACKAGE: &'static str = "penumbra.core.component.governance.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("penumbra.core.component.governance.v1.{}", Self::NAME)
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProposalKind {
Unspecified = 0,
Signaling = 1,
Emergency = 2,
ParameterChange = 3,
CommunityPoolSpend = 4,
UpgradePlan = 5,
FreezeIbcClient = 6,
UnfreezeIbcClient = 7,
}
impl ProposalKind {
pub fn as_str_name(&self) -> &'static str {
match self {
ProposalKind::Unspecified => "PROPOSAL_KIND_UNSPECIFIED",
ProposalKind::Signaling => "PROPOSAL_KIND_SIGNALING",
ProposalKind::Emergency => "PROPOSAL_KIND_EMERGENCY",
ProposalKind::ParameterChange => "PROPOSAL_KIND_PARAMETER_CHANGE",
ProposalKind::CommunityPoolSpend => "PROPOSAL_KIND_COMMUNITY_POOL_SPEND",
ProposalKind::UpgradePlan => "PROPOSAL_KIND_UPGRADE_PLAN",
ProposalKind::FreezeIbcClient => "PROPOSAL_KIND_FREEZE_IBC_CLIENT",
ProposalKind::UnfreezeIbcClient => "PROPOSAL_KIND_UNFREEZE_IBC_CLIENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROPOSAL_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"PROPOSAL_KIND_SIGNALING" => Some(Self::Signaling),
"PROPOSAL_KIND_EMERGENCY" => Some(Self::Emergency),
"PROPOSAL_KIND_PARAMETER_CHANGE" => Some(Self::ParameterChange),
"PROPOSAL_KIND_COMMUNITY_POOL_SPEND" => Some(Self::CommunityPoolSpend),
"PROPOSAL_KIND_UPGRADE_PLAN" => Some(Self::UpgradePlan),
"PROPOSAL_KIND_FREEZE_IBC_CLIENT" => Some(Self::FreezeIbcClient),
"PROPOSAL_KIND_UNFREEZE_IBC_CLIENT" => Some(Self::UnfreezeIbcClient),
_ => None,
}
}
}
#[cfg(feature = "rpc")]
pub mod query_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
QueryServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn proposal_info(
&mut self,
request: impl tonic::IntoRequest<super::ProposalInfoRequest>,
) -> std::result::Result<
tonic::Response<super::ProposalInfoResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/ProposalInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"ProposalInfo",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn proposal_list(
&mut self,
request: impl tonic::IntoRequest<super::ProposalListRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ProposalListResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/ProposalList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"ProposalList",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn proposal_data(
&mut self,
request: impl tonic::IntoRequest<super::ProposalDataRequest>,
) -> std::result::Result<
tonic::Response<super::ProposalDataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/ProposalData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"ProposalData",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn next_proposal_id(
&mut self,
request: impl tonic::IntoRequest<super::NextProposalIdRequest>,
) -> std::result::Result<
tonic::Response<super::NextProposalIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/NextProposalId",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"NextProposalId",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn validator_votes(
&mut self,
request: impl tonic::IntoRequest<super::ValidatorVotesRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ValidatorVotesResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/ValidatorVotes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"ValidatorVotes",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn voting_power_at_proposal_start(
&mut self,
request: impl tonic::IntoRequest<super::VotingPowerAtProposalStartRequest>,
) -> std::result::Result<
tonic::Response<super::VotingPowerAtProposalStartResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"VotingPowerAtProposalStart",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn all_tallied_delegator_votes_for_proposal(
&mut self,
request: impl tonic::IntoRequest<
super::AllTalliedDelegatorVotesForProposalRequest,
>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<
super::AllTalliedDelegatorVotesForProposalResponse,
>,
>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/AllTalliedDelegatorVotesForProposal",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"AllTalliedDelegatorVotesForProposal",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn proposal_rate_data(
&mut self,
request: impl tonic::IntoRequest<super::ProposalRateDataRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ProposalRateDataResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.governance.v1.QueryService/ProposalRateData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.governance.v1.QueryService",
"ProposalRateData",
),
);
self.inner.server_streaming(req, path, codec).await
}
}
}
#[cfg(feature = "rpc")]
pub mod query_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait QueryService: Send + Sync + 'static {
async fn proposal_info(
&self,
request: tonic::Request<super::ProposalInfoRequest>,
) -> std::result::Result<
tonic::Response<super::ProposalInfoResponse>,
tonic::Status,
>;
type ProposalListStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::ProposalListResponse, tonic::Status>,
>
+ Send
+ 'static;
async fn proposal_list(
&self,
request: tonic::Request<super::ProposalListRequest>,
) -> std::result::Result<
tonic::Response<Self::ProposalListStream>,
tonic::Status,
>;
async fn proposal_data(
&self,
request: tonic::Request<super::ProposalDataRequest>,
) -> std::result::Result<
tonic::Response<super::ProposalDataResponse>,
tonic::Status,
>;
async fn next_proposal_id(
&self,
request: tonic::Request<super::NextProposalIdRequest>,
) -> std::result::Result<
tonic::Response<super::NextProposalIdResponse>,
tonic::Status,
>;
type ValidatorVotesStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::ValidatorVotesResponse, tonic::Status>,
>
+ Send
+ 'static;
async fn validator_votes(
&self,
request: tonic::Request<super::ValidatorVotesRequest>,
) -> std::result::Result<
tonic::Response<Self::ValidatorVotesStream>,
tonic::Status,
>;
async fn voting_power_at_proposal_start(
&self,
request: tonic::Request<super::VotingPowerAtProposalStartRequest>,
) -> std::result::Result<
tonic::Response<super::VotingPowerAtProposalStartResponse>,
tonic::Status,
>;
type AllTalliedDelegatorVotesForProposalStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::AllTalliedDelegatorVotesForProposalResponse,
tonic::Status,
>,
>
+ Send
+ 'static;
async fn all_tallied_delegator_votes_for_proposal(
&self,
request: tonic::Request<super::AllTalliedDelegatorVotesForProposalRequest>,
) -> std::result::Result<
tonic::Response<Self::AllTalliedDelegatorVotesForProposalStream>,
tonic::Status,
>;
type ProposalRateDataStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::ProposalRateDataResponse,
tonic::Status,
>,
>
+ Send
+ 'static;
async fn proposal_rate_data(
&self,
request: tonic::Request<super::ProposalRateDataRequest>,
) -> std::result::Result<
tonic::Response<Self::ProposalRateDataStream>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QueryServiceServer<T: QueryService> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: QueryService> QueryServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServiceServer<T>
where
T: QueryService,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/penumbra.core.component.governance.v1.QueryService/ProposalInfo" => {
#[allow(non_camel_case_types)]
struct ProposalInfoSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::UnaryService<super::ProposalInfoRequest>
for ProposalInfoSvc<T> {
type Response = super::ProposalInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProposalInfoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::proposal_info(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ProposalInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/ProposalList" => {
#[allow(non_camel_case_types)]
struct ProposalListSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::ServerStreamingService<super::ProposalListRequest>
for ProposalListSvc<T> {
type Response = super::ProposalListResponse;
type ResponseStream = T::ProposalListStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProposalListRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::proposal_list(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ProposalListSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/ProposalData" => {
#[allow(non_camel_case_types)]
struct ProposalDataSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::UnaryService<super::ProposalDataRequest>
for ProposalDataSvc<T> {
type Response = super::ProposalDataResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProposalDataRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::proposal_data(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ProposalDataSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/NextProposalId" => {
#[allow(non_camel_case_types)]
struct NextProposalIdSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::UnaryService<super::NextProposalIdRequest>
for NextProposalIdSvc<T> {
type Response = super::NextProposalIdResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::NextProposalIdRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::next_proposal_id(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = NextProposalIdSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/ValidatorVotes" => {
#[allow(non_camel_case_types)]
struct ValidatorVotesSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::ServerStreamingService<super::ValidatorVotesRequest>
for ValidatorVotesSvc<T> {
type Response = super::ValidatorVotesResponse;
type ResponseStream = T::ValidatorVotesStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ValidatorVotesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::validator_votes(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ValidatorVotesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart" => {
#[allow(non_camel_case_types)]
struct VotingPowerAtProposalStartSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::UnaryService<
super::VotingPowerAtProposalStartRequest,
> for VotingPowerAtProposalStartSvc<T> {
type Response = super::VotingPowerAtProposalStartResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::VotingPowerAtProposalStartRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::voting_power_at_proposal_start(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = VotingPowerAtProposalStartSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/AllTalliedDelegatorVotesForProposal" => {
#[allow(non_camel_case_types)]
struct AllTalliedDelegatorVotesForProposalSvc<T: QueryService>(
pub Arc<T>,
);
impl<
T: QueryService,
> tonic::server::ServerStreamingService<
super::AllTalliedDelegatorVotesForProposalRequest,
> for AllTalliedDelegatorVotesForProposalSvc<T> {
type Response = super::AllTalliedDelegatorVotesForProposalResponse;
type ResponseStream = T::AllTalliedDelegatorVotesForProposalStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::AllTalliedDelegatorVotesForProposalRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::all_tallied_delegator_votes_for_proposal(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AllTalliedDelegatorVotesForProposalSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.governance.v1.QueryService/ProposalRateData" => {
#[allow(non_camel_case_types)]
struct ProposalRateDataSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::ServerStreamingService<
super::ProposalRateDataRequest,
> for ProposalRateDataSvc<T> {
type Response = super::ProposalRateDataResponse;
type ResponseStream = T::ProposalRateDataStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProposalRateDataRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::proposal_rate_data(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ProposalRateDataSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: QueryService> Clone for QueryServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: QueryService> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: QueryService> tonic::server::NamedService for QueryServiceServer<T> {
const NAME: &'static str = "penumbra.core.component.governance.v1.QueryService";
}
}