diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index 0781e911a9..c708e83961 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -13,7 +13,7 @@ use validator_dir::Builder as ValidatorDirBuilder; pub const CMD: &str = "create"; pub const BASE_DIR_FLAG: &str = "base-dir"; pub const WALLET_NAME_FLAG: &str = "wallet-name"; -pub const WALLET_PASSPHRASE_FLAG: &str = "wallet-passphrase"; +pub const WALLET_PASSWORD_FLAG: &str = "wallet-password"; pub const DEPOSIT_GWEI_FLAG: &str = "deposit-gwei"; pub const STORE_WITHDRAW_FLAG: &str = "store-withdrawal-keystore"; pub const COUNT_FLAG: &str = "count"; @@ -34,8 +34,8 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .required(true), ) .arg( - Arg::with_name(WALLET_PASSPHRASE_FLAG) - .long(WALLET_PASSPHRASE_FLAG) + Arg::with_name(WALLET_PASSWORD_FLAG) + .long(WALLET_PASSWORD_FLAG) .value_name("WALLET_PASSWORD_PATH") .help("A path to a file containing the password which will unlock the wallet.") .takes_value(true) @@ -109,8 +109,7 @@ pub fn cli_run( let spec = env.core_context().eth2_config.spec; let name: String = clap_utils::parse_required(matches, WALLET_NAME_FLAG)?; - let wallet_password_path: PathBuf = - clap_utils::parse_required(matches, WALLET_PASSPHRASE_FLAG)?; + let wallet_password_path: PathBuf = clap_utils::parse_required(matches, WALLET_PASSWORD_FLAG)?; let validator_dir = clap_utils::parse_path_with_default_in_home_dir( matches, VALIDATOR_DIR_FLAG, diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index 64703f4dc3..f8a5c0776a 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -15,7 +15,7 @@ use std::path::{Path, PathBuf}; pub const CMD: &str = "create"; pub const HD_TYPE: &str = "hd"; pub const NAME_FLAG: &str = "name"; -pub const PASSPHRASE_FLAG: &str = "passphrase-file"; +pub const PASSWORD_FLAG: &str = "password-file"; pub const TYPE_FLAG: &str = "type"; pub const MNEMONIC_FLAG: &str = "mnemonic-output-path"; @@ -34,8 +34,8 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .required(true), ) .arg( - Arg::with_name(PASSPHRASE_FLAG) - .long(PASSPHRASE_FLAG) + Arg::with_name(PASSWORD_FLAG) + .long(PASSWORD_FLAG) .value_name("WALLET_PASSWORD_PATH") .help( "A path to a file containing the password which will unlock the wallet. \ @@ -71,7 +71,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { pub fn cli_run(matches: &ArgMatches, base_dir: PathBuf) -> Result<(), String> { let name: String = clap_utils::parse_required(matches, NAME_FLAG)?; - let wallet_password_path: PathBuf = clap_utils::parse_required(matches, PASSPHRASE_FLAG)?; + let wallet_password_path: PathBuf = clap_utils::parse_required(matches, PASSWORD_FLAG)?; let mnemonic_output_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?; let type_field: String = clap_utils::parse_required(matches, TYPE_FLAG)?; @@ -90,7 +90,7 @@ pub fn cli_run(matches: &ArgMatches, base_dir: PathBuf) -> Result<(), String> { // Create a random password if the file does not exist. if !wallet_password_path.exists() { - // To prevent users from accidentally supplying their password to the PASSPHRASE_FLAG and + // To prevent users from accidentally supplying their password to the PASSWORD_FLAG and // create a file with that name, we require that the password has a .pass suffix. if wallet_password_path.extension() != Some(&OsStr::new("pass")) { return Err(format!( diff --git a/book/src/become-a-validator-source.md b/book/src/become-a-validator-source.md index b640d9a134..adab86ce39 100644 --- a/book/src/become-a-validator-source.md +++ b/book/src/become-a-validator-source.md @@ -88,7 +88,7 @@ validator](./validator-create.md). A two-step example follows: Create a wallet with: ```bash -lighthouse --testnet medalla account wallet create --name my-validators --passphrase-file my-validators.pass +lighthouse --testnet medalla account wallet create --name my-validators --password-file my-validators.pass ``` The output will look like this: @@ -124,7 +124,7 @@ used to restore your validator if there is a data loss. Create a validator from the wallet with: ```bash -lighthouse --testnet medalla account validator create --wallet-name my-validators --wallet-passphrase my-validators.pass --count 1 +lighthouse --testnet medalla account validator create --wallet-name my-validators --wallet-password my-validators.pass --count 1 ``` The output will look like this: diff --git a/book/src/key-management.md b/book/src/key-management.md index 3641b9b69e..53edec221d 100644 --- a/book/src/key-management.md +++ b/book/src/key-management.md @@ -35,9 +35,9 @@ items, starting at one easy-to-backup mnemonic and ending with multiple keypairs. Creating a single validator looks like this: 1. Create a **wallet** and record the **mnemonic**: - - `lighthouse account wallet create --name wally --passphrase-file wally.pass` + - `lighthouse account wallet create --name wally --password-file wally.pass` 1. Create the voting and withdrawal **keystores** for one validator: - - `lighthouse account validator create --wallet-name wally --wallet-passphrase wally.pass --count 1` + - `lighthouse account validator create --wallet-name wally --wallet-password wally.pass --count 1` In step (1), we created a wallet in `~/.lighthouse/wallets` with the name diff --git a/book/src/validator-create.md b/book/src/validator-create.md index 7f856a139d..25112e7487 100644 --- a/book/src/validator-create.md +++ b/book/src/validator-create.md @@ -17,7 +17,7 @@ lighthouse account validator create --help Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key derivation scheme. USAGE: - lighthouse account_manager validator create [FLAGS] [OPTIONS] --wallet-name --wallet-passphrase + lighthouse account_manager validator create [FLAGS] [OPTIONS] --wallet-name --wallet-password FLAGS: -h, --help Prints help information @@ -56,7 +56,7 @@ OPTIONS: The path where the validator directories will be created. Defaults to ~/.lighthouse/validators --wallet-name Use the wallet identified by this name - --wallet-passphrase + --wallet-password A path to a file containing the password which will unlock the wallet. ``` @@ -66,12 +66,12 @@ The example assumes that the `wally` wallet was generated from the [wallet](./wallet-create.md) example. ```bash -lighthouse --testnet medalla account validator create --name wally --wallet-passphrase wally.pass --count 1 +lighthouse --testnet medalla account validator create --name wally --wallet-password wally.pass --count 1 ``` This command will: -- Derive a new BLS keypair from `wally`, updating it so that it generates a +- Derive a single new BLS keypair from `wally`, updating it so that it generates a new key next time. - Create a new directory in `~/.lighthouse/validators` containing: - An encrypted keystore containing the validators voting keypair. diff --git a/book/src/wallet-create.md b/book/src/wallet-create.md index 1505566d49..fe0ac6dc94 100644 --- a/book/src/wallet-create.md +++ b/book/src/wallet-create.md @@ -25,7 +25,7 @@ lighthouse account wallet create --help Creates a new HD (hierarchical-deterministic) EIP-2386 wallet. USAGE: - lighthouse account_manager wallet create [OPTIONS] --name --passphrase-file + lighthouse account_manager wallet create [OPTIONS] --name --password-file FLAGS: -h, --help Prints help information @@ -39,7 +39,7 @@ OPTIONS: --name The wallet will be created with this name. It is not allowed to create two wallets with the same name for the same --base-dir. - --passphrase-file + --password-file A path to a file containing the password which will unlock the wallet. If the file does not exist, a random password will be generated and saved at that path. To avoid confusion, if the file does not already exist it must include a '.pass' suffix. @@ -61,7 +61,7 @@ Creates a new wallet named `wally` with a randomly generated password saved to `./wallet.pass`: ```bash -lighthouse account wallet create --name wally --passphrase-file wally.pass +lighthouse account wallet create --name wally --password-file wally.pass ``` > Notes: diff --git a/lighthouse/tests/account_manager.rs b/lighthouse/tests/account_manager.rs index 133bbd721f..6652c1ec64 100644 --- a/lighthouse/tests/account_manager.rs +++ b/lighthouse/tests/account_manager.rs @@ -102,7 +102,7 @@ fn create_wallet>( .arg(CREATE_CMD) .arg(format!("--{}", NAME_FLAG)) .arg(&name) - .arg(format!("--{}", PASSPHRASE_FLAG)) + .arg(format!("--{}", PASSWORD_FLAG)) .arg(password.as_ref().as_os_str()) .arg(format!("--{}", MNEMONIC_FLAG)) .arg(mnemonic.as_ref().as_os_str()), @@ -238,7 +238,7 @@ impl TestValidator { .arg(CREATE_CMD) .arg(format!("--{}", WALLET_NAME_FLAG)) .arg(&self.wallet.name) - .arg(format!("--{}", WALLET_PASSPHRASE_FLAG)) + .arg(format!("--{}", WALLET_PASSWORD_FLAG)) .arg(self.wallet.password_path().into_os_string()) .arg(format!("--{}", VALIDATOR_DIR_FLAG)) .arg(self.validator_dir.clone().into_os_string())