From 95386cd742deed6d733dee971b9fd00311c5286e Mon Sep 17 00:00:00 2001 From: harkamal Date: Wed, 12 Jan 2022 20:47:24 +0530 Subject: [PATCH 1/2] Upgrade to spec 1.1.6 sans proposer boost --- packages/fork-choice/src/forkChoice/forkChoice.ts | 15 ++------------- .../lodestar/test/spec/allForks/forkChoice.ts | 5 +++++ packages/lodestar/test/spec/specTestVersioning.ts | 2 +- packages/types/src/merge/sszTypes.ts | 2 -- packages/types/src/merge/types.ts | 1 - 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/fork-choice/src/forkChoice/forkChoice.ts b/packages/fork-choice/src/forkChoice/forkChoice.ts index 3b3fe867dff7..1dc05bb68a6d 100644 --- a/packages/fork-choice/src/forkChoice/forkChoice.ts +++ b/packages/fork-choice/src/forkChoice/forkChoice.ts @@ -17,7 +17,7 @@ import {ProtoArray} from "../protoArray/protoArray"; import {IForkChoiceMetrics} from "../metrics"; import {ForkChoiceError, ForkChoiceErrorCode, InvalidBlockCode, InvalidAttestationCode} from "./errors"; import {IForkChoice, ILatestMessage, IQueuedAttestation, OnBlockPrecachedData} from "./interface"; -import {IForkChoiceStore, CheckpointWithHex, toCheckpointWithHex, equalCheckpointWithHex} from "./store"; +import {IForkChoiceStore, CheckpointWithHex, toCheckpointWithHex} from "./store"; /* eslint-disable max-len */ @@ -329,19 +329,8 @@ export class ForkChoice implements IForkChoice { // Update finalized checkpoint. if (finalizedCheckpoint.epoch > this.fcStore.finalizedCheckpoint.epoch) { this.fcStore.finalizedCheckpoint = toCheckpointWithHex(finalizedCheckpoint); + shouldUpdateJustified = true; this.synced = false; - - if ( - // If checkpoints are not equal - (!equalCheckpointWithHex(this.fcStore.justifiedCheckpoint, currentJustifiedCheckpoint) && - stateJustifiedEpoch > this.fcStore.justifiedCheckpoint.epoch) || - this.getAncestor( - this.fcStore.justifiedCheckpoint.rootHex, - computeStartSlotAtEpoch(this.fcStore.finalizedCheckpoint.epoch) - ) !== this.fcStore.finalizedCheckpoint.rootHex - ) { - shouldUpdateJustified = true; - } } // This needs to be performed after finalized checkpoint has been updated diff --git a/packages/lodestar/test/spec/allForks/forkChoice.ts b/packages/lodestar/test/spec/allForks/forkChoice.ts index 297b4bb855b6..eb635ee27ca4 100644 --- a/packages/lodestar/test/spec/allForks/forkChoice.ts +++ b/packages/lodestar/test/spec/allForks/forkChoice.ts @@ -157,6 +157,11 @@ export function forkChoiceTest(fork: ForkName): void { timeout: 10000, // eslint-disable-next-line @typescript-eslint/no-empty-function expectFunc: () => {}, + shouldSkip: (_testCase, name, _index) => { + const ignoreTestsWithKeywords = ["proposer_boost"]; + const ignoreTest = ignoreTestsWithKeywords.reduce((acc, kword) => acc || name.includes(kword), false); + return ignoreTest; + }, } ); } diff --git a/packages/lodestar/test/spec/specTestVersioning.ts b/packages/lodestar/test/spec/specTestVersioning.ts index 184ee902ae6d..c3a0c73d7b0e 100644 --- a/packages/lodestar/test/spec/specTestVersioning.ts +++ b/packages/lodestar/test/spec/specTestVersioning.ts @@ -8,6 +8,6 @@ import path from "path"; // The contents of this file MUST include the URL, version and target path, and nothing else. export const SPEC_TEST_REPO_URL = "https://github.com/ethereum/consensus-spec-tests"; -export const SPEC_TEST_VERSION = "v1.1.5"; +export const SPEC_TEST_VERSION = "v1.1.6"; // Target directory is the host package root: 'packages/*/spec-tests' export const SPEC_TEST_LOCATION = path.join(__dirname, "../../spec-tests"); diff --git a/packages/types/src/merge/sszTypes.ts b/packages/types/src/merge/sszTypes.ts index 0609d468b41b..b4b1cf260e7b 100644 --- a/packages/types/src/merge/sszTypes.ts +++ b/packages/types/src/merge/sszTypes.ts @@ -157,13 +157,11 @@ export const PowBlock = new ContainerType({ blockHash: Root, parentHash: Root, totalDifficulty: Uint256, - difficulty: Uint256, }, casingMap: { blockHash: "block_hash", parentHash: "parent_hash", totalDifficulty: "total_difficulty", - difficulty: "difficulty", }, }); diff --git a/packages/types/src/merge/types.ts b/packages/types/src/merge/types.ts index bcc95d13d900..c7034c891b49 100644 --- a/packages/types/src/merge/types.ts +++ b/packages/types/src/merge/types.ts @@ -49,5 +49,4 @@ export type PowBlock = { blockHash: Root; parentHash: Root; totalDifficulty: bigint; - difficulty: bigint; }; From 9e505c774c682f98524490f02f9cb4113c770065 Mon Sep 17 00:00:00 2001 From: harkamal Date: Wed, 12 Jan 2022 20:57:35 +0530 Subject: [PATCH 2/2] placeholder for merge/transition tests --- packages/lodestar/test/spec/merge/transition.test.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/lodestar/test/spec/merge/transition.test.ts diff --git a/packages/lodestar/test/spec/merge/transition.test.ts b/packages/lodestar/test/spec/merge/transition.test.ts new file mode 100644 index 000000000000..e69de29bb2d1