Skip to content

Commit

Permalink
remove solana-sdk from solana-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Nov 4, 2024
1 parent 09374b7 commit 5aba138
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 21 deletions.
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion perf/src/data_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion perf/src/deduper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
4 changes: 2 additions & 2 deletions perf/src/packet.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -247,8 +247,8 @@ where
mod tests {
use {
super::*,
solana_hash::Hash,
solana_sdk::{
hash::Hash,
signature::{Keypair, Signer},
system_transaction,
},
Expand Down
2 changes: 1 addition & 1 deletion perf/src/recycler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<T: Default> Default for RecyclerX<T> {

#[cfg(feature = "frozen-abi")]
impl solana_frozen_abi::abi_example::AbiExample
for RecyclerX<crate::cuda_runtime::PinnedVec<solana_sdk::packet::Packet>>
for RecyclerX<crate::cuda_runtime::PinnedVec<solana_packet::Packet>>
{
fn example() -> Self {
Self::default()
Expand Down
23 changes: 10 additions & 13 deletions perf/src/sigverify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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},
Expand Down
7 changes: 6 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5aba138

Please sign in to comment.