lighthouse/beacon_node/beacon_chain/src
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
..
attestation_verification Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
schema_change Remove equivocating validators from fork choice (#3371) 2022-07-28 09:43:41 +00:00
attestation_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
attester_cache.rs Add early attester cache (#2872) 2022-01-11 01:35:55 +00:00
beacon_chain.rs Fix block verification and checkpoint sync caches (#3466) 2022-08-15 01:31:00 +00:00
beacon_fork_choice_store.rs Remove equivocating validators from fork choice (#3371) 2022-07-28 09:43:41 +00:00
beacon_proposer_cache.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
beacon_snapshot.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
block_reward.rs Extend block reward APIs (#3290) 2022-06-29 04:50:37 +00:00
block_times_cache.rs Add BlockTimesCache to allow additional block delay metrics (#2546) 2021-09-30 04:31:41 +00:00
block_verification.rs Fix block verification and checkpoint sync caches (#3466) 2022-08-15 01:31:00 +00:00
builder.rs Fix block verification and checkpoint sync caches (#3466) 2022-08-15 01:31:00 +00:00
canonical_head.rs Make fork choice prune again (#3408) 2022-08-02 07:58:42 +00:00
chain_config.rs Update invalid head tests (#3400) 2022-08-05 23:41:09 +00:00
early_attester_cache.rs Fix some typos (#3376) 2022-07-27 00:51:06 +00:00
errors.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
eth1_chain.rs Removed PowBlock struct that never got used (#2813) 2021-12-02 14:29:20 +11:00
events.rs Implement API for block rewards (#2628) 2022-01-27 01:06:02 +00:00
execution_payload.rs Remove INVALID_TERMINAL_BLOCK (#3385) 2022-08-10 07:52:58 +00:00
fork_choice_signal.rs Run fork choice before block proposal (#3168) 2022-05-20 05:02:11 +00:00
fork_revert.rs Realized unrealized experimentation (#3322) 2022-07-25 23:53:26 +00:00
head_tracker.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
historical_blocks.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
lib.rs Add support for beaconAPI in lcli functions (#3252) 2022-08-09 06:05:13 +00:00
merge_readiness.rs Increase merge-readiness lookhead (#3463) 2022-08-15 01:30:59 +00:00
metrics.rs Run fork choice before block proposal (#3168) 2022-05-20 05:02:11 +00:00
migrate.rs Avoid parallel fork choice runs during sync (#3217) 2022-05-25 03:27:30 +00:00
naive_aggregation_pool.rs Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
observed_aggregates.rs v2.2.0 (#3139) 2022-04-05 02:53:09 +00:00
observed_attesters.rs Ensure doppelganger detects attestations in blocks (#2495) 2021-08-09 02:43:03 +00:00
observed_block_producers.rs Doppelganger detection (#2230) 2021-07-31 03:50:52 +00:00
observed_operations.rs Clippy 1.49.0 updates and dht persistence test fix (#2156) 2021-01-19 00:34:28 +00:00
otb_verification_service.rs Initial Commit of Retrospective OTB Verification (#3372) 2022-07-30 00:22:38 +00:00
persisted_beacon_chain.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
persisted_fork_choice.rs Remove equivocating validators from fork choice (#3371) 2022-07-28 09:43:41 +00:00
pre_finalization_cache.rs Separate execution payloads in the DB (#3157) 2022-05-12 00:42:17 +00:00
proposer_prep_service.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
schema_change.rs Remove equivocating validators from fork choice (#3371) 2022-07-28 09:43:41 +00:00
shuffling_cache.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
snapshot_cache.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
state_advance_timer.rs Don't return errors when fork choice fails (#3370) 2022-07-28 13:57:09 +00:00
sync_committee_verification.rs Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
test_utils.rs Serve Bellatrix preset in BN API (#3425) 2022-08-10 07:52:59 +00:00
timeout_rw_lock.rs Add flag to disable lock timeouts (#2714) 2021-10-19 00:30:40 +00:00
validator_monitor.rs Fix validator_monitor_prev_epoch_ metrics (#2911) 2022-06-20 04:06:30 +00:00
validator_pubkey_cache.rs Add support for beaconAPI in lcli functions (#3252) 2022-08-09 06:05:13 +00:00