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 CI failure due to recent merge from unstable #6646

Merged
merged 7 commits into from
Apr 12, 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
16 changes: 8 additions & 8 deletions packages/beacon-node/src/execution/engine/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ export class ExecutionEngineHttp implements IExecutionEngine {
ForkSeq[fork] >= ForkSeq.electra
? "engine_newPayloadV6110"
: ForkSeq[fork] >= ForkSeq.deneb
? "engine_newPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_newPayloadV2"
: "engine_newPayloadV1";
? "engine_newPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_newPayloadV2"
: "engine_newPayloadV1";

const serializedExecutionPayload = serializeExecutionPayload(fork, executionPayload);

Expand Down Expand Up @@ -375,10 +375,10 @@ export class ExecutionEngineHttp implements IExecutionEngine {
ForkSeq[fork] >= ForkSeq.electra
? "engine_getPayloadV6110"
: ForkSeq[fork] >= ForkSeq.deneb
? "engine_getPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_getPayloadV2"
: "engine_getPayloadV1";
? "engine_getPayloadV3"
: ForkSeq[fork] >= ForkSeq.capella
? "engine_getPayloadV2"
: "engine_getPayloadV1";
const payloadResponse = await this.rpc.fetchWithRetries<
EngineApiRpcReturnTypes[typeof method],
EngineApiRpcParamTypes[typeof method]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 {CheckpointStateCache, StateContextCache} from "../../../../src/chain/stateCache/index.js";
import {InMemoryCheckpointStateCache, StateContextCache} from "../../../../src/chain/stateCache/index.js";
import {generateCachedElectraState} from "../../../utils/state.js";

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

let checkpointStateCache: CheckpointStateCache;
let checkpointStateCache: InMemoryCheckpointStateCache;
let stateCache: StateContextCache;

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

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

for (let i = 0; i < numCheckpointStateCache; i++) {
Expand Down
18 changes: 9 additions & 9 deletions packages/beacon-node/test/sim/electra-interop.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "node:fs";
import assert from "node:assert";
import {describe, it, vi, afterAll, afterEach} from "vitest";
/* eslint-disable @typescript-eslint/naming-convention */
import _ from "lodash";

import {LogLevel, sleep} from "@lodestar/utils";
import {ForkName, SLOTS_PER_EPOCH, UNSET_DEPOSIT_RECEIPTS_START_INDEX} from "@lodestar/params";
import {electra, Epoch, Slot} from "@lodestar/types";
Expand Down Expand Up @@ -225,13 +225,13 @@ describe("executionEngine / ExecutionEngineHttp", function () {
}

const actualDepositReceipt = payload.depositReceipts[0];
if (!_.isEqual(actualDepositReceipt, depositReceiptB)) {
throw Error(
`Deposit receipts mismatched. Expected: ${JSON.stringify(depositReceiptB)}, actual: ${JSON.stringify(
actualDepositReceipt
)}`
);
}
assert.deepStrictEqual(
actualDepositReceipt,
depositReceiptB,
`Deposit receipts mismatched. Expected: ${JSON.stringify(depositReceiptB)}, actual: ${JSON.stringify(
actualDepositReceipt
)}`
);
});

it("Post-merge, run for a few blocks", async function () {
Expand Down
1 change: 1 addition & 0 deletions packages/beacon-node/test/spec/utils/specTestIterator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const coveredTestRunners = [
// ],
// ```
export const defaultSkipOpts: SkipOpts = {
skippedForks: ["eip6110"],
// TODO: capella
// BeaconBlockBody proof in lightclient is the new addition in v1.3.0-rc.2-hotfix
// Skip them for now to enable subsequently
Expand Down
2 changes: 1 addition & 1 deletion packages/state-transition/src/cache/epochCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class EpochCache {
* eg. latest epoch = 105, latest finalized cp state epoch = 102
* then the list will be (in terms of epoch) [103, 104, 105]
*/
private historicalValidatorLengths: immutable.List<number>;
historicalValidatorLengths: immutable.List<number>;

constructor(data: {
config: BeaconConfig;
Expand Down
Loading