Import keys
The Prysm validator client signs with keys stored in a wallet, a folder that holds your keystores encrypted with a wallet password. This page imports the keystore-m_*.json files from the deposit CLI and starts the validator with them.
Before you begin
- Have the
validator_keysfolder from Create validator keys on the machine that runs the validator, and its keystore password. If you made the keys on another machine, copy only thekeystore-m_*.jsonfiles, not the mnemonic. - Install Prysm.
- If these keys have ever run in another validator client, stop that client for good first and bring its slashing protection history. See Avoid slashing.
Never load the same key into two running validator clients, on the same machine or on different ones. Both sign, and the key gets slashed. This includes "backup" or "failover" setups.
Import your keystores
-
Import your keystores. This creates the wallet if it doesn't exist yet.
./prysm.sh validator accounts import \--mainnet \--keys-dir=<PATH_TO_VALIDATOR_KEYS> \--wallet-dir=<PATH_TO_WALLET_DIR>.\prysm.bat validator accounts import `--mainnet `--keys-dir=<PATH_TO_VALIDATOR_KEYS> `--wallet-dir=<PATH_TO_WALLET_DIR>Replace:
<PATH_TO_VALIDATOR_KEYS>with the path to the folder containing thekeystore-m_*.jsonfiles.<PATH_TO_WALLET_DIR>with the folder where Prysm keeps the wallet. Prysm creates it on the first import. Use the same path in every command on this page.
Prysm asks for two passwords:
- New wallet password (twice, at least 8 characters). It encrypts the wallet; the validator needs it every time it starts.
- The password for your imported accounts: the password you chose at step 3 of Generate your keys.
-
Read the result:
INFO local: Successfully imported validator key(s) pubkeys=<PUBKEY>INFO accounts: Imported accounts [<PUBKEY>], view all of them by running `accounts list` -
List the accounts in the wallet:
./prysm.sh validator accounts list --wallet-dir=<PATH_TO_WALLET_DIR>.\prysm.bat validator accounts list --wallet-dir=<PATH_TO_WALLET_DIR>Showing 2 validator accountsAccount 0 | <ACCOUNT_NAME>[validating public key] 0x<PUBKEY>Account 1 | <ACCOUNT_NAME>[validating public key] 0x<PUBKEY>The public keys should match the
pubkeyfields in yourdeposit_data-*.json. -
Start the validator with the wallet:
./prysm.sh validator \--mainnet \--wallet-dir=<PATH_TO_WALLET_DIR> \--suggested-fee-recipient=<YOUR_WALLET_ADDRESS> \--enable-doppelganger.\prysm.bat validator `--mainnet `--wallet-dir=<PATH_TO_WALLET_DIR> `--suggested-fee-recipient=<YOUR_WALLET_ADDRESS> `--enable-doppelgangerReplace
<YOUR_WALLET_ADDRESS>with the address that should receive block fees. The validator asks for the wallet password when it starts.
If you don't want to type the wallet password at every restart, save it into a file, then add --wallet-password-file to the validator command.
If the validator is already running with this wallet, you don't need to restart it: it picks up newly imported keys on its own.