diff --git a/packages/cli/src/config/beaconParams.ts b/packages/cli/src/config/beaconParams.ts index 54a4155a3914..8fda812eafe0 100644 --- a/packages/cli/src/config/beaconParams.ts +++ b/packages/cli/src/config/beaconParams.ts @@ -5,6 +5,7 @@ import { ChainForkConfig, chainConfigFromJson, } from "@lodestar/config"; +import {DATA_COLUMN_SIDECAR_SUBNET_COUNT} from "@lodestar/params"; import {readFile} from "../util/index.js"; import {getNetworkBeaconParams, NetworkName} from "../networks/index.js"; import { @@ -39,7 +40,7 @@ export function getBeaconConfigFromArgs(args: GlobalArgs): {config: ChainForkCon * @see getBeaconParams */ export function getBeaconParamsFromArgs(args: GlobalArgs): ChainConfig { - return getBeaconParams({ + const beaconParams = getBeaconParams({ network: args.network, paramsFile: args.paramsFile, additionalParamsCli: { @@ -47,6 +48,10 @@ export function getBeaconParamsFromArgs(args: GlobalArgs): ChainConfig { ...parseTerminalPowArgs(args as ITerminalPowArgs), }, }); + if (args.supernode) { + beaconParams["NODE_CUSTODY_REQUIREMENT"] = DATA_COLUMN_SIDECAR_SUBNET_COUNT; + } + return beaconParams; } /** diff --git a/packages/cli/src/options/globalOptions.ts b/packages/cli/src/options/globalOptions.ts index 52a5090c6794..8e26da1258f1 100644 --- a/packages/cli/src/options/globalOptions.ts +++ b/packages/cli/src/options/globalOptions.ts @@ -10,6 +10,7 @@ type GlobalSingleArgs = { paramsFile?: string; preset: string; presetFile?: string; + supernode?: boolean; }; export const defaultNetwork: NetworkName = "mainnet"; @@ -44,6 +45,11 @@ const globalSingleOptions: CliCommandOptions = { description: "Preset configuration file to override the active preset with custom values", type: "string", }, + + supernode: { + description: "custody all subnets, alias to params.NODE_CUSTODY_REQUIREMENT for all subnets", + type: "boolean", + }, }; export const rcConfigOption: [string, string, (configPath: string) => Record] = [ diff --git a/packages/validator/src/util/params.ts b/packages/validator/src/util/params.ts index d2e32acd5d8c..57201996cd21 100644 --- a/packages/validator/src/util/params.ts +++ b/packages/validator/src/util/params.ts @@ -236,6 +236,6 @@ function getSpecCriticalParams(localConfig: ChainConfig): Record