Refuse to sign sync committee messages when head is optimistic (#3191)

## Issue Addressed

Resolves #3151 

## Proposed Changes

When fetching duties for sync committee contributions, check the value of `execution_optimistic` of the head block from the BN and refuse to sign any sync committee messages `if execution_optimistic == true`.

## Additional Info
- Is backwards compatible with older BNs
- Finding a way to add test coverage for this would be prudent. Open to suggestions.
This commit is contained in:
Mac L
2022-07-27 00:51:05 +00:00
parent d316305411
commit 44fae52cd7
4 changed files with 70 additions and 8 deletions

View File

@@ -184,6 +184,9 @@ pub enum BeaconChainError {
CannotAttestToFinalizedBlock {
beacon_block_root: Hash256,
},
SyncContributionDataReferencesFinalizedBlock {
beacon_block_root: Hash256,
},
RuntimeShutdown,
TokioJoin(tokio::task::JoinError),
ProcessInvalidExecutionPayload(JoinError),