lighthouse-pulse/consensus
Michael Sproul 10945e0619 Revert bad blocks on missed fork (#2529)
## Issue Addressed

Closes #2526

## Proposed Changes

If the head block fails to decode on start up, do two things:

1. Revert all blocks between the head and the most recent hard fork (to `fork_slot - 1`).
2. Reset fork choice so that it contains the new head, and all blocks back to the new head's finalized checkpoint.

## Additional Info

I tweaked some of the beacon chain test harness stuff in order to make it generic enough to test with a non-zero slot clock on start-up. In the process I consolidated all the various `new_` methods into a single generic one which will hopefully serve all future uses 🤞
2021-08-30 06:41:31 +00:00
..
cached_tree_hash Upgrade dependencies (#2513) 2021-08-17 01:00:24 +00:00
fork_choice Revert bad blocks on missed fork (#2529) 2021-08-30 06:41:31 +00:00
int_to_bytes Update to tokio 1.1 (#2172) 2021-02-10 23:29:49 +00:00
merkle_proof Upgrade dependencies (#2513) 2021-08-17 01:00:24 +00:00
proto_array Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
safe_arith Remove saturating arith from state_processing (#1644) 2020-09-25 05:18:21 +00:00
serde_utils Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
ssz Upgrade dependencies (#2513) 2021-08-17 01:00:24 +00:00
ssz_derive Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
ssz_types Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
state_processing removed verify_exit_time_independent_only function (#2509) 2021-08-30 06:41:30 +00:00
swap_or_not_shuffle Upgrade dependencies (#2513) 2021-08-17 01:00:24 +00:00
tree_hash Upgrade dependencies (#2513) 2021-08-17 01:00:24 +00:00
tree_hash_derive Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
types Revert bad blocks on missed fork (#2529) 2021-08-30 06:41:31 +00:00