mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 08:08:16 -05:00
chore: remove eip7594 from skipped spec tests and rename mekle.test.ts -> merkleProof.test.ts (#8452)
**Motivation** Ensure that all spec tests are running for peerDas and fulu scopes. Rename merkle.test.ts -> merkleProof.test.ts so it matches the other file namings --------- Co-authored-by: Nico Flaig <nflaig@protonmail.com>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import path from "node:path";
|
||||
import {expect} from "vitest";
|
||||
import {Tree} from "@chainsafe/persistent-merkle-tree";
|
||||
import {ACTIVE_PRESET, ForkAll} from "@lodestar/params";
|
||||
import {ACTIVE_PRESET} from "@lodestar/params";
|
||||
import {InputType} from "@lodestar/spec-test-util";
|
||||
import {BeaconBlockBody, SSZTypesFor, ssz} from "@lodestar/types";
|
||||
import {BeaconBlockBody, sszTypesFor} from "@lodestar/types";
|
||||
import {toHex} from "@lodestar/utils";
|
||||
import {ethereumConsensusSpecsTests} from "../specTestVersioning.js";
|
||||
import {specTestIterator} from "../utils/specTestIterator.js";
|
||||
import {RunnerType, TestRunnerFn} from "../utils/types.js";
|
||||
|
||||
const merkle: TestRunnerFn<MerkleTestCase, string[]> = (fork) => {
|
||||
const merkleProof: TestRunnerFn<MerkleTestCase, string[]> = (fork) => {
|
||||
return {
|
||||
testFunction: (testcase) => {
|
||||
const bodyView = (ssz[fork].BeaconBlockBody as SSZTypesFor<ForkAll, "BeaconBlockBody">).toView(testcase.object);
|
||||
const bodyView = sszTypesFor(fork).BeaconBlockBody.toView(testcase.object);
|
||||
const branch = new Tree(bodyView.node).getSingleProof(testcase.proof.leaf_index);
|
||||
return branch.map(toHex);
|
||||
},
|
||||
@@ -22,7 +22,7 @@ const merkle: TestRunnerFn<MerkleTestCase, string[]> = (fork) => {
|
||||
proof: InputType.YAML,
|
||||
},
|
||||
getSszTypes: () => ({
|
||||
object: ssz[fork].BeaconBlockBody,
|
||||
object: sszTypesFor(fork).BeaconBlockBody,
|
||||
}),
|
||||
timeout: 10000,
|
||||
shouldSkip: (_testCase, name) => {
|
||||
@@ -51,5 +51,5 @@ interface IProof {
|
||||
}
|
||||
|
||||
specTestIterator(path.join(ethereumConsensusSpecsTests.outputDir, "tests", ACTIVE_PRESET), {
|
||||
merkle_proof: {type: RunnerType.default, fn: merkle},
|
||||
merkle_proof: {type: RunnerType.default, fn: merkleProof},
|
||||
});
|
||||
@@ -59,7 +59,7 @@ const coveredTestRunners = [
|
||||
// ],
|
||||
// ```
|
||||
export const defaultSkipOpts: SkipOpts = {
|
||||
skippedForks: ["eip7594", "eip7732", "eip7805", "gloas"],
|
||||
skippedForks: ["eip7732", "eip7805", "gloas"],
|
||||
// TODO: capella
|
||||
// BeaconBlockBody proof in lightclient is the new addition in v1.3.0-rc.2-hotfix
|
||||
// Skip them for now to enable subsequently
|
||||
|
||||
Reference in New Issue
Block a user