Module solana_runtime::ancient_append_vecs
source · Expand description
helpers for squashing append vecs into ancient append vecs an ancient append vec is:
- a slot that is older than an epoch old
- multiple ‘slots’ squashed into a single older (ie. ancient) slot for convenience and performance Otherwise, an ancient append vec is the same as any other append vec
Structs
- hold all alive accounts to be shrunk and/or combined
- reference a set of accounts to store The accounts may have to be split between 2 storages (primary and overflow) if there is not enough room in the primary storage. The ‘store’ functions need data stored in a slice of specific type. We need 1-2 of these slices constructed based on available bytes and individual account sizes. The slice arithmetic across both hashes and account data gets messy. So, this struct abstracts that.
- info for all storages in ancient slots ‘all_infos’ contains all slots and storages that are ancient
- intended contents of a packed ancient storage
- ancient packing algorithm tuning per pass
- SlotInfo 🔒info about a storage eligible to be combined into an ancient append vec. Useful to help sort vecs of storages.
- Used to hold the result of writing a single ancient storage and results of writing multiple ancient storages
Enums
- a set of accounts need to be stored. If there are too many to fit in ‘Primary’, the rest are put in ‘Overflow’
Functions
- capacity of an ancient append vec
- is this a max-size append vec designed to be used as an ancient append vec?