diff --git a/Cargo.lock b/Cargo.lock index 6c4f7b64528de5..5656c6c069343b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7367,12 +7367,18 @@ dependencies = [ "serde", "solana-frozen-abi", "solana-frozen-abi-macro", + "solana-hash", "solana-logger", "solana-metrics", + "solana-packet", "solana-perf", + "solana-program", + "solana-pubkey", "solana-rayon-threadlimit", "solana-sdk", "solana-short-vec", + "solana-signature", + "solana-time-utils", "solana-vote-program", "test-case", ] diff --git a/perf/Cargo.toml b/perf/Cargo.toml index 91941c9b666c08..92334cc9622c0a 100644 --- a/perf/Cargo.toml +++ b/perf/Cargo.toml @@ -27,9 +27,15 @@ solana-frozen-abi = { workspace = true, optional = true, features = [ solana-frozen-abi-macro = { workspace = true, optional = true, features = [ "frozen-abi", ] } +solana-hash = { workspace = true } solana-metrics = { workspace = true } +solana-packet = { workspace = true } +solana-program = { workspace = true, default-features = false } +solana-pubkey = { workspace = true, default-features = false } solana-rayon-threadlimit = { workspace = true } -solana-sdk = { workspace = true } +solana-sdk = { workspace = true, optional = true } +solana-signature = { workspace = true } +solana-time-utils = { workspace = true } solana-short-vec = { workspace = true } solana-vote-program = { workspace = true, optional = true } @@ -49,7 +55,7 @@ solana-perf = { path = ".", features = ["dev-context-only-utils"] } test-case = { workspace = true } [features] -dev-context-only-utils = ["dep:solana-vote-program"] +dev-context-only-utils = ["dep:solana-vote-program", "dep:solana-sdk"] frozen-abi = [ "dep:solana-frozen-abi", "dep:solana-frozen-abi-macro", diff --git a/perf/src/data_budget.rs b/perf/src/data_budget.rs index 939627e3fc0ed1..85b55dd2cb9091 100644 --- a/perf/src/data_budget.rs +++ b/perf/src/data_budget.rs @@ -42,7 +42,7 @@ impl DataBudget { // Updates timestamp and returns true, if at least given milliseconds // has passed since last update. Otherwise returns false. fn can_update(&self, duration_millis: u64) -> bool { - let now = solana_sdk::timing::timestamp(); + let now = solana_time_utils::timestamp(); let mut asof = self.asof.load(Ordering::Acquire); while asof.saturating_add(duration_millis) <= now { asof = match self.asof.compare_exchange_weak( diff --git a/perf/src/deduper.rs b/perf/src/deduper.rs index 4e98876fd4f4a4..afb60bd9419593 100644 --- a/perf/src/deduper.rs +++ b/perf/src/deduper.rs @@ -121,7 +121,7 @@ mod tests { crate::{packet::to_packet_batches, sigverify, test_tx::test_tx}, rand::SeedableRng, rand_chacha::ChaChaRng, - solana_sdk::packet::{Meta, PACKET_DATA_SIZE}, + solana_packet::{Meta, PACKET_DATA_SIZE}, test_case::test_case, }; diff --git a/perf/src/packet.rs b/perf/src/packet.rs index f5a704fe40c6eb..17c49069cd8514 100644 --- a/perf/src/packet.rs +++ b/perf/src/packet.rs @@ -1,5 +1,5 @@ //! The `packet` module defines data structures and methods to pull data from the network. -pub use solana_sdk::packet::{Meta, Packet, PacketFlags, PACKET_DATA_SIZE}; +pub use solana_packet::{Meta, Packet, PacketFlags, PACKET_DATA_SIZE}; use { crate::{cuda_runtime::PinnedVec, recycler::Recycler}, bincode::config::Options, @@ -247,8 +247,8 @@ where mod tests { use { super::*, + solana_hash::Hash, solana_sdk::{ - hash::Hash, signature::{Keypair, Signer}, system_transaction, }, diff --git a/perf/src/recycler.rs b/perf/src/recycler.rs index 3af4e554f870eb..395a3285250db1 100644 --- a/perf/src/recycler.rs +++ b/perf/src/recycler.rs @@ -59,7 +59,7 @@ impl Default for RecyclerX { #[cfg(feature = "frozen-abi")] impl solana_frozen_abi::abi_example::AbiExample - for RecyclerX> + for RecyclerX> { fn example() -> Self { Self::default() diff --git a/perf/src/sigverify.rs b/perf/src/sigverify.rs index d58f27879ba393..6e6f302d6adbc6 100644 --- a/perf/src/sigverify.rs +++ b/perf/src/sigverify.rs @@ -11,14 +11,12 @@ use { recycler::Recycler, }, rayon::{prelude::*, ThreadPool}, + solana_hash::Hash, + solana_program::message::{MESSAGE_HEADER_LENGTH, MESSAGE_VERSION_PREFIX}, + solana_pubkey::Pubkey, solana_rayon_threadlimit::get_thread_count, - solana_sdk::{ - hash::Hash, - message::{MESSAGE_HEADER_LENGTH, MESSAGE_VERSION_PREFIX}, - pubkey::Pubkey, - signature::Signature, - }, solana_short_vec::decode_shortu16_len, + solana_signature::Signature, std::{convert::TryFrom, mem::size_of}, }; @@ -417,7 +415,7 @@ fn check_for_simple_vote_transaction( if packet .data(instruction_program_id_start..instruction_program_id_end) .ok_or(PacketError::InvalidLen)? - == solana_sdk::vote::program::id().as_ref() + == solana_program::vote::program::id().as_ref() { packet.meta_mut().flags |= PacketFlags::SIMPLE_VOTE_TX; } @@ -684,12 +682,11 @@ mod tests { bincode::{deserialize, serialize}, curve25519_dalek::{edwards::CompressedEdwardsY, scalar::Scalar}, rand::{thread_rng, Rng}, - solana_sdk::{ - instruction::CompiledInstruction, - message::{Message, MessageHeader}, - signature::{Keypair, Signature, Signer}, - transaction::Transaction, - }, + solana_instruction::CompiledInstruction, + solana_program::message::{Message, MessageHeader}, + solana_sdk::transaction::Transaction, + solana_signature::Signature, + solana_signer::{keypair::Keypair, Signer}, std::{ iter::repeat_with, sync::atomic::{AtomicU64, Ordering}, diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 78716922b7c152..b0e9318effadec 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -5762,10 +5762,15 @@ dependencies = [ "rand 0.8.5", "rayon", "serde", + "solana-hash", "solana-metrics", + "solana-packet", + "solana-program", + "solana-pubkey", "solana-rayon-threadlimit", - "solana-sdk", "solana-short-vec", + "solana-signature", + "solana-time-utils", ] [[package]]