Skip to content

Commit

Permalink
staking: specify MUST on evidence processing
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Feb 20, 2024
1 parent 831d52d commit e2ffe06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/component/stake/src/component/epoch_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ pub trait EpochHandler: StateWriteExt + ConsensusIndexRead {
// record them for the funding component to process.
self.queue_staking_rewards(funding_queue);

// Now that all the voting power has been calculated, we can select the
// top `limit` validators to be active for the next epoch.
// Now that the consensus set voting power has been calculated, we can select the
// top N validators to be active for the next epoch.
self.set_active_and_inactive_validators().await?;
Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,10 @@ pub trait ValidatorManager: StateWrite {

/// Process evidence of byzantine behavior from CometBFT.
///
/// Evidence *MUST* be processed before `end_block` is called, because
/// the evidence may trigger a validator state transition requiring
/// an early epoch change.
///
/// # Errors
/// Returns an error if the validator is not found in the JMT.
async fn process_evidence(&mut self, evidence: &Misbehavior) -> Result<()> {
Expand Down

0 comments on commit e2ffe06

Please sign in to comment.