How do I stake a validator using the Ethereum CLI for Testnet?

This guide is for Testnet ONLY

S
Written by Stakehouse
Updated over a week ago

Below is a step-by-step guide explaining how to generate your own deposit credentials for Testnet with Stakehouse on the Ethereum Deposit Contract.

If you are using Wagyu keygen, check out this guide.

Step# 1: Start Expert Mode

  • Select “Create a Validator” to start staking on the Ethereum blockchain.

  • Select the “⋯” in the top right corner and toggle “Expert Mode”. Note: you don’t need to create a password here. Password creation is done at a later stage.

Select “Turn On Expert Mode”.

Step #2: Download and unzip the staking deposit CLI

Download the CLI needed for your operating system.

Step #3: Generate the deposit credentials

  • Generate deposit credentials with the official Stakehouse account manager address: 0x952295078a226bf40c8cb076c16e0e7229f77b28

Note this address is for Goerli, Testnet

  • Mac/Linux
    ./deposit new-mnemonic --num_validators 1 --mnemonic_language english --chain prater --eth1_withdrawal_address 0x952295078a226bf40c8cb076c16e0e7229f77b28

Note this address is for Goerli, Testnet

  • Windows
    ./deposit.exe new-mnemonic --num_validators 1 --mnemonic_language english --chain prater --eth1_withdrawal_address 0x952295078a226bf40c8cb076c16e0e7229f77b28

Note this address is for Goerli, Testnet

  • You will be asked to enter a password to encrypt your validator keystore file.

  • Make sure your password is at least 8 characters long. Keep this password secure as it is not recoverable.

  • Re-enter the password when prompted.

  • You will be presented with a mnemonic. Write it down and store it safely: Keep it secure as it is not recoverable.

  • Example:
    start bleak slide grocery heavy ecology define grant because chicken piano feature hen hockey crystal divide cliff sail bubble toast ice brand found a tunnel

  • At this point you will have a keystore and deposit data file generated.

  • The deposit data file contains the data needed to process the validator deposit.

  • Example file: deposit_data-1642770906.json

This will vary from network to network

[

{

"pubkey":"86d5c9c0280931bab5f7a09cf31b60717e435dc715427e50d6912e77fa8a11f0cd9a1e8dcde2337f4117b27ca3ad8d96",

"withdrawal_credentials":"010000000000000000000000f847b44695d33e9fe20b1cb81881b55bfd4aa104",

"amount":32000000000,

"signature":"adfdab23444b0ffd7a70f8bab3039b9a8162180560f5dcd58524ecb8c7eb7cb1a362dba5bac13f000e31241b23d225c90b22909e15272f72ae44c15a9a5a3e71b92647a3d863944dffd00fb027e951f3b0c5c3277f604e943d3496e23cc91fb6",

"deposit_message_root":"36f0a43a1945509b90bcb145664e58e09396b3a25e638d1948e440404e08962a",

"deposit_data_root":"6acc60eaebef38b5602c831ac4a0b061903ff56b0b1343a3cd8d4838e11e2345",

"fork_version":"00001020",

"eth2_network_name":"prater",

"deposit_cli_version":"1.2.0"

}

]

  • The keystore file contains your encrypted signing key which can be unlocked with the password you entered during the key generation process.

  • Example file: keystore-m_12381_3600_0_0_0-1642770906.json

This will vary from network to network

{

"crypto":{

"kdf":{

"function":"scrypt",

"params":{

"dklen":32,

"n":262144,

"r":8,

"p":1,

"salt":"4a2193c8359724f9d881e4d9285d39cf5f345325d5e0cc1fdd4396410d53f741"

},

"message":""

},

"checksum":{

"function":"sha256",

"params":{

},

"message":"353f056b5f6648d8718a3d2c55e475ef2233892e36214de6d14863000cd66ebf"

},

"cipher":{

"function":"aes-128-ctr",

"params":{

"iv":"e05eb3b405f887f7786970588151c9c4"

},

"message":"cbfc706ce52f91b2aa1653bf7b72362fa8e1b7a040198e91fd61611c09e3e899"

}

},

"description":"",

"pubkey":"86d5c9c0280931bab5f7a09cf31b60717e435dc715427e50d6912e77fa8a11f0cd9a1e8dcde2337f4117b27ca3ad8d96",

"path":"m/12381/3600/0/0/0",

"uuid":"7c07d4b5-3fd5-49f3-8cb0-42f61cea5389",

"version":4

}

Step #4: Stake ETH using Expert Mode

  • Use the generated files to register the validator in the Stakehouse registry and enter the password associated with your keys.

  • Then select “Deposit” to send 32 ETH to the Ethereum Deposit Contract. Registering your validator is storing your encrypted validator keys on the Ethereum Blockchain. Only you have access. These files are being uploaded from your browser's cache.

  • You’ll be asked to confirm your validator key before approving and sending the transaction.


Step #5: Setup Node

  • A node is required to perform validator duties. If you do not have one, a link to node setup is here.

Did this answer your question?