diff --git a/shared/featureconfig/config.go b/shared/featureconfig/config.go index cb7f38360..daa8684ef 100644 --- a/shared/featureconfig/config.go +++ b/shared/featureconfig/config.go @@ -34,6 +34,7 @@ type Flags struct { NewBeaconStateLocks bool // NewStateLocks for updated beacon state locking. // Testnet Flags. AltonaTestnet bool // AltonaTestnet defines the flag through which we can enable the node to run on the altona testnet. + OnyxTestnet bool // OnyxTestnet defines the flag through which we can enable the node to run on the onyx testnet. // Feature related flags. WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory. InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents. @@ -124,6 +125,12 @@ func ConfigureBeaconChain(ctx *cli.Context) { params.UseAltonaNetworkConfig() cfg.AltonaTestnet = true } + if ctx.Bool(OnyxTestnet.Name) { + log.Warn("Running Node on Onyx Testnet") + params.UseOnyxConfig() + params.UseOnyxNetworkConfig() + cfg.OnyxTestnet = true + } if ctx.Bool(writeSSZStateTransitionsFlag.Name) { log.Warn("Writing SSZ states and blocks after state transitions") cfg.WriteSSZStateTransitions = true @@ -277,6 +284,12 @@ func ConfigureValidator(ctx *cli.Context) { params.UseAltonaNetworkConfig() cfg.AltonaTestnet = true } + if ctx.Bool(OnyxTestnet.Name) { + log.Warn("Running Node on Onyx Testnet") + params.UseOnyxConfig() + params.UseOnyxNetworkConfig() + cfg.OnyxTestnet = true + } if ctx.Bool(enableLocalProtectionFlag.Name) { cfg.LocalProtection = true } else { diff --git a/shared/featureconfig/flags.go b/shared/featureconfig/flags.go index cf3bc4bb9..533f49532 100644 --- a/shared/featureconfig/flags.go +++ b/shared/featureconfig/flags.go @@ -10,6 +10,11 @@ var ( Name: "altona", Usage: "This defines the flag through which we can run on the Altona Multiclient Testnet", } + // OnyxTestnet flag for the Prysmatic Labs single-client testnet configuration. + OnyxTestnet = &cli.BoolFlag{ + Name: "onyx", + Usage: "This defines the flag through which we can run on the Onyx Prysm Testnet", + } devModeFlag = &cli.BoolFlag{ Name: "dev", Usage: "Enable experimental features still in development. These features may not be stable.", @@ -583,6 +588,7 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{ disableDomainDataCacheFlag, waitForSyncedFlag, AltonaTestnet, + OnyxTestnet, disableAccountsV2, }...) @@ -626,6 +632,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{ newBeaconStateLocks, forceMaxCoverAttestationAggregation, AltonaTestnet, + OnyxTestnet, batchBlockVerify, initSyncVerbose, enableFinalizedDepositsCache, diff --git a/validator/accounts/v2/cmd_accounts.go b/validator/accounts/v2/cmd_accounts.go index c0f1f8e79..661fb007e 100644 --- a/validator/accounts/v2/cmd_accounts.go +++ b/validator/accounts/v2/cmd_accounts.go @@ -24,6 +24,7 @@ this command outputs a deposit data string which is required to become a validat flags.AccountPasswordFileFlag, flags.NumAccountsFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := CreateAccount(cliCtx); err != nil { @@ -40,6 +41,7 @@ this command outputs a deposit data string which is required to become a validat flags.WalletPasswordFileFlag, flags.ShowDepositDataFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := ListAccounts(cliCtx); err != nil { @@ -56,6 +58,7 @@ this command outputs a deposit data string which is required to become a validat flags.BackupDirFlag, flags.AccountsFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := ExportAccount(cliCtx); err != nil { @@ -73,6 +76,7 @@ this command outputs a deposit data string which is required to become a validat flags.KeysDirFlag, flags.WalletPasswordFileFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := ImportAccount(cliCtx); err != nil { diff --git a/validator/accounts/v2/cmd_wallet.go b/validator/accounts/v2/cmd_wallet.go index c526a8706..a0c8d3390 100644 --- a/validator/accounts/v2/cmd_wallet.go +++ b/validator/accounts/v2/cmd_wallet.go @@ -26,6 +26,7 @@ var WalletCommands = &cli.Command{ flags.RemoteSignerCACertPathFlag, flags.WalletPasswordFileFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if _, err := CreateWallet(cliCtx); err != nil { @@ -45,6 +46,7 @@ var WalletCommands = &cli.Command{ flags.RemoteSignerCACertPathFlag, flags.WalletPasswordsDirFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := EditWalletConfiguration(cliCtx); err != nil { @@ -63,6 +65,7 @@ var WalletCommands = &cli.Command{ flags.WalletPasswordFileFlag, flags.NumAccountsFlag, featureconfig.AltonaTestnet, + featureconfig.OnyxTestnet, }, Action: func(cliCtx *cli.Context) error { if err := RecoverWallet(cliCtx); err != nil {