diff --git a/cmd/validator/accounts/accounts.go b/cmd/validator/accounts/accounts.go index 0cf9e8360..36e9b76f7 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.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -62,7 +62,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -94,7 +94,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -123,7 +123,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -164,7 +164,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), diff --git a/cmd/validator/slashing-protection/slashing-protection.go b/cmd/validator/slashing-protection/slashing-protection.go index beb1f12ff..523c2bb95 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.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, features.EnableMinimalSlashingProtection, @@ -51,7 +51,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, features.EnableMinimalSlashingProtection, diff --git a/cmd/validator/wallet/wallet.go b/cmd/validator/wallet/wallet.go index 64e46ea9e..35ed8ce7b 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.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), @@ -62,7 +62,7 @@ var Commands = &cli.Command{ features.Mainnet, features.PulseChain, features.PraterTestnet, - features.PulseChainTestnetV3, + features.PulseChainTestnetV4, features.SepoliaTestnet, features.HoleskyTestnet, }), diff --git a/config/features/config.go b/config/features/config.go index bc3c4272f..66d3bd4c0 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(PulseChainTestnetV3.Name) { - log.Warn("Running on PulseChain Testnet V3") - if err := params.SetActive(params.PulseChainTestnetV3Config().Copy()); err != nil { + } else if ctx.Bool(PulseChainTestnetV4.Name) { + log.Warn("Running on PulseChain Testnet V4") + if err := params.SetActive(params.PulseChainTestnetV4Config().Copy()); err != nil { return err } - applyPulseChainTestnetV3FeatureFlags(ctx) - params.UsePulseChainTestnetV3NetworkConfig() + applyPulseChainTestnetV4FeatureFlags(ctx) + params.UsePulseChainTestnetV4NetworkConfig() } 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 V3. -func applyPulseChainTestnetV3FeatureFlags(ctx *cli.Context) { +// Insert feature flags within the function to be enabled for PulseChain Testnet V4. +func applyPulseChainTestnetV4FeatureFlags(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 10f09ffac..d2b909465 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"}, } - // 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", + // PulseChainTestnetV4 flag for the multiclient Ethereum consensus testnet. + PulseChainTestnetV4 = &cli.BoolFlag{ + Name: "pulsechain-testnet-v4", + Usage: "Run Prysm configured for the PulseChain Testnet V4 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, - PulseChainTestnetV3, + PulseChainTestnetV4, SepoliaTestnet, Mainnet, PulseChain, @@ -221,7 +221,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c disableGRPCConnectionLogging, HoleskyTestnet, PraterTestnet, - PulseChainTestnetV3, + PulseChainTestnetV4, SepoliaTestnet, Mainnet, PulseChain, @@ -255,7 +255,7 @@ var NetworkFlags = []cli.Flag{ Mainnet, PulseChain, PraterTestnet, - PulseChainTestnetV3, + PulseChainTestnetV4, SepoliaTestnet, HoleskyTestnet, } diff --git a/config/params/BUILD.bazel b/config/params/BUILD.bazel index 989e2883a..c5a67419e 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_v3_config.go", + "testnet_pulsechain_v4_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 3755641d5..430c9f085 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 - UsePulseChainTestnetV3NetworkConfig() + UsePulseChainTestnetV4NetworkConfig() } // PulseChainConfig defines the config for the PulseChain beacon chain mainnet. func PulseChainConfig() *BeaconChainConfig { // TODO - return PulseChainTestnetV3Config() + return PulseChainTestnetV4Config() } diff --git a/config/params/testnet_pulsechain_v3_config.go b/config/params/testnet_pulsechain_v3_config.go deleted file mode 100644 index e3789f305..000000000 --- a/config/params/testnet_pulsechain_v3_config.go +++ /dev/null @@ -1,37 +0,0 @@ -package params - -// UsePulseChainTestnetV3NetworkConfig uses the PulseChain beacon chain testnet network config. -func UsePulseChainTestnetV3NetworkConfig() { - cfg := BeaconNetworkConfig().Copy() - cfg.ContractDeploymentBlock = 16492700 - cfg.BootstrapNodes = []string{ - "enr:-MK4QC37TFAfc973oOezRlVoOCygtjT-rlOoKbbuZNmrJ5dhXS-IfrsH3yhjNP0dfy3-UpyFZy2hy6lOE__ykFfj3lKGAYa95Co5h2F0dG5ldHOIAAAAAAAAAACEZXRoMpBbnJIGAAAJRP__________gmlkgnY0gmlwhAPsylWJc2VjcDI1NmsxoQOpEhsSXVShFW4yvaww_SI0A-H0pix0aJlOdYJgyIgbjYhzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-1-001 - "enr:-MK4QM1JpOXnj-zpjfPvG1GkCEvjYMg8dEk6t7VLtpFuionhBz59n2ZIwixpO2exzoNLMV4_v7jCHGQqi0zYtc-Gp3OGAYa94lhqh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBbnJIGAAAJRP__________gmlkgnY0gmlwhCzKVYOJc2VjcDI1NmsxoQK24rqFwR7W3HJgLVVGDSMy8PiMculxF6VOJgAlG4wmXohzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-1-002 - "enr:-MK4QBAlroGpM1xtk7WzWP8lbKnI2UjVpoQNsKJeNRS-kVvFCswNyVRBZHwMOvfW2G3j0qaaDsUpMxXY-t9LdGAZgQGGAYa94IQmh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBbnJIGAAAJRP__________gmlkgnY0gmlwhK6BYN-Jc2VjcDI1NmsxoQJNoBFGkhcAMKIbrDPHoI7dYVAY99Z832TimlqhpoYo7YhzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-1-003 - } - OverrideBeaconNetworkConfig(cfg) -} - -// PulseChainTestnetV3Config defines the config for the PulseChain beacon chain testnet. -func PulseChainTestnetV3Config() *BeaconChainConfig { - cfg := MainnetConfig().Copy() - cfg.ConfigName = PulseChainTestnetV3Name - cfg.PresetBase = "pulsechain" - cfg.TerminalTotalDifficulty = "58750003716598352947541" - cfg.MinGenesisActiveValidatorCount = 4096 - cfg.MinGenesisTime = 1674864000 - cfg.GenesisForkVersion = []byte{0x00, 0x00, 0x09, 0x42} - cfg.GenesisDelay = 300 - cfg.AltairForkVersion = []byte{0x00, 0x00, 0x09, 0x43} - cfg.AltairForkEpoch = 1 - cfg.BellatrixForkVersion = []byte{0x00, 0x00, 0x09, 0x44} - cfg.BellatrixForkEpoch = 2 - cfg.SecondsPerSlot = 10 - cfg.MaxEffectiveBalance = 32 * 1e15 - cfg.EjectionBalance = 16 * 1e15 - cfg.DepositChainID = 942 - cfg.DepositNetworkID = 942 - cfg.DepositContractAddress = "0x3693693693693693693693693693693693693693" - cfg.InitializeForkSchedule() - return cfg -} diff --git a/config/params/testnet_pulsechain_v4_config.go b/config/params/testnet_pulsechain_v4_config.go new file mode 100644 index 000000000..6839d9960 --- /dev/null +++ b/config/params/testnet_pulsechain_v4_config.go @@ -0,0 +1,44 @@ +package params + +// UsePulseChainTestnetV4NetworkConfig uses the PulseChain beacon chain testnet network config. +func UsePulseChainTestnetV4NetworkConfig() { + cfg := BeaconNetworkConfig().Copy() + cfg.ContractDeploymentBlock = 16492700 + cfg.BootstrapNodes = []string{ + "enr:-MK4QPzTScyPIPS7UWhaz0v4cVYKTfN2-0leb-iFKGl_xFBjDOSJenQ91BwaZ7sUXApiCPihr_Mw4L5oZJ4W5vNqffuGAYd4QZA7h2F0dG5ldHOIAAAAAAAAAACEZXRoMpB3mwAIAAAJRAEAAAAAAAAAgmlkgnY0gmlwhAOOpsuJc2VjcDI1NmsxoQNJljCY9olY73J9aYbW-9Ix72ZNzKv1AeIt6BHSqtniV4hzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-2-001 + "enr:-MK4QF0dJA9H3BlxJE7HEjucJD47JYdlQyJ0wbQVNrbfgM_0A-OZEb8J1jjtmiaw3ytpl-FdmofS7QPW31j1n2WImTiGAYd4QUGRh2F0dG5ldHOIAAAAAAAAAACEZXRoMpB3mwAIAAAJRAEAAAAAAAAAgmlkgnY0gmlwhBJ2vKWJc2VjcDI1NmsxoQJsvKcVWN9inS4QTW8QsPSd053XZl6MZ5zmvBXLycbONYhzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-2-002 + "enr:-MK4QMqHY3x4vzN1yHXY7ZCAH8ylE8dSYT3ZWSNsUBd0MJ4dIYjz94vrEUvMZGsDfJXW1aHZlpszxScBLJEQovnha6WGAYd4QUMUh2F0dG5ldHOIAAAAAAAAAACEZXRoMpB3mwAIAAAJRAEAAAAAAAAAgmlkgnY0gmlwhAOKa5CJc2VjcDI1NmsxoQIt-VoTVWzXdUTO78hhF_25-AhXgOk0k-YG3gW_dzX6YIhzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A", // bootnode-aws-us-east-2-003 + } + OverrideBeaconNetworkConfig(cfg) +} + +// PulseChainTestnetV4Config defines the config for the PulseChain beacon chain testnet. +func PulseChainTestnetV4Config() *BeaconChainConfig { + cfg := MainnetConfig().Copy() + cfg.ConfigName = PulseChainTestnetV4Name + cfg.PresetBase = "pulsechain" + + // preset overrides + cfg.BaseRewardFactor = 64000 + cfg.EffectiveBalanceIncrement = 1 * 1e15 + cfg.MaxEffectiveBalance = 32 * 1e15 + + // config overrides + cfg.TerminalTotalDifficulty = "58750003716598352947541" + cfg.MinGenesisActiveValidatorCount = 4096 + cfg.MinGenesisTime = 1674864000 + cfg.GenesisForkVersion = []byte{0x00, 0x00, 0x09, 0x43} + cfg.GenesisDelay = 300 + cfg.AltairForkVersion = []byte{0x00, 0x00, 0x09, 0x44} + cfg.AltairForkEpoch = 1 + cfg.BellatrixForkVersion = []byte{0x00, 0x00, 0x09, 0x45} + cfg.BellatrixForkEpoch = 2 + cfg.SecondsPerSlot = 10 + cfg.EjectionBalance = 16 * 1e15 + cfg.DepositChainID = 943 + cfg.DepositNetworkID = 943 + cfg.DepositContractAddress = "0x3693693693693693693693693693693693693693" + + cfg.InitializeForkSchedule() + return cfg +} diff --git a/config/params/values.go b/config/params/values.go index 53d39b1aa..7b03eb628 100644 --- a/config/params/values.go +++ b/config/params/values.go @@ -13,5 +13,5 @@ const ( GoerliName = "goerli" SepoliaName = "sepolia" HoleskyName = "holesky" - PulseChainTestnetV3Name = "pulsechain-testnet-v3" + PulseChainTestnetV4Name = "pulsechain-testnet-v4" )