lighthouse/consensus
Michael Sproul 9667dc2f03 Implement checkpoint sync (#2244)
## Issue Addressed

Closes #1891
Closes #1784

## Proposed Changes

Implement checkpoint sync for Lighthouse, enabling it to start from a weak subjectivity checkpoint.

## Additional Info

- [x] Return unavailable status for out-of-range blocks requested by peers (#2561)
- [x] Implement sync daemon for fetching historical blocks (#2561)
- [x] Verify chain hashes (either in `historical_blocks.rs` or the calling module)
- [x] Consistency check for initial block + state
- [x] Fetch the initial state and block from a beacon node HTTP endpoint
- [x] Don't crash fetching beacon states by slot from the API
- [x] Background service for state reconstruction, triggered by CLI flag or API call.

Considered out of scope for this PR:

- Drop the requirement to provide the `--checkpoint-block` (this would require some pretty heavy refactoring of block verification)


Co-authored-by: Diva M <divma@protonmail.com>
2021-09-22 00:37:28 +00:00
..
cached_tree_hash Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
fork_choice Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
int_to_bytes Update to tokio 1.1 (#2172) 2021-02-10 23:29:49 +00:00
merkle_proof Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
proto_array Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
safe_arith Remove saturating arith from state_processing (#1644) 2020-09-25 05:18:21 +00:00
serde_utils Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
ssz Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
ssz_derive Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
ssz_types Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
state_processing Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
swap_or_not_shuffle Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
tree_hash Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
tree_hash_derive Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
types Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00