Expand description
Persistent accounts are stored at this path location:
<path>/<pid>/data/
The persistent store would allow for this mode of operation:
- Concurrent single thread append with many concurrent readers.
The underlying memory is memory mapped to a file. The accounts would be stored across multiple files and the mappings of file and offset of a particular account would be stored in a shared index. This will allow for concurrent commits without blocking reads, which will sequentially write to memory, ssd or disk, and should be as fast as the hardware allow for. The only required in memory data structure with a write lock is the index, which should be fast to update.
[AppendVec
]’s only store accounts for single slots. To bootstrap the
index from a persistent store of [AppendVec
]’s, the entries include
a “write_version”. A single global atomic AccountsDb::write_version
tracks the number of commits to the entire data store. So the latest
commit for each slot entry would be indexed.
Modules§
Structs§
- Account
From Storage - reference an account found during scanning a storage. This is a byval struct to replace
StoredAccountMeta
- Account
Storage Entry - Persistent storage structure holding the accounts
- Accounts
AddRoot Timing - Accounts
Db - Accounts
DbConfig - Duplicates
LtHash - The lt hash of old/duplicate accounts
- GetUnique
Accounts Result - Index
Generation Info - Pubkey
Hash Account - Verify
Accounts Hash AndLamports Config - Configuration Parameters for running accounts hash and total lamports verification
Enums§
- Account
Shrink Threshold - Accounts
Hash Verification Error - Calc
Accounts Hash Data Source - Specify the source of the accounts data when calculating the accounts hash
- Calc
Accounts Hash Kind - Which accounts hash calculation is being performed?
- Create
Ancient Storage - Load
Hint - Loaded
Account - Loaded
Account Accessor - OldStorages
Policy - How should old storages be handled in clean_accounts()?
- Scan
Storage Result - Store
Reclaims
Constants§
- ACCOUNTS_
DB_ CONFIG_ FOR_ BENCHMARKS - ACCOUNTS_
DB_ CONFIG_ FOR_ TESTING - DEFAULT_
ACCOUNTS_ SHRINK_ OPTIMIZE_ TOTAL_ SPACE - DEFAULT_
ACCOUNTS_ SHRINK_ RATIO - MAX_
ANCIENT_ SLOTS_ DEFAULT - Default value for the number of ancient storages the ancient slot combining should converge to.
- PUBKEY_
BINS_ FOR_ CALCULATING_ HASHES
Functions§
- default_
num_ foreground_ threads - default_
num_ hash_ threads - Returns the default number of threads to use for background accounts hashing
- get_
temp_ accounts_ paths - make_
hash_ thread_ pool - make_
min_ priority_ thread_ pool - quarter_
thread_ count
Type Aliases§
- Accounts
File Id - Atomic
Accounts File Id - An offset into the AccountsDb::storage vector
- Binned
Hash Data