Skip to content

Commit

Permalink
improve ValidatorState documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed May 21, 2024
1 parent c7d79f4 commit c235d66
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions crates/proof_of_stake/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ impl Position {
}
}

/// Validator's state.
/// Validator's state. May correspond to the validator set within which the
/// validator belongs.
#[derive(
Debug,
Clone,
Expand All @@ -547,19 +548,22 @@ impl Position {
Eq,
)]
pub enum ValidatorState {
/// A validator who may participate in the consensus
/// A validator who may participate in the consensus and is one of the top
/// `max_validator_slots` validators with stake above
/// `validator_stake_threshold`
Consensus,
/// A validator who does not have enough stake to be considered in the
/// `Consensus` validator set but still may have active bonds and unbonds
/// A validator who has stake greater than the `validator_stake_threshold`
/// but is not one of the top `max_validator_slots` validators who have
/// such stake
BelowCapacity,
/// A validator who has stake less than the `validator_stake_threshold`
/// parameter
BelowThreshold,
/// A validator who is deactivated via a tx when a validator no longer
/// wants to be one (not implemented yet)
/// wants to be considered for consensus
Inactive,
/// A `Jailed` validator has been prohibited from participating in
/// consensus due to a misbehavior
/// A validator who is prohibited from participating in
/// consensus due to a misbehavior or downtime
Jailed,
}

Expand Down

0 comments on commit c235d66

Please sign in to comment.