Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jail validators for inactivity #2174

Merged
merged 14 commits into from
Nov 21, 2023
4 changes: 4 additions & 0 deletions apps/src/lib/config/genesis/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ impl Finalized {
light_client_attack_min_slash_rate,
cubic_slashing_window_length,
validator_stake_threshold,
liveness_window_check,
liveness_threshold,
} = self.parameters.pos_params.clone();

namada::proof_of_stake::parameters::PosParams {
Expand All @@ -350,6 +352,8 @@ impl Finalized {
light_client_attack_min_slash_rate,
cubic_slashing_window_length,
validator_stake_threshold,
liveness_window_check,
liveness_threshold,
},
max_proposal_period: self.parameters.gov_params.max_proposal_period,
}
Expand Down
6 changes: 6 additions & 0 deletions apps/src/lib/config/genesis/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ pub struct PosParams {
/// The minimum amount of bonded tokens that a validator needs to be in
/// either the `consensus` or `below_capacity` validator sets
pub validator_stake_threshold: token::Amount,
/// The length, in blocks, of the sliding window for consensus validators
/// inactivity verification
pub liveness_window_check: u64,
/// The minimum required activity of consensus validators, in percentage,
/// over the `liveness_window_check`
pub liveness_threshold: Dec,
}

#[derive(
Expand Down
Loading
Loading