Skip to main content

Recover Validator Keystores

You can recover validator keystores that are active.

Slashing Prevention

Before starting validators with recovered keystores, ensure the original validators have been stopped and at least 2 epochs have passed. Running the same keys on two machines simultaneously will result in slashing.

Security Notice

Protect your mnemonic — it can be used to regenerate your validator keys.

./operator recover
Example Output
Enter the mnemonic for generating the validator keys: leaf circle ground star...
Enter your vault address: 0x001...
Enter comma separated list of API endpoints for execution nodes: https://execution-node
Enter comma separated list of API endpoints for consensus nodes: https://consensus-node
Enter the network name: mainnet
Fetching registered validators for vault 0x001...
Fetched 1 registered validators
Fetching validators statuses...
Fetched statuses for registered validators
Vault has 1 registered validator(s), recover active keystores from provided mnemonic? [Y/n]: y
Successfully recovered 1 keystores for vaults 0x001...

recover flags

The command prompts for anything it needs, so all flags are optional.

FlagDescription
--mnemonicMnemonic used to generate the validator keys. Prompted if omitted
--vaultAddress of the Vault to recover keystores for. Prompted if omitted
--per-keystore-passwordCreates a separate password file for each keystore instead of one shared password.txt
--vault-first-blockBlock the Vault was created at. Without it, recover scans from the Keeper's genesis block, which can take a long time
--no-confirmSkips confirmation prompts
--execution-endpointsComma-separated API endpoints for execution nodes. Prompted if omitted
--consensus-endpointsComma-separated API endpoints for consensus nodes. Prompted if omitted
--networkNetwork of the Vault. Default: the network chosen during init
--data-dirPath where keystores and config data are placed. Default: ~/.stakewise
--log-levelSet logging level: ERROR, WARNING, INFO, DEBUG. Default: INFO