lighthouse/beacon_node/beacon_chain
GeemoCandama a7351c00c0 light client optimistic update reprocessing (#3799)
## Issue Addressed
Currently there is a race between receiving blocks and receiving light client optimistic updates (in unstable), which results in processing errors. This is a continuation of PR #3693 and seeks to progress on issue #3651

## Proposed Changes

Add the parent_root to ReprocessQueueMessage::BlockImported so we can remove blocks from queue when a block arrives that has the same parent root. We use the parent root as opposed to the block_root because the LightClientOptimisticUpdate does not contain the block_root.

If light_client_optimistic_update.attested_header.canonical_root() != head_block.message().parent_root() then we queue the update. Otherwise we process immediately.
## Additional Info
michaelsproul came up with this idea.
The code was heavily based off of the attestation reprocessing.
I have not properly tested this to see if it works as intended.
2023-01-24 22:17:50 +00:00
..
src light client optimistic update reprocessing (#3799) 2023-01-24 22:17:50 +00:00
tests Implement sync_committee_rewards API (per-validator reward) (#3903) 2023-01-24 02:06:42 +00:00
Cargo.toml Impl oneshot_broadcast for committee promises (#3595) 2022-09-21 01:01:50 +00:00