Skip to main content

solana_program_runtime/program_cache/
mod.rs

1//! Loaded program cache.
2
3pub mod ebpp;
4pub mod entry;
5pub mod env;
6pub mod fork_graph;
7pub mod global;
8pub mod loading_task;
9pub mod metrics;
10pub mod owner;
11pub mod tx_batch;
12
13use solana_clock::Slot;
14
15/// Slots between a program's deployment and when it takes effect. A program
16/// deployed in slot `N` is not visible to transactions until slot `N + 1`.
17pub const DELAY_VISIBILITY_SLOT_OFFSET: Slot = 1;
18
19/// Soft limit on the number of `Loaded` entries in the cache. Eviction shrinks
20/// the cache to a percentage of this count after a transaction batch, so it can
21/// be exceeded in the meantime.
22pub const MAX_LOADED_ENTRY_COUNT: usize = 1024;
23
24/// Slots since its last access after which a program's sole tombstone or
25/// `Unloaded` entry is pruned. 7.5 minutes at 200ms slot time.
26pub const MAX_TOMBSTONE_AGE_IN_SLOTS: u64 = 2250;