From 35e902ba5193251bdfb5ca9dde12974944b00331 Mon Sep 17 00:00:00 2001 From: Tao Zhu Date: Fri, 10 Jan 2025 17:14:28 -0600 Subject: [PATCH] refactor: rename compute_budget_instruction_details to instruction_details to better reflect its purpose --- ...tion_details.rs => instruction_details.rs} | 83 +++++++++---------- .../src/instructions_processor.rs | 4 +- compute-budget-instruction/src/lib.rs | 2 +- core/src/banking_stage/consumer.rs | 4 +- .../receive_and_buffer.rs | 4 +- cost-model/src/cost_model.rs | 4 +- cost-model/src/transaction_cost.rs | 6 +- .../src/runtime_transaction.rs | 6 +- .../runtime_transaction/sdk_transactions.rs | 8 +- .../runtime_transaction/transaction_view.rs | 8 +- runtime-transaction/src/transaction_meta.rs | 8 +- runtime/src/prioritization_fee_cache.rs | 2 +- 12 files changed, 69 insertions(+), 70 deletions(-) rename compute-budget-instruction/src/{compute_budget_instruction_details.rs => instruction_details.rs} (89%) diff --git a/compute-budget-instruction/src/compute_budget_instruction_details.rs b/compute-budget-instruction/src/instruction_details.rs similarity index 89% rename from compute-budget-instruction/src/compute_budget_instruction_details.rs rename to compute-budget-instruction/src/instruction_details.rs index 145172033d0dfb..b1234fa5b6d06b 100644 --- a/compute-budget-instruction/src/compute_budget_instruction_details.rs +++ b/compute-budget-instruction/src/instruction_details.rs @@ -36,7 +36,7 @@ impl Default for MigrationBuiltinFeatureCounter { #[cfg_attr(test, derive(Eq, PartialEq))] #[cfg_attr(feature = "dev-context-only-utils", derive(Clone))] #[derive(Default, Debug)] -pub struct ComputeBudgetInstructionDetails { +pub struct InstructionDetails { // compute-budget instruction details: // the first field in tuple is instruction index, second field is the unsanitized value set by user requested_compute_unit_limit: Option<(u8, u32)>, @@ -50,12 +50,12 @@ pub struct ComputeBudgetInstructionDetails { migrating_builtin_feature_counters: MigrationBuiltinFeatureCounter, } -impl ComputeBudgetInstructionDetails { +impl InstructionDetails { pub fn try_from<'a>( instructions: impl Iterator)> + Clone, ) -> Result { let mut filter = ComputeBudgetProgramIdFilter::new(); - let mut compute_budget_instruction_details = ComputeBudgetInstructionDetails::default(); + let mut compute_budget_instruction_details = InstructionDetails::default(); for (i, (program_id, instruction)) in instructions.clone().enumerate() { if filter.is_compute_budget_program(instruction.program_id_index as usize, program_id) { @@ -253,15 +253,15 @@ mod test { ComputeBudgetInstruction::request_heap_frame(40 * 1024), Instruction::new_with_bincode(Pubkey::new_unique(), &(), vec![]), ]); - let expected_details = Ok(ComputeBudgetInstructionDetails { + let expected_details = Ok(InstructionDetails { requested_heap_size: Some((1, 40 * 1024)), num_non_compute_budget_instructions: Saturating(2), num_non_migratable_builtin_instructions: Saturating(1), num_non_builtin_instructions: Saturating(2), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), expected_details ); @@ -271,7 +271,7 @@ mod test { ComputeBudgetInstruction::request_heap_frame(41 * 1024), ]); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), Err(TransactionError::DuplicateInstruction(2)) ); } @@ -283,13 +283,13 @@ mod test { ComputeBudgetInstruction::set_compute_unit_limit(u32::MAX), Instruction::new_with_bincode(Pubkey::new_unique(), &(), vec![]), ]); - let expected_details = Ok(ComputeBudgetInstructionDetails { + let expected_details = Ok(InstructionDetails { requested_compute_unit_limit: Some((1, u32::MAX)), num_non_compute_budget_instructions: Saturating(2), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), expected_details ); @@ -299,7 +299,7 @@ mod test { ComputeBudgetInstruction::set_compute_unit_limit(u32::MAX), ]); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), Err(TransactionError::DuplicateInstruction(2)) ); } @@ -311,15 +311,15 @@ mod test { ComputeBudgetInstruction::set_compute_unit_price(u64::MAX), Instruction::new_with_bincode(Pubkey::new_unique(), &(), vec![]), ]); - let expected_details = Ok(ComputeBudgetInstructionDetails { + let expected_details = Ok(InstructionDetails { requested_compute_unit_price: Some((1, u64::MAX)), num_non_compute_budget_instructions: Saturating(2), num_non_migratable_builtin_instructions: Saturating(1), num_non_builtin_instructions: Saturating(2), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), expected_details ); @@ -329,7 +329,7 @@ mod test { ComputeBudgetInstruction::set_compute_unit_price(u64::MAX), ]); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), Err(TransactionError::DuplicateInstruction(2)) ); } @@ -341,15 +341,15 @@ mod test { ComputeBudgetInstruction::set_loaded_accounts_data_size_limit(u32::MAX), Instruction::new_with_bincode(Pubkey::new_unique(), &(), vec![]), ]); - let expected_details = Ok(ComputeBudgetInstructionDetails { + let expected_details = Ok(InstructionDetails { requested_loaded_accounts_data_size_limit: Some((1, u32::MAX)), num_non_compute_budget_instructions: Saturating(2), num_non_migratable_builtin_instructions: Saturating(1), num_non_builtin_instructions: Saturating(2), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), expected_details ); @@ -359,17 +359,17 @@ mod test { ComputeBudgetInstruction::set_loaded_accounts_data_size_limit(u32::MAX), ]); assert_eq!( - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), + InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx),), Err(TransactionError::DuplicateInstruction(2)) ); } fn prep_feature_minimial_cus_for_builtin_instructions( is_active: bool, - instruction_details: &ComputeBudgetInstructionDetails, + instruction_details: &InstructionDetails, ) -> (FeatureSet, u32) { let mut feature_set = FeatureSet::default(); - let ComputeBudgetInstructionDetails { + let InstructionDetails { num_non_compute_budget_instructions, num_non_migratable_builtin_instructions, num_non_builtin_instructions, @@ -394,7 +394,7 @@ mod test { #[test] fn test_sanitize_and_convert_to_compute_budget_limits() { // empty details, default ComputeBudgetLimits with 0 compute_unit_limits - let instruction_details = ComputeBudgetInstructionDetails::default(); + let instruction_details = InstructionDetails::default(); assert_eq!( instruction_details .sanitize_and_convert_to_compute_budget_limits(&FeatureSet::default()), @@ -405,11 +405,11 @@ mod test { ); // no compute-budget instructions, all default ComputeBudgetLimits except cu-limit - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { num_non_compute_budget_instructions: Saturating(4), num_non_migratable_builtin_instructions: Saturating(1), num_non_builtin_instructions: Saturating(3), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, expected_compute_unit_limit) = @@ -428,12 +428,12 @@ mod test { InstructionError::InvalidInstructionData, )); // invalid: requested_heap_size can't be zero - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, 0)), requested_compute_unit_price: Some((2, 0)), requested_heap_size: Some((3, 0)), requested_loaded_accounts_data_size_limit: Some((4, 1024)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -445,12 +445,12 @@ mod test { } // invalid: requested_heap_size can't be less than MIN_HEAP_FRAME_BYTES - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, 0)), requested_compute_unit_price: Some((2, 0)), requested_heap_size: Some((3, MIN_HEAP_FRAME_BYTES - 1)), requested_loaded_accounts_data_size_limit: Some((4, 1024)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -462,12 +462,12 @@ mod test { } // invalid: requested_heap_size can't be more than MAX_HEAP_FRAME_BYTES - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, 0)), requested_compute_unit_price: Some((2, 0)), requested_heap_size: Some((3, MAX_HEAP_FRAME_BYTES + 1)), requested_loaded_accounts_data_size_limit: Some((4, 1024)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -479,12 +479,12 @@ mod test { } // invalid: requested_heap_size must be round by 1024 - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, 0)), requested_compute_unit_price: Some((2, 0)), requested_heap_size: Some((3, MIN_HEAP_FRAME_BYTES + 1024 + 1)), requested_loaded_accounts_data_size_limit: Some((4, 1024)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -496,12 +496,12 @@ mod test { } // invalid: loaded_account_data_size can't be zero - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, 0)), requested_compute_unit_price: Some((2, 0)), requested_heap_size: Some((3, 40 * 1024)), requested_loaded_accounts_data_size_limit: Some((4, 0)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -513,13 +513,13 @@ mod test { } // valid: acceptable MAX - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, u32::MAX)), requested_compute_unit_price: Some((2, u64::MAX)), requested_heap_size: Some((3, MAX_HEAP_FRAME_BYTES)), requested_loaded_accounts_data_size_limit: Some((4, u32::MAX)), num_non_compute_budget_instructions: Saturating(4), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -537,12 +537,12 @@ mod test { // valid let val: u32 = 1024 * 40; - let instruction_details = ComputeBudgetInstructionDetails { + let instruction_details = InstructionDetails { requested_compute_unit_limit: Some((1, val)), requested_compute_unit_price: Some((2, val as u64)), requested_heap_size: Some((3, val)), requested_loaded_accounts_data_size_limit: Some((4, val)), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; for is_active in [true, false] { let (feature_set, _expected_compute_unit_limit) = @@ -571,17 +571,16 @@ mod test { ]); let feature_id_index = get_migration_feature_position(&feature_set::migrate_stake_program_to_core_bpf::id()); - let mut expected_details = ComputeBudgetInstructionDetails { + let mut expected_details = InstructionDetails { num_non_compute_budget_instructions: Saturating(2), num_non_builtin_instructions: Saturating(1), - ..ComputeBudgetInstructionDetails::default() + ..InstructionDetails::default() }; expected_details .migrating_builtin_feature_counters .migrating_builtin[feature_id_index] = Saturating(1); let expected_details = Ok(expected_details); - let details = - ComputeBudgetInstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx)); + let details = InstructionDetails::try_from(SVMMessage::program_instructions_iter(&tx)); assert_eq!(details, expected_details); let details = details.unwrap(); diff --git a/compute-budget-instruction/src/instructions_processor.rs b/compute-budget-instruction/src/instructions_processor.rs index 47e99d0b3359d0..55ce9f48823dcd 100644 --- a/compute-budget-instruction/src/instructions_processor.rs +++ b/compute-budget-instruction/src/instructions_processor.rs @@ -1,5 +1,5 @@ use { - crate::compute_budget_instruction_details::*, solana_compute_budget::compute_budget_limits::*, + crate::instruction_details::*, solana_compute_budget::compute_budget_limits::*, solana_feature_set::FeatureSet, solana_pubkey::Pubkey, solana_svm_transaction::instruction::SVMInstruction, solana_transaction_error::TransactionError, @@ -14,7 +14,7 @@ pub fn process_compute_budget_instructions<'a>( instructions: impl Iterator)> + Clone, feature_set: &FeatureSet, ) -> Result { - ComputeBudgetInstructionDetails::try_from(instructions)? + InstructionDetails::try_from(instructions)? .sanitize_and_convert_to_compute_budget_limits(feature_set) } diff --git a/compute-budget-instruction/src/lib.rs b/compute-budget-instruction/src/lib.rs index 032730b9f1bf56..45c11fddd828c0 100644 --- a/compute-budget-instruction/src/lib.rs +++ b/compute-budget-instruction/src/lib.rs @@ -1,6 +1,6 @@ #![allow(clippy::arithmetic_side_effects)] mod builtin_programs_filter; -pub mod compute_budget_instruction_details; mod compute_budget_program_id_filter; +pub mod instruction_details; pub mod instructions_processor; diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 5a8ef5cb79b7d0..41e85ebff96186 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -574,7 +574,7 @@ impl Consumer { .iter() .filter_map(|transaction| { transaction - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(&bank.feature_set) .ok() .map(|limits| limits.compute_unit_price) @@ -759,7 +759,7 @@ impl Consumer { let fee_payer = transaction.fee_payer(); let fee_budget_limits = FeeBudgetLimits::from( transaction - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(&bank.feature_set)?, ); let fee = solana_fee::calculate_fee( diff --git a/core/src/banking_stage/transaction_scheduler/receive_and_buffer.rs b/core/src/banking_stage/transaction_scheduler/receive_and_buffer.rs index 9284c0f9ed5028..1f8430ba64cb56 100644 --- a/core/src/banking_stage/transaction_scheduler/receive_and_buffer.rs +++ b/core/src/banking_stage/transaction_scheduler/receive_and_buffer.rs @@ -210,7 +210,7 @@ impl SanitizedTransactionReceiveAndBuffer { .is_ok() }) .filter_map(|(packet, tx, deactivation_slot)| { - tx.compute_budget_instruction_details() + tx.instruction_details() .sanitize_and_convert_to_compute_budget_limits(&working_bank.feature_set) .map(|compute_budget| { (packet, tx, deactivation_slot, compute_budget.into()) @@ -519,7 +519,7 @@ impl TransactionViewReceiveAndBuffer { } let Ok(compute_budget_limits) = view - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(&working_bank.feature_set) else { return Err(()); diff --git a/cost-model/src/cost_model.rs b/cost-model/src/cost_model.rs index dfdca3b31eb05c..fdc7f2c5eedb78 100644 --- a/cost-model/src/cost_model.rs +++ b/cost-model/src/cost_model.rs @@ -251,7 +251,7 @@ impl CostModel { // will not be executed by `bank`, therefore it should be considered // as no execution cost by cost model. match meta - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(feature_set) { Ok(compute_budget_limits) => { @@ -293,7 +293,7 @@ impl CostModel { // if failed to process compute_budget instructions, the transaction will not be executed // by `bank`, therefore it should be considered as no execution cost by cost model. let (programs_execution_costs, loaded_accounts_data_size_cost) = match transaction - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(feature_set) { Ok(compute_budget_limits) => ( diff --git a/cost-model/src/transaction_cost.rs b/cost-model/src/transaction_cost.rs index 824f447392f594..d6c8a7d3f113f4 100644 --- a/cost-model/src/transaction_cost.rs +++ b/cost-model/src/transaction_cost.rs @@ -1,5 +1,5 @@ #[cfg(feature = "dev-context-only-utils")] -use solana_compute_budget_instruction::compute_budget_instruction_details::ComputeBudgetInstructionDetails; +use solana_compute_budget_instruction::instruction_details::InstructionDetails; use { crate::block_cost_limits, solana_pubkey::Pubkey, solana_runtime_transaction::transaction_meta::StaticMeta, @@ -265,8 +265,8 @@ impl solana_runtime_transaction::transaction_meta::StaticMeta for WritableKeysTr &DUMMY } - fn compute_budget_instruction_details(&self) -> &ComputeBudgetInstructionDetails { - unimplemented!("WritableKeysTransaction::compute_budget_instruction_details") + fn instruction_details(&self) -> &InstructionDetails { + unimplemented!("WritableKeysTransaction::instruction_details") } } diff --git a/runtime-transaction/src/runtime_transaction.rs b/runtime-transaction/src/runtime_transaction.rs index 7273a67d670b03..9c59a7868a28d4 100644 --- a/runtime-transaction/src/runtime_transaction.rs +++ b/runtime-transaction/src/runtime_transaction.rs @@ -12,7 +12,7 @@ use { crate::transaction_meta::{DynamicMeta, StaticMeta, TransactionMeta}, core::ops::Deref, - solana_compute_budget_instruction::compute_budget_instruction_details::*, + solana_compute_budget_instruction::instruction_details::*, solana_hash::Hash, solana_message::{AccountKeys, TransactionSignatureDetails}, solana_pubkey::Pubkey, @@ -45,8 +45,8 @@ impl StaticMeta for RuntimeTransaction { fn signature_details(&self) -> &TransactionSignatureDetails { &self.meta.signature_details } - fn compute_budget_instruction_details(&self) -> &ComputeBudgetInstructionDetails { - &self.meta.compute_budget_instruction_details + fn instruction_details(&self) -> &InstructionDetails { + &self.meta.instruction_details } } diff --git a/runtime-transaction/src/runtime_transaction/sdk_transactions.rs b/runtime-transaction/src/runtime_transaction/sdk_transactions.rs index 61167b7c253713..0d6976495f900d 100644 --- a/runtime-transaction/src/runtime_transaction/sdk_transactions.rs +++ b/runtime-transaction/src/runtime_transaction/sdk_transactions.rs @@ -1,5 +1,5 @@ use { - super::{ComputeBudgetInstructionDetails, RuntimeTransaction}, + super::{InstructionDetails, RuntimeTransaction}, crate::{ signature_details::get_precompile_signature_details, transaction_meta::{StaticMeta, TransactionMeta}, @@ -48,7 +48,7 @@ impl RuntimeTransaction { precompile_signature_details.num_ed25519_instruction_signatures, precompile_signature_details.num_secp256r1_instruction_signatures, ); - let compute_budget_instruction_details = ComputeBudgetInstructionDetails::try_from( + let instruction_details = InstructionDetails::try_from( sanitized_versioned_tx .get_message() .program_instructions_iter() @@ -61,7 +61,7 @@ impl RuntimeTransaction { message_hash, is_simple_vote_transaction: is_simple_vote_tx, signature_details, - compute_budget_instruction_details, + instruction_details, }, }) } @@ -328,7 +328,7 @@ mod tests { for feature_set in [FeatureSet::default(), FeatureSet::all_enabled()] { let compute_budget_limits = runtime_transaction_static - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(&feature_set) .unwrap(); assert_eq!(compute_unit_limit, compute_budget_limits.compute_unit_limit); diff --git a/runtime-transaction/src/runtime_transaction/transaction_view.rs b/runtime-transaction/src/runtime_transaction/transaction_view.rs index 0a09fc2c310cae..c9056336f10819 100644 --- a/runtime-transaction/src/runtime_transaction/transaction_view.rs +++ b/runtime-transaction/src/runtime_transaction/transaction_view.rs @@ -1,5 +1,5 @@ use { - super::{ComputeBudgetInstructionDetails, RuntimeTransaction}, + super::{InstructionDetails, RuntimeTransaction}, crate::{ signature_details::get_precompile_signature_details, transaction_meta::{StaticMeta, TransactionMeta}, @@ -59,8 +59,8 @@ impl RuntimeTransaction> { precompile_signature_details.num_ed25519_instruction_signatures, precompile_signature_details.num_secp256r1_instruction_signatures, ); - let compute_budget_instruction_details = - ComputeBudgetInstructionDetails::try_from(transaction.program_instructions_iter())?; + let instruction_details = + InstructionDetails::try_from(transaction.program_instructions_iter())?; Ok(Self { transaction, @@ -68,7 +68,7 @@ impl RuntimeTransaction> { message_hash, is_simple_vote_transaction: is_simple_vote_tx, signature_details, - compute_budget_instruction_details, + instruction_details, }, }) } diff --git a/runtime-transaction/src/transaction_meta.rs b/runtime-transaction/src/transaction_meta.rs index 1ba551c05f3b9e..4d4f484caaf268 100644 --- a/runtime-transaction/src/transaction_meta.rs +++ b/runtime-transaction/src/transaction_meta.rs @@ -12,8 +12,8 @@ //! RuntimeTransaction types, not the TransactionMeta itself. //! use { - solana_compute_budget_instruction::compute_budget_instruction_details::ComputeBudgetInstructionDetails, - solana_hash::Hash, solana_message::TransactionSignatureDetails, + solana_compute_budget_instruction::instruction_details::InstructionDetails, solana_hash::Hash, + solana_message::TransactionSignatureDetails, }; /// metadata can be extracted statically from sanitized transaction, @@ -22,7 +22,7 @@ pub trait StaticMeta { fn message_hash(&self) -> &Hash; fn is_simple_vote_transaction(&self) -> bool; fn signature_details(&self) -> &TransactionSignatureDetails; - fn compute_budget_instruction_details(&self) -> &ComputeBudgetInstructionDetails; + fn instruction_details(&self) -> &InstructionDetails; } /// Statically loaded meta is a supertrait of Dynamically loaded meta, when @@ -38,5 +38,5 @@ pub struct TransactionMeta { pub(crate) message_hash: Hash, pub(crate) is_simple_vote_transaction: bool, pub(crate) signature_details: TransactionSignatureDetails, - pub(crate) compute_budget_instruction_details: ComputeBudgetInstructionDetails, + pub(crate) instruction_details: InstructionDetails, } diff --git a/runtime/src/prioritization_fee_cache.rs b/runtime/src/prioritization_fee_cache.rs index 5205dd1fd63efc..b9a137c3342e3b 100644 --- a/runtime/src/prioritization_fee_cache.rs +++ b/runtime/src/prioritization_fee_cache.rs @@ -208,7 +208,7 @@ impl PrioritizationFeeCache { } let compute_budget_limits = sanitized_transaction - .compute_budget_instruction_details() + .instruction_details() .sanitize_and_convert_to_compute_budget_limits(&bank.feature_set); let lock_result = validate_account_locks(