diff --git a/Cargo.lock b/Cargo.lock index 55da711546..4a7a33976f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6348,6 +6348,7 @@ dependencies = [ "enum-iterator", "itertools", "libc", + "libsecp256k1", "log", "num-derive", "num-traits", diff --git a/program-runtime/Cargo.toml b/program-runtime/Cargo.toml index b2583b3470..9225c8b0b1 100644 --- a/program-runtime/Cargo.toml +++ b/program-runtime/Cargo.toml @@ -31,6 +31,7 @@ solana_rbpf = { workspace = true } thiserror = { workspace = true } [dev-dependencies] +libsecp256k1 = { workspace = true } solana-logger = { workspace = true } [lib] diff --git a/program-runtime/src/lib.rs b/program-runtime/src/lib.rs index 7c7e91d059..24aae9ca98 100644 --- a/program-runtime/src/lib.rs +++ b/program-runtime/src/lib.rs @@ -15,6 +15,7 @@ pub mod compute_budget; pub mod invoke_context; pub mod loaded_programs; pub mod log_collector; +pub mod message_processor; pub mod pre_account; pub mod prioritization_fee; pub mod stable_log; diff --git a/runtime/src/message_processor.rs b/program-runtime/src/message_processor.rs similarity index 99% rename from runtime/src/message_processor.rs rename to program-runtime/src/message_processor.rs index 5bef3071d8..8dc3125586 100644 --- a/runtime/src/message_processor.rs +++ b/program-runtime/src/message_processor.rs @@ -1,7 +1,5 @@ use { - serde::{Deserialize, Serialize}, - solana_measure::measure::Measure, - solana_program_runtime::{ + crate::{ compute_budget::ComputeBudget, invoke_context::InvokeContext, loaded_programs::LoadedProgramsForTxBatch, @@ -9,6 +7,8 @@ use { sysvar_cache::SysvarCache, timings::{ExecuteDetailsTimings, ExecuteTimings}, }, + serde::{Deserialize, Serialize}, + solana_measure::measure::Measure, solana_sdk::{ account::WritableAccount, feature_set::FeatureSet, @@ -189,7 +189,10 @@ impl MessageProcessor { mod tests { use { super::*, - solana_program_runtime::{declare_process_instruction, loaded_programs::LoadedProgram}, + crate::{ + declare_process_instruction, loaded_programs::LoadedProgram, + message_processor::MessageProcessor, + }, solana_sdk::{ account::{AccountSharedData, ReadableAccount}, instruction::{AccountMeta, Instruction, InstructionError}, diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 4b6e738898..ab607f055f 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -62,7 +62,6 @@ use { epoch_accounts_hash::{self, EpochAccountsHash}, epoch_rewards_hasher::hash_rewards_into_partitions, epoch_stakes::{EpochStakes, NodeVoteAccounts}, - message_processor::MessageProcessor, partitioned_rewards::PartitionedEpochRewardsConfig, rent_collector::{CollectedInfo, RentCollector}, rent_debits::RentDebits, @@ -104,6 +103,7 @@ use { LoadedProgramsForTxBatch, WorkingSlot, }, log_collector::LogCollector, + message_processor::MessageProcessor, sysvar_cache::SysvarCache, timings::{ExecuteDetailsTimings, ExecuteTimingType, ExecuteTimings}, }, diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index eb49381a21..3dd7eee23c 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -48,7 +48,6 @@ pub mod inline_spl_associated_token_account; pub mod inline_spl_token; pub mod inline_spl_token_2022; pub mod loader_utils; -pub mod message_processor; pub mod non_circulating_supply; pub mod partitioned_rewards; pub mod prioritization_fee;