From 626d425bcb697754bf18536245d7de8773ffe0ca Mon Sep 17 00:00:00 2001 From: Jakub Zajkowski Date: Tue, 14 Apr 2026 21:06:27 +0200 Subject: [PATCH] Fixing various places in which 'transactions' were still mislabeled 'deploys' --- .../test_support/src/wasm_test_builder.rs | 6 +- .../system_contracts/auction/distribute.rs | 4 +- node/src/components/block_synchronizer.rs | 27 +-- .../block_synchronizer/block_acquisition.rs | 174 +++++++++--------- .../block_acquisition_action.rs | 2 +- .../block_synchronizer/block_builder.rs | 26 +-- .../components/block_synchronizer/error.rs | 4 +- .../components/block_synchronizer/event.rs | 4 +- .../execution_results_acquisition.rs | 10 +- .../execution_results_acquisition/tests.rs | 4 +- .../components/block_synchronizer/tests.rs | 38 ++-- ...uisition.rs => transaction_acquisition.rs} | 0 .../tests.rs | 0 13 files changed, 154 insertions(+), 145 deletions(-) rename node/src/components/block_synchronizer/{deploy_acquisition.rs => transaction_acquisition.rs} (100%) rename node/src/components/block_synchronizer/{deploy_acquisition => transaction_acquisition}/tests.rs (100%) diff --git a/execution_engine_testing/test_support/src/wasm_test_builder.rs b/execution_engine_testing/test_support/src/wasm_test_builder.rs index 7d2483340e..70b8db9115 100644 --- a/execution_engine_testing/test_support/src/wasm_test_builder.rs +++ b/execution_engine_testing/test_support/src/wasm_test_builder.rs @@ -954,7 +954,9 @@ where self } - /// Executes a request to call the system auction contract. + /// This ONLY executes the run_auction logic of the auction. If you are testing + /// specifically that function, this is sufficient. However, to match the standard + /// end of era auction behavior the comprehensive `step` function should be used instead. pub fn run_auction( &mut self, era_end_timestamp_millis: u64, @@ -974,7 +976,7 @@ where self.exec(exec_request).expect_success().commit() } - /// Increments engine state. + /// Increments engine state at end of era (rewards, auction, unbond, etc.). pub fn step(&mut self, step_request: StepRequest) -> StepResult { let step_result = self.data_access_layer.step(step_request); diff --git a/execution_engine_testing/tests/src/test/system_contracts/auction/distribute.rs b/execution_engine_testing/tests/src/test/system_contracts/auction/distribute.rs index 310cd50653..bc9c8db9e4 100644 --- a/execution_engine_testing/tests/src/test/system_contracts/auction/distribute.rs +++ b/execution_engine_testing/tests/src/test/system_contracts/auction/distribute.rs @@ -3784,9 +3784,7 @@ fn should_not_restake_after_full_unbond() { let withdraws = builder.get_unbonds(); let unbond_kind = UnbondKind::DelegatedPublicKey(DELEGATOR_1.clone()); - let unbond = withdraws - .get(&unbond_kind) - .expect("should have validator entry"); + let unbond = withdraws.get(&unbond_kind).expect("should have entry"); let delegator_unbond_amount = unbond[0].eras().first().expect("should be era").amount(); assert_eq!( diff --git a/node/src/components/block_synchronizer.rs b/node/src/components/block_synchronizer.rs index cbf7a1d76b..c9f7fa85a7 100644 --- a/node/src/components/block_synchronizer.rs +++ b/node/src/components/block_synchronizer.rs @@ -3,7 +3,6 @@ mod block_acquisition_action; mod block_builder; mod block_synchronizer_progress; mod config; -mod deploy_acquisition; mod error; mod event; mod execution_results_acquisition; @@ -12,6 +11,7 @@ mod metrics; mod need_next; mod peer_list; mod signature_acquisition; +mod transaction_acquisition; mod trie_accumulator; #[cfg(test)] @@ -588,7 +588,7 @@ impl BlockSynchronizer { node_id, Box::new(EmptyValidationMetadata), ) - .event(move |result| Event::DeployFetched { + .event(move |result| Event::TransactionFetched { block_hash, result: Either::Left(result), }) @@ -603,7 +603,7 @@ impl BlockSynchronizer { node_id, Box::new(EmptyValidationMetadata), ) - .event(move |result| Event::DeployFetched { + .event(move |result| Event::TransactionFetched { block_hash, result: Either::Right(result), }) @@ -1186,8 +1186,8 @@ impl BlockSynchronizer { }; if let Some(builder) = self.get_builder(block_hash, false) { - if let Err(error) = builder.register_deploy(txn.fetch_id(), maybe_peer) { - error!(%block_hash, %error, "BlockSynchronizer: failed to apply deploy"); + if let Err(error) = builder.register_transaction(txn.fetch_id(), maybe_peer) { + error!(%block_hash, %error, "BlockSynchronizer: failed to apply transaction"); } } } @@ -1362,7 +1362,7 @@ impl Component for BlockSynchronizer { | Event::SyncLeapFetched(_) | Event::GlobalStateSynced { .. } | Event::GotExecutionResultsChecksum { .. } - | Event::DeployFetched { .. } + | Event::TransactionFetched { .. } | Event::ExecutionResultsFetched { .. } | Event::ExecutionResultsStored(_) | Event::AccumulatedPeers(_, _) @@ -1513,7 +1513,7 @@ impl Component for BlockSynchronizer { self.need_next(effect_builder, rng) } // for both historical and forward sync, post-1.4 blocks track approvals hashes - // for the deploys they contain + // for the transactions they contain Event::ApprovalsHashesFetched(result) => { self.approvals_hashes_fetched(result); self.need_next(effect_builder, rng) @@ -1545,9 +1545,10 @@ impl Component for BlockSynchronizer { self.execution_results_stored(block_hash); self.need_next(effect_builder, rng) } - // for pre-1.5 blocks we use the legacy deploy fetcher, otherwise we use the deploy - // fetcher but the results of both are forwarded to this handler - Event::DeployFetched { block_hash, result } => { + // for pre-1.5 blocks we use the legacy deploy fetcher, otherwise we use the + // transaction fetcher but the results of both are forwarded to this + // handler + Event::TransactionFetched { block_hash, result } => { match result { Either::Left(Ok(fetched_legacy_deploy)) => { let deploy_id = fetched_legacy_deploy.id(); @@ -1561,7 +1562,7 @@ impl Component for BlockSynchronizer { } Either::Left(Err(error)) => { if let Some(builder) = self.get_builder(block_hash, false) { - if builder.waiting_for_deploys() { + if builder.waiting_for_transactions() { builder.latch_decrement(); } } @@ -1570,12 +1571,12 @@ impl Component for BlockSynchronizer { } Either::Right(Err(error)) => { if let Some(builder) = self.get_builder(block_hash, false) { - if builder.waiting_for_deploys() { + if builder.waiting_for_transactions() { builder.latch_decrement(); } } - debug!(%error, "BlockSynchronizer: failed to fetch deploy"); + debug!(%error, "BlockSynchronizer: failed to fetch transaction"); } }; self.need_next(effect_builder, rng) diff --git a/node/src/components/block_synchronizer/block_acquisition.rs b/node/src/components/block_synchronizer/block_acquisition.rs index b132b2fb95..2b0ead6f94 100644 --- a/node/src/components/block_synchronizer/block_acquisition.rs +++ b/node/src/components/block_synchronizer/block_acquisition.rs @@ -15,28 +15,28 @@ use casper_types::{ use crate::{ components::block_synchronizer::{ - block_acquisition_action::BlockAcquisitionAction, - deploy_acquisition::TransactionAcquisition, peer_list::PeerList, - signature_acquisition::SignatureAcquisition, BlockAcquisitionError, + block_acquisition_action::BlockAcquisitionAction, peer_list::PeerList, + signature_acquisition::SignatureAcquisition, + transaction_acquisition::TransactionAcquisition, BlockAcquisitionError, ExecutionResultsAcquisition, ExecutionResultsChecksum, }, types::{BlockExecutionResultsOrChunk, EraValidatorWeights, ExecutableBlock, SignatureWeight}, NodeRng, }; -use super::deploy_acquisition::TransactionIdentifier; +use super::transaction_acquisition::TransactionIdentifier; // BlockAcquisitionState is a milestone oriented state machine; it is always in a resting state // indicating the last completed step, while attempting to acquire the necessary data to transition // to the next resting state milestone. the start and end of the workflow is linear, but the // middle steps conditionally branch depending upon if this is a historical block (needs execution -// state) or a block we intend to execute, and if the block body has one or more deploys. +// state) or a block we intend to execute, and if the block body has one or more transactions. // // blocks always require a header & body and sufficient finality signatures; blocks may contain -// one or more deploys. if a block has any deploys, we must also acquire execution effects -// for the deploys in the block (we do this as a chunked aggregate), and for post 1.5 blocks +// one or more transactions. if a block has any transactions, we must also acquire execution effects +// for the transactions in the block (we do this as a chunked aggregate), and for post 1.5 blocks // we must also acquire approvals hashes (which correlate to which authorized account holders -// signed the deploys). +// signed the transactions). // // there are two levels of finality, weak and strict. we first get the block header (which is // the minimum amount of necessary information we need to function), and then attempt to acquire @@ -60,8 +60,8 @@ use super::deploy_acquisition::TransactionIdentifier; // of global state, other than the first downloaded historical block we likely already have // the vast majority of global state data locally. for these reasons, it is common for most // blocks to transition thru the various states very quickly...particularly blocks without -// deploys. however, the first block downloaded or blocks with a lot of deploys and / or -// execution state delta can take arbitrarily longer on their relevant steps. +// transactions. however, the first block downloaded or blocks with a lot of transactions +// and / or execution state delta can take arbitrarily longer on their relevant steps. // // similarly, it is possible that the peer set available to us to acquire this data can become // partitioned. the block synchronizer will periodically attempt to refresh its peer list to @@ -82,8 +82,8 @@ use super::deploy_acquisition::TransactionIdentifier; /// A -->|No| HaveApprovalsHashes /// HaveApprovalsHashes --> C{is block empty?} /// C -->|Yes| HaveStrictFinalitySignatures -/// C -->|No| HaveAllDeploys -/// HaveAllDeploys --> HaveStrictFinalitySignatures +/// C -->|No| HaveAllTransactions +/// HaveAllTransactions --> HaveStrictFinalitySignatures /// HaveStrictFinalitySignatures --> D{is historical?} /// D -->|Yes| Complete /// D -->|No| HaveFinalizedBlock @@ -108,7 +108,7 @@ pub(super) enum BlockAcquisitionState { ExecutionResultsChecksum, ), HaveApprovalsHashes(Box, SignatureAcquisition, TransactionAcquisition), - HaveAllDeploys(Box, SignatureAcquisition), + HaveAllTransactions(Box, SignatureAcquisition), HaveStrictFinalitySignatures(Box, SignatureAcquisition), // We keep the `Block` as well as the `FinalizedBlock` because the // block is necessary to reach the `Complete` state and the finalized @@ -171,8 +171,13 @@ impl Display for BlockAcquisitionState { block.height(), block.hash() ), - BlockAcquisitionState::HaveAllDeploys(block, _) => { - write!(f, "have deploys({}) for: {}", block.height(), block.hash()) + BlockAcquisitionState::HaveAllTransactions(block, _) => { + write!( + f, + "have transactions({}) for: {}", + block.height(), + block.hash() + ) } BlockAcquisitionState::HaveStrictFinalitySignatures(block, _) => write!( f, @@ -214,7 +219,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(block, _, _, _) | BlockAcquisitionState::HaveAllExecutionResults(block, _, _, _) | BlockAcquisitionState::HaveApprovalsHashes(block, _, _) - | BlockAcquisitionState::HaveAllDeploys(block, _) + | BlockAcquisitionState::HaveAllTransactions(block, _) | BlockAcquisitionState::HaveStrictFinalitySignatures(block, _) | BlockAcquisitionState::HaveExecutableBlock(block, ..) | BlockAcquisitionState::Complete(block) => *block.hash(), @@ -227,7 +232,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::Failed(..) | BlockAcquisitionState::HaveBlockHeader(..) | BlockAcquisitionState::HaveWeakFinalitySignatures(..) => None, - BlockAcquisitionState::HaveAllDeploys(block, _) + BlockAcquisitionState::HaveAllTransactions(block, _) | BlockAcquisitionState::HaveStrictFinalitySignatures(block, _) | BlockAcquisitionState::HaveBlock(block, _, _) | BlockAcquisitionState::HaveGlobalState(block, _, _, _) @@ -263,12 +268,12 @@ pub(super) struct RegisterExecResultsOutcome { /// Block -->> GlobalState: is historical? /// GlobalState ->> AllExecutionResults: get execution results /// AllExecutionResults -->> ApprovalsHashes: is not legacy? -/// AllExecutionResults -->> AllDeploys: is legacy? -/// ApprovalsHashes ->> AllDeploys: get deploys +/// AllExecutionResults -->> AllTransactions: is legacy? +/// ApprovalsHashes ->> AllTransactions: get transactions /// GlobalState -->> StrictFinalitySignatures: is block empty? -/// Block -->> AllDeploys: is not historical and is not empty? +/// Block -->> AllTransactions: is not historical and is not empty? /// Block -->> StrictFinalitySignatures: is not historical and is empty? -/// AllDeploys ->> StrictFinalitySignatures: get strict finality +/// AllTransactions ->> StrictFinalitySignatures: get strict finality /// StrictFinalitySignatures ->> FinalizedBlock: is forward and finalized block created /// StrictFinalitySignatures -->> Complete: is historical and block marked complete /// FinalizedBlock ->> Complete: is forward and block executed @@ -284,11 +289,11 @@ impl BlockAcquisitionState { // HaveWeakFinalitySignatures -> need block // // HaveBlock -> if should_fetch_execution_state -> need global state - // else if block has deploys need approvals hashes - // else if no deploys need strict finality + // else if block has transactions need approvals hashes + // else if no transactions need strict finality // // HaveGlobalState -> if should_fetch_execution_state - // if block has deploys -> + // if block has transactions -> // if have execution effects -> need approvals hashes // else -> need execution effects // else -> need strict finality @@ -296,12 +301,12 @@ impl BlockAcquisitionState { // // HaveAllExecutionResults -> if should_fetch_execution_state // if approvals checkable -> need approvals hashes - // else -> need deploys + // else -> need transactions // else error // - // HaveApprovalsHashes -> need deploys + // HaveApprovalsHashes -> need transactions // - // HaveDeploys -> need strict finality + // HaveTransactions -> need strict finality // // HaveStrictFinalitySignatures -> if should_fetch_execution_state -> need to mark block // complete else need to convert block to FinalizedBlock @@ -373,12 +378,12 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveGlobalState( block, signatures, - deploy_state, + transaction_state, exec_results, ) => { if false == is_historical { Err(BlockAcquisitionError::InvalidStateTransition) - } else if deploy_state.needs_transaction() { + } else if transaction_state.needs_transaction() { BlockAcquisitionAction::maybe_execution_results( block, peer_list, @@ -405,7 +410,7 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveAllExecutionResults( block, signatures, - deploys, + transactions, checksum, ) if is_historical => { let is_checkable = checksum.is_checkable(); @@ -414,11 +419,11 @@ impl BlockAcquisitionState { Ok(BlockAcquisitionAction::approvals_hashes( block, peer_list, rng, )) - } else if let Some(needed_deploy) = deploys.next_needed_transaction() { + } else if let Some(needed_transaction) = transactions.next_needed_transaction() { // If the checksum is not checkable, it means that we are dealing with a legacy // deploys. If the required transactions are not deploys for // this block it means that something went wrong. - let deploy_hash = match needed_deploy { + let deploy_hash = match needed_transaction { TransactionIdentifier::ByHash(TransactionHash::Deploy(deploy_hash)) => { deploy_hash } @@ -433,7 +438,7 @@ impl BlockAcquisitionState { )) } else { Ok( - BlockAcquisitionAction::next_action_after_deploy_acquisition( + BlockAcquisitionAction::next_action_after_transaction_acquisition( *block.hash(), block.height(), block.era_id(), @@ -467,7 +472,7 @@ impl BlockAcquisitionState { )) } else { Ok( - BlockAcquisitionAction::next_action_after_deploy_acquisition( + BlockAcquisitionAction::next_action_after_transaction_acquisition( *block.hash(), block.height(), block.era_id(), @@ -481,7 +486,7 @@ impl BlockAcquisitionState { ) } } - BlockAcquisitionState::HaveAllDeploys(block, signatures) => { + BlockAcquisitionState::HaveAllTransactions(block, signatures) => { if signatures.has_sufficient_finality(is_historical, true) { Ok(BlockAcquisitionAction::switch_to_have_sufficient_finality( *block.hash(), @@ -550,7 +555,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(block, ..) | BlockAcquisitionState::HaveAllExecutionResults(block, _, _, _) | BlockAcquisitionState::HaveApprovalsHashes(block, _, _) - | BlockAcquisitionState::HaveAllDeploys(block, ..) + | BlockAcquisitionState::HaveAllTransactions(block, ..) | BlockAcquisitionState::HaveStrictFinalitySignatures(block, _) | BlockAcquisitionState::Complete(block) => Some(block.height()), } @@ -589,7 +594,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -628,13 +633,13 @@ impl BlockAcquisitionState { .collect(), Block::V2(v2) => v2.all_transactions().copied().collect(), }; - let deploy_acquisition = + let transaction_acquisition = TransactionAcquisition::new_by_hash(transaction_hashes, need_execution_state); BlockAcquisitionState::HaveBlock( Box::new(block), signatures.clone(), - deploy_acquisition, + transaction_acquisition, ) } BlockAcquisitionState::Initialized(..) @@ -642,7 +647,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -670,7 +675,7 @@ impl BlockAcquisitionState { let maybe_new_state = match self { BlockAcquisitionState::HaveBlock(block, acquired_signatures, ..) | BlockAcquisitionState::HaveGlobalState(block, acquired_signatures, ..) - | BlockAcquisitionState::HaveAllDeploys(block, acquired_signatures) + | BlockAcquisitionState::HaveAllTransactions(block, acquired_signatures) | BlockAcquisitionState::HaveApprovalsHashes(block, acquired_signatures, ..) => { if acquired_signatures.has_sufficient_finality(is_historical, true) { Some(BlockAcquisitionState::HaveStrictFinalitySignatures( @@ -704,7 +709,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(_, acquired_signatures, ..) | BlockAcquisitionState::HaveApprovalsHashes(_, acquired_signatures, ..) | BlockAcquisitionState::HaveAllExecutionResults(_, acquired_signatures, ..) - | BlockAcquisitionState::HaveAllDeploys(_, acquired_signatures) + | BlockAcquisitionState::HaveAllTransactions(_, acquired_signatures) | BlockAcquisitionState::HaveStrictFinalitySignatures(_, acquired_signatures) | BlockAcquisitionState::HaveWeakFinalitySignatures(_, acquired_signatures) => { acquired_signatures.register_pending(validator); @@ -733,31 +738,31 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveGlobalState( _, acquired_signatures, - acquired_deploys, + acquired_transactions, .., ) => { - acquired_deploys.needs_transaction() == false + acquired_transactions.needs_transaction() == false && acquired_signatures.signature_weight() != SignatureWeight::Strict } BlockAcquisitionState::HaveApprovalsHashes( _, acquired_signatures, - acquired_deploys, + acquired_transactions, ) => { - acquired_deploys.needs_transaction() == false + acquired_transactions.needs_transaction() == false && acquired_signatures.signature_weight() != SignatureWeight::Strict } BlockAcquisitionState::HaveAllExecutionResults( _, acquired_signatures, - acquired_deploys, + acquired_transactions, .., ) => { acquired_signatures.is_legacy() - && acquired_deploys.needs_transaction() == false + && acquired_transactions.needs_transaction() == false && acquired_signatures.signature_weight() != SignatureWeight::Strict } - BlockAcquisitionState::HaveAllDeploys(_, acquired_signatures) => { + BlockAcquisitionState::HaveAllTransactions(_, acquired_signatures) => { acquired_signatures.signature_weight() != SignatureWeight::Strict } } @@ -803,8 +808,8 @@ impl BlockAcquisitionState { && acquired_transactions.needs_transaction() == false && acquired_signatures.has_sufficient_finality(is_historical, true) { - // When syncing a forward block, if we don't need deploys and have all required - // signatures, advance the state + // When syncing a forward block, if we don't need transactions and have all + // required signatures, advance the state Some(BlockAcquisitionState::HaveStrictFinalitySignatures( block.clone(), acquired_signatures.clone(), @@ -817,12 +822,12 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveGlobalState( block, acquired_signatures, - acquired_deploys, + acquired_transactions, .., ) => { maybe_block_hash = Some(*block.hash()); acceptance = acquired_signatures.apply_signature(signature, validator_weights); - if !acquired_deploys.needs_transaction() + if !acquired_transactions.needs_transaction() && acquired_signatures.has_sufficient_finality(is_historical, true) { Some(BlockAcquisitionState::HaveStrictFinalitySignatures( @@ -841,13 +846,13 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveAllExecutionResults( block, acquired_signatures, - acquired_deploys, + acquired_transactions, .., ) => { maybe_block_hash = Some(*block.hash()); acceptance = acquired_signatures.apply_signature(signature, validator_weights); if acquired_signatures.is_legacy() - && acquired_deploys.needs_transaction() == false + && acquired_transactions.needs_transaction() == false && acquired_signatures.has_sufficient_finality(is_historical, true) { Some(BlockAcquisitionState::HaveStrictFinalitySignatures( @@ -858,7 +863,7 @@ impl BlockAcquisitionState { None } } - BlockAcquisitionState::HaveAllDeploys(block, acquired_signatures) => { + BlockAcquisitionState::HaveAllTransactions(block, acquired_signatures) => { maybe_block_hash = Some(*block.hash()); acceptance = acquired_signatures.apply_signature(signature, validator_weights); if acquired_signatures.has_sufficient_finality(is_historical, true) { @@ -943,15 +948,15 @@ impl BlockAcquisitionState { transactions.clone(), ) } - // we never ask for deploys in the following states, and thus it is erroneous to attempt - // to apply any + // we never ask for transactions in the following states, and thus it is erroneous to + // attempt to apply any BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::Initialized(..) | BlockAcquisitionState::HaveBlockHeader(..) | BlockAcquisitionState::HaveWeakFinalitySignatures(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(_, _, _) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -1001,7 +1006,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveWeakFinalitySignatures(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -1037,7 +1042,7 @@ impl BlockAcquisitionState { .apply_checksum(execution_results_checksum) .map_err(BlockAcquisitionError::ExecutionResults)?; } - BlockAcquisitionState::HaveAllDeploys(..) + BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::Initialized(..) @@ -1068,7 +1073,7 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveGlobalState( block, signatures, - deploys, + transactions, exec_results_acq, ) if need_execution_state => { info!( @@ -1103,7 +1108,7 @@ impl BlockAcquisitionState { let new_state = BlockAcquisitionState::HaveGlobalState( block.clone(), signatures.clone(), - deploys.clone(), + transactions.clone(), new_acquisition.clone(), ); let maybe_exec_results = Some(results.clone()); @@ -1114,7 +1119,7 @@ impl BlockAcquisitionState { let new_state = BlockAcquisitionState::HaveGlobalState( block.clone(), signatures.clone(), - deploys.clone(), + transactions.clone(), new_acquisition, ); let maybe_exec_results = None; @@ -1127,7 +1132,7 @@ impl BlockAcquisitionState { } } } - BlockAcquisitionState::HaveAllDeploys(..) + BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::Initialized(..) @@ -1161,7 +1166,7 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveGlobalState( block, signatures, - deploys, + transactions, ExecutionResultsAcquisition::Complete { checksum, .. }, ) if need_execution_state => { info!( @@ -1171,12 +1176,12 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveAllExecutionResults( block.clone(), signatures.clone(), - deploys.clone(), + transactions.clone(), *checksum, ) } BlockAcquisitionState::HaveGlobalState(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::Initialized(..) | BlockAcquisitionState::HaveBlockHeader(..) @@ -1194,13 +1199,13 @@ impl BlockAcquisitionState { Ok(()) } - /// Register a deploy for this block. - pub(super) fn register_deploy( + /// Register a transactions for this block. + pub(super) fn register_transaction( &mut self, txn_id: TransactionId, is_historical: bool, ) -> Result, BlockAcquisitionError> { - let (block, signatures, deploys) = match self { + let (block, signatures, transactions) = match self { BlockAcquisitionState::HaveBlock(block, signatures, transactions) if false == is_historical => { @@ -1212,10 +1217,10 @@ impl BlockAcquisitionState { BlockAcquisitionState::HaveAllExecutionResults( block, signatures, - deploys, + transactions, checksum, ) if is_historical => match checksum { - ExecutionResultsChecksum::Uncheckable => (block, signatures, deploys), + ExecutionResultsChecksum::Uncheckable => (block, signatures, transactions), ExecutionResultsChecksum::Checkable(_) => { return Err(BlockAcquisitionError::InvalidAttemptToApplyTransaction { txn_id }); } @@ -1226,24 +1231,27 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveBlock(_, _, _) | BlockAcquisitionState::HaveGlobalState(_, _, _, _) | BlockAcquisitionState::HaveAllExecutionResults(_, _, _, _) - | BlockAcquisitionState::HaveAllDeploys(_, _) + | BlockAcquisitionState::HaveAllTransactions(_, _) | BlockAcquisitionState::HaveExecutableBlock(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(_, _) | BlockAcquisitionState::Failed(_, _) | BlockAcquisitionState::Complete(..) => { debug!( ?txn_id, - "BlockAcquisition: invalid attempt to register deploy for: {}", + "BlockAcquisition: invalid attempt to register transaction for: {}", self.block_hash() ); return Ok(None); } }; - info!("BlockAcquisition: registering deploy for: {}", block.hash()); - let maybe_acceptance = deploys.apply_transaction(txn_id); - if !deploys.needs_transaction() { + info!( + "BlockAcquisition: registering transaction for: {}", + block.hash() + ); + let maybe_acceptance = transactions.apply_transaction(txn_id); + if !transactions.needs_transaction() { let new_state = - BlockAcquisitionState::HaveAllDeploys(block.clone(), signatures.clone()); + BlockAcquisitionState::HaveAllTransactions(block.clone(), signatures.clone()); self.set_state(new_state); } Ok(maybe_acceptance) @@ -1273,7 +1281,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) | BlockAcquisitionState::HaveApprovalsHashes(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveExecutableBlock(..) | BlockAcquisitionState::Failed(..) | BlockAcquisitionState::Complete(..) => { @@ -1303,7 +1311,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) | BlockAcquisitionState::HaveApprovalsHashes(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::Failed(..) | BlockAcquisitionState::Complete(..) => {} @@ -1335,7 +1343,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) | BlockAcquisitionState::HaveApprovalsHashes(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::Failed(..) | BlockAcquisitionState::Complete(..) => { @@ -1370,7 +1378,7 @@ impl BlockAcquisitionState { | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) | BlockAcquisitionState::HaveApprovalsHashes(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveExecutableBlock(..) | BlockAcquisitionState::Failed(..) | BlockAcquisitionState::Complete(..) => { diff --git a/node/src/components/block_synchronizer/block_acquisition_action.rs b/node/src/components/block_synchronizer/block_acquisition_action.rs index 4be30bbfcb..f1ac7ec9f5 100644 --- a/node/src/components/block_synchronizer/block_acquisition_action.rs +++ b/node/src/components/block_synchronizer/block_acquisition_action.rs @@ -256,7 +256,7 @@ impl BlockAcquisitionAction { } #[allow(clippy::too_many_arguments)] - pub(super) fn next_action_after_deploy_acquisition( + pub(super) fn next_action_after_transaction_acquisition( block_hash: BlockHash, block_height: u64, era_id: EraId, diff --git a/node/src/components/block_synchronizer/block_builder.rs b/node/src/components/block_synchronizer/block_builder.rs index e5bb94a58e..a1b874ae3b 100644 --- a/node/src/components/block_synchronizer/block_builder.rs +++ b/node/src/components/block_synchronizer/block_builder.rs @@ -269,7 +269,7 @@ impl BlockBuilder { | BlockAcquisitionState::HaveGlobalState(_, _, _, _) | BlockAcquisitionState::HaveAllExecutionResults(_, _, _, _) | BlockAcquisitionState::HaveApprovalsHashes(_, _, _) - | BlockAcquisitionState::HaveAllDeploys(_, _) + | BlockAcquisitionState::HaveAllTransactions(_, _) | BlockAcquisitionState::HaveStrictFinalitySignatures(_, _) | BlockAcquisitionState::HaveExecutableBlock(_, _, _) | BlockAcquisitionState::Failed(_, _) => false, @@ -463,7 +463,7 @@ impl BlockBuilder { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -498,7 +498,7 @@ impl BlockBuilder { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -533,7 +533,7 @@ impl BlockBuilder { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveApprovalsHashes(..) | BlockAcquisitionState::HaveExecutableBlock(..) @@ -631,7 +631,7 @@ impl BlockBuilder { pub(super) fn waiting_for_execution_results(&self) -> bool { match &self.acquisition_state { BlockAcquisitionState::HaveGlobalState(..) if self.should_fetch_execution_state => true, - BlockAcquisitionState::HaveAllDeploys(..) + BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::Initialized(..) @@ -719,8 +719,8 @@ impl BlockBuilder { execution_results_acquisition::Error::InvalidChunkCount { .. } | execution_results_acquisition::Error::ChecksumMismatch { .. } | execution_results_acquisition::Error::FailedToDeserialize { .. } - | execution_results_acquisition::Error::ExecutionResultToDeployHashLengthDiscrepancy { .. } => { - debug!("register_fetched_execution_results: InvalidChunkCount | ChecksumMismatch | FailedToDeserialize | ExecutionResultToDeployHashLengthDiscrepancy"); + | execution_results_acquisition::Error::ExecutionResultToTransactionHashLengthDiscrepancy { .. } => { + debug!("register_fetched_execution_results: InvalidChunkCount | ChecksumMismatch | FailedToDeserialize | ExecutionResultToTransactionHashLengthDiscrepancy"); if let Some(peer) = maybe_peer { self.disqualify_peer(peer); } @@ -761,7 +761,7 @@ impl BlockBuilder { Ok(()) } - pub(super) fn waiting_for_deploys(&self) -> bool { + pub(super) fn waiting_for_transactions(&self) -> bool { match &self.acquisition_state { BlockAcquisitionState::HaveApprovalsHashes(_, _, transactions) => { transactions.needs_transaction() @@ -781,7 +781,7 @@ impl BlockBuilder { | BlockAcquisitionState::HaveBlock(..) | BlockAcquisitionState::HaveGlobalState(..) | BlockAcquisitionState::HaveAllExecutionResults(..) - | BlockAcquisitionState::HaveAllDeploys(..) + | BlockAcquisitionState::HaveAllTransactions(..) | BlockAcquisitionState::HaveStrictFinalitySignatures(..) | BlockAcquisitionState::HaveExecutableBlock(..) | BlockAcquisitionState::Failed(..) @@ -789,16 +789,16 @@ impl BlockBuilder { } } - pub(super) fn register_deploy( + pub(super) fn register_transaction( &mut self, txn_id: TransactionId, maybe_peer: Option, ) -> Result<(), Error> { - let was_waiting_for_deploys = self.waiting_for_deploys(); + let was_waiting_for_transactions = self.waiting_for_transactions(); let acceptance = self .acquisition_state - .register_deploy(txn_id, self.should_fetch_execution_state); - self.handle_acceptance(maybe_peer, acceptance, was_waiting_for_deploys) + .register_transaction(txn_id, self.should_fetch_execution_state); + self.handle_acceptance(maybe_peer, acceptance, was_waiting_for_transactions) } pub(super) fn register_peers(&mut self, peers: Vec) { diff --git a/node/src/components/block_synchronizer/error.rs b/node/src/components/block_synchronizer/error.rs index 52561ae7c7..465d8057b1 100644 --- a/node/src/components/block_synchronizer/error.rs +++ b/node/src/components/block_synchronizer/error.rs @@ -5,7 +5,7 @@ use derive_more::From; use casper_types::{Digest, TransactionHash, TransactionId}; -use super::deploy_acquisition; +use super::transaction_acquisition; use casper_types::BlockHash; @@ -22,7 +22,7 @@ pub(crate) enum BlockAcquisitionError { }, InvalidAttemptToAcquireExecutionResults, #[from] - InvalidAttemptToApplyApprovalsHashes(deploy_acquisition::Error), + InvalidAttemptToApplyApprovalsHashes(transaction_acquisition::Error), InvalidAttemptToApplyTransaction { txn_id: TransactionId, }, diff --git a/node/src/components/block_synchronizer/event.rs b/node/src/components/block_synchronizer/event.rs index cdf1b08f2f..a413611fd0 100644 --- a/node/src/components/block_synchronizer/event.rs +++ b/node/src/components/block_synchronizer/event.rs @@ -56,7 +56,7 @@ pub(crate) enum Event { #[serde(skip_serializing)] result: ExecutionResultsChecksumResult, }, - DeployFetched { + TransactionFetched { block_hash: BlockHash, result: Either, FetchResult>, }, @@ -142,7 +142,7 @@ impl Display for Event { Ok(None) => write!(f, "got no exec results checksum"), Err(error) => write!(f, "failed to get exec results checksum: {}", error), }, - Event::DeployFetched { + Event::TransactionFetched { block_hash: _, result, } => match result { diff --git a/node/src/components/block_synchronizer/execution_results_acquisition.rs b/node/src/components/block_synchronizer/execution_results_acquisition.rs index f99afb5483..f486bff885 100644 --- a/node/src/components/block_synchronizer/execution_results_acquisition.rs +++ b/node/src/components/block_synchronizer/execution_results_acquisition.rs @@ -76,7 +76,7 @@ pub(crate) enum Error { FailedToDeserialize { block_hash: BlockHash, }, - ExecutionResultToDeployHashLengthDiscrepancy { + ExecutionResultToTransactionHashLengthDiscrepancy { block_hash: BlockHash, expected: usize, actual: usize, @@ -96,14 +96,14 @@ impl Display for Error { expected, actual ) } - Error::ExecutionResultToDeployHashLengthDiscrepancy { + Error::ExecutionResultToTransactionHashLengthDiscrepancy { block_hash, expected, actual, } => { write!( f, - "discrepancy between the number of deploys and corresponding execution results for block_hash: {}; expected {} actual: {}", + "discrepancy between the number of transactions and corresponding execution results for block_hash: {}; expected {} actual: {}", block_hash, expected, actual ) } @@ -404,9 +404,9 @@ impl ExecutionResultsAcquisition { if transaction_hashes.len() != execution_results.len() { debug!( %block_hash, - "apply_block_execution_results_or_chunk: Error::ExecutionResultToDeployHashLengthDiscrepancy" + "apply_block_execution_results_or_chunk: Error::ExecutionResultToTransactionHashLengthDiscrepancy" ); - return Err(Error::ExecutionResultToDeployHashLengthDiscrepancy { + return Err(Error::ExecutionResultToTransactionHashLengthDiscrepancy { block_hash, expected: transaction_hashes.len(), actual: execution_results.len(), diff --git a/node/src/components/block_synchronizer/execution_results_acquisition/tests.rs b/node/src/components/block_synchronizer/execution_results_acquisition/tests.rs index 17b2a0659c..48d356a703 100644 --- a/node/src/components/block_synchronizer/execution_results_acquisition/tests.rs +++ b/node/src/components/block_synchronizer/execution_results_acquisition/tests.rs @@ -343,7 +343,7 @@ fn acquisition_pending_state_has_correct_transitions() { acquisition .clone() .apply_block_execution_results_or_chunk(exec_result.clone(), vec![]), - Err(Error::ExecutionResultToDeployHashLengthDiscrepancy { .. }) + Err(Error::ExecutionResultToTransactionHashLengthDiscrepancy { .. }) ); assert_matches!( acquisition.clone().apply_block_execution_results_or_chunk( @@ -472,7 +472,7 @@ fn acquisition_acquiring_state_gets_overridden_by_value() { acquisition .clone() .apply_block_execution_results_or_chunk(exec_result.clone(), vec![]), - Err(Error::ExecutionResultToDeployHashLengthDiscrepancy { .. }) + Err(Error::ExecutionResultToTransactionHashLengthDiscrepancy { .. }) ); assert_matches!( diff --git a/node/src/components/block_synchronizer/tests.rs b/node/src/components/block_synchronizer/tests.rs index b9d197c291..75d869637a 100644 --- a/node/src/components/block_synchronizer/tests.rs +++ b/node/src/components/block_synchronizer/tests.rs @@ -2361,7 +2361,7 @@ fn historical_state(block_synchronizer: &BlockSynchronizer) -> &BlockAcquisition } /// When there is no deploy, the state goes from `HaveGlobalState` to `HaveStrictFinalitySignature` -/// directly, skipping `HaveAllExecutionResults`, `HaveApprovalsHashes` and `HaveAllDeploys`. +/// directly, skipping `HaveAllExecutionResults`, `HaveApprovalsHashes` and `HaveAllTransactions`. #[tokio::test] async fn historical_sync_skips_exec_results_and_deploys_if_block_empty() { let rng = &mut TestRng::new(); @@ -2672,15 +2672,15 @@ async fn historical_sync_no_legacy_block() { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(txn)))), }, ); - // ----- HaveAllDeploys ----- + // ----- HaveAllTransactions ----- assert_matches!( historical_state(&block_synchronizer), - BlockAcquisitionState::HaveAllDeploys(_, _) + BlockAcquisitionState::HaveAllTransactions(_, _) ); let events = mock_reactor.process_effects(effects).await; @@ -2874,15 +2874,15 @@ async fn historical_sync_legacy_block_strict_finality() { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Left(Ok(FetchedData::from_storage(Box::new(deploy.into())))), }, ); - // ----- HaveAllDeploys ----- + // ----- HaveAllTransactions ----- assert_matches!( historical_state(&block_synchronizer), - BlockAcquisitionState::HaveAllDeploys(_, _) + BlockAcquisitionState::HaveAllTransactions(_, _) ); let events = mock_reactor.process_effects(effects).await; @@ -3076,7 +3076,7 @@ async fn historical_sync_legacy_block_weak_finality() { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Left(Ok(FetchedData::from_storage(Box::new(deploy.into())))), }, @@ -3289,7 +3289,7 @@ async fn historical_sync_legacy_block_any_finality() { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Left(Ok(FetchedData::from_storage(Box::new(deploy.into())))), }, @@ -3688,13 +3688,13 @@ async fn fwd_sync_latch_should_not_decrement_for_old_responses() { ); } - // Receive a deploy. This would make the synchronizer switch to HaveAllDeploys and continue + // Receive a deploy. This would make the synchronizer switch to HaveAllTransactions and continue // asking for more finality signatures in order to reach strict finality. { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), &mut rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(txn.clone())))), }, @@ -3731,7 +3731,7 @@ async fn fwd_sync_latch_should_not_decrement_for_old_responses() { let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), &mut rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(txn.clone())))), }, @@ -3958,7 +3958,7 @@ async fn historical_sync_latch_should_not_decrement_for_old_deploy_fetch_respons let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(first_txn.clone())))), }, @@ -3986,7 +3986,7 @@ async fn historical_sync_latch_should_not_decrement_for_old_deploy_fetch_respons let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(second_txn.clone())))), }, @@ -4028,7 +4028,7 @@ async fn historical_sync_latch_should_not_decrement_for_old_deploy_fetch_respons let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(first_txn.clone())))), }, @@ -4048,7 +4048,7 @@ async fn historical_sync_latch_should_not_decrement_for_old_deploy_fetch_respons let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(second_txn.clone())))), }, @@ -4066,16 +4066,16 @@ async fn historical_sync_latch_should_not_decrement_for_old_deploy_fetch_respons let effects = block_synchronizer.handle_event( mock_reactor.effect_builder(), rng, - Event::DeployFetched { + Event::TransactionFetched { block_hash: *block.hash(), result: Either::Right(Ok(FetchedData::from_storage(Box::new(third_txn.clone())))), }, ); - // ----- HaveAllDeploys ----- + // ----- HaveAllTransactions ----- assert_matches!( historical_state(&block_synchronizer), - BlockAcquisitionState::HaveAllDeploys(_, _) + BlockAcquisitionState::HaveAllTransactions(_, _) ); let events = mock_reactor.process_effects(effects).await; diff --git a/node/src/components/block_synchronizer/deploy_acquisition.rs b/node/src/components/block_synchronizer/transaction_acquisition.rs similarity index 100% rename from node/src/components/block_synchronizer/deploy_acquisition.rs rename to node/src/components/block_synchronizer/transaction_acquisition.rs diff --git a/node/src/components/block_synchronizer/deploy_acquisition/tests.rs b/node/src/components/block_synchronizer/transaction_acquisition/tests.rs similarity index 100% rename from node/src/components/block_synchronizer/deploy_acquisition/tests.rs rename to node/src/components/block_synchronizer/transaction_acquisition/tests.rs