lighthouse/beacon_node
Paul Hauner c11253a82f Remove grandparents from snapshot cache (#2917)
## Issue Addressed

NA

## Proposed Changes

In https://github.com/sigp/lighthouse/pull/2832 we made some changes to the `SnapshotCache` to help deal with the one-block reorgs seen on mainnet (and testnets).

I believe the change in #2832 is good and we should keep it, but I think that in its present form it is causing the `SnapshotCache` to hold onto states that it doesn't need anymore. For example, a skip slot will result in one more `BeaconSnapshot` being stored in the cache.

This PR adds a new type of pruning that happens after a block is inserted to the cache. We will remove any snapshot from the cache that is a *grandparent* of the block being imported. Since we know the grandparent has two valid blocks built atop it, it is not at risk from a one-block re-org. 

## Additional Info

NA
2022-01-14 07:20:55 +00:00
..
beacon_chain Remove grandparents from snapshot cache (#2917) 2022-01-14 07:20:55 +00:00
client Additional networking metrics (#2549) 2021-12-22 06:17:14 +00:00
eth1 Bump crate versions (#2829) 2021-12-02 14:29:57 +11:00
execution_layer Rust 1.58 lints (#2906) 2022-01-13 22:39:58 +00:00
genesis Bump crate versions (#2829) 2021-12-02 14:29:57 +11:00
http_api Additional networking metrics (#2549) 2021-12-22 06:17:14 +00:00
http_metrics Additional networking metrics (#2549) 2021-12-22 06:17:14 +00:00
lighthouse_network PeerDB Status unknown bug fix (#2907) 2022-01-14 05:42:48 +00:00
network Lazy hashing for SignedBeaconBlock in sync (#2916) 2022-01-14 07:20:54 +00:00
operation_pool Bump crate versions (#2829) 2021-12-02 14:29:57 +11:00
src Network performance tuning (#2608) 2022-01-14 05:42:47 +00:00
store Additional networking metrics (#2549) 2021-12-22 06:17:14 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Update Lighthouse Dependencies (#2818) 2021-11-18 05:08:42 +00:00
Cargo.toml Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00