Skip to content

Commit 433e692

Browse files
ensi321claude
andauthored
refactor: revert dual-state from regen, block production, and metrics (#9218)
## Summary Depends on #9215 - Remove `payloadPresent` parameter from regen interfaces (`addCheckpointState`, `updatePreComputedCheckpoint`, `getCheckpointStateOrBytes`, `getCheckpointStateSync`) - Remove `processPayloadState`, `upgradeForGloas` from `IStateRegenerator` - Remove `PayloadStatus` → `payloadPresent` conversion logic from regen (queued.ts, regen.ts) - Remove `UNEXPECTED_PAYLOAD_STATUS` and `INTERNAL_ERROR` regen error codes - Remove `CheckpointHexPayload` type and `fcCheckpointToHexPayload` helper — all callers now use `CheckpointHex` - Delete `computePayloadEnvelopeStateRoot()` and remove `payloadEnvelopeStateRoot` from `ProduceFullGloas` type - Remove `computePayloadEnvelopeStateRoot` from `StateHashTreeRootSource` enum - Rename `processBlockState` → `processState` and `postBlockState` → `postState` to remove dual-state naming Reverts #9175 ## Test plan - [x] `pnpm check-types` passes - [x] `pnpm lint` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5f92858 commit 433e692

19 files changed

Lines changed: 68 additions & 185 deletions

File tree

packages/beacon-node/src/api/impl/validator/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import {ChainEvent, CommonBlockBody} from "../../../chain/index.js";
7070
import {PREPARE_NEXT_SLOT_BPS} from "../../../chain/prepareNextSlot.js";
7171
import {BlockType, ProduceFullDeneb, ProduceFullGloas} from "../../../chain/produceBlock/index.js";
7272
import {RegenCaller} from "../../../chain/regen/index.js";
73-
import {CheckpointHexPayload} from "../../../chain/stateCache/types.js";
73+
import {CheckpointHex} from "../../../chain/stateCache/types.js";
7474
import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
7575
import {validateSyncCommitteeGossipContributionAndProof} from "../../../chain/validation/syncCommitteeContributionAndProof.js";
7676
import {ZERO_HASH} from "../../../constants/index.js";
@@ -301,7 +301,7 @@ export function getValidatorApi(
301301
* |
302302
* prepareNextSlot (4s before next slot)
303303
*/
304-
async function waitForCheckpointState(cpHex: CheckpointHexPayload): Promise<IBeaconStateView | null> {
304+
async function waitForCheckpointState(cpHex: CheckpointHex): Promise<IBeaconStateView | null> {
305305
const cpState = chain.regen.getCheckpointStateSync(cpHex);
306306
if (cpState) {
307307
return cpState;
@@ -1113,7 +1113,6 @@ export function getValidatorApi(
11131113
const cpState = await waitForCheckpointState({
11141114
rootHex: head.blockRoot,
11151115
epoch,
1116-
payloadPresent: head.payloadStatus === PayloadStatus.FULL,
11171116
});
11181117
if (cpState) {
11191118
state = cpState;
@@ -1642,15 +1641,17 @@ export function getValidatorApi(
16421641
throw Error("Cached block production result is not full block");
16431642
}
16441643

1645-
const {executionPayload, executionRequests, payloadEnvelopeStateRoot} = produceResult as ProduceFullGloas;
1644+
const {executionPayload, executionRequests} = produceResult as ProduceFullGloas;
16461645

16471646
const envelope: gloas.ExecutionPayloadEnvelope = {
16481647
payload: executionPayload,
16491648
executionRequests: executionRequests,
16501649
builderIndex: BUILDER_INDEX_SELF_BUILD,
16511650
beaconBlockRoot,
16521651
slot,
1653-
stateRoot: payloadEnvelopeStateRoot,
1652+
// TODO GLOAS: stateRoot is no longer computed during block production.
1653+
// This field will be removed when we implement defer payload processing
1654+
stateRoot: ZERO_HASH,
16541655
};
16551656

16561657
logger.info("Produced execution payload envelope", {

packages/beacon-node/src/chain/archiveStore/strategies/frequencyStateArchiveStrategy.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {AllocSource, BufferPool} from "../../../util/bufferPool.js";
99
import {getStateSlotFromBytes} from "../../../util/multifork.js";
1010
import {IStateRegenerator} from "../../regen/interface.js";
1111
import {serializeState} from "../../serializeState.js";
12-
import {fcCheckpointToHexPayload} from "../../stateCache/persistentCheckpointsCache.js";
1312
import {StateArchiveStrategy, StatesArchiveOpts} from "../interface.js";
1413

1514
/**
@@ -108,9 +107,8 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
108107
async archiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void> {
109108
// starting from Mar 2024, the finalized state could be from disk or in memory
110109
let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
111-
// Convert fork-choice checkpoint to beacon-node checkpoint with payloadPresent
112-
const finalizedHexPayload = fcCheckpointToHexPayload(finalized);
113-
const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHexPayload);
110+
const finalizedHex = {epoch: finalized.epoch, rootHex: finalized.rootHex};
111+
const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHex);
114112
timer?.({step: FrequencyStateArchiveStep.GetFinalizedState});
115113

116114
const {rootHex} = finalized;

packages/beacon-node/src/chain/blocks/importBlock.ts

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
ForkChoiceErrorCode,
99
NotReorgedReason,
1010
getSafeExecutionBlockHash,
11-
isGloasBlock,
1211
} from "@lodestar/fork-choice";
1312
import {
1413
ForkPostAltair,
@@ -87,7 +86,7 @@ export async function importBlock(
8786
fullyVerifiedBlock: FullyVerifiedBlock,
8887
opts: ImportBlockOpts
8988
): Promise<void> {
90-
const {blockInput, postBlockState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
89+
const {blockInput, postState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
9190
fullyVerifiedBlock;
9291
const block = blockInput.getBlock();
9392
const source = blockInput.getBlockSource();
@@ -99,7 +98,7 @@ export async function importBlock(
9998
const blockEpoch = computeEpochAtSlot(blockSlot);
10099
const prevFinalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
101100
const blockDelaySec =
102-
fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postBlockState.genesisTime);
101+
fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postState.genesisTime);
103102
const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);
104103
const fork = this.config.getForkSeq(blockSlot);
105104

@@ -122,10 +121,10 @@ export async function importBlock(
122121
// 2. Import block to fork choice
123122

124123
// Should compute checkpoint balances before forkchoice.onBlock
125-
this.checkpointBalancesCache.processState(blockRootHex, postBlockState);
124+
this.checkpointBalancesCache.processState(blockRootHex, postState);
126125
const blockSummary = this.forkChoice.onBlock(
127126
block.message,
128-
postBlockState,
127+
postState,
129128
blockDelaySec,
130129
currentSlot,
131130
fork >= ForkSeq.gloas ? ExecutionStatus.PayloadSeparated : executionStatus,
@@ -134,11 +133,7 @@ export async function importBlock(
134133

135134
// This adds the state necessary to process the next block
136135
// Some block event handlers require state being in state cache so need to do this before emitting EventType.block
137-
// Pre-Gloas: blockSummary.payloadStatus is always FULL, payloadPresent = true
138-
// Post-Gloas: blockSummary.payloadStatus is always PENDING, so payloadPresent = false (block state only, no payload processing yet)
139-
const payloadPresent = !isGloasBlock(blockSummary);
140-
// processState manages both block state and payload state variants together for memory/disk management
141-
this.regen.processBlockState(blockRootHex, postBlockState);
136+
this.regen.processState(blockRootHex, postState);
142137

143138
// For Gloas blocks, create PayloadEnvelopeInput so it's available for later payload import
144139
if (fork >= ForkSeq.gloas) {
@@ -191,7 +186,7 @@ export async function importBlock(
191186
(opts.importAttestations !== AttestationImportOpt.Skip && blockEpoch >= currentEpoch - FORK_CHOICE_ATT_EPOCH_LIMIT)
192187
) {
193188
const attestations = block.message.body.attestations;
194-
const rootCache = new RootCache(postBlockState);
189+
const rootCache = new RootCache(postState);
195190
const invalidAttestationErrorsByCode = new Map<string, {error: Error; count: number}>();
196191

197192
const addAttestation = fork >= ForkSeq.electra ? addAttestationPostElectra : addAttestationPreElectra;
@@ -205,7 +200,7 @@ export async function importBlock(
205200
const attDataRoot = toRootHex(ssz.phase0.AttestationData.hashTreeRoot(indexedAttestation.data));
206201
addAttestation.call(
207202
this,
208-
postBlockState,
203+
postState,
209204
target,
210205
attDataRoot,
211206
attestation as Attestation<ForkPostElectra>,
@@ -320,7 +315,7 @@ export async function importBlock(
320315

321316
if (newHead.blockRoot !== oldHead.blockRoot) {
322317
// Set head state as strong reference
323-
this.regen.updateHeadState(newHead, postBlockState);
318+
this.regen.updateHeadState(newHead, postState);
324319

325320
try {
326321
this.emitter.emit(routes.events.EventType.head, {
@@ -390,10 +385,10 @@ export async function importBlock(
390385
// we want to import block asap so do this in the next event loop
391386
callInNextEventLoop(() => {
392387
try {
393-
if (isStatePostAltair(postBlockState)) {
388+
if (isStatePostAltair(postState)) {
394389
this.lightClientServer?.onImportBlockHead(
395390
block.message as BeaconBlock<ForkPostAltair>,
396-
postBlockState,
391+
postState,
397392
parentBlockSlot
398393
);
399394
}
@@ -415,11 +410,11 @@ export async function importBlock(
415410
// and the block is weak and can potentially be reorged out.
416411
let shouldOverrideFcu = false;
417412

418-
if (blockSlot >= currentSlot && isStatePostBellatrix(postBlockState) && postBlockState.isExecutionStateType) {
413+
if (blockSlot >= currentSlot && isStatePostBellatrix(postState) && postState.isExecutionStateType) {
419414
let notOverrideFcuReason = NotReorgedReason.Unknown;
420415
const proposalSlot = blockSlot + 1;
421416
try {
422-
const proposerIndex = postBlockState.getBeaconProposer(proposalSlot);
417+
const proposerIndex = postState.getBeaconProposer(proposalSlot);
423418
const feeRecipient = this.beaconProposerCache.get(proposerIndex);
424419

425420
if (feeRecipient) {
@@ -499,22 +494,22 @@ export async function importBlock(
499494
}
500495
}
501496

502-
if (!postBlockState.isStateValidatorsNodesPopulated()) {
503-
this.logger.verbose("After importBlock caching postState without SSZ cache", {slot: postBlockState.slot});
497+
if (!postState.isStateValidatorsNodesPopulated()) {
498+
this.logger.verbose("After importBlock caching postState without SSZ cache", {slot: postState.slot});
504499
}
505500

506501
// Cache shufflings when crossing an epoch boundary
507502
const parentEpoch = computeEpochAtSlot(parentBlockSlot);
508503
if (parentEpoch < blockEpoch) {
509-
this.shufflingCache.processState(postBlockState);
504+
this.shufflingCache.processState(postState);
510505
this.logger.verbose("Processed shuffling for next epoch", {parentEpoch, blockEpoch, slot: blockSlot});
511506
}
512507

513508
if (blockSlot % SLOTS_PER_EPOCH === 0) {
514509
// Cache state to preserve epoch transition work
515-
const checkpointState = postBlockState;
510+
const checkpointState = postState;
516511
const cp = getCheckpointFromState(checkpointState);
517-
this.regen.addCheckpointState(cp, checkpointState, payloadPresent);
512+
this.regen.addCheckpointState(cp, checkpointState);
518513
// consumers should not mutate state ever
519514
this.emitter.emit(ChainEvent.checkpoint, cp, checkpointState);
520515

@@ -602,11 +597,11 @@ export async function importBlock(
602597
this.metrics?.parentBlockDistance.observe(blockSlot - parentBlockSlot);
603598
this.metrics?.proposerBalanceDeltaAny.observe(fullyVerifiedBlock.proposerBalanceDelta);
604599
this.validatorMonitor?.registerImportedBlock(block.message, fullyVerifiedBlock);
605-
if (isStatePostAltair(fullyVerifiedBlock.postBlockState)) {
600+
if (isStatePostAltair(fullyVerifiedBlock.postState)) {
606601
this.validatorMonitor?.registerSyncAggregateInBlock(
607602
blockEpoch,
608603
(block as altair.SignedBeaconBlock).message.body.syncAggregate,
609-
fullyVerifiedBlock.postBlockState.currentSyncCommitteeIndexed.validatorIndices
604+
fullyVerifiedBlock.postState.currentSyncCommitteeIndexed.validatorIndices
610605
);
611606
}
612607

packages/beacon-node/src/chain/blocks/importExecutionPayload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ export async function importExecutionPayload(
240240
);
241241

242242
// 8. Cache payload state
243-
this.regen.processPayloadState(postPayloadState);
243+
this.regen.processState(blockRootHex, postPayloadState);
244244
if (postPayloadState.slot % SLOTS_PER_EPOCH === 0) {
245245
const {checkpoint} = postPayloadState.computeAnchorCheckpoint();
246-
this.regen.addCheckpointState(checkpoint, postPayloadState, true);
246+
this.regen.addCheckpointState(checkpoint, postPayloadState);
247247
}
248248

249249
// 9. Record metrics for payload envelope and column sources

packages/beacon-node/src/chain/blocks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function processBlocks(
8888
const fullyVerifiedBlocks = relevantBlocks.map(
8989
(block, i): FullyVerifiedBlock => ({
9090
blockInput: block,
91-
postBlockState: postStates[i],
91+
postState: postStates[i],
9292
postPayloadState: null,
9393
parentBlockSlot: parentSlots[i],
9494
executionStatus: executionStatuses[i],

packages/beacon-node/src/chain/blocks/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export type ImportBlockOpts = {
9090

9191
type FullyVerifiedBlockBase = {
9292
blockInput: IBlockInput;
93-
postBlockState: IBeaconStateView;
93+
postState: IBeaconStateView;
9494
parentBlockSlot: Slot;
9595
proposerBalanceDelta: number;
9696
dataAvailabilityStatus: DataAvailabilityStatus;

packages/beacon-node/src/chain/chain.ts

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {BeaconConfig} from "@lodestar/config";
55
import {CheckpointWithPayloadStatus, IForkChoice, ProtoBlock, UpdateHeadOpt} from "@lodestar/fork-choice";
66
import {LoggerNode} from "@lodestar/logger/node";
77
import {
8-
BUILDER_INDEX_SELF_BUILD,
98
EFFECTIVE_BALANCE_INCREMENT,
109
type ForkPostFulu,
1110
type ForkPostGloas,
@@ -24,7 +23,6 @@ import {
2423
getEffectiveBalancesFromStateBytes,
2524
isStatePostAltair,
2625
isStatePostElectra,
27-
isStatePostGloas,
2826
} from "@lodestar/state-transition";
2927
import {
3028
BeaconBlock,
@@ -93,8 +91,8 @@ import {
9391
} from "./opPools/index.js";
9492
import {IChainOptions} from "./options.js";
9593
import {PrepareNextSlotScheduler} from "./prepareNextSlot.js";
96-
import {computeNewStateRoot, computePayloadEnvelopeStateRoot} from "./produceBlock/computeNewStateRoot.js";
97-
import {AssembledBlockType, BlockType, ProduceFullGloas, ProduceResult} from "./produceBlock/index.js";
94+
import {computeNewStateRoot} from "./produceBlock/computeNewStateRoot.js";
95+
import {AssembledBlockType, BlockType, ProduceResult} from "./produceBlock/index.js";
9896
import {BlockAttributes, produceBlockBody, produceCommonBlockBody} from "./produceBlock/produceBlockBody.js";
9997
import {QueuedStateRegenerator, RegenCaller} from "./regen/index.js";
10098
import {ReprocessController} from "./reprocess.js";
@@ -118,7 +116,7 @@ import {DbCPStateDatastore, checkpointToDatastoreKey} from "./stateCache/datasto
118116
import {FileCPStateDatastore} from "./stateCache/datastore/file.js";
119117
import {CPStateDatastore} from "./stateCache/datastore/types.js";
120118
import {FIFOBlockStateCache} from "./stateCache/fifoBlockStateCache.js";
121-
import {PersistentCheckpointStateCache, fcCheckpointToHexPayload} from "./stateCache/persistentCheckpointsCache.js";
119+
import {PersistentCheckpointStateCache} from "./stateCache/persistentCheckpointsCache.js";
122120
import {CheckpointStateCache} from "./stateCache/types.js";
123121
import {ValidatorMonitor} from "./validatorMonitor.js";
124122

@@ -685,8 +683,8 @@ export class BeaconChain implements IBeaconChain {
685683
checkpoint: CheckpointWithPayloadStatus
686684
): {state: IBeaconStateView; executionOptimistic: boolean; finalized: boolean} | null {
687685
// finalized or justified checkpoint states maynot be available with PersistentCheckpointStateCache, use getCheckpointStateOrBytes() api to get Uint8Array
688-
const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
689-
const cachedStateCtx = this.regen.getCheckpointStateSync(checkpointHexPayload);
686+
const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
687+
const cachedStateCtx = this.regen.getCheckpointStateSync(checkpointHex);
690688
if (cachedStateCtx) {
691689
const block = this.forkChoice.getBlockDefaultStatus(
692690
ssz.phase0.BeaconBlockHeader.hashTreeRoot(cachedStateCtx.latestBlockHeader)
@@ -705,8 +703,8 @@ export class BeaconChain implements IBeaconChain {
705703
async getStateOrBytesByCheckpoint(
706704
checkpoint: CheckpointWithPayloadStatus
707705
): Promise<{state: IBeaconStateView | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
708-
const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
709-
const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpointHexPayload);
706+
const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
707+
const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpointHex);
710708
if (cachedStateCtx) {
711709
const block = this.forkChoice.getBlockDefaultStatus(checkpoint.root);
712710
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
@@ -1062,7 +1060,7 @@ export class BeaconChain implements IBeaconChain {
10621060
body,
10631061
} as AssembledBlockType<T>;
10641062

1065-
const {newStateRoot, proposerReward, postBlockState} = computeNewStateRoot(this.metrics, state, block);
1063+
const {newStateRoot, proposerReward} = computeNewStateRoot(this.metrics, state, block);
10661064
block.stateRoot = newStateRoot;
10671065
const blockRoot =
10681066
produceResult.type === BlockType.Full
@@ -1071,26 +1069,9 @@ export class BeaconChain implements IBeaconChain {
10711069
const blockRootHex = toRootHex(blockRoot);
10721070

10731071
const fork = this.config.getForkName(slot);
1074-
if (isForkPostGloas(fork)) {
1075-
// TODO GLOAS: we should retire BlockType post-gloas, may need a new enum for self vs non-self built
1076-
if (produceResult.type !== BlockType.Full) {
1077-
throw Error(`Unexpected block type=${produceResult.type} for post-gloas fork=${fork}`);
1078-
}
1079-
1080-
const gloasResult = produceResult as ProduceFullGloas;
1081-
const envelope: gloas.ExecutionPayloadEnvelope = {
1082-
payload: gloasResult.executionPayload,
1083-
executionRequests: gloasResult.executionRequests,
1084-
builderIndex: BUILDER_INDEX_SELF_BUILD,
1085-
beaconBlockRoot: blockRoot,
1086-
slot,
1087-
stateRoot: ZERO_HASH,
1088-
};
1089-
if (!isStatePostGloas(postBlockState)) {
1090-
throw Error(`Expected gloas+ post-state for execution payload envelope, got fork=${postBlockState.forkName}`);
1091-
}
1092-
const payloadEnvelopeStateRoot = computePayloadEnvelopeStateRoot(this.metrics, postBlockState, envelope);
1093-
gloasResult.payloadEnvelopeStateRoot = payloadEnvelopeStateRoot;
1072+
// TODO GLOAS: we should retire BlockType post-gloas, may need a new enum for self vs non-self built
1073+
if (isForkPostGloas(fork) && produceResult.type !== BlockType.Full) {
1074+
throw Error(`Unexpected block type=${produceResult.type} for post-gloas fork=${fork}`);
10941075
}
10951076

10961077
// Track the produced block for consensus broadcast validations, later validation, etc.
@@ -1338,8 +1319,8 @@ export class BeaconChain implements IBeaconChain {
13381319
checkpoint: CheckpointWithPayloadStatus,
13391320
blockState: IBeaconStateView
13401321
): {state: IBeaconStateView; stateId: string; shouldWarn: boolean} {
1341-
const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
1342-
const state = this.regen.getCheckpointStateSync(checkpointHexPayload);
1322+
const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
1323+
const state = this.regen.getCheckpointStateSync(checkpointHex);
13431324
if (state) {
13441325
return {state, stateId: "checkpoint_state", shouldWarn: false};
13451326
}

packages/beacon-node/src/chain/prepareNextSlot.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {routes} from "@lodestar/api";
22
import {ChainForkConfig} from "@lodestar/config";
3-
import {PayloadStatus, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
3+
import {getSafeExecutionBlockHash} from "@lodestar/fork-choice";
44
import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix} from "@lodestar/params";
55
import {
66
IBeaconStateView,
@@ -217,11 +217,7 @@ export class PrepareNextSlotScheduler {
217217
// + if next slot is a skipped slot, it'd help getting target checkpoint state faster to validate attestations
218218
if (isEpochTransition) {
219219
this.metrics?.precomputeNextEpochTransition.count.inc({result: "success"}, 1);
220-
// Determine payloadPresent from head block's payload status
221-
// Pre-Gloas: payloadStatus is always FULL → payloadPresent = true
222-
// Post-Gloas: FULL → true, EMPTY → false, PENDING → false (conservative, treat as block state)
223-
const payloadPresent = headBlock.payloadStatus === PayloadStatus.FULL;
224-
const previousHits = this.chain.regen.updatePreComputedCheckpoint(headRoot, nextEpoch, payloadPresent);
220+
const previousHits = this.chain.regen.updatePreComputedCheckpoint(headRoot, nextEpoch);
225221
if (previousHits === 0) {
226222
this.metrics?.precomputeNextEpochTransition.waste.inc();
227223
}

0 commit comments

Comments
 (0)