lighthouse/consensus/state_processing/src
Paul Hauner 27e83b888c Retrospective invalidation of exec. payloads for opt. sync (#2837)
## Issue Addressed

NA

## Proposed Changes

Adds the functionality to allow blocks to be validated/invalidated after their import as per the [optimistic sync spec](https://github.com/ethereum/consensus-specs/blob/dev/sync/optimistic.md#how-to-optimistically-import-blocks). This means:

- Updating `ProtoArray` to allow flipping the `execution_status` of ancestors/descendants based on payload validity updates.
- Creating separation between `execution_layer` and the `beacon_chain` by creating a `PayloadStatus` struct.
- Refactoring how the `execution_layer` selects a `PayloadStatus` from the multiple statuses returned from multiple EEs.
- Adding testing framework for optimistic imports.
- Add `ExecutionBlockHash(Hash256)` new-type struct to avoid confusion between *beacon block roots* and *execution payload hashes*.
- Add `merge` to [`FORKS`](c3a793fd73/Makefile (L17)) in the `Makefile` to ensure we test the beacon chain with merge settings.
    - Fix some tests here that were failing due to a missing execution layer.

## TODO

- [ ] Balance tests

Co-authored-by: Mark Mackey <mark@sigmaprime.io>
2022-02-28 22:07:48 +00:00
..
common 1.1.5 merge spec tests (#2781) 2021-12-02 14:26:55 +11:00
per_block_processing Retrospective invalidation of exec. payloads for opt. sync (#2837) 2022-02-28 22:07:48 +00:00
per_epoch_processing Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
upgrade Update to spec v1.1.8 (#2893) 2022-01-19 00:24:19 +00:00
block_replayer.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
genesis.rs Update to spec v1.1.8 (#2893) 2022-01-19 00:24:19 +00:00
lib.rs Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
macros.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
metrics.rs Cache participating indices for Altair epoch processing (#2416) 2021-07-27 07:01:01 +00:00
per_block_processing.rs Update to consensus-specs v1.1.9 (#3016) 2022-02-14 23:57:23 +00:00
per_epoch_processing.rs Initial merge changes 2021-12-02 14:26:50 +11:00
per_slot_processing.rs Update to spec v1.1.8 (#2893) 2022-01-19 00:24:19 +00:00
state_advance.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
upgrade.rs Update to spec v1.1.8 (#2893) 2022-01-19 00:24:19 +00:00
verify_operation.rs Detailed validator monitoring (#2151) 2021-01-20 19:19:38 +00:00