SVM: Move RentDebits from accounts-db to Solana SDK (#35135)
This commit is contained in:
parent
1b9dfd447e
commit
b9ee3b475b
|
@ -7,7 +7,6 @@ use {
|
||||||
accounts_index::{IndexKey, ScanConfig, ScanError, ScanResult, ZeroLamport},
|
accounts_index::{IndexKey, ScanConfig, ScanError, ScanResult, ZeroLamport},
|
||||||
ancestors::Ancestors,
|
ancestors::Ancestors,
|
||||||
nonce_info::{NonceFull, NonceInfo},
|
nonce_info::{NonceFull, NonceInfo},
|
||||||
rent_debits::RentDebits,
|
|
||||||
storable_accounts::StorableAccounts,
|
storable_accounts::StorableAccounts,
|
||||||
transaction_results::TransactionExecutionResult,
|
transaction_results::TransactionExecutionResult,
|
||||||
},
|
},
|
||||||
|
@ -24,6 +23,7 @@ use {
|
||||||
State as NonceState,
|
State as NonceState,
|
||||||
},
|
},
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
|
rent_debits::RentDebits,
|
||||||
slot_hashes::SlotHashes,
|
slot_hashes::SlotHashes,
|
||||||
transaction::{Result, SanitizedTransaction, TransactionAccountLocks, TransactionError},
|
transaction::{Result, SanitizedTransaction, TransactionAccountLocks, TransactionError},
|
||||||
transaction_context::{IndexOfAccount, TransactionAccount},
|
transaction_context::{IndexOfAccount, TransactionAccount},
|
||||||
|
|
|
@ -35,7 +35,6 @@ pub mod partitioned_rewards;
|
||||||
mod pubkey_bins;
|
mod pubkey_bins;
|
||||||
mod read_only_accounts_cache;
|
mod read_only_accounts_cache;
|
||||||
pub mod rent_collector;
|
pub mod rent_collector;
|
||||||
pub mod rent_debits;
|
|
||||||
mod rolling_bit_field;
|
mod rolling_bit_field;
|
||||||
pub mod secondary_index;
|
pub mod secondary_index;
|
||||||
pub mod shared_buffer_reader;
|
pub mod shared_buffer_reader;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
use {
|
use solana_sdk::{
|
||||||
crate::rent_debits::RentDebits,
|
account::{AccountSharedData, ReadableAccount, WritableAccount},
|
||||||
solana_sdk::{
|
message::SanitizedMessage,
|
||||||
account::{AccountSharedData, ReadableAccount, WritableAccount},
|
nonce_account,
|
||||||
message::SanitizedMessage,
|
pubkey::Pubkey,
|
||||||
nonce_account,
|
rent_debits::RentDebits,
|
||||||
pubkey::Pubkey,
|
transaction::{self, TransactionError},
|
||||||
transaction::{self, TransactionError},
|
transaction_context::TransactionAccount,
|
||||||
transaction_context::TransactionAccount,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub trait NonceInfo {
|
pub trait NonceInfo {
|
||||||
|
|
|
@ -5,12 +5,10 @@
|
||||||
)]
|
)]
|
||||||
pub use solana_sdk::inner_instruction::{InnerInstruction, InnerInstructionsList};
|
pub use solana_sdk::inner_instruction::{InnerInstruction, InnerInstructionsList};
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::nonce_info::{NonceFull, NonceInfo, NoncePartial},
|
||||||
nonce_info::{NonceFull, NonceInfo, NoncePartial},
|
|
||||||
rent_debits::RentDebits,
|
|
||||||
},
|
|
||||||
solana_program_runtime::loaded_programs::LoadedProgramsForTxBatch,
|
solana_program_runtime::loaded_programs::LoadedProgramsForTxBatch,
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
|
rent_debits::RentDebits,
|
||||||
transaction::{self, TransactionError},
|
transaction::{self, TransactionError},
|
||||||
transaction_context::TransactionReturnData,
|
transaction_context::TransactionReturnData,
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,6 @@ use {
|
||||||
accounts_index::AccountSecondaryIndexes,
|
accounts_index::AccountSecondaryIndexes,
|
||||||
accounts_update_notifier_interface::AccountsUpdateNotifier,
|
accounts_update_notifier_interface::AccountsUpdateNotifier,
|
||||||
epoch_accounts_hash::EpochAccountsHash,
|
epoch_accounts_hash::EpochAccountsHash,
|
||||||
rent_debits::RentDebits,
|
|
||||||
transaction_results::{
|
transaction_results::{
|
||||||
TransactionExecutionDetails, TransactionExecutionResult, TransactionResults,
|
TransactionExecutionDetails, TransactionExecutionResult, TransactionResults,
|
||||||
},
|
},
|
||||||
|
@ -49,6 +48,7 @@ use {
|
||||||
genesis_config::GenesisConfig,
|
genesis_config::GenesisConfig,
|
||||||
hash::Hash,
|
hash::Hash,
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
|
rent_debits::RentDebits,
|
||||||
saturating_add_assign,
|
saturating_add_assign,
|
||||||
signature::{Keypair, Signature},
|
signature::{Keypair, Signature},
|
||||||
timing,
|
timing,
|
||||||
|
|
|
@ -212,10 +212,7 @@ pub(crate) mod tests {
|
||||||
crossbeam_channel::unbounded,
|
crossbeam_channel::unbounded,
|
||||||
dashmap::DashMap,
|
dashmap::DashMap,
|
||||||
solana_account_decoder::parse_token::token_amount_to_ui_amount,
|
solana_account_decoder::parse_token::token_amount_to_ui_amount,
|
||||||
solana_accounts_db::{
|
solana_accounts_db::nonce_info::{NonceFull, NoncePartial},
|
||||||
nonce_info::{NonceFull, NoncePartial},
|
|
||||||
rent_debits::RentDebits,
|
|
||||||
},
|
|
||||||
solana_ledger::{genesis_utils::create_genesis_config, get_tmp_ledger_path_auto_delete},
|
solana_ledger::{genesis_utils::create_genesis_config, get_tmp_ledger_path_auto_delete},
|
||||||
solana_runtime::bank::{Bank, TransactionBalancesSet},
|
solana_runtime::bank::{Bank, TransactionBalancesSet},
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
|
@ -227,6 +224,7 @@ pub(crate) mod tests {
|
||||||
nonce::{self, state::DurableNonce},
|
nonce::{self, state::DurableNonce},
|
||||||
nonce_account,
|
nonce_account,
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
|
rent_debits::RentDebits,
|
||||||
signature::{Keypair, Signature, Signer},
|
signature::{Keypair, Signature, Signer},
|
||||||
system_transaction,
|
system_transaction,
|
||||||
transaction::{
|
transaction::{
|
||||||
|
|
|
@ -89,7 +89,6 @@ use {
|
||||||
nonce_info::{NonceInfo, NoncePartial},
|
nonce_info::{NonceInfo, NoncePartial},
|
||||||
partitioned_rewards::PartitionedEpochRewardsConfig,
|
partitioned_rewards::PartitionedEpochRewardsConfig,
|
||||||
rent_collector::{CollectedInfo, RentCollector, RENT_EXEMPT_RENT_EPOCH},
|
rent_collector::{CollectedInfo, RentCollector, RENT_EXEMPT_RENT_EPOCH},
|
||||||
rent_debits::RentDebits,
|
|
||||||
sorted_storages::SortedStorages,
|
sorted_storages::SortedStorages,
|
||||||
stake_rewards::StakeReward,
|
stake_rewards::StakeReward,
|
||||||
storable_accounts::StorableAccounts,
|
storable_accounts::StorableAccounts,
|
||||||
|
@ -143,6 +142,7 @@ use {
|
||||||
precompiles::get_precompiles,
|
precompiles::get_precompiles,
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
rent::RentDue,
|
rent::RentDue,
|
||||||
|
rent_debits::RentDebits,
|
||||||
reward_info::RewardInfo,
|
reward_info::RewardInfo,
|
||||||
saturating_add_assign,
|
saturating_add_assign,
|
||||||
signature::{Keypair, Signature},
|
signature::{Keypair, Signature},
|
||||||
|
|
|
@ -92,6 +92,7 @@ pub mod program_utils;
|
||||||
pub mod pubkey;
|
pub mod pubkey;
|
||||||
pub mod quic;
|
pub mod quic;
|
||||||
pub mod recent_blockhashes_account;
|
pub mod recent_blockhashes_account;
|
||||||
|
pub mod rent_debits;
|
||||||
pub mod reward_info;
|
pub mod reward_info;
|
||||||
pub mod reward_type;
|
pub mod reward_type;
|
||||||
pub mod rpc_port;
|
pub mod rpc_port;
|
||||||
|
|
|
@ -10,7 +10,6 @@ use {
|
||||||
accounts::{LoadedTransaction, TransactionLoadResult, TransactionRent},
|
accounts::{LoadedTransaction, TransactionLoadResult, TransactionRent},
|
||||||
nonce_info::NonceFull,
|
nonce_info::NonceFull,
|
||||||
rent_collector::{RentCollector, RENT_EXEMPT_RENT_EPOCH},
|
rent_collector::{RentCollector, RENT_EXEMPT_RENT_EPOCH},
|
||||||
rent_debits::RentDebits,
|
|
||||||
transaction_results::TransactionCheckResult,
|
transaction_results::TransactionCheckResult,
|
||||||
},
|
},
|
||||||
solana_program_runtime::{
|
solana_program_runtime::{
|
||||||
|
@ -29,6 +28,7 @@ use {
|
||||||
nonce::State as NonceState,
|
nonce::State as NonceState,
|
||||||
pubkey::Pubkey,
|
pubkey::Pubkey,
|
||||||
rent::RentDue,
|
rent::RentDue,
|
||||||
|
rent_debits::RentDebits,
|
||||||
saturating_add_assign,
|
saturating_add_assign,
|
||||||
sysvar::{self, instructions::construct_instructions_data},
|
sysvar::{self, instructions::construct_instructions_data},
|
||||||
transaction::{Result, SanitizedTransaction, TransactionError},
|
transaction::{Result, SanitizedTransaction, TransactionError},
|
||||||
|
|
Loading…
Reference in New Issue