lighthouse/beacon_node/beacon_chain
Michael Sproul 25e3dc9300 Fix block verification and checkpoint sync caches (#3466)
## Issue Addressed

Closes https://github.com/sigp/lighthouse/issues/2962

## Proposed Changes

Build all caches on the checkpoint state before storing it in the database.

Additionally, fix a bug in `signature_verify_chain_segment` which prevented block verification from succeeding unless the previous epoch cache was already built. The previous epoch cache is required to verify the signatures of attestations included from previous epochs, even when all the blocks in the segment are from the same epoch.

The comments around `signature_verify_chain_segment` have also been updated to reflect the fact that it should only be used on a chain of blocks from a single epoch. I believe this restriction had already been added at some point in the past and that the current comments were just outdated (and I think because the proposer shuffling can change in the next epoch based on the blocks applied in the current epoch that this limitation is essential).
2022-08-15 01:31:00 +00:00
..
src Fix block verification and checkpoint sync caches (#3466) 2022-08-15 01:31:00 +00:00
tests Remove INVALID_TERMINAL_BLOCK (#3385) 2022-08-10 07:52:58 +00:00
Cargo.toml Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00