From a5cddc36ebd7c6efeed983960faedf48d8d5fe50 Mon Sep 17 00:00:00 2001 From: Shane Bammel Date: Thu, 23 Mar 2023 16:15:07 -0500 Subject: [PATCH] Add v3 suffix to pulsechain-testnet --- cmd/validator/accounts/accounts.go | 10 +++---- .../slashing-protection.go | 4 +-- cmd/validator/wallet/wallet.go | 4 +-- config/features/config.go | 14 +++++----- config/features/flags.go | 14 +++++----- config/params/BUILD.bazel | 2 +- config/params/mainnet_pulsechain_config.go | 4 +-- ...fig.go => testnet_pulsechain_v3_config.go} | 10 +++---- config/params/values.go | 26 +++++++++---------- 9 files changed, 44 insertions(+), 44 deletions(-) rename config/params/{testnet_pulsechain_config.go => testnet_pulsechain_v3_config.go} (84%) diff --git a/cmd/validator/accounts/accounts.go b/cmd/validator/accounts/accounts.go index be77db4de..0cf9e8360 100644 --- a/cmd/validator/accounts/accounts.go +++ b/cmd/validator/accounts/accounts.go @@ -28,7 +28,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -62,7 +62,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -94,7 +94,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -123,7 +123,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -164,7 +164,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), diff --git a/cmd/validator/slashing-protection/slashing-protection.go b/cmd/validator/slashing-protection/slashing-protection.go index 78062c00a..beb1f12ff 100644 --- a/cmd/validator/slashing-protection/slashing-protection.go +++ b/cmd/validator/slashing-protection/slashing-protection.go @@ -23,7 +23,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, features.EnableMinimalSlashingProtection, @@ -51,7 +51,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, features.EnableMinimalSlashingProtection, diff --git a/cmd/validator/wallet/wallet.go b/cmd/validator/wallet/wallet.go index e17e8a8b2..64e46ea9e 100644 --- a/cmd/validator/wallet/wallet.go +++ b/cmd/validator/wallet/wallet.go @@ -32,7 +32,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -62,7 +62,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnet, + features.PulseChainTestnetV3, features.SepoliaTestnet, features.HoleskyTestnet, }), diff --git a/config/features/config.go b/config/features/config.go index 22d323447..bc3c4272f 100644 --- a/config/features/config.go +++ b/config/features/config.go @@ -137,13 +137,13 @@ func configureTestnet(ctx *cli.Context) error { } applyPulseChainFeatureFlags(ctx) params.UsePulseChainNetworkConfig() - } else if ctx.Bool(PulseChainTestnet.Name) { - log.Warn("Running on PulseChain Testnet") - if err := params.SetActive(params.PulseChainTestnetConfig().Copy()); err != nil { + } else if ctx.Bool(PulseChainTestnetV3.Name) { + log.Warn("Running on PulseChain Testnet V3") + if err := params.SetActive(params.PulseChainTestnetV3Config().Copy()); err != nil { return err } - applyPulseChainTestnetFeatureFlags(ctx) - params.UsePulseChainTestnetNetworkConfig() + applyPulseChainTestnetV3FeatureFlags(ctx) + params.UsePulseChainTestnetV3NetworkConfig() } else if ctx.Bool(SepoliaTestnet.Name) { log.Info("Running on the Sepolia Beacon Chain Testnet") if err := params.SetActive(params.SepoliaConfig().Copy()); err != nil { @@ -179,8 +179,8 @@ func applyPraterFeatureFlags(ctx *cli.Context) { func applyPulseChainFeatureFlags(ctx *cli.Context) { } -// Insert feature flags within the function to be enabled for PulseChain testnet. -func applyPulseChainTestnetFeatureFlags(ctx *cli.Context) { +// Insert feature flags within the function to be enabled for PulseChain Testnet V3. +func applyPulseChainTestnetV3FeatureFlags(ctx *cli.Context) { } // Insert feature flags within the function to be enabled for Sepolia testnet. diff --git a/config/features/flags.go b/config/features/flags.go index a9a515fef..10f09ffac 100644 --- a/config/features/flags.go +++ b/config/features/flags.go @@ -14,10 +14,10 @@ var ( Usage: "Runs Prysm configured for the Prater / Goerli test network.", Aliases: []string{"goerli"}, } - // PulseChainTestnet flag for the multiclient Ethereum consensus testnet. - PulseChainTestnet = &cli.BoolFlag{ - Name: "pulsechain-testnet", - Usage: "Run Prysm configured for the PulseChain beacon chain test network", + // PulseChainTestnetV3 flag for the multiclient Ethereum consensus testnet. + PulseChainTestnetV3 = &cli.BoolFlag{ + Name: "pulsechain-testnet-v3", + Usage: "Run Prysm configured for the PulseChain Testnet V3 beacon chain", } // SepoliaTestnet flag for the multiclient Ethereum consensus testnet. SepoliaTestnet = &cli.BoolFlag{ @@ -194,7 +194,7 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{ writeWalletPasswordOnWebOnboarding, HoleskyTestnet, PraterTestnet, - PulseChainTestnet, + PulseChainTestnetV3, SepoliaTestnet, Mainnet, PulseChain, @@ -221,7 +221,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c disableGRPCConnectionLogging, HoleskyTestnet, PraterTestnet, - PulseChainTestnet, + PulseChainTestnetV3, SepoliaTestnet, Mainnet, PulseChain, @@ -255,7 +255,7 @@ var NetworkFlags = []cli.Flag{ Mainnet, PulseChain, PraterTestnet, - PulseChainTestnet, + PulseChainTestnetV3, SepoliaTestnet, HoleskyTestnet, } diff --git a/config/params/BUILD.bazel b/config/params/BUILD.bazel index dae53af4e..989e2883a 100644 --- a/config/params/BUILD.bazel +++ b/config/params/BUILD.bazel @@ -18,7 +18,7 @@ go_library( "testnet_e2e_config.go", "testnet_holesky_config.go", "testnet_prater_config.go", - "testnet_pulsechain_config.go", + "testnet_pulsechain_v3_config.go", "testnet_sepolia_config.go", "testutils.go", "testutils_develop.go", # keep diff --git a/config/params/mainnet_pulsechain_config.go b/config/params/mainnet_pulsechain_config.go index b539bbb43..3755641d5 100644 --- a/config/params/mainnet_pulsechain_config.go +++ b/config/params/mainnet_pulsechain_config.go @@ -3,11 +3,11 @@ package params // UsePulseChainNetworkConfig uses the PulseChain beacon chain mainnet network config. func UsePulseChainNetworkConfig() { // TODO - UsePulseChainTestnetNetworkConfig() + UsePulseChainTestnetV3NetworkConfig() } // PulseChainConfig defines the config for the PulseChain beacon chain mainnet. func PulseChainConfig() *BeaconChainConfig { // TODO - return PulseChainTestnetConfig() + return PulseChainTestnetV3Config() } diff --git a/config/params/testnet_pulsechain_config.go b/config/params/testnet_pulsechain_v3_config.go similarity index 84% rename from config/params/testnet_pulsechain_config.go rename to config/params/testnet_pulsechain_v3_config.go index 48505c6f4..e3789f305 100644 --- a/config/params/testnet_pulsechain_config.go +++ b/config/params/testnet_pulsechain_v3_config.go @@ -1,7 +1,7 @@ package params -// UsePulseChainTestnetNetworkConfig uses the PulseChain beacon chain testnet network config. -func UsePulseChainTestnetNetworkConfig() { +// UsePulseChainTestnetV3NetworkConfig uses the PulseChain beacon chain testnet network config. +func UsePulseChainTestnetV3NetworkConfig() { cfg := BeaconNetworkConfig().Copy() cfg.ContractDeploymentBlock = 16492700 cfg.BootstrapNodes = []string{ @@ -12,10 +12,10 @@ func UsePulseChainTestnetNetworkConfig() { OverrideBeaconNetworkConfig(cfg) } -// PulseChainTestnetConfig defines the config for the PulseChain beacon chain testnet. -func PulseChainTestnetConfig() *BeaconChainConfig { +// PulseChainTestnetV3Config defines the config for the PulseChain beacon chain testnet. +func PulseChainTestnetV3Config() *BeaconChainConfig { cfg := MainnetConfig().Copy() - cfg.ConfigName = PulseChainTestnetName + cfg.ConfigName = PulseChainTestnetV3Name cfg.PresetBase = "pulsechain" cfg.TerminalTotalDifficulty = "58750003716598352947541" cfg.MinGenesisActiveValidatorCount = 4096 diff --git a/config/params/values.go b/config/params/values.go index 202f068d7..53d39b1aa 100644 --- a/config/params/values.go +++ b/config/params/values.go @@ -1,17 +1,17 @@ package params const ( - DevnetName = "devnet" - EndToEndName = "end-to-end" - EndToEndMainnetName = "end-to-end-mainnet" - InteropName = "interop" - MainnetName = "mainnet" - PulseChainName = "pulsechain-mainnet" - MainnetTestName = "mainnet-test" - MinimalName = "minimal" - PraterName = "prater" - GoerliName = "goerli" - SepoliaName = "sepolia" - HoleskyName = "holesky" - PulseChainTestnetName = "pulsechain-testnet-v3" + DevnetName = "devnet" + EndToEndName = "end-to-end" + EndToEndMainnetName = "end-to-end-mainnet" + InteropName = "interop" + MainnetName = "mainnet" + PulseChainName = "pulsechain-mainnet" + MainnetTestName = "mainnet-test" + MinimalName = "minimal" + PraterName = "prater" + GoerliName = "goerli" + SepoliaName = "sepolia" + HoleskyName = "holesky" + PulseChainTestnetV3Name = "pulsechain-testnet-v3" )