diff --git a/validator/BUILD.bazel b/validator/BUILD.bazel index e1e81b012..1c84522ac 100644 --- a/validator/BUILD.bazel +++ b/validator/BUILD.bazel @@ -17,6 +17,7 @@ go_library( "//shared/debug:go_default_library", "//shared/featureconfig:go_default_library", "//shared/logutil:go_default_library", + "//shared/params:go_default_library", "//shared/version:go_default_library", "//validator/flags:go_default_library", "//validator/node:go_default_library", @@ -46,6 +47,7 @@ go_image( "//shared/debug:go_default_library", "//shared/featureconfig:go_default_library", "//shared/logutil:go_default_library", + "//shared/params:go_default_library", "//shared/version:go_default_library", "//validator/flags:go_default_library", "//validator/node:go_default_library", diff --git a/validator/main.go b/validator/main.go index 180e6e43a..a659943ff 100644 --- a/validator/main.go +++ b/validator/main.go @@ -10,6 +10,7 @@ import ( "github.com/prysmaticlabs/prysm/shared/debug" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/logutil" + "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/version" "github.com/prysmaticlabs/prysm/validator/flags" "github.com/prysmaticlabs/prysm/validator/node" @@ -86,6 +87,19 @@ contract in order to activate the validator client`, flags.PasswordFlag, }, Action: func(ctx *cli.Context) { + featureconfig.ConfigureValidatorFeatures(ctx) + // Use custom config values if the --no-custom-config flag is set. + if !ctx.GlobalBool(flags.NoCustomConfigFlag.Name) { + log.Info("Using custom parameter configuration") + if featureconfig.FeatureConfig().MinimalConfig { + log.Warn("Using Minimal Config") + params.UseMinimalConfig() + } else { + log.Warn("Using Demo Config") + params.UseDemoBeaconConfig() + } + } + if keystoreDir, _, err := node.CreateValidatorAccount(ctx); err != nil { log.Fatalf("Could not create validator at path: %s", keystoreDir) }