Skip to content

Commit

Permalink
SVM: Move nonce_info from accounts-db to Solana SDK (solana-labs#35138)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmakarov authored Feb 8, 2024
1 parent 9b63ac8 commit eeb0cf1
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion accounts-db/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use {
},
accounts_index::{IndexKey, ScanConfig, ScanError, ScanResult, ZeroLamport},
ancestors::Ancestors,
nonce_info::{NonceFull, NonceInfo},
storable_accounts::StorableAccounts,
transaction_results::TransactionExecutionResult,
},
Expand All @@ -22,6 +21,7 @@ use {
state::{DurableNonce, Versions as NonceVersions},
State as NonceState,
},
nonce_info::{NonceFull, NonceInfo},
pubkey::Pubkey,
rent_debits::RentDebits,
slot_hashes::SlotHashes,
Expand Down
1 change: 0 additions & 1 deletion accounts-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub mod hardened_unpack;
pub mod in_mem_accounts_index;
pub mod inline_spl_token;
pub mod inline_spl_token_2022;
pub mod nonce_info;
pub mod partitioned_rewards;
mod pubkey_bins;
mod read_only_accounts_cache;
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/transaction_results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
)]
pub use solana_sdk::inner_instruction::{InnerInstruction, InnerInstructionsList};
use {
crate::nonce_info::{NonceFull, NonceInfo, NoncePartial},
solana_program_runtime::loaded_programs::LoadedProgramsForTxBatch,
solana_sdk::{
nonce_info::{NonceFull, NonceInfo, NoncePartial},
rent_debits::RentDebits,
transaction::{self, TransactionError},
transaction_context::TransactionReturnData,
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/transaction_status_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ pub(crate) mod tests {
crossbeam_channel::unbounded,
dashmap::DashMap,
solana_account_decoder::parse_token::token_amount_to_ui_amount,
solana_accounts_db::nonce_info::{NonceFull, NoncePartial},
solana_ledger::{genesis_utils::create_genesis_config, get_tmp_ledger_path_auto_delete},
solana_runtime::bank::{Bank, TransactionBalancesSet},
solana_sdk::{
Expand All @@ -223,6 +222,7 @@ pub(crate) mod tests {
message::{LegacyMessage, Message, MessageHeader, SanitizedMessage},
nonce::{self, state::DurableNonce},
nonce_account,
nonce_info::{NonceFull, NoncePartial},
pubkey::Pubkey,
rent_debits::RentDebits,
signature::{Keypair, Signature, Signer},
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ use {
ancestors::{Ancestors, AncestorsForSerialization},
blockhash_queue::BlockhashQueue,
epoch_accounts_hash::EpochAccountsHash,
nonce_info::{NonceInfo, NoncePartial},
partitioned_rewards::PartitionedEpochRewardsConfig,
sorted_storages::SortedStorages,
stake_rewards::StakeReward,
Expand Down Expand Up @@ -136,6 +135,7 @@ use {
native_token::LAMPORTS_PER_SOL,
nonce::{self, state::DurableNonce, NONCED_TX_MARKER_IX_INDEX},
nonce_account,
nonce_info::{NonceInfo, NoncePartial},
packet::PACKET_DATA_SIZE,
precompiles::get_precompiles,
pubkey::Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use {
accounts_partition::{self, PartitionIndex, RentPayingAccountsByPartition},
ancestors::Ancestors,
inline_spl_token,
nonce_info::NonceFull,
partitioned_rewards::TestPartitionedEpochRewards,
transaction_results::DurableNonceFee,
},
Expand Down Expand Up @@ -82,6 +81,7 @@ use {
native_loader,
native_token::{sol_to_lamports, LAMPORTS_PER_SOL},
nonce::{self, state::DurableNonce},
nonce_info::NonceFull,
packet::PACKET_DATA_SIZE,
poh_config::PohConfig,
program::MAX_RETURN_DATA,
Expand Down
1 change: 1 addition & 0 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub mod log;
pub mod native_loader;
pub mod net;
pub mod nonce_account;
pub mod nonce_info;
pub mod offchain_message;
pub mod packet;
pub mod poh_config;
Expand Down
5 changes: 3 additions & 2 deletions accounts-db/src/nonce_info.rs → sdk/src/nonce_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use solana_sdk::{
#![cfg(feature = "full")]
use crate::{
account::{AccountSharedData, ReadableAccount, WritableAccount},
message::SanitizedMessage,
nonce_account,
Expand Down Expand Up @@ -118,7 +119,7 @@ impl NonceInfo for NonceFull {
mod tests {
use {
super::*,
solana_sdk::{
crate::{
hash::Hash,
instruction::Instruction,
message::Message,
Expand Down
2 changes: 1 addition & 1 deletion svm/src/account_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use {
log::warn,
solana_accounts_db::{
accounts::{LoadedTransaction, TransactionLoadResult, TransactionRent},
nonce_info::NonceFull,
transaction_results::TransactionCheckResult,
},
solana_program_runtime::{
Expand All @@ -25,6 +24,7 @@ use {
message::SanitizedMessage,
native_loader,
nonce::State as NonceState,
nonce_info::NonceFull,
pubkey::Pubkey,
rent::RentDue,
rent_collector::{RentCollector, RENT_EXEMPT_RENT_EPOCH},
Expand Down

0 comments on commit eeb0cf1

Please sign in to comment.