solana/runtime/src/lib.rs

93 lines
2.2 KiB
Rust
Raw Normal View History

#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)]
#[macro_use]
extern crate lazy_static;
pub mod account_info;
pub mod account_overrides;
pub mod account_rent_state;
pub mod accounts;
pub mod accounts_background_service;
pub mod accounts_cache;
pub mod accounts_db;
pub mod accounts_hash;
pub mod accounts_index;
2021-09-12 15:14:59 -07:00
pub mod accounts_index_storage;
pub mod accounts_update_notifier_interface;
mod active_stats;
pub mod ancestors;
2022-05-10 14:41:04 -07:00
mod ancient_append_vecs;
pub mod append_vec;
pub mod bank;
pub mod bank_client;
pub mod bank_forks;
pub mod bank_utils;
pub mod block_cost_limits;
pub mod blockhash_queue;
2021-09-12 15:14:59 -07:00
pub mod bucket_map_holder;
pub mod bucket_map_holder_stats;
2020-08-14 12:32:45 -07:00
pub mod builtins;
pub mod cache_hash_data;
pub mod cache_hash_data_stats;
pub mod commitment;
pub mod contains;
pub mod cost_model;
pub mod cost_tracker;
pub mod epoch_accounts_hash;
pub mod epoch_stakes;
pub mod genesis_utils;
pub mod hardened_unpack;
pub mod in_mem_accounts_index;
pub mod inline_spl_associated_token_account;
pub mod inline_spl_token;
pub mod inline_spl_token_2022;
pub mod loader_utils;
pub mod message_processor;
pub mod non_circulating_supply;
mod nonce_keyed_account;
pub mod prioritization_fee;
pub mod prioritization_fee_cache;
mod pubkey_bins;
mod read_only_accounts_cache;
pub mod rent_collector;
mod rent_paying_accounts_by_partition;
mod rolling_bit_field;
pub mod root_bank_cache;
pub mod runtime_config;
2020-12-31 18:06:03 -08:00
pub mod secondary_index;
Multi-version snapshot support (#9980) * Multi-version snapshot support * rustfmt * Remove CLI options and runtime support for selection output snapshot version. Address some clippy complaints. * Muzzle clippy type complexity warning. Despite clippy's suggestion, it is not currently possible to create type aliases for traits and so everything within the 'Box<...>' cannot be type aliased. This then leaves creating full blown traits, and either implementing said traits by closure (somehow) or moving the closures into new structs implementing said traits which seems a bit of a palaver. Alternatively it is possible to define and use the type alias 'type ResultBox<T> = Result<Box<T>>' which does seems rather pointless and not a great reduction in complexity but is enough to keep clippy happy. In the end I simply went with squelching the clippy warning. * Remove now unused Serialize/Deserialize trait implementations for AccountStorageEntry and AppendVec * refactor versioned de/serialisers * rename serde_utils to serde_snapshot * move call to accounts_db.generate_index() back down to context_accountsdb_from_stream() * update version 1.1.1 to 1.2.0 remove nested use of serialize_bytes * cleanups * Add back measurement of account storage entry serialization. Remove construction of Vec and HashMap temporaries during serialization. * consolidate serialisation test cases into serde_snapshot. clean up leakage of implementation details in serde_snapshot. * move short term / legacy snapshot code into child module * add serialize_iter_as_tuple * preliminary integration of following commit commit 6d58b73c47294bfb93465d5a83cd2175660b6e6d Author: Ryo Onodera <ryoqun@gmail.com> Date: Wed May 20 14:02:02 2020 +0900 Confine snapshot 1.1 relic to versioned codepath * refactored serde_snapshot, rustfmt legacy accounts_db format now "owns" both leading u64s, legacy bank_rc format has none * reduce type complexity (clippy)
2020-05-22 10:54:24 -07:00
pub mod serde_snapshot;
mod shared_buffer_reader;
pub mod snapshot_archive_info;
pub mod snapshot_config;
pub mod snapshot_hash;
ledger-tool minimized snapshots (#25334) * working on local snapshot * Parallelization for slot storage minimization * Additional clean-up and fixes * make --minimize an option of create-snapshot * remove now unnecessary function * Parallelize parts of minimized account set generation * clippy fixes * Add rent collection accounts and voting node_pubkeys * Simplify programdata_accounts generation * Loop over storages to get slot set * Parallelize minimized slot set generation * Parallelize adding owners and programdata_accounts * Remove some now unncessary checks on the blockstore * Add a warning for minimized snapshots across epoch boundary * Simplify ledger-tool minimize * Clarify names of bank's minimization helper functions * Remove unnecesary funciton, fix line spacing * Use DashSets instead of HashSets for minimized account and slot sets * Filter storages uses all threads instead of thread_pool * Add some additional comments on functions for minimization * Moved more into bank and parallelized * Update programs/bpf/Cargo.lock for dashmap in ledger * Clippy fix * ledger-tool: convert minimize_bank_for_snapshot Measure into measure! * bank.rs: convert minimize_bank_for_snapshot Measure into measure! * accounts_db.rs: convert minimize_accounts_db Measure into measure! * accounts_db.rs: add comment about use of minimize_accounts_db * ledger-tool: CLI argument clarification * minimization functions: make infos unique * bank.rs: Add test_get_rent_collection_accounts_between_slots * bank.rs: Add test_minimization_add_vote_accounts * bank.rs: Add test_minimization_add_stake_accounts * bank.rs: Add test_minimization_add_owner_accounts * bank.rs: Add test_minimization_add_programdata_accounts * accounts_db.rs: Add test_minimize_accounts_db * bank.rs: Add negative case and comments in test_get_rent_collection_accounts_between_slots * bank.rs: Negative test in test_minimization_add_programdata_accounts * use new static runtime and sdk ids * bank comments to doc comments * Only need to insert the maximum slot a key is found in * rename remove_pubkeys to purge_pubkeys * add comment on builtins::get_pubkeys * prevent excessive logging of removed dead slots * don't need to remove slot from shrink slot candidates * blockstore.rs: get_accounts_used_in_range shouldn't return Result * blockstore.rs: get_accounts_used_in_range: parallelize slot loop * report filtering progress on time instead of count * parallelize loop over snapshot storages * WIP: move some bank minimization functionality into a new class * WIP: move some accounts_db minimization functionality into SnapshotMinimizer * WIP: Use new SnapshotMinimizer * SnapshotMinimizer: fix use statements * remove bank and accounts_db minimization code, where possible * measure! doesn't take a closure * fix use statement in blockstore * log_dead_slots does not need pub(crate) * get_unique_accounts_from_storages does not need pub(crate) * different way to get stake accounts/nodes * fix tests * move rent collection account functionality to snapshot minimizer * move accounts_db minimize behavior to snapshot minimizer * clean up * Use bank reference instead of Arc. Additional comments * Add a comment to blockstore function * Additional clarifying comments * Moved all non-transaction account accumulation into the SnapshotMinimizer. * transaction_account_set does not need to be mutable now * Add comment about load_to_collect_rent_eagerly * Update log_dead_slots comment * remove duplicate measure/print of get_minimized_slot_set
2022-06-22 10:17:43 -07:00
pub mod snapshot_minimizer;
pub mod snapshot_package;
pub mod snapshot_utils;
pub mod sorted_storages;
mod stake_account;
pub mod stake_history;
pub mod stake_weighted_timestamp;
pub mod stakes;
pub mod static_ids;
pub mod status_cache;
mod storable_accounts;
mod system_instruction_processor;
pub mod transaction_batch;
pub mod transaction_error_metrics;
pub mod transaction_priority_details;
mod verify_accounts_hash_in_background;
pub mod vote_account;
pub mod vote_parser;
pub mod vote_sender_types;
pub mod vote_transaction;
pub mod waitable_condvar;
#[macro_use]
2020-04-27 21:05:12 -07:00
extern crate solana_metrics;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate solana_frozen_abi_macro;