StatusDeque split into separate objects with their own root checkpoint strategy (#2613)
Split up StatusDeque into different modules * LastIdQueue tracks last_ids * StatusCache keeps track of signature statuses * StatusCache stores success as a bit in a bloom filter * Overhead for 1m Ok transactions is 4mb in memory * Less concurrency between the objects, last_id and status_cache are read and written to at different points in the pipeline * Each object has its own strategy for merging into the root checkpoint
This commit is contained in:
committed by
GitHub
parent
609e915169
commit
2754ceec60
@ -3,7 +3,6 @@ use solana_native_loader;
|
||||
|
||||
use solana::bank::Bank;
|
||||
use solana::genesis_block::GenesisBlock;
|
||||
use solana::status_deque::Status;
|
||||
#[cfg(feature = "bpf_c")]
|
||||
use solana_sdk::bpf_loader;
|
||||
use solana_sdk::loader_transaction::LoaderTransaction;
|
||||
@ -39,10 +38,7 @@ fn create_bpf_path(name: &str) -> PathBuf {
|
||||
fn check_tx_results(bank: &Bank, tx: &Transaction, result: Vec<solana::bank::Result<()>>) {
|
||||
assert_eq!(result.len(), 1);
|
||||
assert_eq!(result[0], Ok(()));
|
||||
assert_eq!(
|
||||
bank.get_signature(&tx.last_id, &tx.signatures[0]),
|
||||
Some(Status::Complete(Ok(())))
|
||||
);
|
||||
assert_eq!(bank.get_signature_status(&tx.signatures[0]), Some(Ok(())));
|
||||
}
|
||||
|
||||
struct Loader {
|
||||
|
Reference in New Issue
Block a user