From db7909c1fe3f715f67476ae8717d10f384e579b3 Mon Sep 17 00:00:00 2001 From: tersec Date: Thu, 18 Jan 2024 15:56:43 +0000 Subject: [PATCH] don't catch up on validator duties (#5773) --- beacon_chain/validators/beacon_validators.nim | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index f418ac27f..6566893fa 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -1868,12 +1868,6 @@ proc handleFallbackAttestations(node: BeaconNode, lastSlot, slot: Slot) = if attestationHead.slot + SLOTS_PER_EPOCH < slot: return - # Using `slot` and `curSlot` here ensure that the attestation data created - # is for the wall slot, regardless of attestationHead's block and slot. - for curSlot in (lastSlot + 1) ..< slot: - notice "Catching up on fallback attestation duties", curSlot, slot - handleAttestations(node, attestationHead.blck, curSlot) - handleAttestations(node, attestationHead.blck, slot) proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} = @@ -1914,27 +1908,6 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} = var curSlot = lastSlot + 1 - # Start by checking if there's work we should have done in the past that we - # can still meaningfully do - while curSlot < slot: - notice "Catching up on validator duties", - curSlot = shortLog(curSlot), - lastSlot = shortLog(lastSlot), - slot = shortLog(slot) - - # For every slot we're catching up, we'll propose then send - # attestations - head should normally be advancing along the same branch - # in this case - head = await handleProposal(node, head, curSlot) - - # For each slot we missed, we need to send out attestations - if we were - # proposing during this time, we'll use the newly proposed head, else just - # keep reusing the same - the attestation that goes out will actually - # rewind the state to what it looked like at the time of that slot - handleAttestations(node, head, curSlot) - - curSlot += 1 - let newHead = await handleProposal(node, head, slot) head = newHead