lighthouse/beacon_node/beacon_chain/tests
Paul Hauner bcfde6e7df Indicate that invalid blocks are optimistic (#3383)
## Issue Addressed

NA

## Proposed Changes

This PR will make Lighthouse return blocks with invalid payloads via the API with `execution_optimistic = true`. This seems a bit awkward, however I think it's better than returning a 404 or some other error.

Let's consider the case where the only possible head is invalid (#3370 deals with this). In such a scenario all of the duties endpoints will start failing because the head is invalid. I think it would be better if the duties endpoints continue to work, because it's likely that even though the head is invalid the duties are still based upon valid blocks and we want the VC to have them cached. There's no risk to the VC here because we won't actually produce an attestation pointing to an invalid head.

Ultimately, I don't think it's particularly important for us to distinguish between optimistic and invalid blocks on the API. Neither should be trusted and the only *real* reason that we track this is so we can try and fork around the invalid blocks.


## Additional Info

- ~~Blocked on #3370~~
2022-07-30 05:08:57 +00:00
..
attestation_production.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
attestation_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
block_verification.rs Don't return errors when fork choice fails (#3370) 2022-07-28 13:57:09 +00:00
main.rs Retrospective invalidation of exec. payloads for opt. sync (#2837) 2022-02-28 22:07:48 +00:00
merge.rs Don't create a execution payload with same timestamp as terminal block (#3331) 2022-07-18 23:15:41 +00:00
op_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
payload_invalidation.rs Indicate that invalid blocks are optimistic (#3383) 2022-07-30 05:08:57 +00:00
store_tests.rs Don't return errors when fork choice fails (#3370) 2022-07-28 13:57:09 +00:00
sync_committee_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
tests.rs Don't return errors when fork choice fails (#3370) 2022-07-28 13:57:09 +00:00