pub struct StakingConfig {
pub max_validators: usize,
pub min_self_stake: u64,
pub slash_rate_double_sign: u32,
pub slash_rate_downtime: u32,
pub jail_duration: u64,
pub initial_score: u32,
pub max_score: u32,
pub block_reward: u64,
pub unbonding_period: u64,
}Expand description
Staking system configuration.
Fields§
§max_validators: usizeMaximum number of active (non-jailed) validators in the formal set.
min_self_stake: u64Minimum self-stake required to register as a validator.
slash_rate_double_sign: u32Slash rate for double-signing (basis points: 500 = 5%).
slash_rate_downtime: u32Slash rate for downtime (basis points: 100 = 1%).
jail_duration: u64Number of blocks a jailed validator must wait before unjailing.
initial_score: u32Initial reputation score for new validators.
max_score: u32Maximum reputation score.
block_reward: u64Block reward (added to proposer’s self-stake).
unbonding_period: u64Unbonding period in blocks. 0 = instant (legacy behavior).
Implementations§
Trait Implementations§
Source§impl Clone for StakingConfig
impl Clone for StakingConfig
Source§fn clone(&self) -> StakingConfig
fn clone(&self) -> StakingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StakingConfig
impl Debug for StakingConfig
Source§impl Default for StakingConfig
impl Default for StakingConfig
Source§impl<'de> Deserialize<'de> for StakingConfig
impl<'de> Deserialize<'de> for StakingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StakingConfig
impl RefUnwindSafe for StakingConfig
impl Send for StakingConfig
impl Sync for StakingConfig
impl Unpin for StakingConfig
impl UnsafeUnpin for StakingConfig
impl UnwindSafe for StakingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more