lighthouse/consensus/proto_array/src
Paul Hauner b49b4291a3 Disallow attesting to optimistic head (#3140)
## Issue Addressed

NA

## Proposed Changes

Disallow the production of attestations and retrieval of unaggregated attestations when they reference an optimistic head. Add tests to this end.

I also moved `BeaconChain::produce_unaggregated_attestation_for_block` to the `BeaconChainHarness`. It was only being used during tests, so it's nice to stop pretending it's production code. I also needed something that could produce attestations to optimistic blocks in order to simulate scenarios where the justified checkpoint is determined invalid (if no one would attest to an optimistic block, we could never justify it and then flip it to invalid).

## Additional Info

- ~~Blocked on #3126~~
2022-04-13 03:54:42 +00:00
..
fork_choice_test_definition Retrospective invalidation of exec. payloads for opt. sync (#2837) 2022-02-28 22:07:48 +00:00
bin.rs Retrospective invalidation of exec. payloads for opt. sync (#2837) 2022-02-28 22:07:48 +00:00
error.rs Add tests for importing blocks on invalid parents (#3123) 2022-04-05 20:58:16 +00:00
fork_choice_test_definition.rs Disallow attesting to optimistic head (#3140) 2022-04-13 03:54:42 +00:00
lib.rs Rename random to prev_randao (#3040) 2022-03-03 02:10:57 +00:00
proto_array_fork_choice.rs Disallow attesting to optimistic head (#3140) 2022-04-13 03:54:42 +00:00
proto_array.rs Disallow attesting to optimistic head (#3140) 2022-04-13 03:54:42 +00:00
ssz_container.rs v1.1.6 Fork Choice changes (#2822) 2021-12-13 20:43:22 +00:00