Skip to content

Commit

Permalink
remove blockhash/lmaps per sig from core
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe committed Aug 27, 2024
1 parent a02b303 commit 542eff0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
7 changes: 1 addition & 6 deletions core/src/banking_stage/committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use {
transaction_batch::TransactionBatch,
vote_sender_types::ReplayVoteSender,
},
solana_sdk::{hash::Hash, pubkey::Pubkey, saturating_add_assign},
solana_sdk::{pubkey::Pubkey, saturating_add_assign},
solana_svm::{
transaction_commit_result::{TransactionCommitResult, TransactionCommitResultExtensions},
transaction_processing_result::{
Expand Down Expand Up @@ -65,13 +65,10 @@ impl Committer {
self.transaction_status_sender.is_some()
}

#[allow(clippy::too_many_arguments)]
pub(super) fn commit_transactions(
&self,
batch: &TransactionBatch,
processing_results: Vec<TransactionProcessingResult>,
last_blockhash: Hash,
lamports_per_signature: u64,
starting_transaction_index: Option<usize>,
bank: &Arc<Bank>,
pre_balance_info: &mut PreBalanceInfo,
Expand All @@ -87,8 +84,6 @@ impl Committer {
let (commit_results, commit_time_us) = measure_us!(bank.commit_transactions(
batch.sanitized_transactions(),
processing_results,
last_blockhash,
lamports_per_signature,
processed_counts,
&mut execute_and_commit_timings.execute_timings,
));
Expand Down
14 changes: 1 addition & 13 deletions core/src/banking_stage/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,17 +665,7 @@ impl Consumer {

let (freeze_lock, freeze_lock_us) = measure_us!(bank.freeze_lock());
execute_and_commit_timings.freeze_lock_us = freeze_lock_us;

// In order to avoid a race condition, leaders must get the last
// blockhash *before* recording transactions because recording
// transactions will only succeed if the block max tick height hasn't
// been reached yet. If they get the last blockhash *after* recording
// transactions, the block max tick height could have already been
// reached and the blockhash queue could have already been updated with
// a new blockhash.
let ((last_blockhash, lamports_per_signature), last_blockhash_us) =
measure_us!(bank.last_blockhash_and_lamports_per_signature());
execute_and_commit_timings.last_blockhash_us = last_blockhash_us;
execute_and_commit_timings.last_blockhash_us = 0;

let (record_transactions_summary, record_us) = measure_us!(self
.transaction_recorder
Expand Down Expand Up @@ -713,8 +703,6 @@ impl Consumer {
self.committer.commit_transactions(
batch,
processing_results,
last_blockhash,
lamports_per_signature,
starting_transaction_index,
bank,
&mut pre_balance_info,
Expand Down

0 comments on commit 542eff0

Please sign in to comment.