Skip to content

Snapshots cloned during sync #2944

@michaelsproul

Description

@michaelsproul

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:

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

No one assigned

    Labels

    optimizationSomething to make Lighthouse run more efficiently.syncing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions