Re-generate or Generate More Keys
Last updated
Last updated
You can use the 24-word secret recovery phrase to create additional validator keys; or to re-generate your deposit_data and keystore files in the event you lost access to these files. You can use the Wagyu Key Generator software for this purpose. It doesn't matter what tool you originally used to generate your keys; different tools should all adhere to the same standards.
Follow the same procedure in Generate Keys to install the Wagyu Ken Generation software if you haven't already installed it. The usual precautions apply: it is best to use an "air-gapped" computer during the procedure. If an air-gapped computer is not available, ensure you disconnect from the internet by turning off all networking options (unplugging Ethernet, switching off Wi-Fi, etc.) while handling your secret recovery phrase and generating your keys.
On the Welcome screen, instead of choosing to "Create New Secret Recovery Phrase", choose Use Existing Secret Recovery Phrase instead.
Then to the question "How would you like to use your existing secret recovery phrase", choose Generate existing or new validator keys.
On the next screen, enter your 24-word secret recovery phrase. Once your secret recovery phrase is verified, the Create Keys screen will show.
This is where things can get a little confusing. Read the following carefully.
You are asked to enter Number of New Keys and Amount of Existing (starting index).
Think of it this way. When a 24-word secret recovery phrase was initially generated for you, a whole chain of "keys" were already pre-cut and arranged in a pre-determined sequence, starting from index #0, #1, #2, and so on. All that Wagyu Key Gen software (or any other key generation software) is doing, is to select the item(s) from this key chain, and output the corresponding keystore file(s) for you.
Assume you had initially generated one key. This would have been the first item in the chain, which has an index #0. The corresponding keystore file is named:
keystore-m_12381_3600_0_0_0-xxxxxxxxxx.json
where the m_12381_3600
portion is the "derivation path" of the keys and is standard for all Ethereum addresses. The following digit "0" (highlight in green) is the index number of the key, in this case, this is the first key with index #0.
The trailing xxxxxxxxxx
portion is a Unix timestamp which is a code that represents the time when the file was generated.
The subsequent keys have indices #1, #2, #3, and so on, and their keystore files have standard names, respectively:
keystore-m_12381_3600_1_0_0-xxxxxxxxxx.json
keystore-m_12381_3600_2_0_0-xxxxxxxxxx.json
keystore-m_12381_3600_3_0_0-xxxxxxxxxx.json
Now this is how you specify the Number of New Keys and Amount of Existing (starting index). These terms are a little misleading. Instead, think of the "number of new keys" as "how many" to generate, and "amount of existing (starting index)" as "from where" to start.
Assume you had previously generated one key (#0):
No. of New Keys ("how many")
Starting Index ("from where")
Re-generate the first key (#0)
1
0
Generate one new key (#1)
1
1
Generate two new keys (#1, #2)
2
1
In other words, "regenerate the first key" means generate 1 key, starting from index #0. "Generate one new key" means generate 1 key, starting from index #1, and so on.
In this way, you can confidently generate, or re-generate, any one or more keys from the key set and obtain the corresponding keystore file(s).
You can open up the keystore file using a text editor, to check its pubkey value.
If you are re-generating a key, it is important to check that the keystore file you obtained has the same pubkey that matches with your existing validator. Otherwise it won't work.
You will get one keystore file per each key, but only one deposit_data file.
If you are generating or re-generating multiple keys, you will get one keystore file per each key you ask for, but you will only get one deposit_data file for all the keys generated in a single operation. Think ahead how you would like to use the deposit_data file. At the Staking Launchpad site where you will upload the deposit_data file, you will be expected to make all the deposits for all the keys contained in the deposit_data.
Once you have specified the Number of New Keys and the Starting Index, proceed to supply a password for the keystore file(s), and a Withdrawal Address for the newly generated keys, as per the instructions in Generate Keys - Step 3.
Follow the prompts to re-enter the password, and choose the download folder. Finally, click Create to create the keystore file(s) and deposit_data file.