mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 03:03:45 +00:00
Add block/state caching on beacon chain (#677)
* Add basic block/state caching on beacon chain * Adds checkpoint cache * Stop storing the tree hash cache in the db * Remove dedunant beacon state write * Use caching get methods in fork choice * Use caching state getting in state_by_slot * Add state.cacheless_clone * Attempt to improve attestation processing times * Introduce HeadInfo struct * Used cache tree hash for block processing * Use cached tree hash for block production too
This commit is contained in:
@@ -149,6 +149,14 @@ lazy_static! {
|
||||
pub static ref PERSIST_CHAIN: Result<Histogram> =
|
||||
try_create_histogram("beacon_persist_chain", "Time taken to update the canonical head");
|
||||
|
||||
/*
|
||||
* Checkpoint cache
|
||||
*/
|
||||
pub static ref CHECKPOINT_CACHE_HITS: Result<IntCounter> =
|
||||
try_create_int_counter("beacon_checkpoint_cache_hits_total", "Count of times checkpoint cache fulfils request");
|
||||
pub static ref CHECKPOINT_CACHE_MISSES: Result<IntCounter> =
|
||||
try_create_int_counter("beacon_checkpoint_cache_misses_total", "Count of times checkpoint cache fulfils request");
|
||||
|
||||
/*
|
||||
* Chain Head
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user