Deprecate Old Configuration Flags (#1676)

* replace password flag with path to password

* changed to simple string flag

* fix build
This commit is contained in:
Raul Jordan 2019-02-21 14:34:44 -06:00 committed by GitHub
parent 718f99ee10
commit 0a3b8fae9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 34 deletions

View File

@ -12,35 +12,12 @@ var (
Usage: "Logging verbosity (debug, info=default, warn, error, fatal, panic)",
Value: "info",
}
// IPCPathFlag defines the filename of a pipe within the datadir.
IPCPathFlag = DirectoryFlag{
Name: "ipcpath",
Usage: "Filename for IPC socket/pipe within the datadir (explicit paths escape it)",
}
// DataDirFlag defines a path on disk.
DataDirFlag = DirectoryFlag{
Name: "datadir",
Usage: "Data directory for the databases and keystore",
Value: DirectoryString{DefaultDataDir()},
}
// NetworkIDFlag defines the specific network identifier.
NetworkIDFlag = cli.Uint64Flag{
Name: "networkid",
Usage: "Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby)",
Value: 1,
}
// PasswordFileFlag defines the path to the user's account password file.
PasswordFileFlag = cli.StringFlag{
Name: "password",
Usage: "Password file to use for non-interactive password input",
Value: "",
}
// RPCProviderFlag defines a http endpoint flag to connect to mainchain.
RPCProviderFlag = cli.StringFlag{
Name: "rpc",
Usage: "HTTP-RPC server end point to use to connect to mainchain.",
Value: "http://localhost:8545/",
}
// EnableTracingFlag defines a flag to enable p2p message tracing.
EnableTracingFlag = cli.BoolFlag{
Name: "enable-tracing",
@ -70,24 +47,17 @@ var (
Usage: "Port used to listening and respond metrics for prometheus.",
Value: 8080,
}
// KeystorePasswordFlag defines the password that will unlock the keystore file.
KeystorePasswordFlag = cli.StringFlag{
Name: "keystore-password",
Usage: "Keystore password is used to unlock the keystore so that the users decrypted keys can be used.",
}
// BootstrapNode tells the beacon node which bootstrap node to connect to
BootstrapNode = cli.StringFlag{
Name: "bootstrap-node",
Usage: "The address of bootstrap node. Beacon node will connect for peer discovery via DHT",
}
// RelayNode tells the beacon node which relay node to connect to.
RelayNode = cli.StringFlag{
Name: "relay-node",
Usage: "The address of relay node. The beacon node will connect to the " +
"relay node and advertise their address via the relay node to other peers",
}
// P2PPort defines the port to be used by libp2p.
P2PPort = cli.IntFlag{
Name: "p2p-port",

View File

@ -113,7 +113,6 @@ contract in order to activate the validator client`,
cmd.EnableTracingFlag,
cmd.TracingEndpointFlag,
cmd.TraceSampleFractionFlag,
cmd.KeystorePasswordFlag,
cmd.BootstrapNode,
cmd.MonitoringPortFlag,
debug.PProfFlag,

View File

@ -111,7 +111,7 @@ func (s *ValidatorClient) registerPrometheusService(ctx *cli.Context) error {
func (s *ValidatorClient) registerClientService(ctx *cli.Context) error {
endpoint := ctx.GlobalString(types.BeaconRPCProviderFlag.Name)
keystoreDirectory := ctx.GlobalString(types.KeystorePathFlag.Name)
keystorePassword := ctx.GlobalString(types.PasswordFlag.Name)
keystorePassword := ctx.String(types.PasswordFlag.Name)
v, err := client.NewValidatorService(context.TODO(), &client.Config{
Endpoint: endpoint,
KeystorePath: keystoreDirectory,

View File

@ -21,9 +21,9 @@ var (
Name: "keystore-path",
Usage: "path to the desired keystore directory",
}
// PasswordFlag defines the password for storing and retrieving validator private keys from the keystore.
// PasswordFlag defines the password value for storing and retrieving validator private keys from the keystore.
PasswordFlag = cli.StringFlag{
Name: "password",
Usage: "password to your validator private keys",
Usage: "string value of the password for your validator private keys",
}
)