From 62a22c5b0a9e13a19225c4ee925c37ded37148c5 Mon Sep 17 00:00:00 2001 From: Lucas B Date: Sun, 10 Dec 2023 23:20:54 -0600 Subject: [PATCH 1/2] add blockhash metrics --- core/src/bundle_stage/bundle_consumer.rs | 6 ++++++ core/src/bundle_stage/committer.rs | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/bundle_stage/bundle_consumer.rs b/core/src/bundle_stage/bundle_consumer.rs index 0b3f570a14..ef4e480abe 100644 --- a/core/src/bundle_stage/bundle_consumer.rs +++ b/core/src/bundle_stage/bundle_consumer.rs @@ -688,6 +688,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, @@ -725,6 +729,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, diff --git a/core/src/bundle_stage/committer.rs b/core/src/bundle_stage/committer.rs index ec0577be4e..5bdf0c0b5a 100644 --- a/core/src/bundle_stage/committer.rs +++ b/core/src/bundle_stage/committer.rs @@ -12,7 +12,7 @@ use { bank_utils, prioritization_fee_cache::PrioritizationFeeCache, }, - solana_sdk::{saturating_add_assign, transaction::SanitizedTransaction}, + solana_sdk::{hash::Hash, saturating_add_assign, transaction::SanitizedTransaction}, solana_transaction_status::{ token_balances::{TransactionTokenBalances, TransactionTokenBalancesSet}, PreBalanceInfo, @@ -56,13 +56,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, bank: &Arc, 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 From d983e289925b4cdd9aa8e6575c63f3d42de9cfd6 Mon Sep 17 00:00:00 2001 From: Lucas B Date: Sun, 10 Dec 2023 23:32:53 -0600 Subject: [PATCH 2/2] fix github actions --- .github/workflows/cargo.yml | 2 ++ .github/workflows/downstream-project-anchor.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 54566f705c..9a957759fa 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -34,6 +34,8 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + with: + submodules: 'recursive' - uses: mozilla-actions/sccache-action@v0.0.3 with: diff --git a/.github/workflows/downstream-project-anchor.yml b/.github/workflows/downstream-project-anchor.yml index c150beef37..2aadbf5cc2 100644 --- a/.github/workflows/downstream-project-anchor.yml +++ b/.github/workflows/downstream-project-anchor.yml @@ -38,6 +38,8 @@ jobs: version: ["v0.29.0"] steps: - uses: actions/checkout@v3 + with: + submodules: 'recursive' - shell: bash run: |