Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix the rebase build #6735

Merged
merged 2 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/beacon-node/src/chain/regen/queued.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class QueuedStateRegenerator implements IStateRegenerator {
*/
updateUnfinalizedPubkeys(validators: UnfinalizedPubkeyIndexMap): void {
let numStatesUpdated = 0;
const states = this.stateCache.getStates();
const states = this.blockStateCache.getStates();
const cpStates = this.checkpointStateCache.getStates();

// Add finalized pubkeys to all states.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import bls from "@chainsafe/bls";
import {ssz} from "@lodestar/types";
import {type CachedBeaconStateAllForks, PubkeyIndexMap} from "@lodestar/state-transition";
import {bytesToBigInt, intToBytes} from "@lodestar/utils";
import {InMemoryCheckpointStateCache, StateContextCache} from "../../../../src/chain/stateCache/index.js";
import {InMemoryCheckpointStateCache, BlockStateCacheImpl} from "../../../../src/chain/stateCache/index.js";
import {BlockStateCache} from "../../../../src/chain/stateCache/types.js";
import {generateCachedElectraState} from "../../../utils/state.js";

// Benchmark date from Mon Nov 21 2023 - Intel Core i7-9750H @ 2.60Ghz
Expand All @@ -22,7 +23,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
const numStateCache = 3 * 32;

let checkpointStateCache: InMemoryCheckpointStateCache;
let stateCache: StateContextCache;
let stateCache: BlockStateCache;

const unfinalizedPubkey2Index = generatePubkey2Index(0, Math.max.apply(null, numPubkeysToBeFinalizedCases));
const baseState = generateCachedElectraState();
Expand All @@ -36,7 +37,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
baseState.epochCtx.index2pubkey = [];

checkpointStateCache = new InMemoryCheckpointStateCache({});
stateCache = new StateContextCache({});
stateCache = new BlockStateCacheImpl({});

for (let i = 0; i < numCheckpointStateCache; i++) {
const clonedState = baseState.clone();
Expand Down
Loading