Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/blockifier/src/concurrency/worker_logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ impl<S: StateReader> WorkerExecutor<S> {
let reads = &execution_output.reads;
let reads_valid = tx_versioned_state.validate_reads(reads)?;

if !reads_valid {
let tx = self.tx_at(tx_index);
let tx_hash = Transaction::tx_hash(tx.as_ref());
log::debug!(
"Validation failed for tx {} ({}): stale reads detected, discarding speculative \
state_diff: {:?}",
tx_index,
tx_hash,
execution_output.state_diff
);
}

let aborted = !reads_valid && self.scheduler.try_validation_abort(tx_index, commit_phase);
if aborted {
self.metrics.count_abort();
Expand Down
Loading