Skip to content

Commit

Permalink
remove solana-sdk from unified-scheduler-pool (#4238)
Browse files Browse the repository at this point in the history
* remove solana-sdk from unified-scheduler-pool

* missing comma

* fmt
  • Loading branch information
kevinheavey authored Jan 7, 2025
1 parent ebaa970 commit 1877601
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 31 deletions.
7 changes: 6 additions & 1 deletion Cargo.lock

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

4 changes: 3 additions & 1 deletion programs/sbf/Cargo.lock

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

4 changes: 3 additions & 1 deletion svm/examples/Cargo.lock

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

7 changes: 6 additions & 1 deletion unified-scheduler-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@ log = { workspace = true }
qualifier_attr = { workspace = true }
scopeguard = { workspace = true }
solana-ledger = { workspace = true }
solana-pubkey = { workspace = true }
solana-runtime = { workspace = true }
solana-runtime-transaction = { workspace = true }
solana-sdk = { workspace = true }
solana-timings = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }
solana-unified-scheduler-logic = { workspace = true }
static_assertions = { workspace = true }
vec_extract_if_polyfill = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
lazy_static = { workspace = true }
solana-clock = { workspace = true }
solana-keypair = { workspace = true }
solana-logger = { workspace = true }
solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
solana-system-transaction = { workspace = true }

[features]
dev-context-only-utils = []
52 changes: 25 additions & 27 deletions unified-scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use {
solana_ledger::blockstore_processor::{
execute_batch, TransactionBatchWithIndexes, TransactionStatusSender,
},
solana_pubkey::Pubkey,
solana_runtime::{
installed_scheduler_pool::{
initialized_result_with_timings, InstalledScheduler, InstalledSchedulerBox,
Expand All @@ -31,11 +32,9 @@ use {
vote_sender_types::ReplayVoteSender,
},
solana_runtime_transaction::runtime_transaction::RuntimeTransaction,
solana_sdk::{
pubkey::Pubkey,
transaction::{Result, SanitizedTransaction, TransactionError},
},
solana_timings::ExecuteTimings,
solana_transaction::sanitized::SanitizedTransaction,
solana_transaction_error::{TransactionError, TransactionResult as Result},
solana_unified_scheduler_logic::{SchedulingStateMachine, Task, UsageQueue},
static_assertions::const_assert_eq,
std::{
Expand Down Expand Up @@ -1473,21 +1472,20 @@ mod tests {
super::*,
crate::sleepless_testing,
assert_matches::assert_matches,
solana_clock::{Slot, MAX_PROCESSING_AGE},
solana_keypair::Keypair,
solana_pubkey::Pubkey,
solana_runtime::{
bank::Bank,
bank_forks::BankForks,
genesis_utils::{create_genesis_config, GenesisConfigInfo},
installed_scheduler_pool::{BankWithScheduler, SchedulingContext},
prioritization_fee_cache::PrioritizationFeeCache,
},
solana_sdk::{
clock::{Slot, MAX_PROCESSING_AGE},
pubkey::Pubkey,
signer::keypair::Keypair,
system_transaction,
transaction::{SanitizedTransaction, TransactionError},
},
solana_system_transaction as system_transaction,
solana_timings::ExecuteTimingType,
solana_transaction::sanitized::SanitizedTransaction,
solana_transaction_error::TransactionError,
std::{
sync::{Arc, RwLock},
thread::JoinHandle,
Expand Down Expand Up @@ -1787,7 +1785,7 @@ mod tests {
let tx_before_stale =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand All @@ -1799,7 +1797,7 @@ mod tests {
let tx_after_stale =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -1907,7 +1905,7 @@ mod tests {
let tx_before_stale =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand All @@ -1920,7 +1918,7 @@ mod tests {
let tx_after_stale =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -1970,7 +1968,7 @@ mod tests {

let tx = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2090,7 +2088,7 @@ mod tests {
for i in 0..MAX_TASK_COUNT {
let tx = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2241,7 +2239,7 @@ mod tests {
} = create_genesis_config(10_000);
let tx0 = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2301,7 +2299,7 @@ mod tests {
let unfunded_keypair = Keypair::new();
let bad_tx = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&unfunded_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand All @@ -2313,7 +2311,7 @@ mod tests {
let good_tx_after_bad_tx =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
3,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2431,7 +2429,7 @@ mod tests {
// Use 2 non-conflicting txes to exercise the channel disconnected case as well.
let tx = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&Keypair::new(),
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
1,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2504,7 +2502,7 @@ mod tests {
for i in 0..10 {
let tx = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2561,13 +2559,13 @@ mod tests {
// tx0 and tx1 is definitely conflicting to write-lock the mint address
let tx0 = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
let tx1 = RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2653,7 +2651,7 @@ mod tests {
let dummy_tx =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2831,7 +2829,7 @@ mod tests {
let very_old_valid_tx =
RuntimeTransaction::from_transaction_for_tests(system_transaction::transfer(
&mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
));
Expand Down Expand Up @@ -2921,7 +2919,7 @@ mod tests {

let mut tx = system_transaction::transfer(
mint_keypair,
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
2,
genesis_config.hash(),
);
Expand Down

0 comments on commit 1877601

Please sign in to comment.