Skip to content

Commit

Permalink
Only abort deploys early in prepare_for_speculate
Browse files Browse the repository at this point in the history
See: https://github.com/AleoHQ/snarkVM/issues/2451

A malicious validator can generate a transaction with mostly the same
transitions, which will be aborted causing the victim's transaction
to be filtered out and dropped.
  • Loading branch information
vicsn committed May 13, 2024
1 parent 3ebe60c commit ca2b6ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synthesizer/src/vm/finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,9 @@ impl<N: Network, C: ConsensusStorage<N>> VM<N, C> {
// Initialize the list of deployment payers.
let mut deployment_payers: IndexSet<Address<N>> = Default::default();

// Abort the transactions that are have duplicates or are invalid. This will prevent the VM from performing
// verification on transactions that would have been aborted in `VM::atomic_speculate`.
for transaction in transactions.iter() {
// Abort the deployments that are have duplicates or are invalid. This will prevent the VM from performing
// verification on deployments that would have been aborted in `VM::atomic_speculate`.
for transaction in transactions.iter().filter(|tx| tx.is_deploy()) {
// Determine if the transaction should be aborted.
match self.should_abort_transaction(
transaction,
Expand Down

0 comments on commit ca2b6ca

Please sign in to comment.