pub struct Bank {
pub rc: BankRc,
pub status_cache: Arc<RwLock<BankStatusCache>>,
pub ancestors: Ancestors,
pub ns_per_slot: u128,
pub rewards: RwLock<Vec<(Pubkey, RewardInfo)>>,
pub cluster_type: Option<ClusterType>,
pub transaction_log_collector_config: Arc<RwLock<TransactionLogCollectorConfig>>,
pub transaction_log_collector: Arc<RwLock<TransactionLogCollector>>,
pub feature_set: Arc<FeatureSet>,
pub drop_callback: RwLock<OptionalDropCallback>,
pub freeze_started: AtomicBool,
/* private fields */
}agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Expand description
Manager for the state of all accounts and programs after processing its entries.
Fields§
§rc: BankRcagave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.References to accounts, parent and signature status
status_cache: Arc<RwLock<BankStatusCache>>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.A cache of signature statuses
ancestors: Ancestorsagave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.The set of parents including this bank
ns_per_slot: u128agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.length of a slot in ns
rewards: RwLock<Vec<(Pubkey, RewardInfo)>>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Protocol-level rewards that were distributed by this bank
cluster_type: Option<ClusterType>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.transaction_log_collector_config: Arc<RwLock<TransactionLogCollectorConfig>>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.transaction_log_collector: Arc<RwLock<TransactionLogCollector>>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.feature_set: Arc<FeatureSet>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.drop_callback: RwLock<OptionalDropCallback>agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.callback function only to be called when dropping and should only be called once
freeze_started: AtomicBoolagave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Implementations§
Source§impl Bank
impl Bank
Sourcepub fn update_accounts_lt_hash(&self)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn update_accounts_lt_hash(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Updates the accounts lt hash
When freezing a bank, we compute and update the accounts lt hash. For each account modified in this bank, we:
- mix out its previous state, and
- mix in its current state
Since this function is non-idempotent, it should only be called once per bank.
Sourcepub fn inspect_account_for_accounts_lt_hash(
&self,
address: &Pubkey,
account_state: &AccountState<'_>,
is_writable: bool,
)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn inspect_account_for_accounts_lt_hash( &self, address: &Pubkey, account_state: &AccountState<'_>, is_writable: bool, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Caches initial state of writeable accounts
If a transaction account is writeable, cache its initial account state. The initial state is needed when computing the accounts lt hash for the slot, and caching the initial state saves us from having to look it up on disk later.
Source§impl Bank
impl Bank
Sourcepub fn load_addresses_from_ref<'a>(
&self,
address_table_lookups: impl Iterator<Item = SVMMessageAddressTableLookup<'a>>,
) -> Result<(LoadedAddresses, Slot), AddressLoaderError>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_addresses_from_ref<'a>( &self, address_table_lookups: impl Iterator<Item = SVMMessageAddressTableLookup<'a>>, ) -> Result<(LoadedAddresses, Slot), AddressLoaderError>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Load addresses from an iterator of SVMMessageAddressTableLookup,
additionally returning the minimum deactivation slot across all referenced ALTs
Source§impl Bank
impl Bank
Sourcepub fn check_transactions_with_forwarding_delay(
&self,
transactions: &[impl TransactionWithMeta],
filter: &[TransactionResult<()>],
forward_transactions_to_leader_at_slot_offset: u64,
) -> Vec<TransactionCheckResult> ⓘ
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn check_transactions_with_forwarding_delay( &self, transactions: &[impl TransactionWithMeta], filter: &[TransactionResult<()>], forward_transactions_to_leader_at_slot_offset: u64, ) -> Vec<TransactionCheckResult> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Checks a batch of sanitized transactions again bank for age and status
pub fn check_transactions<Tx: TransactionWithMeta>( &self, sanitized_txs: &[impl Borrow<Tx>], lock_results: &[TransactionResult<()>], max_age: usize, error_counters: &mut TransactionErrorMetrics, ) -> Vec<TransactionCheckResult> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Source§impl Bank
impl Bank
pub fn calculate_reward_for_transaction( &self, transaction: &impl TransactionWithMeta, fee_budget_limits: &FeeBudgetLimits, ) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn calculate_reward_and_burn_fee_details( &self, fee_details: &CollectorFeeDetails, ) -> FeeDistribution
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Source§impl Bank
impl Bank
pub fn get_rewards_and_num_partitions(&self) -> KeyedRewardsAndNumPartitions
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn force_reward_interval_end_for_tests(&mut self)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn force_reward_interval_end_for_tests(&mut self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.For testing only
Source§impl Bank
impl Bank
pub fn new_from_genesis( genesis_config: &GenesisConfig, runtime_config: Arc<RuntimeConfig>, paths: Vec<PathBuf>, debug_keys: Option<Arc<HashSet<Pubkey>>>, accounts_db_config: AccountsDbConfig, accounts_update_notifier: Option<AccountsUpdateNotifier>, collector_id_for_tests: Option<Pubkey>, exit: Arc<AtomicBool>, genesis_hash: Option<Hash>, feature_set: Option<FeatureSet>, ) -> Self
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn new_from_parent(
parent: Arc<Bank>,
collector_id: &Pubkey,
slot: Slot,
) -> Self
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn new_from_parent( parent: Arc<Bank>, collector_id: &Pubkey, slot: Slot, ) -> Self
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Create a new bank that points to an immutable checkpoint of another bank.
pub fn new_from_parent_with_options( parent: Arc<Bank>, collector_id: &Pubkey, slot: Slot, new_bank_options: NewBankOptions, ) -> Self
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn new_from_parent_with_tracer( parent: Arc<Bank>, collector_id: &Pubkey, slot: Slot, reward_calc_tracer: impl RewardCalcTracer, ) -> Self
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_fork_graph_in_program_cache( &self, fork_graph: Weak<RwLock<BankForks>>, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn prune_program_cache(&self, new_root_slot: Slot, new_root_epoch: Epoch)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn prune_program_cache_by_deployment_slot(&self, deployment_slot: Slot)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn new_warmup_cooldown_rate_epoch(&self) -> Option<Epoch>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn new_warmup_cooldown_rate_epoch(&self) -> Option<Epoch>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Epoch in which the new cooldown warmup rate for stake was activated
pub fn byte_limit_for_scans(&self) -> Option<usize>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn proper_ancestors_set(&self) -> HashSet<Slot>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_callback( &self, callback: Option<Box<dyn DropCallback + Send + Sync>>, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn vote_only_bank(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn warp_from_parent(
parent: Arc<Bank>,
collector_id: &Pubkey,
slot: Slot,
) -> Self
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn warp_from_parent( parent: Arc<Bank>, collector_id: &Pubkey, slot: Slot, ) -> Self
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Like new_from_parent but additionally:
- Doesn’t assume that the parent is anywhere near
slot, parent could be millions of slots in the past - Adjusts the new bank’s tick height to avoid having to run PoH for millions of slots
- Freezes the new bank, assuming that the user will
Bank::new_from_parentfrom this bank
pub fn collector_id(&self) -> &Pubkey
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn genesis_creation_time(&self) -> UnixTimestamp
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn slot(&self) -> Slot
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn bank_id(&self) -> BankId
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn epoch(&self) -> Epoch
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn first_normal_epoch(&self) -> Epoch
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn freeze_lock(&self) -> RwLockReadGuard<'_, Hash>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn hash(&self) -> Hash
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn is_frozen(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn freeze_started(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn status_cache_ancestors(&self) -> Vec<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn unix_timestamp_from_genesis(&self) -> i64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn unix_timestamp_from_genesis(&self) -> i64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.computed unix_timestamp at this slot height
pub fn clock(&self) -> Clock
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn update_last_restart_slot(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_sysvar_for_tests<T>(&self, sysvar: &T)where
T: SysvarSerialize + SysvarId,
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_slot_history(&self) -> SlotHistory
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn epoch_duration_in_years(&self, prev_epoch: Epoch) -> f64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn slot_in_year_for_inflation(&self) -> f64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn update_recent_blockhashes(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn rehash(&self)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn rehash(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Recalculates the bank hash
This is used by ledger-tool when creating a snapshot, which recalcuates the bank hash.
Note that the account state is not allowed to change by rehashing. If modifying accounts in ledger-tool is needed, create a new bank.
pub fn freeze(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn epoch_schedule(&self) -> &EpochSchedule
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn squash(&self) -> SquashTiming
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn squash(&self) -> SquashTiming
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.squash the parent’s state up into this Bank, this Bank becomes a root Note that this function is not thread-safe. If it is called concurrently on the same bank by multiple threads, the end result could be inconsistent. Calling code does not currently call this concurrently.
Sourcepub fn parent(&self) -> Option<Arc<Bank>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn parent(&self) -> Option<Arc<Bank>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the more recent checkpoint of this bank instance.
pub fn parent_slot(&self) -> Slot
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn parent_hash(&self) -> Hash
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn add_precompiled_account(&self, program_id: &Pubkey)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn add_precompiled_account(&self, program_id: &Pubkey)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Add a precompiled program account
pub fn set_rent_burn_percentage(&mut self, burn_percent: u8)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_hashes_per_tick(&mut self, hashes_per_tick: Option<u64>)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn last_blockhash(&self) -> Hash
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn last_blockhash(&self) -> Hash
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the last block hash registered.
pub fn last_blockhash_and_lamports_per_signature(&self) -> (Hash, u64)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn is_blockhash_valid(&self, hash: &Hash) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_minimum_balance_for_rent_exemption(&self, data_len: usize) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_lamports_per_signature(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_lamports_per_signature_for_blockhash( &self, hash: &Hash, ) -> Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_fee_for_message(&self, message: &SanitizedMessage) -> Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_fee_for_message_with_lamports_per_signature( &self, message: &impl SVMMessage, lamports_per_signature: u64, ) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_blockhash_last_valid_block_height( &self, blockhash: &Hash, ) -> Option<Slot>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn confirmed_last_blockhash(&self) -> Hash
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn clear_slot_signatures(&self, slot: Slot)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn register_unique_recent_blockhash_for_test(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn register_tick(&self, hash: &Hash, scheduler: &InstalledSchedulerRwLock)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn register_tick(&self, hash: &Hash, scheduler: &InstalledSchedulerRwLock)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Tell the bank which Entry IDs exist on the ledger. This function assumes subsequent calls
correspond to later entries, and will boot the oldest ones once its internal cache is full.
Once boot, the bank will reject transactions using that hash.
This is NOT thread safe because if tick height is updated by two different threads, the block boundary condition could be missed.
pub fn is_complete(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn is_block_boundary(&self, tick_height: u64) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_transaction_account_lock_limit(&self) -> usize
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_transaction_account_lock_limit(&self) -> usize
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the max number of accounts that a transaction may lock in this block
Sourcepub fn prepare_entry_batch(
&self,
txs: Vec<VersionedTransaction>,
) -> Result<TransactionBatch<'_, '_, RuntimeTransaction<SanitizedTransaction>>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn prepare_entry_batch( &self, txs: Vec<VersionedTransaction>, ) -> Result<TransactionBatch<'_, '_, RuntimeTransaction<SanitizedTransaction>>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Prepare a transaction batch from a list of versioned transactions from an entry. Used for tests only.
Sourcepub fn try_lock_accounts(
&self,
txs: &[impl TransactionWithMeta],
) -> Vec<Result<()>> ⓘ
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn try_lock_accounts( &self, txs: &[impl TransactionWithMeta], ) -> Vec<Result<()>> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Attempt to take locks on the accounts in a transaction batch
Sourcepub fn try_lock_accounts_with_results(
&self,
txs: &[impl TransactionWithMeta],
tx_results: impl Iterator<Item = Result<()>>,
) -> Vec<Result<()>> ⓘ
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn try_lock_accounts_with_results( &self, txs: &[impl TransactionWithMeta], tx_results: impl Iterator<Item = Result<()>>, ) -> Vec<Result<()>> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Attempt to take locks on the accounts in a transaction batch, and their cost limited packing status and duplicate transaction conflict status
Sourcepub fn prepare_sanitized_batch<'a, 'b, Tx: TransactionWithMeta>(
&'a self,
txs: &'b [Tx],
) -> TransactionBatch<'a, 'b, Tx>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn prepare_sanitized_batch<'a, 'b, Tx: TransactionWithMeta>( &'a self, txs: &'b [Tx], ) -> TransactionBatch<'a, 'b, Tx>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Prepare a locked transaction batch from a list of sanitized transactions.
Sourcepub fn prepare_sanitized_batch_with_results<'a, 'b, Tx: TransactionWithMeta>(
&'a self,
transactions: &'b [Tx],
transaction_results: impl Iterator<Item = Result<()>>,
) -> TransactionBatch<'a, 'b, Tx>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn prepare_sanitized_batch_with_results<'a, 'b, Tx: TransactionWithMeta>( &'a self, transactions: &'b [Tx], transaction_results: impl Iterator<Item = Result<()>>, ) -> TransactionBatch<'a, 'b, Tx>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Prepare a locked transaction batch from a list of sanitized transactions, and their cost limited packing status
Sourcepub fn prepare_unlocked_batch_from_single_tx<'a, Tx: SVMMessage>(
&'a self,
transaction: &'a Tx,
) -> TransactionBatch<'a, 'a, Tx>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn prepare_unlocked_batch_from_single_tx<'a, Tx: SVMMessage>( &'a self, transaction: &'a Tx, ) -> TransactionBatch<'a, 'a, Tx>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Prepare a transaction batch from a single transaction without locking accounts
Sourcepub fn prepare_locked_batch_from_single_tx<'a, Tx: TransactionWithMeta>(
&'a self,
transaction: &'a Tx,
) -> TransactionBatch<'a, 'a, Tx>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn prepare_locked_batch_from_single_tx<'a, Tx: TransactionWithMeta>( &'a self, transaction: &'a Tx, ) -> TransactionBatch<'a, 'a, Tx>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Prepare a transaction batch from a single transaction after locking accounts
Sourcepub fn simulate_transaction(
&self,
transaction: &impl TransactionWithMeta,
enable_cpi_recording: bool,
) -> TransactionSimulationResult
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn simulate_transaction( &self, transaction: &impl TransactionWithMeta, enable_cpi_recording: bool, ) -> TransactionSimulationResult
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Run transactions against a frozen bank without committing the results
Sourcepub fn simulate_transaction_unchecked(
&self,
transaction: &impl TransactionWithMeta,
enable_cpi_recording: bool,
) -> TransactionSimulationResult
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn simulate_transaction_unchecked( &self, transaction: &impl TransactionWithMeta, enable_cpi_recording: bool, ) -> TransactionSimulationResult
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Run transactions against a bank without committing the results; does not check if the bank is frozen, enabling use in single-Bank test frameworks
pub fn unlock_accounts<'a, Tx: SVMMessage + 'a>( &self, txs_and_results: impl Iterator<Item = (&'a Tx, &'a Result<()>)> + Clone, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn remove_unrooted_slots(&self, slots: &[(Slot, BankId)])
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_hash_age(&self, hash: &Hash) -> Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn is_hash_valid_for_age(&self, hash: &Hash, max_age: usize) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn collect_balances( &self, batch: &TransactionBatch<'_, '_, impl SVMMessage>, ) -> TransactionBalances
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn load_and_execute_transactions( &self, batch: &TransactionBatch<'_, '_, impl TransactionWithMeta>, max_age: usize, timings: &mut ExecuteTimings, error_counters: &mut TransactionErrorMetrics, processing_config: TransactionProcessingConfig<'_>, ) -> LoadAndExecuteTransactionsOutput
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn load_accounts_data_size(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_accounts_data_size(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Load the accounts data size, in bytes
Sourcepub fn load_accounts_data_size_delta(&self) -> i64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_accounts_data_size_delta(&self) -> i64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Load the change in accounts data size in this Bank, in bytes
Sourcepub fn load_accounts_data_size_delta_on_chain(&self) -> i64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_accounts_data_size_delta_on_chain(&self) -> i64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Load the change in accounts data size in this Bank, in bytes, from on-chain events i.e. transactions
Sourcepub fn load_accounts_data_size_delta_off_chain(&self) -> i64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_accounts_data_size_delta_off_chain(&self) -> i64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Load the change in accounts data size in this Bank, in bytes, from off-chain events i.e. rent collection
pub fn commit_transactions( &self, sanitized_txs: &[impl TransactionWithMeta], processing_results: Vec<TransactionProcessingResult>, processed_counts: &ProcessedTransactionCounts, timings: &mut ExecuteTimings, ) -> Vec<TransactionCommitResult> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn cluster_type(&self) -> ClusterType
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn load_execute_and_commit_transactions(
&self,
batch: &TransactionBatch<'_, '_, impl TransactionWithMeta>,
max_age: usize,
recording_config: ExecutionRecordingConfig,
timings: &mut ExecuteTimings,
log_messages_bytes_limit: Option<usize>,
) -> (Vec<TransactionCommitResult>, Option<BalanceCollector>)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn load_execute_and_commit_transactions( &self, batch: &TransactionBatch<'_, '_, impl TransactionWithMeta>, max_age: usize, recording_config: ExecutionRecordingConfig, timings: &mut ExecuteTimings, log_messages_bytes_limit: Option<usize>, ) -> (Vec<TransactionCommitResult>, Option<BalanceCollector>)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Process a batch of transactions.
pub fn load_execute_and_commit_transactions_with_pre_commit_callback<'a>( &'a self, batch: &TransactionBatch<'_, '_, impl TransactionWithMeta>, max_age: usize, recording_config: ExecutionRecordingConfig, timings: &mut ExecuteTimings, log_messages_bytes_limit: Option<usize>, pre_commit_callback: impl FnOnce(&mut ExecuteTimings, &[TransactionProcessingResult]) -> PreCommitResult<'a>, ) -> Result<(Vec<TransactionCommitResult>, Option<BalanceCollector>)>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn process_transaction(&self, tx: &Transaction) -> Result<()>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn process_transaction(&self, tx: &Transaction) -> Result<()>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Process a Transaction. This is used for unit tests and simply calls the vector Bank::process_transactions method.
Sourcepub fn process_transaction_with_metadata(
&self,
tx: impl Into<VersionedTransaction>,
) -> Result<CommittedTransaction>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn process_transaction_with_metadata( &self, tx: impl Into<VersionedTransaction>, ) -> Result<CommittedTransaction>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Process a Transaction and store metadata. This is used for tests and the banks services. It replicates the vector Bank::process_transaction method with metadata recording enabled.
Sourcepub fn try_process_transactions<'a>(
&self,
txs: impl Iterator<Item = &'a Transaction>,
) -> Result<Vec<Result<()>>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn try_process_transactions<'a>( &self, txs: impl Iterator<Item = &'a Transaction>, ) -> Result<Vec<Result<()>>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Process multiple transaction in a single batch. This is used for benches and unit tests. Short circuits if any of the transactions do not pass sanitization checks.
Sourcepub fn try_process_entry_transactions(
&self,
txs: Vec<VersionedTransaction>,
) -> Result<Vec<Result<()>>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn try_process_entry_transactions( &self, txs: Vec<VersionedTransaction>, ) -> Result<Vec<Result<()>>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Process multiple transaction in a single batch. This is used for benches and unit tests. Short circuits if any of the transactions do not pass sanitization checks.
Sourcepub fn transfer(
&self,
n: u64,
keypair: &Keypair,
to: &Pubkey,
) -> Result<Signature>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn transfer( &self, n: u64, keypair: &Keypair, to: &Pubkey, ) -> Result<Signature>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Create, sign, and process a Transaction from keypair to to of
n lamports where blockhash is the last Entry ID observed by the client.
pub fn read_balance(account: &AccountSharedData) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_balance(&self, pubkey: &Pubkey) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_balance(&self, pubkey: &Pubkey) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Each program would need to be able to introspect its own state this is hard-coded to the Budget language
Sourcepub fn parents(&self) -> Vec<Arc<Bank>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn parents(&self) -> Vec<Arc<Bank>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Compute all the parents of the bank in order
Sourcepub fn parents_inclusive(self: Arc<Self>) -> Vec<Arc<Bank>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn parents_inclusive(self: Arc<Self>) -> Vec<Arc<Bank>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Compute all the parents of the bank including this bank itself
Sourcepub fn store_account(&self, pubkey: &Pubkey, account: &AccountSharedData)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn store_account(&self, pubkey: &Pubkey, account: &AccountSharedData)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.fn store the single account with pubkey.
Uses store_accounts, which works on a vector of accounts.
pub fn store_accounts<'a>(&self, accounts: impl StorableAccounts<'a>)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn force_flush_accounts_cache(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn flush_accounts_cache_if_needed(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn accounts(&self) -> Arc<Accounts>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_tick_height(&self, tick_height: u64)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_inflation(&self, inflation: Inflation)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn hard_forks(&self) -> HardForks
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn hard_forks(&self) -> HardForks
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get a snapshot of the current set of hard forks
pub fn register_hard_fork(&self, new_hard_fork_slot: Slot)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_account_with_fixed_root_no_cache( &self, pubkey: &Pubkey, ) -> Option<AccountSharedData>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_account(&self, pubkey: &Pubkey) -> Option<AccountSharedData>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_account_with_fixed_root( &self, pubkey: &Pubkey, ) -> Option<AccountSharedData>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_account_modified_slot_with_fixed_root( &self, pubkey: &Pubkey, ) -> Option<(AccountSharedData, Slot)>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_account_modified_slot( &self, pubkey: &Pubkey, ) -> Option<(AccountSharedData, Slot)>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_program_accounts( &self, program_id: &Pubkey, config: &ScanConfig, ) -> ScanResult<Vec<KeyedAccountSharedData>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_filtered_program_accounts<F: Fn(&AccountSharedData) -> bool>( &self, program_id: &Pubkey, filter: F, config: &ScanConfig, ) -> ScanResult<Vec<KeyedAccountSharedData>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_filtered_indexed_accounts<F: Fn(&AccountSharedData) -> bool>( &self, index_key: &IndexKey, filter: F, config: &ScanConfig, byte_limit_for_scan: Option<usize>, ) -> ScanResult<Vec<KeyedAccountSharedData>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn account_indexes_include_key(&self, key: &Pubkey) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_all_accounts(
&self,
sort_results: bool,
) -> ScanResult<Vec<PubkeyAccountSlot>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_all_accounts( &self, sort_results: bool, ) -> ScanResult<Vec<PubkeyAccountSlot>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns all the accounts this bank can load
pub fn scan_all_accounts<F>( &self, scan_func: F, sort_results: bool, ) -> ScanResult<()>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_program_accounts_modified_since_parent( &self, program_id: &Pubkey, ) -> Vec<KeyedAccountSharedData> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_transaction_logs( &self, address: Option<&Pubkey>, ) -> Option<Vec<TransactionLogInfo>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_all_accounts_modified_since_parent(
&self,
) -> Vec<KeyedAccountSharedData> ⓘ
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_all_accounts_modified_since_parent( &self, ) -> Vec<KeyedAccountSharedData> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns all the accounts stored in this slot
pub fn get_largest_accounts( &self, num: usize, filter_by_address: &HashSet<Pubkey>, filter: AccountAddressFilter, sort_results: bool, ) -> ScanResult<Vec<(Pubkey, u64)>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn transaction_count(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn transaction_count(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the accumulated executed transaction count
Sourcepub fn non_vote_transaction_count_since_restart(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn non_vote_transaction_count_since_restart(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the number of non-vote transactions processed without error
since the most recent boot from snapshot or genesis.
This value is not shared though the network, nor retained
within snapshots, but is preserved in Bank::new_from_parent.
Sourcepub fn executed_transaction_count(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn executed_transaction_count(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the transaction count executed only in this bank
pub fn transaction_error_count(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn transaction_entries_count(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn transactions_per_entry_max(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn signature_count(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_signature_status_processed_since_parent( &self, signature: &Signature, ) -> Option<Result<()>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_signature_status_with_blockhash( &self, signature: &Signature, blockhash: &Hash, ) -> Option<Result<()>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_committed_transaction_status_and_slot( &self, message_hash: &Hash, transaction_blockhash: &Hash, ) -> Option<(Slot, bool)>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_signature_status_slot( &self, signature: &Signature, ) -> Option<(Slot, Result<()>)>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_signature_status(&self, signature: &Signature) -> Option<Result<()>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn has_signature(&self, signature: &Signature) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn collector_fees(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn run_final_hash_calc(&self)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn run_final_hash_calc(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Used by ledger tool to run a final hash calculation once all ledger replay has completed. This should not be called by validator code.
Sourcepub fn get_snapshot_storages(
&self,
base_slot: Option<Slot>,
) -> Vec<Arc<AccountStorageEntry>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_snapshot_storages( &self, base_slot: Option<Slot>, ) -> Vec<Arc<AccountStorageEntry>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get this bank’s storages to use for snapshots.
If a base slot is provided, return only the storages that are higher than this slot.
pub fn verify_transaction( &self, tx: VersionedTransaction, verification_mode: TransactionVerificationMode, ) -> Result<RuntimeTransaction<SanitizedTransaction>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn fully_verify_transaction( &self, tx: VersionedTransaction, ) -> Result<RuntimeTransaction<SanitizedTransaction>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn check_reserved_keys(&self, tx: &impl SVMMessage) -> Result<()>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn check_reserved_keys(&self, tx: &impl SVMMessage) -> Result<()>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Checks if the transaction violates the bank’s reserved keys. This needs to be checked upon epoch boundary crosses because the reserved key set may have changed since the initial sanitization.
Sourcepub fn calculate_capitalization_for_tests(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn calculate_capitalization_for_tests(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Calculates and returns the capitalization.
Panics if capitalization overflows a u64.
Note, this is very expensive! It walks the whole accounts index, account-by-account, summing each account’s balance.
Only intended to be called at startup by ledger-tool or tests. (cannot be made DCOU due to solana-program-test)
Sourcepub fn set_capitalization_for_tests(&self, capitalization: u64)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn set_capitalization_for_tests(&self, capitalization: u64)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sets the capitalization.
Only intended to be called by ledger-tool or tests. (cannot be made DCOU due to solana-program-test)
Sourcepub fn get_snapshot_hash(&self) -> SnapshotHash
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_snapshot_hash(&self) -> SnapshotHash
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the SnapshotHash for this bank’s slot
This fn is used at startup to verify the bank was rebuilt correctly.
pub fn load_account_into_read_cache(&self, key: &Pubkey)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn verify_snapshot_bank(
&self,
skip_shrink: bool,
force_clean: bool,
latest_full_snapshot_slot: Slot,
calculated_accounts_lt_hash: Option<&AccountsLtHash>,
) -> bool
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn verify_snapshot_bank( &self, skip_shrink: bool, force_clean: bool, latest_full_snapshot_slot: Slot, calculated_accounts_lt_hash: Option<&AccountsLtHash>, ) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.A snapshot bank should be purged of 0 lamport accounts which are not part of the hash calculation and could shield other real accounts.
Sourcepub fn hashes_per_tick(&self) -> &Option<u64>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn hashes_per_tick(&self) -> &Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the number of hashes per tick
Sourcepub fn ticks_per_slot(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn ticks_per_slot(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the number of ticks per slot
Sourcepub fn slots_per_year(&self) -> f64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn slots_per_year(&self) -> f64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the number of slots per year
Sourcepub fn tick_height(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn tick_height(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the number of ticks since genesis.
Sourcepub fn inflation(&self) -> Inflation
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn inflation(&self) -> Inflation
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the inflation parameters of the Bank
Sourcepub fn rent_collector(&self) -> &RentCollector
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn rent_collector(&self) -> &RentCollector
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the rent collector for this Bank
Sourcepub fn capitalization(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn capitalization(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the total capitalization of the Bank
Sourcepub fn max_tick_height(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn max_tick_height(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return this bank’s max_tick_height
Sourcepub fn block_height(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn block_height(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the block_height of this bank
Sourcepub fn get_slots_in_epoch(&self, epoch: Epoch) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_slots_in_epoch(&self, epoch: Epoch) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return the number of slots per epoch for the given epoch
Sourcepub fn get_leader_schedule_epoch(&self, slot: Slot) -> Epoch
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_leader_schedule_epoch(&self, slot: Slot) -> Epoch
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.returns the epoch for which this bank’s leader_schedule_slot_offset and slot would need to cache leader_schedule
Sourcepub fn should_use_vote_keyed_leader_schedule(
&self,
epoch: Epoch,
) -> Option<bool>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn should_use_vote_keyed_leader_schedule( &self, epoch: Epoch, ) -> Option<bool>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns whether the specified epoch should use the new vote account keyed leader schedule
Sourcepub fn vote_accounts(&self) -> Arc<VoteAccountsHashMap> ⓘ
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn vote_accounts(&self) -> Arc<VoteAccountsHashMap> ⓘ
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.current vote accounts for this bank along with the stake attributed to each account
Sourcepub fn get_vote_account(&self, vote_account: &Pubkey) -> Option<VoteAccount>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_vote_account(&self, vote_account: &Pubkey) -> Option<VoteAccount>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Vote account for the given vote account pubkey.
Sourcepub fn current_epoch_stakes(&self) -> &VersionedEpochStakes
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn current_epoch_stakes(&self) -> &VersionedEpochStakes
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the EpochStakes for the current Bank::epoch
Sourcepub fn epoch_stakes(&self, epoch: Epoch) -> Option<&VersionedEpochStakes>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_stakes(&self, epoch: Epoch) -> Option<&VersionedEpochStakes>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the EpochStakes for a given epoch
pub fn epoch_stakes_map(&self) -> &HashMap<Epoch, VersionedEpochStakes>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn current_epoch_staked_nodes(&self) -> Arc<HashMap<Pubkey, u64>>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn current_epoch_staked_nodes(&self) -> Arc<HashMap<Pubkey, u64>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the staked nodes map for the current Bank::epoch
pub fn epoch_staked_nodes( &self, epoch: Epoch, ) -> Option<Arc<HashMap<Pubkey, u64>>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn epoch_total_stake(&self, epoch: Epoch) -> Option<u64>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_total_stake(&self, epoch: Epoch) -> Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the total epoch stake for the given epoch.
Sourcepub fn get_current_epoch_total_stake(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_current_epoch_total_stake(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the total epoch stake for the current Bank::epoch
Sourcepub fn epoch_vote_accounts(&self, epoch: Epoch) -> Option<&VoteAccountsHashMap>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_vote_accounts(&self, epoch: Epoch) -> Option<&VoteAccountsHashMap>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.vote accounts for the specific epoch along with the stake attributed to each account
Sourcepub fn get_current_epoch_vote_accounts(&self) -> &VoteAccountsHashMap
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_current_epoch_vote_accounts(&self) -> &VoteAccountsHashMap
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the vote accounts along with the stake attributed to each account for the current Bank::epoch
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the fixed authorized voter for the given vote account for the current epoch
Sourcepub fn epoch_vote_accounts_for_node_id(
&self,
node_id: &Pubkey,
) -> Option<&NodeVoteAccounts>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_vote_accounts_for_node_id( &self, node_id: &Pubkey, ) -> Option<&NodeVoteAccounts>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the fixed set of vote accounts for the given node id for the current epoch
Sourcepub fn epoch_node_id_to_stake(
&self,
epoch: Epoch,
node_id: &Pubkey,
) -> Option<u64>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_node_id_to_stake( &self, epoch: Epoch, node_id: &Pubkey, ) -> Option<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the total stake belonging to vote accounts associated with the given node id for the given epoch.
Sourcepub fn total_epoch_stake(&self) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn total_epoch_stake(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the fixed total stake of all vote accounts for current epoch
Sourcepub fn epoch_vote_account_stake(&self, vote_account: &Pubkey) -> u64
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn epoch_vote_account_stake(&self, vote_account: &Pubkey) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get the fixed stake of the given vote account for the current epoch
Sourcepub fn get_epoch_and_slot_index(&self, slot: Slot) -> (Epoch, SlotIndex)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_epoch_and_slot_index(&self, slot: Slot) -> (Epoch, SlotIndex)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.given a slot, return the epoch and offset into the epoch this slot falls e.g. with a fixed number for slots_per_epoch, the calculation is simply:
( slot/slots_per_epoch, slot % slots_per_epoch )
pub fn get_epoch_info(&self) -> EpochInfo
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn is_empty(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn add_mockup_builtin( &mut self, program_id: Pubkey, builtin_function: BuiltinFunctionWithContext, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn add_precompile(&mut self, program_id: &Pubkey)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn print_accounts_stats(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn shrink_candidate_slots(&self) -> usize
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn read_cost_tracker(&self) -> LockResult<RwLockReadGuard<'_, CostTracker>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn write_cost_tracker( &self, ) -> LockResult<RwLockWriteGuard<'_, CostTracker>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn should_bank_still_be_processing_txs( bank_creation_time: &Instant, max_tx_ingestion_nanos: u128, ) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn deactivate_feature(&mut self, id: &Pubkey)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn activate_feature(&mut self, id: &Pubkey)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn fill_bank_with_ticks_for_tests(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_reserved_account_keys(&self) -> &HashSet<Pubkey>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_reserved_account_keys(&self) -> &HashSet<Pubkey>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Get a set of all actively reserved account keys that are not allowed to be write-locked during transaction processing.
Sourcepub fn compute_pending_activation_slot(
&self,
feature_id: &Pubkey,
) -> Option<Slot>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn compute_pending_activation_slot( &self, feature_id: &Pubkey, ) -> Option<Slot>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.If feature_id is pending to be activated at the next epoch boundary, return
the first slot at which it will be active (the epoch boundary).
Sourcepub fn calculate_accounts_data_size(&self) -> ScanResult<u64>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn calculate_accounts_data_size(&self) -> ScanResult<u64>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Calculates the accounts data size of all accounts
Panics if total overflows a u64.
Note, this may be very expensive, as all accounts are collected into a Vec before summing each account’s data size.
Only intended to be called by tests or when the number of accounts is small.
pub fn is_in_slot_hashes_history(&self, slot: &Slot) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn check_program_modification_slot(&self) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_check_program_modification_slot(&mut self, check: bool)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn fee_structure(&self) -> &FeeStructure
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn parent_block_id(&self) -> Option<Hash>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn block_id(&self) -> Option<Hash>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_block_id(&self, block_id: Option<Hash>)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn compute_budget(&self) -> Option<ComputeBudget>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn add_builtin( &self, program_id: Pubkey, name: &str, builtin: ProgramCacheEntry, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn get_bank_hash_stats(&self) -> BankHashStats
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn clear_epoch_rewards_cache(&self)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn set_accounts_lt_hash_for_snapshot_minimizer(
&self,
accounts_lt_hash: AccountsLtHash,
)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn set_accounts_lt_hash_for_snapshot_minimizer( &self, accounts_lt_hash: AccountsLtHash, )
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sets the accounts lt hash, only to be used by SnapshotMinimizer
Sourcepub fn get_collector_fee_details(&self) -> CollectorFeeDetails
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_collector_fee_details(&self) -> CollectorFeeDetails
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Return total transaction fee collected
Trait Implementations§
Source§impl AddressLoader for &Bank
impl AddressLoader for &Bank
fn load_addresses( self, address_table_lookups: &[MessageAddressTableLookup], ) -> Result<LoadedAddresses, AddressLoaderError>
Source§impl InvokeContextCallback for Bank
impl InvokeContextCallback for Bank
Source§fn get_epoch_stake(&self) -> u64
fn get_epoch_stake(&self) -> u64
Source§fn get_epoch_stake_for_vote_account(&self, vote_address: &Pubkey) -> u64
fn get_epoch_stake_for_vote_account(&self, vote_address: &Pubkey) -> u64
Source§fn is_precompile(&self, program_id: &Pubkey) -> bool
fn is_precompile(&self, program_id: &Pubkey) -> bool
Source§fn process_precompile(
&self,
program_id: &Pubkey,
data: &[u8],
instruction_datas: Vec<&[u8]>,
) -> Result<(), PrecompileError>
fn process_precompile( &self, program_id: &Pubkey, data: &[u8], instruction_datas: Vec<&[u8]>, ) -> Result<(), PrecompileError>
Source§impl TransactionProcessingCallback for Bank
impl TransactionProcessingCallback for Bank
fn inspect_account( &self, address: &Pubkey, account_state: AccountState<'_>, is_writable: bool, )
Auto Trait Implementations§
impl !Freeze for Bank
impl !RefUnwindSafe for Bank
impl Send for Bank
impl Sync for Bank
impl Unpin for Bank
impl !UnwindSafe for Bank
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.