lighthouse/beacon_node/store/src
Age Manning 35ca086269 Backfill blocks only to the WSP by default (#4082)
## Limit Backfill Sync

This PR transitions Lighthouse from syncing all the way back to genesis to only syncing back to the weak subjectivity point (~ 5 months) when syncing via a checkpoint sync.

There are a number of important points to note with this PR:

- Firstly and most importantly, this PR fundamentally shifts the default security guarantees of checkpoint syncing in Lighthouse. Prior to this PR, Lighthouse could verify the checkpoint of any given chain by ensuring the chain eventually terminates at the corresponding genesis. This guarantee can still be employed via the new CLI flag --genesis-backfill which will prompt lighthouse to the old behaviour of downloading all blocks back to genesis. The new behaviour only checks the proposer signatures for the last 5 months of blocks but cannot guarantee the chain matches the genesis chain.
- I have not modified any of the peer scoring or RPC responses. Clients syncing from gensis, will downscore new Lighthouse peers that do not possess blocks prior to the WSP. This is by design, as Lighthouse nodes of this form, need a mechanism to sort through peers in order to find useful peers in order to complete their genesis sync. We therefore do not discriminate between empty/error responses for blocks prior or post the local WSP. If we request a block that a peer does not posses, then fundamentally that peer is less useful to us than other peers.
- This will make a radical shift in that the majority of nodes will no longer store the full history of the chain. In the future we could add a pruning mechanism to remove old blocks from the db also.


Co-authored-by: Paul Hauner <paul@paulhauner.com>
2023-05-05 03:49:23 +00:00
..
impls Clean capella (#4019) 2023-03-01 03:19:02 +00:00
chunk_writer.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
chunked_iter.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
chunked_vector.rs add historical summaries (#3865) 2023-01-11 12:40:21 +11:00
config.rs use state cache to optimise historical state lookup (#4228) 2023-05-05 00:51:57 +00:00
errors.rs Fix Capella schema downgrades (#4004) 2023-02-20 17:50:42 +11:00
forwards_iter.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
garbage_collection.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
hot_cold_store.rs use state cache to optimise historical state lookup (#4228) 2023-05-05 00:51:57 +00:00
impls.rs Separate execution payloads in the DB (#3157) 2022-05-12 00:42:17 +00:00
iter.rs Fix lints for Rust 1.63 (#3459) 2022-08-12 00:56:39 +00:00
leveldb_store.rs Separate execution payloads in the DB (#3157) 2022-05-12 00:42:17 +00:00
lib.rs Clean capella (#4019) 2023-03-01 03:19:02 +00:00
memory_store.rs Initial Commit of Retrospective OTB Verification (#3372) 2022-07-30 00:22:38 +00:00
metadata.rs Backfill blocks only to the WSP by default (#4082) 2023-05-05 03:49:23 +00:00
metrics.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
partial_beacon_state.rs Clean capella (#4019) 2023-03-01 03:19:02 +00:00
reconstruct.rs Remove Redundant Trait Bound (#4169) 2023-04-12 01:48:22 +00:00