diff --git a/banks-server/src/banks_server.rs b/banks-server/src/banks_server.rs index 7051daac45cb0f..f2d2d10da85abb 100644 --- a/banks-server/src/banks_server.rs +++ b/banks-server/src/banks_server.rs @@ -13,6 +13,7 @@ use { bank::{Bank, TransactionSimulationResult}, bank_forks::BankForks, commitment::BlockCommitmentCache, + verify_precompiles::verify_precompiles, }, solana_sdk::{ account::Account, @@ -167,7 +168,7 @@ fn verify_transaction( let move_precompile_verification_to_svm = feature_set.is_active(&move_precompile_verification_to_svm::id()); if !move_precompile_verification_to_svm { - transaction.verify_precompiles(feature_set)?; + verify_precompiles(transaction, feature_set)?; } Ok(()) diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 4bd6f50cd18b65..57f1b1958b152c 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -21,6 +21,7 @@ use { solana_runtime::{ bank::{Bank, LoadAndExecuteTransactionsOutput}, transaction_batch::TransactionBatch, + verify_precompiles::verify_precompiles, }, solana_runtime_transaction::instructions_processor::process_compute_budget_instructions, solana_sdk::{ @@ -401,7 +402,7 @@ impl Consumer { .map(|(tx, result)| match result { Ok(_) => { if !move_precompile_verification_to_svm { - tx.verify_precompiles(&bank.feature_set) + verify_precompiles(tx, &bank.feature_set) } else { Ok(()) } @@ -452,7 +453,7 @@ impl Consumer { } else { // Verify pre-compiles. if !move_precompile_verification_to_svm { - tx.verify_precompiles(&bank.feature_set)?; + verify_precompiles(tx, &bank.feature_set)?; } // Any transaction executed between sanitization time and now may have closed the lookup table(s). diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index 08fe5f3355f7af..9f6de648a40e30 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -59,6 +59,7 @@ use { prioritization_fee_cache::PrioritizationFeeCache, snapshot_config::SnapshotConfig, snapshot_utils, + verify_precompiles::verify_precompiles, }, solana_sdk::{ account::{AccountSharedData, ReadableAccount}, @@ -2260,7 +2261,7 @@ fn verify_transaction( let move_precompile_verification_to_svm = feature_set.is_active(&feature_set::move_precompile_verification_to_svm::id()); if !move_precompile_verification_to_svm { - if let Err(e) = transaction.verify_precompiles(feature_set) { + if let Err(e) = verify_precompiles(transaction, feature_set) { return Err(RpcCustomError::TransactionPrecompileVerificationFailure(e).into()); } } diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 77661a4bc43cf2..f74de8b2ffec64 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -57,6 +57,7 @@ use { stakes::{InvalidCacheEntryReason, Stakes, StakesCache, StakesEnum}, status_cache::{SlotDelta, StatusCache}, transaction_batch::{OwnedOrBorrowed, TransactionBatch}, + verify_precompiles::verify_precompiles, }, byteorder::{ByteOrder, LittleEndian}, dashmap::{DashMap, DashSet}, @@ -5664,7 +5665,7 @@ impl Bank { verification_mode == TransactionVerificationMode::HashAndVerifyPrecompiles || verification_mode == TransactionVerificationMode::FullVerification } { - sanitized_tx.verify_precompiles(&self.feature_set)?; + verify_precompiles(&sanitized_tx, &self.feature_set)?; } Ok(sanitized_tx) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0d83d9bad5eda9..21947a64e79d02 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -36,7 +36,7 @@ pub mod stakes; pub mod static_ids; pub mod status_cache; pub mod transaction_batch; -mod verify_precompiles; +pub mod verify_precompiles; pub mod vote_sender_types; #[macro_use]