From 69d56c24bf94acaaf03f9b84a91c563db13431c3 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Fri, 7 Jun 2024 09:02:30 +0700 Subject: [PATCH] chore: add predictProposerHead regen enum --- packages/beacon-node/src/chain/prepareNextSlot.ts | 4 +++- packages/beacon-node/src/chain/regen/interface.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/beacon-node/src/chain/prepareNextSlot.ts b/packages/beacon-node/src/chain/prepareNextSlot.ts index fddbc9026fca..3f730df3bf1d 100644 --- a/packages/beacon-node/src/chain/prepareNextSlot.ts +++ b/packages/beacon-node/src/chain/prepareNextSlot.ts @@ -150,13 +150,15 @@ export class PrepareNextSlotScheduler { this.logger.verbose("Weak head detected. May build on this block instead:", { proposerHeadSlot, proposerHeadRoot, + headSlot, + headRoot, }); this.metrics?.weakHeadDetected.inc(); updatedPrepareState = (await this.chain.regen.getBlockSlotState( proposerHeadRoot, prepareSlot, {dontTransferCache: !isEpochTransition}, - RegenCaller.precomputeEpoch + RegenCaller.predictProposerHead )) as CachedBeaconStateExecutions; updatedHeadRoot = proposerHeadRoot; } diff --git a/packages/beacon-node/src/chain/regen/interface.ts b/packages/beacon-node/src/chain/regen/interface.ts index 650d92143a8e..a1021de4aeab 100644 --- a/packages/beacon-node/src/chain/regen/interface.ts +++ b/packages/beacon-node/src/chain/regen/interface.ts @@ -11,6 +11,7 @@ export enum RegenCaller { validateGossipBlock = "validateGossipBlock", validateGossipBlob = "validateGossipBlob", precomputeEpoch = "precomputeEpoch", + predictProposerHead = "predictProposerHead", produceAttestationData = "produceAttestationData", processBlocksInEpoch = "processBlocksInEpoch", validateGossipAggregateAndProof = "validateGossipAggregateAndProof",