weaken overaggressive different-fork-next-slot check (#4665)

This commit is contained in:
tersec 2023-02-27 20:23:00 +00:00 committed by GitHub
parent 0a87889eaf
commit 8ee5e8271d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -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.