## Issue Addressed Resolve #1652 ## Proposed Changes Adds a cli option for voluntary exits. The flow is similar to prysm's where after entering the password for the validator keystore (or load password from `secrets` if present) the user is given multiple warnings about the operation being irreversible, then redirected to the docs webpage(not added yet) which explains what a voluntary exit is and the consequences of exiting and then prompted to enter a phrase from the docs webpage as a final confirmation. Example usage ``` $ lighthouse --testnet zinken account validator exit --validator <validator-pubkey> --beacon-node http://localhost:5052 Running account manager for zinken testnet validator-dir path: "..." Enter the keystore password: for validator in ... Password is correct Publishing a voluntary exit for validator: ... WARNING: This is an irreversible operation WARNING: Withdrawing staked eth will not be possible until Eth1/Eth2 merge Please visit [website] to make sure you understand the implications of a voluntary exit. Enter the phrase from the above URL to confirm the voluntary exit: Exit my validator Published voluntary exit for validator ... ``` ## Additional info Not sure if we should have batch exits (`--validator all`) option for exiting all the validators in the `validators` directory. I'm slightly leaning towards having only single exits but don't have a strong preference.
24 lines
741 B
Rust
24 lines
741 B
Rust
//! Provides:
|
|
//!
|
|
//! - `ValidatorDir`: manages a directory containing validator keypairs, deposit info and other
|
|
//! things.
|
|
//! - `Manager`: manages a directory that contains multiple `ValidatorDir`.
|
|
//!
|
|
//! This crate is intended to be used by the account manager to create validators and the validator
|
|
//! client to load those validators.
|
|
|
|
mod builder;
|
|
pub mod insecure_keys;
|
|
mod manager;
|
|
mod validator_dir;
|
|
|
|
pub use crate::validator_dir::{
|
|
unlock_keypair_from_password_path, Error, Eth1DepositData, ValidatorDir,
|
|
ETH1_DEPOSIT_TX_HASH_FILE,
|
|
};
|
|
pub use builder::{
|
|
Builder, Error as BuilderError, ETH1_DEPOSIT_DATA_FILE, VOTING_KEYSTORE_FILE,
|
|
WITHDRAWAL_KEYSTORE_FILE,
|
|
};
|
|
pub use manager::{Error as ManagerError, Manager};
|