Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #500 to v1.16 #506

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions core/src/bundle_stage/bundle_consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ impl BundleConsumer {
let (freeze_lock, freeze_lock_us) = measure_us!(bank_start.working_bank.freeze_lock());
execute_and_commit_timings.freeze_lock_us = freeze_lock_us;

let (last_blockhash, lamports_per_signature) = bank_start
.working_bank
.last_blockhash_and_lamports_per_signature();

let (
RecordTransactionsSummary {
result: record_transactions_result,
Expand Down Expand Up @@ -724,6 +728,8 @@ impl BundleConsumer {
// note: execute_and_commit_timings.commit_us handled inside this function
let (commit_us, commit_bundle_details) = committer.commit_bundle(
&mut bundle_execution_results,
last_blockhash,
lamports_per_signature,
starting_transaction_index,
&bank_start.working_bank,
&mut execute_and_commit_timings,
Expand Down
7 changes: 3 additions & 4 deletions core/src/bundle_stage/committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use {
prioritization_fee_cache::PrioritizationFeeCache,
vote_sender_types::ReplayVoteSender,
},
solana_sdk::{saturating_add_assign, transaction::SanitizedTransaction},
solana_sdk::{hash::Hash, saturating_add_assign, transaction::SanitizedTransaction},
solana_transaction_status::{
token_balances::{TransactionTokenBalances, TransactionTokenBalancesSet},
PreBalanceInfo,
Expand Down Expand Up @@ -58,13 +58,12 @@ impl Committer {
pub(crate) fn commit_bundle<'a>(
&self,
bundle_execution_output: &'a mut LoadAndExecuteBundleOutput<'a>,
last_blockhash: Hash,
lamports_per_signature: u64,
mut starting_transaction_index: Option<usize>,
bank: &Arc<Bank>,
execute_and_commit_timings: &mut LeaderExecuteAndCommitTimings,
) -> (u64, CommitBundleDetails) {
let (last_blockhash, lamports_per_signature) =
bank.last_blockhash_and_lamports_per_signature();

let transaction_output = bundle_execution_output.bundle_transaction_results_mut();

let (commit_transaction_details, commit_times): (Vec<_>, Vec<_>) = transaction_output
Expand Down