how can i create a validator from a keystore file
Closed this issue · 3 comments
assuming i have this
cat keystore-m_12381_3600_0_0_0-1715783445.json
{"crypto": {"kdf": {"function": "scrypt", "params": {"dklen": 32, "n": 262144, "r": 8, "p": 1, "salt": "3dea9c48bbb5ba32f3e5bcbf1377dd8371ac1eb5bda945b588fd5928141f21e6"}, "message": ""}, "checksum": {"function": "sha256", "params": {}, "message": "c23bebf91faabcfef2e97ec9969021cc7da51e69df185a92baea6a729c9d917b"}, "cipher": {"function": "aes-128-ctr", "params": {"iv": "4c48b5cc2e24a8a0cd37bd50d63eecbe"}, "message": "cba31e06650e4c680f4aa7b13ce65f969236c73446e95c6bc11fc922327a744c"}}, "description": "", "pubkey": "ae8276eb4f7be2b9d025198df394ebf56df3f9aa74e6eb7ef162a89aa8aff810eca907276a5d6ffbff2356a49bcce20c", "path": "m/12381/3600/0/0/0", "uuid": "6dbe932d-53e3-4c4f-be60-fe3e5ae1c7dc", "version": 4}
how can i use ethdo to generate the validator key and the secrets (validator passphrase) from this keystore?
( I am intending to use this in lighthouse beacon node)
I don't see any instructions for this particular case in the provided documentation
your guidance is highly appreciated!
The validator public key is already present in the keystore as "pubkey".
To obtain the private key you need to import the keystore into a wallet. For example:
ethdo wallet create --type=nd --wallet=import
ethdo account import --account=import/account1 --keystore=... --keystore-passphrase=... --passphrase=secret
ethdo account key --account=import/account1 --passphrase=secret
keystore
can be the path to the keystore file rather than the data itself. keystore-passphrase
is the passphrase that was used to create the keystore. You should replace secret
with a proper passphrase to keep the private key secure.
Once you have the key you can remove the wallet with
ethdo wallet delete --wallet=import
The validator public key is already present in the keystore as "pubkey".
To obtain the private key you need to import the keystore into a wallet. For example:
ethdo wallet create --type=nd --wallet=import ethdo account import --account=import/account1 --keystore=... --keystore-passphrase=... --passphrase=secret ethdo account key --account=import/account1 --passphrase=secret
keystore
can be the path to the keystore file rather than the data itself.keystore-passphrase
is the passphrase that was used to create the keystore. You should replacesecret
with a proper passphrase to keep the private key secure.Once you have the key you can remove the wallet with
ethdo wallet delete --wallet=import
thanks alot for the guidance!
if i understand correctly, the secret
is actually the passphrase for the respective voting-keystore.json of each validator yes?
EDIT : closed the issue by mistake, i am still looking for help!
passphrase
is the passphrase for the new account you are creating. keystore-passphrase
is the passphrase for the keystore from which you are importing the private key.