solana/runtime/src
Brooks Prumo 00890957ee
Add snapshot_utils::bank_from_latest_snapshot_archives() (#18983)
While reviewing PR #18565, as issue was brought up to refactor some code
around verifying the bank after rebuilding from snapshots.  A new
top-level function has been added to get the latest snapshot archives
and load the bank then verify.  Additionally, new tests have been
written and existing tests have been updated to use this new function.

Fixes #18973

While resolving the issue, it became clear there was some additional
low-hanging fruit this change enabled.  Specifically, the functions
`bank_to_xxx_snapshot_archive()` now return their respective
`SnapshotArchiveInfo`.  And on the flip side,
`bank_from_snapshot_archives()` now takes `SnapshotArchiveInfo`s instead
of separate paths and archive formats.  This bundling simplifies bank
rebuilding.
2021-08-06 20:16:06 -05:00
..
serde_snapshot for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
accounts.rs get rid of Accounts new and default (#19100) 2021-08-06 15:52:27 -05:00
accounts_background_service.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
accounts_cache.rs calculate_capitalization uses hash calculation (#17443) 2021-06-14 08:53:07 -05:00
accounts_db.rs AccountsDb::new_with_config_for_tests (#19103) 2021-08-06 17:18:16 -05:00
accounts_hash.rs remove superfluous `collect()`s 2021-08-04 07:21:55 +00:00
accounts_index.rs rework AccountsIndex traits (#19089) 2021-08-06 08:39:34 -05:00
ancestors.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
append_vec.rs Eliminate doc warnings and fix some markdown (#18566) 2021-07-16 00:40:07 +00:00
bank.rs remove Bank::default() (#19099) 2021-08-06 13:10:13 -05:00
bank_client.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
bank_forks.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
bank_utils.rs add _for_tests to setup_bank_and_vote_pubkeys (#19060) 2021-08-05 08:43:35 -05:00
blockhash_queue.rs Deprecate SysvarRecentBlockhashes (#18875) 2021-07-27 16:34:21 -07:00
bloom.rs Eliminate doc warnings and fix some markdown (#18566) 2021-07-16 00:40:07 +00:00
builtins.rs tx wide compute budget (#18631) 2021-07-16 00:31:22 -07:00
commitment.rs clippy 2021-04-18 20:55:02 -07:00
contains.rs More generic accounts purge functions (#14595) 2021-01-17 20:31:03 -08:00
epoch_stakes.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
genesis_utils.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
hardened_unpack.rs untar in parallel (#18184) 2021-06-24 17:29:49 -05:00
inline_spl_token_v2_0.rs token: Swap new token program id for consistency on all networks (#18823) 2021-07-22 10:31:55 +02:00
instruction_recorder.rs
lib.rs Move entry/poh to own crate to speed up poh bench build (#18225) 2021-07-14 14:16:29 +02:00
loader_utils.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
log_collector.rs Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
message_processor.rs get rid of Accounts new and default (#19100) 2021-08-06 15:52:27 -05:00
native_loader.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
neon_evm_program.rs fix test (#18609) 2021-07-12 11:45:25 -07:00
non_circulating_supply.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
pubkey_bins.rs move towards accounts index being dynamic (#19032) 2021-08-04 09:18:05 -05:00
read_only_accounts_cache.rs tests: lamports += to checked_add (#16842) 2021-04-27 10:23:07 -05:00
rent_collector.rs Fix rebase... 2021-07-09 09:08:38 -07:00
secondary_index.rs Write helper for multithread update (#18808) 2021-07-29 03:16:36 +02:00
serde_snapshot.rs Add incremental snapshot utils (#18504) 2021-07-22 14:40:37 -05:00
shared_buffer_reader.rs lazy allocate buffers for bg reader in untar (#18640) 2021-07-16 13:17:03 -05:00
snapshot_config.rs Add incremental_snapshot_archive_interval_slots to SnapshotConfig (#19026) 2021-08-04 14:40:20 -05:00
snapshot_package.rs Add snapshot_utils::bank_from_latest_snapshot_archives() (#18983) 2021-08-06 20:16:06 -05:00
snapshot_runtime_info.rs Add snapshot_runtime_info module (#18199) 2021-06-29 15:13:34 -05:00
snapshot_utils.rs Add snapshot_utils::bank_from_latest_snapshot_archives() (#18983) 2021-08-06 20:16:06 -05:00
sorted_storages.rs calculate_capitalization uses hash calculation (#17443) 2021-06-14 08:53:07 -05:00
stake_weighted_timestamp.rs Use newly stabilized Duration methods/consts (#18101) 2021-06-22 00:11:16 +00:00
stakes.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
status_cache.rs chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
system_instruction_processor.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
transaction_batch.rs for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
vote_account.rs revert test to use Account for serialization (#16063) 2021-03-22 22:48:09 +00:00
vote_sender_types.rs
waitable_condvar.rs runtime: ignore flakey `test_waitable_condvar` 2021-07-09 01:26:28 -06:00