Skip to content

Commit

Permalink
chore: add predictProposerHead regen enum
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Jun 7, 2024
1 parent c5b187b commit 69d56c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/beacon-node/src/chain/prepareNextSlot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions packages/beacon-node/src/chain/regen/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum RegenCaller {
validateGossipBlock = "validateGossipBlock",
validateGossipBlob = "validateGossipBlob",
precomputeEpoch = "precomputeEpoch",
predictProposerHead = "predictProposerHead",
produceAttestationData = "produceAttestationData",
processBlocksInEpoch = "processBlocksInEpoch",
validateGossipAggregateAndProof = "validateGossipAggregateAndProof",
Expand Down

0 comments on commit 69d56c2

Please sign in to comment.