Skip to content

Commit

Permalink
Move SchedulingMode out of solana-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Dec 11, 2024
1 parent 9772f93 commit 723f765
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 18 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions banking-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
solana-sdk = { workspace = true }
solana-streamer = { workspace = true }
solana-tpu-client = { workspace = true }
solana-unified-scheduler-logic = { workspace = true }
solana-unified-scheduler-pool = { workspace = true }
solana-version = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion banking-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ use {
hash::Hash,
message::Message,
pubkey::{self, Pubkey},
scheduling::SchedulingMode,
signature::{Keypair, Signature, Signer},
system_instruction, system_transaction,
timing::timestamp,
transaction::Transaction,
},
solana_streamer::socket::SocketAddrSpace,
solana_tpu_client::tpu_client::DEFAULT_TPU_CONNECTION_POOL_SIZE,
solana_unified_scheduler_logic::SchedulingMode,
solana_unified_scheduler_pool::{DefaultSchedulerPool, SupportedSchedulingMode},
std::{
sync::{atomic::Ordering, Arc, RwLock},
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ solana-tls-utils = { workspace = true }
solana-tpu-client = { workspace = true }
solana-transaction-status = { workspace = true }
solana-turbine = { workspace = true }
solana-unified-scheduler-logic = { workspace = true }
solana-unified-scheduler-pool = { workspace = true }
solana-version = { workspace = true }
solana-vote = { workspace = true }
Expand Down Expand Up @@ -120,7 +121,6 @@ solana-program-runtime = { workspace = true }
solana-sdk = { workspace = true, features = ["dev-context-only-utils"] }
solana-stake-program = { workspace = true }
solana-system-program = { workspace = true }
solana-unified-scheduler-logic = { workspace = true }
solana-unified-scheduler-pool = { workspace = true, features = [
"dev-context-only-utils",
] }
Expand Down
3 changes: 2 additions & 1 deletion core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ use {
bank::Bank, bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache,
vote_sender_types::ReplayVoteSender,
},
solana_sdk::{pubkey::Pubkey, scheduling::SchedulingMode, timing::AtomicInterval},
solana_sdk::{pubkey::Pubkey, timing::AtomicInterval},
solana_unified_scheduler_logic::SchedulingMode,
solana_unified_scheduler_pool::{BankingStageAdapter, DefaultSchedulerPool},
std::{
cmp, env,
Expand Down
2 changes: 1 addition & 1 deletion core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ use {
hash::Hash,
pubkey::Pubkey,
saturating_add_assign,
scheduling::SchedulingMode,
signature::{Keypair, Signature, Signer},
timing::timestamp,
transaction::Transaction,
},
solana_timings::ExecuteTimings,
solana_unified_scheduler_logic::SchedulingMode,
solana_vote_program::vote_state::{VoteState, VoteTransaction},
std::{
collections::{HashMap, HashSet},
Expand Down
2 changes: 1 addition & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ use {
hard_forks::HardForks,
hash::Hash,
pubkey::Pubkey,
scheduling::SchedulingMode,
shred_version::compute_shred_version,
signature::{Keypair, Signer},
timing::timestamp,
},
solana_send_transaction_service::send_transaction_service,
solana_streamer::{socket::SocketAddrSpace, streamer::StakedNodes},
solana_turbine::{self, broadcast_stage::BroadcastStageType},
solana_unified_scheduler_logic::SchedulingMode,
solana_unified_scheduler_pool::{DefaultSchedulerPool, SupportedSchedulingMode},
solana_vote_program::vote_state,
solana_wen_restart::wen_restart::{wait_for_wen_restart, WenRestartConfig},
Expand Down
2 changes: 2 additions & 0 deletions programs/sbf/Cargo.lock

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

1 change: 1 addition & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ solana-svm-transaction = { workspace = true }
solana-system-program = { workspace = true, optional = true }
solana-timings = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
solana-unified-scheduler-logic = { workspace = true }
solana-version = { workspace = true }
solana-vote = { workspace = true }
solana-vote-program = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank_forks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use {
solana_sdk::{
clock::{BankId, Slot},
hash::Hash,
scheduling::SchedulingMode,
},
solana_unified_scheduler_logic::SchedulingMode,
std::{
collections::{hash_map::Entry, HashMap, HashSet},
ops::Index,
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/installed_scheduler_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ use {
solana_sdk::{
clock::Slot,
hash::Hash,
scheduling::SchedulingMode,
transaction::{Result, SanitizedTransaction, TransactionError},
},
solana_timings::ExecuteTimings,
solana_unified_scheduler_logic::SchedulingMode,
std::{
fmt::{self, Debug},
mem,
Expand Down
1 change: 0 additions & 1 deletion sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub mod reward_type {
pub use solana_reward_info::RewardType;
}
pub mod rpc_port;
pub mod scheduling;
pub mod shred_version;
pub mod signature;
pub mod signer;
Expand Down
8 changes: 0 additions & 8 deletions sdk/src/scheduling.rs

This file was deleted.

2 changes: 2 additions & 0 deletions svm/examples/Cargo.lock

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

6 changes: 6 additions & 0 deletions unified-scheduler-logic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ use {
std::{collections::VecDeque, mem, sync::Arc},
};

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum SchedulingMode {
BlockVerification,
BlockProduction,
}

/// Internal utilities. Namely this contains [`ShortCounter`] and [`TokenCell`].
mod utils {
use std::{
Expand Down
6 changes: 4 additions & 2 deletions unified-scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ use {
solana_runtime_transaction::runtime_transaction::RuntimeTransaction,
solana_sdk::{
pubkey::Pubkey,
scheduling::SchedulingMode::{self, BlockProduction, BlockVerification},
transaction::{Result, SanitizedTransaction, TransactionError},
},
solana_timings::ExecuteTimings,
solana_unified_scheduler_logic::{SchedulingStateMachine, Task, UsageQueue},
solana_unified_scheduler_logic::{
SchedulingMode::{self, BlockProduction, BlockVerification},
SchedulingStateMachine, Task, UsageQueue,
},
static_assertions::const_assert_eq,
std::{
fmt::Debug,
Expand Down

0 comments on commit 723f765

Please sign in to comment.