diff --git a/validator/main.go b/validator/main.go index d700bda1c..fdf7c21a7 100644 --- a/validator/main.go +++ b/validator/main.go @@ -59,6 +59,7 @@ var appFlags = []cli.Flag{ flags.KeyManager, flags.KeyManagerOpts, flags.DisableAccountMetricsFlag, + flags.MonitoringPortFlag, flags.SlasherRPCProviderFlag, flags.SlasherCertFlag, cmd.VerbosityFlag, @@ -69,18 +70,17 @@ var appFlags = []cli.Flag{ cmd.TracingProcessNameFlag, cmd.TracingEndpointFlag, cmd.TraceSampleFractionFlag, - flags.MonitoringPortFlag, cmd.LogFormat, + cmd.LogFileName, + cmd.ConfigFileFlag, + cmd.ChainConfigFileFlag, + cmd.GrpcMaxCallRecvMsgSizeFlag, debug.PProfFlag, debug.PProfAddrFlag, debug.PProfPortFlag, debug.MemProfileRateFlag, debug.CPUProfileFlag, debug.TraceFlag, - cmd.LogFileName, - cmd.ConfigFileFlag, - cmd.ChainConfigFileFlag, - cmd.GrpcMaxCallRecvMsgSizeFlag, } func init() { @@ -105,16 +105,18 @@ func main() { Description: `creates a new validator account keystore containing private keys for Ethereum 2.0 - this command outputs a deposit data string which can be used to deposit Ether into the ETH1.0 deposit contract in order to activate the validator client`, - Flags: []cli.Flag{ - flags.KeystorePathFlag, - flags.PasswordFlag, - }, + Flags: append(featureconfig.ActiveFlags(featureconfig.ValidatorFlags), + []cli.Flag{ + flags.KeystorePathFlag, + flags.PasswordFlag, + cmd.ChainConfigFileFlag, + }...), Action: func(cliCtx *cli.Context) error { - featureconfig.ConfigureValidator(cliCtx) - if featureconfig.Get().MinimalConfig { - log.Warn("Using Minimal Config") - params.UseMinimalConfig() + if cliCtx.IsSet(cmd.ChainConfigFileFlag.Name) { + chainConfigFileName := cliCtx.String(cmd.ChainConfigFileFlag.Name) + params.LoadChainConfigFile(chainConfigFileName) } + featureconfig.ConfigureValidator(cliCtx) keystorePath, passphrase, err := accounts.HandleEmptyKeystoreFlags(cliCtx, true /*confirmPassword*/) if err != nil {