Skip to content

Commit

Permalink
chore: remove no longer supported networks from config (#6870)
Browse files Browse the repository at this point in the history
* chore: remove no longer supported networks from config

* Fix spelling of lighthouse
  • Loading branch information
nflaig authored Jun 10, 2024
1 parent 90b053c commit 4ef27ac
Show file tree
Hide file tree
Showing 27 changed files with 295 additions and 294 deletions.
2 changes: 0 additions & 2 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ flamegraph
flamegraphs
getNetworkIdentity
gnosis
goerli
heapdump
heaptrack
holesky
Expand Down Expand Up @@ -182,7 +181,6 @@ repos
req
reqresp
responder
ropsten
runtime
scalability
secp
Expand Down
2 changes: 1 addition & 1 deletion default.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To specify a specific network (defaults to mainnet) set this value.
# Allowed values are: mainnet, gnosis, goerli, ropsten, sepolia and chiado. Source for currently supported networks: https://github.com/ChainSafe/lodestar/blob/unstable/packages/cli/src/networks/index.ts#L19
# Allowed values are: mainnet, gnosis, holesky, sepolia and chiado. Source for currently supported networks: https://github.com/ChainSafe/lodestar/blob/unstable/packages/cli/src/networks/index.ts#L21
LODESTAR_NETWORK=mainnet

# Set a custom admin password to prevent having to signup.
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/metrics/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type LodestarMetadata = {
version: string;
/** "4f816b16dfde718e2d74f95f2c8292596138c248" */
commit: string;
/** "goerli" */
/** "holesky" */
network: string;
};

Expand Down
18 changes: 11 additions & 7 deletions packages/cli/docsgen/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const DEFAULT_SEPARATOR = "\n\n";
const LINE_BREAK = "\n\n";

function sanitizeDescription(description: string): string {
return description.replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("{", "&#123;").replaceAll("}", "&#125;");
return description
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll("{", "&#123;")
.replaceAll("}", "&#125;");
}

function renderExampleBody(example: CliExample, lodestarCommand?: string): string {
Expand All @@ -27,10 +31,10 @@ ${lodestarCommand ? `${lodestarCommand} ` : ""}${example.command}
* -------------------
* #### Basic `validator` command example
*
* Run one validator client with all the keystores available in the directory .goerli/keystores
* Run one validator client with all the keystores available in the directory .holesky/keystores
*
* ```
* validator --network goerli
* validator --network holesky
* ```
* -------------------
*/
Expand All @@ -46,15 +50,15 @@ function renderCommandExample(example: CliExample, lodestarCommand?: string): st
*
* #### Basic `validator` command example
*
* Run one validator client with all the keystores available in the directory .goerli/keystores
* Run one validator client with all the keystores available in the directory .holesky/keystores
*
* ```
* validator --network goerli
* validator --network holesky
* ```
*
* #### Advanced `validator` command example
*
* Run one validator client with all the keystores available in the directory .goerli/keystores
* Run one validator client with all the keystores available in the directory .holesky/keystores
* using an rcConfig file for configuration
*
* ```
Expand Down Expand Up @@ -183,7 +187,7 @@ The following sub-commands are available with the \`${command}\` command:`,
* Import an interchange file to the slashing protection DB
*
* ```
* ./lodestar validator slashing-protection import --network goerli --file interchange.json
* ./lodestar validator slashing-protection import --network holesky --file interchange.json
* ```
*/
function renderSubCommand(sub: SubCommandDefinition, lodestarCommand?: string): string {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/beacon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const beacon: CliCommand<BeaconArgs, GlobalArgs> = {
docsFolder: "run/beacon-management",
examples: [
{
command: "beacon --network goerli",
description: "Run a beacon chain node and connect to the goerli testnet",
command: "beacon --network holesky",
description: "Run a beacon chain node and connect to the holesky testnet",
},
],
options: beaconOptions as CliCommandOptions<BeaconArgs>,
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/lightclient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const lightclient: CliCommand<ILightClientArgs, GlobalArgs> = {
docsFolder: "libraries/lightclient-prover",
examples: [
{
command: "lightclient --network goerli",
description: "Run lightclient with goerli network",
command: "lightclient --network holesky",
description: "Run lightclient with holesky network",
},
],
options: lightclientOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/validator/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ethereum Foundation utility.",

examples: [
{
command: "validator import --network goerli --importKeystores $HOME/staking-deposit-cli/validator_keys",
command: "validator import --network holesky --importKeystores $HOME/staking-deposit-cli/validator_keys",
description: "Import validator keystores generated with the Ethereum Foundation Staking Launchpad",
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export const validator: CliCommand<IValidatorCliArgs, GlobalArgs> = {
docsFolder: "run/validator-management",
examples: [
{
command: "validator --network goerli",
command: "validator --network holesky",
title: "Base `validator` command",
description:
"Run one validator client with all the keystores available in the directory" +
` ${getAccountPaths({dataDir: ".goerli"}, "goerli").keystoresDir}`,
` ${getAccountPaths({dataDir: ".holesky"}, "holesky").keystoresDir}`,
},
],
options: validatorOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const exportCmd: CliCommand<ExportArgs, ISlashingProtectionArgs & Account

examples: [
{
command: "validator slashing-protection export --network goerli --file interchange.json",
command: "validator slashing-protection export --network holesky --file interchange.json",
description: "Export an interchange JSON file for all validators in the slashing protection DB",
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const importCmd: CliCommand<ImportArgs, ISlashingProtectionArgs & Account

examples: [
{
command: "validator slashing-protection import --network goerli --file interchange.json",
command: "validator slashing-protection import --network holesky --file interchange.json",
description: "Import an interchange file to the slashing protection DB",
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/validator/voluntaryExit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ If no `pubkeys` are provided, it will exit all validators that have been importe

examples: [
{
command: "validator voluntary-exit --network goerli --pubkeys 0xF00",
command: "validator voluntary-exit --network holesky --pubkeys 0xF00",
description: "Perform a voluntary exit for the validator who has a public key 0xF00",
},
{
command:
"validator voluntary-exit --network goerli --externalSigner.url http://signer:9000 --externalSigner.fetch --pubkeys 0xF00",
"validator voluntary-exit --network holesky --externalSigner.url http://signer:9000 --externalSigner.fetch --pubkeys 0xF00",
description:
"Perform a voluntary exit for the validator who has a public key 0xF00 and its secret key is on an external signer",
},
Expand Down
15 changes: 0 additions & 15 deletions packages/cli/src/networks/goerli.ts

This file was deleted.

19 changes: 1 addition & 18 deletions packages/cli/src/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,15 @@ import {parseBootnodesFile} from "../util/format.js";
import * as mainnet from "./mainnet.js";
import * as dev from "./dev.js";
import * as gnosis from "./gnosis.js";
import * as goerli from "./goerli.js";
import * as ropsten from "./ropsten.js";
import * as sepolia from "./sepolia.js";
import * as holesky from "./holesky.js";
import * as chiado from "./chiado.js";
import * as ephemery from "./ephemery.js";

export type NetworkName =
| "mainnet"
| "dev"
| "gnosis"
| "goerli"
| "ropsten"
| "sepolia"
| "holesky"
| "chiado"
| "ephemery";
export type NetworkName = "mainnet" | "dev" | "gnosis" | "sepolia" | "holesky" | "chiado" | "ephemery";
export const networkNames: NetworkName[] = [
"mainnet",
"gnosis",
"goerli",
"ropsten",
"sepolia",
"holesky",
"chiado",
Expand Down Expand Up @@ -69,10 +56,6 @@ export function getNetworkData(network: NetworkName): {
return dev;
case "gnosis":
return gnosis;
case "goerli":
return goerli;
case "ropsten":
return ropsten;
case "sepolia":
return sepolia;
case "holesky":
Expand Down
9 changes: 0 additions & 9 deletions packages/cli/src/networks/ropsten.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/cli/test/unit/config/beaconParams.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {getBeaconParams} from "../../../src/config/index.js";

describe("config / beaconParams", () => {
const GENESIS_FORK_VERSION_MAINNET = "0x00000000";
const GENESIS_FORK_VERSION_GOERLI = "0x00001020";
const GENESIS_FORK_VERSION_HOLESKY = "0x01017000";
const GENESIS_FORK_VERSION_FILE = "0x00009902";
const GENESIS_FORK_VERSION_CLI = "0x00009903";
const networkName = "goerli";
const networkName = "holesky";
const paramsFilepath = getTestdirPath("./test-config.yaml");

const testCases: {
Expand All @@ -34,7 +34,7 @@ describe("config / beaconParams", () => {
additionalParamsCli: {},
},
// eslint-disable-next-line @typescript-eslint/naming-convention
GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_GOERLI,
GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_HOLESKY,
},
{
id: "Params from network & file > returns file",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test/unit/paths/globalPaths.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe("paths / global", () => {
},
{
id: "Network paths",
args: {network: "goerli"},
args: {network: "holesky"},
globalPaths: {
dataDir: "/my-root-dir/lodestar/goerli",
dataDir: "/my-root-dir/lodestar/holesky",
},
},
{
Expand Down
43 changes: 0 additions & 43 deletions packages/config/src/chainConfig/networks/goerli.ts

This file was deleted.

36 changes: 0 additions & 36 deletions packages/config/src/chainConfig/networks/ropsten.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/config/src/chainConfig/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ChainConfig = {
* Free-form short name of the network that this configuration applies to - known
* canonical network names include:
* * 'mainnet' - there can be only one
* * 'prater' - testnet
* * 'holesky' - testnet
* Must match the regex: [a-z0-9\-]
*/
CONFIG_NAME: string;
Expand Down
Loading

0 comments on commit 4ef27ac

Please sign in to comment.