Skip to content

Commit

Permalink
Fix one more possible crash in execution_driver (#19870)
Browse files Browse the repository at this point in the history
Don't even try to execute certs from prior epochs
  • Loading branch information
mystenmark authored Oct 23, 2024
1 parent 9bafc95 commit ac10df6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/sui-core/src/execution_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ pub async fn execution_process(
let digest = *certificate.digest();
trace!(?digest, "Pending certificate execution activated.");

if epoch_store.epoch() != certificate.epoch() {
info!(
?digest,
cur_epoch = epoch_store.epoch(),
cert_epoch = certificate.epoch(),
"Ignoring certificate from previous epoch."
);
continue;
}

let limit = limit.clone();
// hold semaphore permit until task completes. unwrap ok because we never close
// the semaphore in this context.
Expand Down

0 comments on commit ac10df6

Please sign in to comment.