Trait penumbra_stake::component::stake::StateWriteExt
source · pub trait StateWriteExt: StateWrite {
// Provided methods
fn put_stake_params(&mut self, params: StakeParameters) { ... }
fn put_delegation_changes(&mut self, delegation_changes: DelegationChanges) { ... }
fn push_delegation(&mut self, delegation: Delegate) { ... }
fn push_undelegation(&mut self, undelegation: Undelegate) { ... }
fn queue_staking_rewards(
&mut self,
staking_reward_queue: Vec<(IdentityKey, FundingStreams, Amount)>
) { ... }
fn register_consensus_key(
&mut self,
identity_key: &IdentityKey,
consensus_key: &PublicKey
) { ... }
}
Available on crate feature
component
only.Expand description
Extension trait providing write access to staking data.
Provided Methods§
sourcefn put_stake_params(&mut self, params: StakeParameters)
fn put_stake_params(&mut self, params: StakeParameters)
Writes the provided stake parameters to the JMT.
sourcefn put_delegation_changes(&mut self, delegation_changes: DelegationChanges)
fn put_delegation_changes(&mut self, delegation_changes: DelegationChanges)
Delegation changes accumulated over the course of this block, to be persisted at the end of the block for processing at the end of the next epoch.
sourcefn push_delegation(&mut self, delegation: Delegate)
fn push_delegation(&mut self, delegation: Delegate)
Push an entry in the delegation queue for the current block (object-storage).
sourcefn push_undelegation(&mut self, undelegation: Undelegate)
fn push_undelegation(&mut self, undelegation: Undelegate)
Push an entry in the undelegation queue for the current block (object-storage).
fn queue_staking_rewards( &mut self, staking_reward_queue: Vec<(IdentityKey, FundingStreams, Amount)> )
sourcefn register_consensus_key(
&mut self,
identity_key: &IdentityKey,
consensus_key: &PublicKey
)
fn register_consensus_key( &mut self, identity_key: &IdentityKey, consensus_key: &PublicKey )
Register a consensus key in the state, via two verifiable indices:
- CometBFT address ->
PublicKey
PublicKey
->IdentityKey
§Important note
We do not delete obsolete entries on purpose. This is so that the staking component can do evidence attribution even if a byzantine validator has changed the consensus key that was used at the time of the misbehavior.
Object Safety§
This trait is not object safe.