Skip to content

Commit

Permalink
SVM: Move RuntimeConfig to svm folder (solana-labs#35085)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 authored Feb 5, 2024
1 parent 6570182 commit 3cf5dd2
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ use {
bank_forks::BankForks,
commitment::BlockCommitmentCache,
prioritization_fee_cache::PrioritizationFeeCache,
runtime_config::RuntimeConfig,
snapshot_archive_info::SnapshotArchiveInfoGetter,
snapshot_bank_utils::{self, DISABLED_SNAPSHOT_ARCHIVE_INTERVAL},
snapshot_config::SnapshotConfig,
snapshot_hash::StartingSnapshotHashes,
snapshot_utils::{self, clean_orphaned_account_snapshot_dirs},
svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
clock::Slot,
Expand Down
2 changes: 1 addition & 1 deletion core/tests/epoch_accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ use {
bank::{epoch_accounts_hash_utils, Bank},
bank_forks::BankForks,
genesis_utils::{self, GenesisConfigInfo},
runtime_config::RuntimeConfig,
snapshot_archive_info::SnapshotArchiveInfoGetter,
snapshot_bank_utils,
snapshot_config::SnapshotConfig,
snapshot_utils,
svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
clock::Slot,
Expand Down
2 changes: 1 addition & 1 deletion core/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use {
bank::Bank,
bank_forks::BankForks,
genesis_utils::{create_genesis_config_with_leader, GenesisConfigInfo},
runtime_config::RuntimeConfig,
snapshot_archive_info::FullSnapshotArchiveInfo,
snapshot_bank_utils::{self, DISABLED_SNAPSHOT_ARCHIVE_INTERVAL},
snapshot_config::SnapshotConfig,
Expand All @@ -36,6 +35,7 @@ use {
SnapshotVersion::{self, V1_2_0},
},
status_cache::MAX_CACHE_ENTRIES,
svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
clock::Slot,
Expand Down
2 changes: 1 addition & 1 deletion ledger-tool/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use {
blockstore_processor::ProcessOptions,
use_snapshot_archives_at_startup::{self, UseSnapshotArchivesAtStartup},
},
solana_runtime::runtime_config::RuntimeConfig,
solana_runtime::svm::runtime_config::RuntimeConfig,
solana_sdk::clock::Slot,
std::{
collections::HashSet,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use {
commitment::VOTE_THRESHOLD_SIZE,
installed_scheduler_pool::BankWithScheduler,
prioritization_fee_cache::PrioritizationFeeCache,
runtime_config::RuntimeConfig,
svm::runtime_config::RuntimeConfig,
transaction_batch::TransactionBatch,
},
solana_sdk::{
Expand Down
2 changes: 1 addition & 1 deletion program-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use {
bank_forks::BankForks,
commitment::BlockCommitmentCache,
genesis_utils::{create_genesis_config_with_leader_ex, GenesisConfigInfo},
runtime_config::RuntimeConfig,
svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
account::{create_account_shared_data_for_test, Account, AccountSharedData},
Expand Down
8 changes: 5 additions & 3 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ use {
epoch_rewards_hasher::hash_rewards_into_partitions,
epoch_stakes::{EpochStakes, NodeVoteAccounts},
installed_scheduler_pool::{BankWithScheduler, InstalledSchedulerRwLock},
runtime_config::RuntimeConfig,
serde_snapshot::BankIncrementalSnapshotPersistence,
snapshot_hash::SnapshotHash,
stake_account::StakeAccount,
Expand All @@ -59,8 +58,11 @@ use {
},
stakes::{InvalidCacheEntryReason, Stakes, StakesCache, StakesEnum},
status_cache::{SlotDelta, StatusCache},
svm::transaction_processor::{
TransactionBatchProcessor, TransactionLogMessages, TransactionProcessingCallback,
svm::{
runtime_config::RuntimeConfig,
transaction_processor::{
TransactionBatchProcessor, TransactionLogMessages, TransactionProcessingCallback,
},
},
transaction_batch::TransactionBatch,
},
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank/serde_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mod tests {
StartBlockHeightAndRewards,
},
genesis_utils::activate_all_features,
runtime_config::RuntimeConfig,
serde_snapshot::{
reserialize_bank_with_new_accounts_hash, BankIncrementalSnapshotPersistence,
SerdeAccountsHash, SerdeIncrementalAccountsHash, SerdeStyle, SnapshotStreams,
Expand All @@ -18,6 +17,7 @@ mod tests {
StorageAndNextAppendVecId, BANK_SNAPSHOT_PRE_FILENAME_EXTENSION,
},
status_cache::StatusCache,
svm::runtime_config::RuntimeConfig,
},
assert_matches::assert_matches,
solana_accounts_db::{
Expand Down
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub mod non_circulating_supply;
pub mod prioritization_fee;
pub mod prioritization_fee_cache;
pub mod root_bank_cache;
pub mod runtime_config;
pub mod serde_snapshot;
pub mod snapshot_archive_info;
pub mod snapshot_bank_utils;
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/serde_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use {
bank::{Bank, BankFieldsToDeserialize, BankRc},
builtins::BuiltinPrototype,
epoch_stakes::EpochStakes,
runtime_config::RuntimeConfig,
serde_snapshot::storage::SerializableAccountStorageEntry,
snapshot_utils::{
self, SnapshotError, StorageAndNextAppendVecId, BANK_SNAPSHOT_PRE_FILENAME_EXTENSION,
},
stakes::Stakes,
svm::runtime_config::RuntimeConfig,
},
bincode::{self, config::Options, Error},
log::*,
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/snapshot_bank_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use {
crate::{
bank::{Bank, BankFieldsToDeserialize, BankSlotDelta},
builtins::BuiltinPrototype,
runtime_config::RuntimeConfig,
serde_snapshot::{
bank_from_streams, bank_to_stream, fields_from_streams,
BankIncrementalSnapshotPersistence, SerdeStyle,
Expand All @@ -24,6 +23,7 @@ use {
UnpackedSnapshotsDirAndVersion, VerifySlotDeltasError,
},
status_cache,
svm::runtime_config::RuntimeConfig,
},
bincode::{config::Options, serialize_into},
log::*,
Expand Down
1 change: 1 addition & 0 deletions runtime/src/svm/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod account_loader;
pub mod account_rent_state;
pub mod runtime_config;
pub mod transaction_account_state_info;
pub mod transaction_processor;
File renamed without changes.
9 changes: 3 additions & 6 deletions runtime/src/svm/transaction_processor.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use {
crate::{
runtime_config::RuntimeConfig,
svm::{
account_loader::load_accounts,
transaction_account_state_info::TransactionAccountStateInfo,
},
crate::svm::{
account_loader::load_accounts, runtime_config::RuntimeConfig,
transaction_account_state_info::TransactionAccountStateInfo,
},
log::debug,
percentage::Percentage,
Expand Down
2 changes: 1 addition & 1 deletion test-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use {
solana_rpc_client::{nonblocking, rpc_client::RpcClient},
solana_runtime::{
bank_forks::BankForks, genesis_utils::create_genesis_config_with_leader_ex,
runtime_config::RuntimeConfig, snapshot_config::SnapshotConfig,
snapshot_config::SnapshotConfig, svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
account::{Account, AccountSharedData},
Expand Down
2 changes: 1 addition & 1 deletion validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ use {
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcLeaderScheduleConfig,
solana_runtime::{
runtime_config::RuntimeConfig,
snapshot_bank_utils::DISABLED_SNAPSHOT_ARCHIVE_INTERVAL,
snapshot_config::{SnapshotConfig, SnapshotUsage},
snapshot_utils::{self, ArchiveFormat, SnapshotVersion},
svm::runtime_config::RuntimeConfig,
},
solana_sdk::{
clock::{Slot, DEFAULT_S_PER_SLOT},
Expand Down

0 comments on commit 3cf5dd2

Please sign in to comment.