Skip to content

Commit

Permalink
remove solana-sdk from solana-entry (#3998)
Browse files Browse the repository at this point in the history
* remove solana-sdk from solana-entry

* sort deps
  • Loading branch information
kevinheavey authored Dec 9, 2024
1 parent 2be38d4 commit 1b36926
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 32 deletions.
13 changes: 12 additions & 1 deletion Cargo.lock

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

13 changes: 12 additions & 1 deletion entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,29 @@ log = { workspace = true }
rand = { workspace = true }
rayon = { workspace = true }
serde = { workspace = true }
solana-hash = { workspace = true }
solana-measure = { workspace = true }
solana-merkle-tree = { workspace = true }
solana-metrics = { workspace = true }
solana-packet = { workspace = true }
solana-perf = { workspace = true }
solana-rayon-threadlimit = { workspace = true }
solana-runtime-transaction = { workspace = true }
solana-sdk = { workspace = true }
solana-sha256-hasher = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
solana-keypair = { workspace = true }
solana-logger = { workspace = true }
solana-message = { workspace = true }
solana-perf = { workspace = true, features = ["dev-context-only-utils"] }
solana-pubkey = { workspace = true }
solana-reserved-account-keys = { workspace = true }
solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-system-transaction = { workspace = true }

[lib]
crate-type = ["lib"]
Expand Down
15 changes: 8 additions & 7 deletions entry/benches/entry_sigverify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
extern crate test;
use {
solana_entry::entry::{self, VerifyRecyclers},
solana_hash::Hash,
solana_message::SimpleAddressLoader,
solana_perf::test_tx::test_tx,
solana_reserved_account_keys::ReservedAccountKeys,
solana_runtime_transaction::runtime_transaction::RuntimeTransaction,
solana_sdk::{
hash::Hash,
reserved_account_keys::ReservedAccountKeys,
transaction::{
MessageHash, Result, SanitizedTransaction, SimpleAddressLoader,
TransactionVerificationMode, VersionedTransaction,
},
solana_transaction::{
sanitized::{MessageHash, SanitizedTransaction},
versioned::VersionedTransaction,
TransactionVerificationMode,
},
solana_transaction_error::TransactionResult as Result,
std::sync::Arc,
test::Bencher,
};
Expand Down
38 changes: 19 additions & 19 deletions entry/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ use {
rand::{thread_rng, Rng},
rayon::{prelude::*, ThreadPool},
serde::{Deserialize, Serialize},
solana_hash::Hash,
solana_measure::measure::Measure,
solana_merkle_tree::MerkleTree,
solana_metrics::*,
solana_packet::Meta,
solana_perf::{
cuda_runtime::PinnedVec,
packet::{Packet, PacketBatch, PacketBatchRecycler, PACKETS_PER_BATCH},
Expand All @@ -22,14 +24,10 @@ use {
},
solana_rayon_threadlimit::get_max_thread_count,
solana_runtime_transaction::transaction_with_meta::TransactionWithMeta,
solana_sdk::{
hash::Hash,
packet::Meta,
transaction::{
Result, Transaction, TransactionError, TransactionVerificationMode,
VersionedTransaction,
},
solana_transaction::{
versioned::VersionedTransaction, Transaction, TransactionVerificationMode,
},
solana_transaction_error::{TransactionError, TransactionResult as Result},
std::{
cmp,
ffi::OsStr,
Expand Down Expand Up @@ -684,7 +682,7 @@ impl EntrySlice for [Entry] {
simd_len: usize,
thread_pool: &ThreadPool,
) -> EntryVerificationState {
use solana_sdk::hash::HASH_BYTES;
use solana_hash::HASH_BYTES;
let now = Instant::now();
let genesis = [Entry {
num_hashes: 0,
Expand Down Expand Up @@ -976,19 +974,21 @@ pub fn thread_pool_for_benches() -> ThreadPool {
mod tests {
use {
super::*,
solana_hash::Hash,
solana_keypair::Keypair,
solana_message::SimpleAddressLoader,
solana_perf::test_tx::{test_invalid_tx, test_tx},
solana_pubkey::Pubkey,
solana_reserved_account_keys::ReservedAccountKeys,
solana_runtime_transaction::runtime_transaction::RuntimeTransaction,
solana_sdk::{
hash::{hash, Hash},
pubkey::Pubkey,
reserved_account_keys::ReservedAccountKeys,
signature::{Keypair, Signer},
system_transaction,
transaction::{
MessageHash, Result, SanitizedTransaction, SimpleAddressLoader,
VersionedTransaction,
},
solana_sha256_hasher::hash,
solana_signer::Signer,
solana_system_transaction as system_transaction,
solana_transaction::{
sanitized::{MessageHash, SanitizedTransaction},
versioned::VersionedTransaction,
},
solana_transaction_error::TransactionResult as Result,
};

#[test]
Expand Down Expand Up @@ -1142,7 +1142,7 @@ mod tests {
fn test_transaction_signing() {
let thread_pool = thread_pool_for_tests();

use solana_sdk::signature::Signature;
use solana_signature::Signature;
let zero = Hash::default();

let keypair = Keypair::new();
Expand Down
6 changes: 4 additions & 2 deletions entry/src/poh.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! The `Poh` module provides an object for generating a Proof of History.
use {
log::*,
solana_sdk::hash::{hash, hashv, Hash},
solana_hash::Hash,
solana_sha256_hasher::{hash, hashv},
std::time::{Duration, Instant},
};

Expand Down Expand Up @@ -129,7 +130,8 @@ mod tests {
use {
crate::poh::{Poh, PohEntry},
assert_matches::assert_matches,
solana_sdk::hash::{hash, hashv, Hash},
solana_hash::Hash,
solana_sha256_hasher::{hash, hashv},
std::time::Duration,
};

Expand Down
6 changes: 5 additions & 1 deletion programs/sbf/Cargo.lock

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

6 changes: 5 additions & 1 deletion svm/examples/Cargo.lock

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

0 comments on commit 1b36926

Please sign in to comment.