diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 8db3e9290..184456af4 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -1402,7 +1402,22 @@ proc sendSyncCommitteeContributions( proc handleProposal(node: BeaconNode, head: BlockRef, slot: Slot): Future[BlockRef] {.async: (raises: [CancelledError]).} = - return head + ## Perform the proposal for the given slot, iff we have a validator attached + ## that is supposed to do so, given the shuffling at that slot for the given + ## head - to compute the proposer, we need to advance a state to the given + ## slot + let + proposer = node.dag.getProposer(head, slot).valueOr: + return head + proposerKey = node.dag.validatorKey(proposer).get().toPubKey + validator = node.getValidatorForDuties(proposer, slot).valueOr: + debug "Expecting block proposal", headRoot = shortLog(head.root), + slot = shortLog(slot), + proposer_index = proposer, + proposer = shortLog(proposerKey) + return head + + return await proposeBlock(node, validator, proposer, head, slot) proc signAndSendAggregate( node: BeaconNode, validator: AttachedValidator, shufflingRef: ShufflingRef,