Renames fn to calculate_accounts_delta_hash() (#29876)

This commit is contained in:
Brooks 2023-01-24 18:55:56 -05:00 committed by GitHub
parent 834b98aac0
commit bda0c606a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 76 additions and 72 deletions

View File

@ -143,7 +143,7 @@ fn test_accounts_delta_hash(bencher: &mut Bencher) {
let mut pubkeys: Vec<Pubkey> = vec![];
create_test_accounts(&accounts, &mut pubkeys, 100_000, 0);
bencher.iter(|| {
accounts.accounts_db.get_accounts_delta_hash(0);
accounts.accounts_db.calculate_accounts_delta_hash(0);
});
}

View File

@ -1068,7 +1068,7 @@ impl Accounts {
}
pub fn bank_hash_info_at(&self, slot: Slot) -> BankHashInfo {
let accounts_delta_hash = self.accounts_db.get_accounts_delta_hash(slot);
let accounts_delta_hash = self.accounts_db.calculate_accounts_delta_hash(slot);
let bank_hashes = self.accounts_db.bank_hashes.read().unwrap();
let mut bank_hash_info = bank_hashes
.get(&slot)

View File

@ -1336,7 +1336,7 @@ pub struct AccountsDb {
/// Set of unique keys per slot which is used
/// to drive clean_accounts
/// Generated by get_accounts_delta_hash
/// Generated by calculate_accounts_delta_hash
uncleaned_pubkeys: DashMap<Slot, Vec<Pubkey>>,
#[cfg(test)]
@ -7269,7 +7269,7 @@ impl AccountsDb {
}
}
// modeled after get_accounts_delta_hash
// modeled after calculate_accounts_delta_hash
// intended to be faster than calculate_accounts_hash
pub fn calculate_accounts_hash_from_storages(
&self,
@ -7514,7 +7514,11 @@ impl AccountsDb {
(hashes, scan.as_us(), accumulate)
}
pub fn get_accounts_delta_hash(&self, slot: Slot) -> AccountsDeltaHash {
/// Calculate accounts delta hash for `slot`
///
/// As part of calculating the accounts delta hash, get a list of accounts modified this slot
/// (aka dirty pubkeys) and add them to `self.uncleaned_pubkeys` for future cleaning.
pub fn calculate_accounts_delta_hash(&self, slot: Slot) -> AccountsDeltaHash {
let (mut hashes, scan_us, mut accumulate) = self.get_pubkey_hash_for_slot(slot);
let dirty_keys = hashes.iter().map(|(pubkey, _hash)| *pubkey).collect();
@ -10503,7 +10507,7 @@ pub mod tests {
db.store_for_tests(1, &[(&pubkey, &account)]);
db.store_for_tests(1, &[(&pubkeys[0], &account)]);
// adding root doesn't change anything
db.get_accounts_delta_hash(1);
db.calculate_accounts_delta_hash(1);
db.add_root_and_flush_write_cache(1);
{
let slot_0_store = &db.storage.get_slot_storage_entry(0).unwrap();
@ -10916,7 +10920,7 @@ pub mod tests {
.unwrap();
lock.slot_list()[idx].1.store_id()
};
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
//slot is still there, since gc is lazy
assert_eq!(
@ -10932,7 +10936,7 @@ pub mod tests {
accounts.store_for_tests(1, &[(&pubkey, &account)]);
// generate delta state for slot 1, so clean operates on it.
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
//slot is gone
accounts.print_accounts_stats("pre-clean");
@ -11012,11 +11016,11 @@ pub mod tests {
// Pubkey 1 was the only account in slot 1, and it was updated in slot 2, so
// slot 1 should be purged
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
accounts.get_accounts_delta_hash(2);
accounts.calculate_accounts_delta_hash(2);
accounts.add_root_and_flush_write_cache(2);
// Slot 1 should be removed, slot 0 cannot be removed because it still has
@ -11047,11 +11051,11 @@ pub mod tests {
accounts.store_for_tests(1, &[(&pubkey1, &zero_lamport_account)]);
accounts.store_for_tests(2, &[(&pubkey1, &zero_lamport_account)]);
// Root all slots
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
accounts.get_accounts_delta_hash(2);
accounts.calculate_accounts_delta_hash(2);
accounts.add_root_and_flush_write_cache(2);
// Account ref counts should match how many slots they were stored in
@ -11095,9 +11099,9 @@ pub mod tests {
// Simulate rooting the zero-lamport account, should be a
// candidate for cleaning
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
// Slot 0 should be removed, and
@ -11136,9 +11140,9 @@ pub mod tests {
accounts.store_for_tests(1, &[(&pubkey, &account)]);
// simulate slots are rooted after while
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
//even if rooted, old state isn't cleaned up
@ -11168,9 +11172,9 @@ pub mod tests {
accounts.store_for_tests(1, &[(&pubkey2, &normal_account)]);
//simulate slots are rooted after while
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
//even if rooted, old state isn't cleaned up
@ -11219,11 +11223,11 @@ pub mod tests {
accounts.store_for_tests(2, &[(&pubkey2, &normal_account)]);
//simulate slots are rooted after while
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
accounts.get_accounts_delta_hash(2);
accounts.calculate_accounts_delta_hash(2);
accounts.add_root_and_flush_write_cache(2);
//even if rooted, old state isn't cleaned up
@ -11344,9 +11348,9 @@ pub mod tests {
accounts.store_for_tests(1, &[(&pubkey, &zero_account)]);
// simulate slots are rooted after while
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root_and_flush_write_cache(1);
// Only clean up to account 0, should not purge slot 0 based on
@ -11434,7 +11438,7 @@ pub mod tests {
accounts.add_root_and_flush_write_cache(0);
check_storage(&accounts, 0, 100);
check_accounts(&accounts, &pubkeys, 0, 100, 2);
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
let mut pubkeys1: Vec<Pubkey> = vec![];
@ -11452,7 +11456,7 @@ pub mod tests {
// accounts
create_account(&accounts, &mut pubkeys1, latest_slot, 10, 0, 0);
accounts.get_accounts_delta_hash(latest_slot);
accounts.calculate_accounts_delta_hash(latest_slot);
accounts.add_root_and_flush_write_cache(latest_slot);
check_storage(&accounts, 1, 21);
@ -11472,7 +11476,7 @@ pub mod tests {
// 21 + 10 = 31 accounts
create_account(&accounts, &mut pubkeys2, latest_slot, 10, 0, 0);
accounts.get_accounts_delta_hash(latest_slot);
accounts.calculate_accounts_delta_hash(latest_slot);
accounts.add_root_and_flush_write_cache(latest_slot);
check_storage(&accounts, 2, 31);
@ -11566,7 +11570,7 @@ pub mod tests {
let zero_lamport_account = AccountSharedData::new(zero_lamport, no_data, &owner);
let accounts = AccountsDb::new_single_for_tests();
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root_and_flush_write_cache(0);
// Step A
@ -11575,7 +11579,7 @@ pub mod tests {
// Store another live account to slot 1 which will prevent any purge
// since the store count will not be zero
accounts.store_for_tests(current_slot, &[(&pubkey2, &account2)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
let (slot1, account_info1) = accounts
.accounts_index
@ -11595,13 +11599,13 @@ pub mod tests {
current_slot += 1;
let zero_lamport_slot = current_slot;
accounts.store_for_tests(current_slot, &[(&pubkey, &zero_lamport_account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
assert_load_account(&accounts, current_slot, pubkey, zero_lamport);
current_slot += 1;
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.print_accounts_stats("pre_purge");
@ -11651,13 +11655,13 @@ pub mod tests {
let mut current_slot = 1;
accounts.insert_default_bank_hash(current_slot, current_slot - 1);
accounts.store_for_tests(current_slot, &[(&pubkey, &account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
current_slot += 1;
accounts.insert_default_bank_hash(current_slot, current_slot - 1);
accounts.store_for_tests(current_slot, &[(&pubkey, &zero_lamport_account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
assert_load_account(&accounts, current_slot, pubkey, zero_lamport);
@ -11665,7 +11669,7 @@ pub mod tests {
// Otherwise slot 2 will not be removed
current_slot += 1;
accounts.insert_default_bank_hash(current_slot, current_slot - 1);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.print_accounts_stats("pre_purge");
@ -12640,7 +12644,7 @@ pub mod tests {
accounts.store_for_tests(current_slot, &[(&pubkey2, &account)]);
accounts.store_for_tests(current_slot, &[(&pubkey1, &account)]);
}
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
info!("post A");
@ -12657,7 +12661,7 @@ pub mod tests {
// Stores to same pubkey, same slot only count once towards the
// ref count
assert_eq!(2, accounts.ref_count_for_pubkey(&pubkey1));
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.print_accounts_stats("Post-B pre-clean");
@ -12675,7 +12679,7 @@ pub mod tests {
accounts.store_for_tests(current_slot, &[(&pubkey3, &account4)]);
accounts.add_root_and_flush_write_cache(current_slot);
assert_eq!(3, accounts.ref_count_for_pubkey(&pubkey1));
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
info!("post C");
@ -12696,7 +12700,7 @@ pub mod tests {
info!("post D");
accounts.print_accounts_stats("Post-D");
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.clean_accounts_for_tests();
@ -12757,7 +12761,7 @@ pub mod tests {
current_slot += 1;
accounts.store_for_tests(current_slot, &[(&pubkey1, &account)]);
accounts.store_for_tests(current_slot, &[(&pubkey2, &account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root(current_slot);
// B: Test multiple updates to pubkey1 in a single slot/storage
@ -12772,7 +12776,7 @@ pub mod tests {
// Stores to same pubkey, same slot only count once towards the
// ref count
assert_eq!(2, accounts.ref_count_for_pubkey(&pubkey1));
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
// C: Yet more update to trigger lazy clean of step A
current_slot += 1;
@ -12780,7 +12784,7 @@ pub mod tests {
accounts.store_for_tests(current_slot, &[(&pubkey1, &account3)]);
accounts.add_root_and_flush_write_cache(current_slot);
assert_eq!(3, accounts.ref_count_for_pubkey(&pubkey1));
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
// D: Make pubkey1 0-lamport; also triggers clean of step B
@ -12812,13 +12816,13 @@ pub mod tests {
3, /* == 3 - 1 + 1 */
accounts.ref_count_for_pubkey(&pubkey1)
);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root(current_slot);
// E: Avoid missing bank hash error
current_slot += 1;
accounts.store_for_tests(current_slot, &[(&dummy_pubkey, &dummy_account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root(current_slot);
assert_load_account(&accounts, current_slot, pubkey1, zero_lamport);
@ -12843,7 +12847,7 @@ pub mod tests {
// F: Finally, make Step A cleanable
current_slot += 1;
accounts.store_for_tests(current_slot, &[(&pubkey2, &account)]);
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root(current_slot);
// Do clean
@ -12905,7 +12909,7 @@ pub mod tests {
accounts.store_for_tests(current_slot, &[(pubkey, &account)]);
}
let shrink_slot = current_slot;
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
current_slot += 1;
@ -12915,7 +12919,7 @@ pub mod tests {
for pubkey in updated_pubkeys {
accounts.store_for_tests(current_slot, &[(pubkey, &account)]);
}
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.clean_accounts_for_tests();
@ -12994,7 +12998,7 @@ pub mod tests {
accounts.store_for_tests(current_slot, &[(pubkey, &account)]);
}
let shrink_slot = current_slot;
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
current_slot += 1;
@ -13004,7 +13008,7 @@ pub mod tests {
for pubkey in updated_pubkeys {
accounts.store_for_tests(current_slot, &[(pubkey, &account)]);
}
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
accounts.clean_accounts_for_tests();
@ -13456,7 +13460,7 @@ pub mod tests {
accounts.store_cached((1, &[(&pubkey1, &zero_account)][..]), None);
// Add root 0 and flush separately
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root(0);
accounts.flush_accounts_cache(true, None);
@ -13464,7 +13468,7 @@ pub mod tests {
accounts.clean_accounts_for_tests();
// flush 1
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root(1);
accounts.flush_accounts_cache(true, None);
@ -13498,7 +13502,7 @@ pub mod tests {
keys.push(pubkey);
}
// get delta hash to feed these accounts to clean
accounts.get_accounts_delta_hash(0);
accounts.calculate_accounts_delta_hash(0);
accounts.add_root(0);
// we have to flush just slot 0
// if we slot 0 and 1 together, then they are cleaned and slot 0 doesn't contain the accounts
@ -13510,7 +13514,7 @@ pub mod tests {
AccountSharedData::new((1 + i + num_accounts) as u64, size, &Pubkey::default());
accounts.store_cached((1 as Slot, &[(key, &account)][..]), None);
}
accounts.get_accounts_delta_hash(1);
accounts.calculate_accounts_delta_hash(1);
accounts.add_root(1);
accounts.flush_accounts_cache(true, None);
accounts.clean_accounts_for_tests();
@ -13565,7 +13569,7 @@ pub mod tests {
keys.iter().enumerate().for_each(|(slot, key)| {
let slot = slot as Slot;
db.store_for_tests(slot, &[(key, &zero_lamport_account)]);
db.get_accounts_delta_hash(slot);
db.calculate_accounts_delta_hash(slot);
db.add_root_and_flush_write_cache(slot);
});
assert_eq!(slots - 1, db.next_id.load(Ordering::Acquire));
@ -13592,7 +13596,7 @@ pub mod tests {
keys.iter().enumerate().for_each(|(slot, key)| {
let slot = slot as Slot;
db.store_for_tests(slot, &[(key, &zero_lamport_account)]);
db.get_accounts_delta_hash(slot);
db.calculate_accounts_delta_hash(slot);
db.add_root_and_flush_write_cache(slot);
// reset next_id to what it was previously to cause us to re-use the same id
db.next_id.store(AppendVecId::MAX, Ordering::Release);
@ -13613,9 +13617,9 @@ pub mod tests {
// Store zero lamport account into slots 0 and 1, root both slots
db.store_for_tests(0, &[(&account_key, &zero_lamport_account)]);
db.store_for_tests(1, &[(&account_key, &zero_lamport_account)]);
db.get_accounts_delta_hash(0);
db.calculate_accounts_delta_hash(0);
db.add_root_and_flush_write_cache(0);
db.get_accounts_delta_hash(1);
db.calculate_accounts_delta_hash(1);
db.add_root_and_flush_write_cache(1);
// Only clean zero lamport accounts up to slot 0
@ -14075,7 +14079,7 @@ pub mod tests {
// Fodder for the scan so that the lock on `account_key` is not held
db.store_cached((1, &[(&account_key2, &slot1_account)][..]), None);
db.store_cached((2, &[(&account_key, &slot2_account)][..]), None);
db.get_accounts_delta_hash(0);
db.calculate_accounts_delta_hash(0);
let max_scan_root = 0;
db.add_root(max_scan_root);
@ -14085,7 +14089,7 @@ pub mod tests {
// Add a new root 2
let new_root = 2;
db.get_accounts_delta_hash(new_root);
db.calculate_accounts_delta_hash(new_root);
db.add_root(new_root);
// Check that the scan is properly set up
@ -14650,8 +14654,8 @@ pub mod tests {
db.add_root(1);
// Flushes all roots
db.flush_accounts_cache(true, None);
db.get_accounts_delta_hash(0);
db.get_accounts_delta_hash(1);
db.calculate_accounts_delta_hash(0);
db.calculate_accounts_delta_hash(1);
// Clean to remove outdated entry from slot 0
db.clean_accounts(Some(1), false, None);
@ -14673,7 +14677,7 @@ pub mod tests {
// Should be one store before clean for slot 0
db.get_and_assert_single_storage(0);
db.get_accounts_delta_hash(2);
db.calculate_accounts_delta_hash(2);
db.clean_accounts(Some(2), false, None);
// No stores should exist for slot 0 after clean
@ -14710,8 +14714,8 @@ pub mod tests {
db.store_uncached(0, &[(&account_key1, &account1)]);
db.store_uncached(0, &[(&account_key2, &account1)]);
db.store_uncached(1, &[(&account_key1, &account2)]);
db.get_accounts_delta_hash(0);
db.get_accounts_delta_hash(1);
db.calculate_accounts_delta_hash(0);
db.calculate_accounts_delta_hash(1);
db.print_accounts_stats("pre-clean1");
@ -14733,7 +14737,7 @@ pub mod tests {
// store into slot 2
db.store_uncached(2, &[(&account_key2, &account3)]);
db.store_uncached(2, &[(&account_key1, &account3)]);
db.get_accounts_delta_hash(2);
db.calculate_accounts_delta_hash(2);
db.clean_accounts_for_tests();
db.print_accounts_stats("post-clean2");
@ -14745,7 +14749,7 @@ pub mod tests {
db.print_accounts_stats("post-clean3");
db.store_uncached(3, &[(&account_key2, &account4)]);
db.get_accounts_delta_hash(3);
db.calculate_accounts_delta_hash(3);
db.add_root_and_flush_write_cache(3);
// Check that we can clean where max_root=3 and slot=2 is not rooted
@ -15534,7 +15538,7 @@ pub mod tests {
// Simulate adding dirty pubkeys on bank freeze. Note this is
// not a rooted slot
accounts.get_accounts_delta_hash(slot0);
accounts.calculate_accounts_delta_hash(slot0);
// On the next *rooted* slot, update the `shared_key` account to zero lamports
let zero_lamport_account =
@ -15542,7 +15546,7 @@ pub mod tests {
accounts.store_for_tests(slot1, &[(&shared_key, &zero_lamport_account)]);
// Simulate adding dirty pubkeys on bank freeze, set root
accounts.get_accounts_delta_hash(slot1);
accounts.calculate_accounts_delta_hash(slot1);
accounts.add_root_and_flush_write_cache(slot1);
// The later rooted zero-lamport update to `shared_key` cannot be cleaned
@ -15594,19 +15598,19 @@ pub mod tests {
let slot1: Slot = 1;
let account = AccountSharedData::new(111, space, &owner);
accounts_db.store_cached((slot1, &[(&pubkey, &account)][..]), None);
accounts_db.get_accounts_delta_hash(slot1);
accounts_db.calculate_accounts_delta_hash(slot1);
accounts_db.add_root_and_flush_write_cache(slot1);
let slot2: Slot = 2;
let account = AccountSharedData::new(222, space, &owner);
accounts_db.store_cached((slot2, &[(&pubkey, &account)][..]), None);
accounts_db.get_accounts_delta_hash(slot2);
accounts_db.calculate_accounts_delta_hash(slot2);
accounts_db.add_root_and_flush_write_cache(slot2);
let slot3: Slot = 3;
let account = AccountSharedData::new(0, space, &owner);
accounts_db.store_cached((slot3, &[(&pubkey, &account)][..]), None);
accounts_db.get_accounts_delta_hash(slot3);
accounts_db.calculate_accounts_delta_hash(slot3);
accounts_db.add_root_and_flush_write_cache(slot3);
assert_eq!(accounts_db.ref_count_for_pubkey(&pubkey), 3);

View File

@ -663,7 +663,7 @@ mod tests {
minimized_account_set.insert(*pubkey);
}
}
accounts.get_accounts_delta_hash(current_slot);
accounts.calculate_accounts_delta_hash(current_slot);
accounts.add_root_and_flush_write_cache(current_slot);
}