mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-09 15:48:08 -05:00
**Motiviation** All networks have completed the merge transition and most execution clients no longer support pre-merge so it's not even possible anymore to run a network from a genesis before bellatrix, unless you keep it to phase0/altair only, which still works after this PR is merged. This code is effectively tech debt, no longer exercised and just gets in the way when doing refactors. **Description** Removes all code related to performing the merge transition. Running the node pre-merge (CL only mode) is still possible and syncing still works. Also removed a few CLI flags we added for the merge specifically, those shouldn't be used anymore. Spec constants like `TERMINAL_TOTAL_DIFFICULTY` are kept for spec compliance and ssz types (like `PowBlock`) as well. I had to disable a few spec tests related to handling the merge block since those code paths are removed. Closes https://github.com/ChainSafe/lodestar/issues/8661
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import {describe, expect, it} from "vitest";
|
|
import {config} from "@lodestar/config/default";
|
|
import {getClient} from "../../../../src/beacon/client/config.js";
|
|
import {Endpoints, getDefinitions} from "../../../../src/beacon/routes/config.js";
|
|
import {getRoutes} from "../../../../src/beacon/server/config.js";
|
|
import {runGenericServerTest} from "../../../utils/genericServerTest.js";
|
|
import {testData} from "../testData/config.js";
|
|
|
|
describe("beacon / config", () => {
|
|
runGenericServerTest<Endpoints>(config, getClient, getRoutes, testData);
|
|
|
|
it("Serialize Partial Spec object", () => {
|
|
const {getSpec} = getDefinitions(config);
|
|
|
|
const partialJsonSpec: Record<string, string> = {
|
|
PRESET_BASE: "mainnet",
|
|
DEPOSIT_CONTRACT_ADDRESS: "0xff50ed3d0ec03ac01d4c79aad74928bff48a7b2b",
|
|
GENESIS_FORK_VERSION: "0x00001020",
|
|
MIN_GENESIS_TIME: "1606824000",
|
|
};
|
|
|
|
const jsonRes = getSpec.resp.data.toJson(partialJsonSpec);
|
|
const specRes = getSpec.resp.data.fromJson(jsonRes);
|
|
|
|
expect(specRes).toEqual(partialJsonSpec);
|
|
});
|
|
});
|