diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml index 42859a6c78..729adb3353 100644 --- a/account_manager/Cargo.toml +++ b/account_manager/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "account_manager" version = "0.0.1" -authors = ["Luke Anderson "] +authors = ["Paul Hauner ", "Luke Anderson "] edition = "2018" [dev-dependencies] diff --git a/account_manager/src/cli.rs b/account_manager/src/cli.rs index ad962a14f8..d417e1ecf0 100644 --- a/account_manager/src/cli.rs +++ b/account_manager/src/cli.rs @@ -3,30 +3,13 @@ use clap::{App, Arg, SubCommand}; pub fn cli_app<'a, 'b>() -> App<'a, 'b> { App::new("account_manager") .visible_aliases(&["am", "account", "account_manager"]) - .about("Eth 2.0 Accounts Manager") - .arg( - Arg::with_name("logfile") - .long("logfile") - .value_name("logfile") - .help("File path where output will be written.") - .takes_value(true), - ) - .arg( - Arg::with_name("datadir") - .long("datadir") - .short("d") - .value_name("DIR") - .help("Data directory for keys and databases.") - .takes_value(true), - ) + .about("Utilities for generating and managing Ethereum 2.0 accounts.") .subcommand( SubCommand::with_name("validator") - .about("Eth2 validator managment commands.") - .version("0.0.1") - .author("Sigma Prime ") + .about("Generate or manage Etheruem 2.0 validators.") .subcommand( SubCommand::with_name("new") - .about("Create a new validator.") + .about("Create a new Ethereum 2.0 validator.") .subcommand( SubCommand::with_name("insecure") .about("Uses the insecure deterministic keypairs. Do not store value in these.") diff --git a/account_manager/src/lib.rs b/account_manager/src/lib.rs index 5b43e53b3b..37d2d7692a 100644 --- a/account_manager/src/lib.rs +++ b/account_manager/src/lib.rs @@ -52,7 +52,7 @@ fn run_account_manager( match matches.subcommand() { ("validator", Some(matches)) => match matches.subcommand() { - ("new", Some(matches)) => new_validator_subcommand(matches, datadir, context)?, + ("new", Some(matches)) => run_new_validator_subcommand(matches, datadir, context)?, _ => { return Err("Invalid 'validator new' command. See --help.".to_string()); } @@ -74,7 +74,7 @@ enum KeygenMethod { } /// Process the subcommand for creating new validators. -fn new_validator_subcommand( +fn run_new_validator_subcommand( matches: &ArgMatches, datadir: PathBuf, context: RuntimeContext, diff --git a/beacon_node/client/src/builder.rs b/beacon_node/client/src/builder.rs index 7e73129682..90cbc033cf 100644 --- a/beacon_node/client/src/builder.rs +++ b/beacon_node/client/src/builder.rs @@ -62,7 +62,6 @@ pub struct ClientBuilder { libp2p_network: Option>>, libp2p_network_send: Option>, http_listen_addr: Option, - grpc_listen_addr: Option<(String, u16)>, websocket_listen_addr: Option, eth_spec_instance: T::EthSpec, } @@ -94,7 +93,6 @@ where libp2p_network: None, libp2p_network_send: None, http_listen_addr: None, - grpc_listen_addr: None, websocket_listen_addr: None, eth_spec_instance, } @@ -427,7 +425,6 @@ where beacon_chain: self.beacon_chain, libp2p_network: self.libp2p_network, http_listen_addr: self.http_listen_addr, - grpc_listen_addr: self.grpc_listen_addr, websocket_listen_addr: self.websocket_listen_addr, _exit_signals: self.exit_signals, } diff --git a/beacon_node/client/src/lib.rs b/beacon_node/client/src/lib.rs index 4da474ea1a..f0ed63e485 100644 --- a/beacon_node/client/src/lib.rs +++ b/beacon_node/client/src/lib.rs @@ -25,7 +25,6 @@ pub struct Client { libp2p_network: Option>>, http_listen_addr: Option, websocket_listen_addr: Option, - grpc_listen_addr: Option<(String, u16)>, /// Exit signals will "fire" when dropped, causing each service to exit gracefully. _exit_signals: Vec, } @@ -41,11 +40,6 @@ impl Client { self.http_listen_addr } - /// Returns the address of the client's gRPC API server, if it was started. - pub fn grpc_listen_addr(&self) -> Option<(String, u16)> { - self.grpc_listen_addr.clone() - } - /// Returns the address of the client's WebSocket API server, if it was started. pub fn websocket_listen_addr(&self) -> Option { self.websocket_listen_addr diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index b22b99862f..eb7bd41beb 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -103,30 +103,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .help("A secp256k1 secret key, represented as ASCII-encoded hex bytes (with or without 0x prefix).") .takes_value(true), ) - /* - * gRPC parameters. - */ - .arg( - Arg::with_name("no-grpc") - .long("no-grpc") - .help("Disable the gRPC server.") - .takes_value(false), - ) - .arg( - Arg::with_name("rpc-address") - .long("rpc-address") - .value_name("ADDRESS") - .help("Listen address for RPC endpoint.") - .takes_value(true), - ) - .arg( - Arg::with_name("rpc-port") - .long("rpc-port") - .value_name("PORT") - .help("Listen port for RPC endpoint.") - .conflicts_with("port-bump") - .takes_value(true), - ) /* REST API related arguments */ .arg( Arg::with_name("no-api") diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index a24aba38a1..5bbd2c66e4 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -29,11 +29,11 @@ fn main() { .short("s") .long("spec") .value_name("TITLE") - .help("Specifies the default eth2 spec type. Only effective when creating a new datadir.") + .help("Specifies the default eth2 spec type.") .takes_value(true) .possible_values(&["mainnet", "minimal", "interop"]) .global(true) - .default_value("minimal") + .default_value("minimal"), ) .arg( Arg::with_name("logfile") @@ -51,6 +51,15 @@ fn main() { .possible_values(&["info", "debug", "trace", "warn", "error", "crit"]) .default_value("trace"), ) + .arg( + Arg::with_name("datadir") + .long("datadir") + .short("d") + .value_name("DIR") + .global(true) + .help("Data directory for keys and databases.") + .takes_value(true), + ) .subcommand(beacon_node::cli_app()) .subcommand(validator_client::cli_app()) .subcommand(account_manager::cli_app()) diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 948b0734e3..a630147c2e 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -9,9 +9,6 @@ lazy_static! { Config::default() }; - static ref DEFAULT_SERVER_GRPC_PORT: String = { - format!("{}", DEFAULTS.server_grpc_port) - }; static ref DEFAULT_SERVER_HTTP_PORT: String = { format!("{}", DEFAULTS.server_http_port) }; @@ -54,15 +51,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .default_value(&DEFAULTS.server) .takes_value(true), ) - .arg( - Arg::with_name("server-grpc-port") - .long("server-grpc-port") - .short("g") - .value_name("PORT") - .help("Port to use for gRPC API connection to the server.") - .default_value(&DEFAULT_SERVER_GRPC_PORT) - .takes_value(true), - ) .arg( Arg::with_name("server-http-port") .long("server-http-port") diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index ede389eba9..847c07ed50 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -30,8 +30,6 @@ pub struct Config { pub log_file: PathBuf, /// The server at which the Beacon Node can be contacted pub server: String, - /// The gRPC port on the server - pub server_grpc_port: u16, /// The HTTP port on the server, for the REST API. pub server_http_port: u16, /// The number of slots per epoch. @@ -46,7 +44,6 @@ impl Default for Config { key_source: <_>::default(), log_file: PathBuf::from(""), server: "localhost".into(), - server_grpc_port: 5051, server_http_port: 5052, slots_per_epoch: MainnetEthSpec::slots_per_epoch(), } @@ -72,12 +69,6 @@ impl Config { .map_err(|e| format!("Unable to parse HTTP port: {:?}", e))?; } - if let Some(port) = cli_args.value_of("server-grpc-port") { - client_config.server_grpc_port = port - .parse::() - .map_err(|e| format!("Unable to parse gRPC port: {:?}", e))?; - } - let client_config = match cli_args.subcommand() { ("testnet", Some(sub_cli_args)) => { if cli_args.is_present("eth2-config") && sub_cli_args.is_present("bootstrap") {