Trait penumbra_governance::component::StateWriteExt

source ·
pub trait StateWriteExt: StateWrite + ConnectionStateWriteExt {
Show 20 methods // Provided methods fn put_governance_params(&mut self, params: GovernanceParameters) { ... } fn init_proposal_counter(&mut self) { ... } fn new_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal: &'life1 Proposal ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn mark_nullifier_voted<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, nullifier: &'life1 Nullifier ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn mark_proposal_started(&mut self) { ... } fn put_deposit_amount(&mut self, proposal_id: u64, amount: Amount) { ... } fn put_proposal_state(&mut self, proposal_id: u64, state: ProposalState) { ... } fn cast_validator_vote( &mut self, proposal_id: u64, identity_key: IdentityKey, vote: Vote, reason: ValidatorVoteReason ) { ... } fn put_proposal_voting_start(&mut self, proposal_id: u64, end_block: u64) { ... } fn put_proposal_voting_end(&mut self, proposal_id: u64, end_block: u64) { ... } fn put_proposal_voting_start_position( &mut self, proposal_id: u64, start_position: Position ) { ... } fn mark_nullifier_voted_on_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, nullifier: &'life1 Nullifier ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn cast_delegator_vote<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, identity_key: IdentityKey, vote: Vote, nullifier: &'life1 Nullifier, unbonded_amount: Amount ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn tally_delegator_votes<'life0, 'async_trait>( &'life0 mut self, just_for_proposal: Option<u64> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn enact_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, payload: &'life1 ProposalPayload ) -> Pin<Box<dyn Future<Output = Result<Result<()>>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn deliver_community_pool_transaction<'life0, 'async_trait>( &'life0 mut self, proposal: u64 ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn schedule_app_param_update<'life0, 'async_trait>( &'life0 mut self, old_chain_params: ChangedAppParameters, new_chain_params: ChangedAppParameters ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn cancel_next_block_pending_app_parameters<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn signal_upgrade<'life0, 'async_trait>( &'life0 mut self, height: u64 ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn signal_halt<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... }
}
Available on crate feature component only.

Provided Methods§

source

fn put_governance_params(&mut self, params: GovernanceParameters)

Writes the provided governance parameters to the JMT.

source

fn init_proposal_counter(&mut self)

Initialize the proposal counter so that it can always be read.

source

fn new_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal: &'life1 Proposal ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store a new proposal with a new proposal id.

source

fn mark_nullifier_voted<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, nullifier: &'life1 Nullifier ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a nullifier as spent for a given proposal.

source

fn mark_proposal_started(&mut self)

Record in the object store that some proposal has started.

source

fn put_deposit_amount(&mut self, proposal_id: u64, amount: Amount)

Store the proposal deposit amount.

source

fn put_proposal_state(&mut self, proposal_id: u64, state: ProposalState)

Set the state of a proposal.

source

fn cast_validator_vote( &mut self, proposal_id: u64, identity_key: IdentityKey, vote: Vote, reason: ValidatorVoteReason )

Record a validator vote for a proposal.

source

fn put_proposal_voting_start(&mut self, proposal_id: u64, end_block: u64)

Set the proposal voting start block height for a proposal.

source

fn put_proposal_voting_end(&mut self, proposal_id: u64, end_block: u64)

Set the proposal voting end block height for a proposal.

source

fn put_proposal_voting_start_position( &mut self, proposal_id: u64, start_position: Position )

Set the proposal voting start position for a proposal.

source

fn mark_nullifier_voted_on_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, nullifier: &'life1 Nullifier ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a nullifier as having voted on a proposal.

source

fn cast_delegator_vote<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, identity_key: IdentityKey, vote: Vote, nullifier: &'life1 Nullifier, unbonded_amount: Amount ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record a delegator vote on a proposal.

source

fn tally_delegator_votes<'life0, 'async_trait>( &'life0 mut self, just_for_proposal: Option<u64> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Tally delegator votes by sweeping them into the aggregate for each validator, for each proposal.

source

fn enact_proposal<'life0, 'life1, 'async_trait>( &'life0 mut self, proposal_id: u64, payload: &'life1 ProposalPayload ) -> Pin<Box<dyn Future<Output = Result<Result<()>>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn deliver_community_pool_transaction<'life0, 'async_trait>( &'life0 mut self, proposal: u64 ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn schedule_app_param_update<'life0, 'async_trait>( &'life0 mut self, old_chain_params: ChangedAppParameters, new_chain_params: ChangedAppParameters ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn cancel_next_block_pending_app_parameters<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Cancel the next block’s pending app parameters.

source

fn signal_upgrade<'life0, 'async_trait>( &'life0 mut self, height: u64 ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Records the next upgrade height. After commititng the height, the chain should halt and wait for an upgrade. It re-uses the same mechanism as emergency halting that prevents the chain from restarting without incrementing the application TOTAL_HALT_COUNT.

source

fn signal_halt<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Signals to the consensus worker to halt after the next commit.

Object Safety§

This trait is not object safe.

Implementors§