2

I am trying to setup a local devnet in my computer by using geth and prysm using https://docs.prylabs.network/docs/advanced/proof-of-stake-devnet. I can able to setup network with three execution nodes and three consensus nodes. Now I want to add new validators to the network. I tried with https://github.com/protolambda/eth2-val-tools and https://github.com/ethereum/staking-deposit-cli. I do get keystore-###.json and deposit_data-###.json files.

In mainnet and testnet we need to upload deposit_data-###.json file to launchpad, but what I need to do in the case of local devnet? I imported the keys which I used to deposit 32 ETH and when I start the validator it shows

"[2023-04-19 14:35:39] INFO validator: Waiting for deposit to be observed by beacon node pubKey=0x94e387be6699 status=UNKNOWN_STATUS"

What is the right way to add new validators in the local devnet?

1
  • have you been able to improve on this? I'm having the same problem
    – srSky
    Commented Jun 12, 2023 at 9:13

1 Answer 1

2
+50

Adding new validators to an Ethereum private network involves a few steps. Since you're using Geth and Prysm, I'll guide you through the process:

1 - Generate Keystore and Deposit Data Files: You've already done this using tools like eth2-val-tools and staking-deposit-cli. Make sure you have the keystore files and deposit data files for each new validator you want to add.

2 - Start the Beacon Node: Ensure your beacon node is up and running. This is the core of the proof-of-stake network.

3 - Submit Deposit Transactions: Unlike mainnet or testnet, you don't need to use the launchpad. You can directly send deposit transactions to your private devnet. Use the eth2-deposit-cli tool provided by Prysm to send deposits. Replace # with the validator index.

eth2-deposit-cli \
--deposit-contract-addr 0x0000000000000000000000000000000000000000 \
--chain-id 12345 \
--mnemonic "your-mnemonic-phrase" \
--num-validator-keys 1

4 - Wait for Deposit Confirmation: Once you've submitted the deposit transaction, it might take some time for the beacon node to observe it. You'll see the status change to a known status when it's confirmed.

5 - Start the Validator: After the deposit is observed, start your validator using the keystore files you generated. Monitor the logs for any issues.

6 - Monitor and Troubleshoot: Keep an eye on your beacon node and validator logs for any errors or issues. It might take some time for your new validators to become active.

It looks like you're already on the right track, and your approach seems correct. The "UNKNOWN_STATUS" you're seeing might be due to some synchronization delay or configuration issue. Double-check your configurations, and ensure your beacon node and validator are properly synced.

3
  • Using the link provided by OP, by --deposit-contract-addr do you mean 0x4242424242424242424242424242424242424242 ? The file above sets up the genesis configuration for go-ethereum, which seeds certain accounts with an ETH balance and deploys a validator deposit contract at address 0x4242424242424242424242424242424242424242 which is used for new validators to deposit 32 ETH and join the proof-of-stake chain
    – Magno C
    Commented Aug 15, 2023 at 17:58
  • What if I simply disable this passing --disable-staking-contract-check option in beacon startup ? Can I have validators "for free" ?
    – Magno C
    Commented Aug 15, 2023 at 18:00
  • Where is the eth2-deposit-cli tool?
    – smallyu
    Commented Nov 23, 2023 at 6:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.