From 8ee5e8271db875f5e7746d66cade6e437e341188 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 27 Feb 2023 20:23:00 +0000 Subject: [PATCH] weaken overaggressive different-fork-next-slot check (#4665) --- .../consensus_object_pools/consensus_manager.nim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/beacon_chain/consensus_object_pools/consensus_manager.nim b/beacon_chain/consensus_object_pools/consensus_manager.nim index a0e084780..b96790e5a 100644 --- a/beacon_chain/consensus_object_pools/consensus_manager.nim +++ b/beacon_chain/consensus_object_pools/consensus_manager.nim @@ -354,11 +354,14 @@ proc runProposalForkchoiceUpdated*( nextWallSlot, validatorIndex, nextProposer withState(self.dag.headState): - let nextSlotFork = self.dag.cfg.forkAtEpoch(nextWallSlot.epoch) - if forkyState.data.fork != nextSlotFork: - debug "runProposalForkchoiceUpdated: about to do fork transition; don't have appropriate state to fcU ahead", + let + nextSlotFork = self.dag.cfg.forkAtEpoch(nextWallSlot.epoch) + nextSlotForkVersion = self.dag.cfg.forkVersionAtEpoch(nextWallSlot.epoch) + if nextSlotForkVersion == self.dag.cfg.CAPELLA_FORK_VERSION and + forkyState.data.fork.current_version != nextSlotFork.current_version: + debug "runProposalForkchoiceUpdated: about to do Capella transition; don't have appropriate state to fcU ahead", nextWallSlot, validatorIndex, nextProposer, nextSlotFork, - stateFork = forkyState.data.fork + nextSlotForkVersion, stateFork = forkyState.data.fork # Approximately lines up with validator_duties version. Used optimistically/ # opportunistically, so mismatches are fine if not too frequent.