-
Notifications
You must be signed in to change notification settings - Fork 901
Closed
Labels
optimizationSomething to make Lighthouse run more efficiently.Something to make Lighthouse run more efficiently.syncing
Description
Description
Since #2832 Lighthouse will clone a snapshot from the cache whenever there's a skipped slot. This is designed to help during live block processing, but also gets applied during sync where it isn't very useful.
Present Behaviour
The condition here trips regardless of whether or not Lighthouse is syncing:
lighthouse/beacon_node/beacon_chain/src/snapshot_cache.rs
Lines 256 to 258 in 79db2d4
if block_slot > cache.beacon_block.slot() + 1 { | |
return (cache.clone_as_pre_state(), true); | |
} |
Expected Behaviour
Lighthouse should always move the snapshot from the cache during sync in order to prevent unnecessary cloning and extra memory usage.
Metadata
Metadata
Assignees
Labels
optimizationSomething to make Lighthouse run more efficiently.Something to make Lighthouse run more efficiently.syncing