protolambda / eth2-val-tools

Some experimental tools to manage validators - use at your own risk
MIT License
63 stars 21 forks source link

beacon deposit does not activate validator on testnet #18

Closed SyedMuhamadYasir closed 7 months ago

SyedMuhamadYasir commented 7 months ago

i am using the three provided scripts, and i am on a local testnet - i am trying to activate (onboard) a new validator

however, when i used exec deposit, i get a transaction hash - and i verify that 32 ETH have been sent to the deposit contract address in my testnet

however, my validator still does not activate and it shows " awaiting activation "

please help

SyedMuhamadYasir commented 7 months ago

also, for a local testnet - what is the fork version ?

image

protolambda commented 7 months ago

Deposits must have a valid signature, since the BLS pubkey of the validator needs a proof-of-possession to be used in the eth2 network. If the signature is invalid, the deposit is ignored, and (testnet...) ETH is lost forever.

The fork version changes every hardfork, and is used to distinguish between different upgrades on the beacon chain. For deposit message signing it is pinned to the genesis fork version, not the latest fork version, to keep deposits from being invalidated due to hardforks. It's the one exception compared to all other eth2 message types.

The genesis-validators root also is not used, since deposits may happen pre-genesis. Those attributes would otherwise hash into a fork digest, which is used during message signing, by mixing it in with the actual message hash-tree-root.

This fork version should be part of your custom config.yaml you used to create your local testnet.

Please read the specs + the Eth2 book ( https://eth2book.info/ ) to learn more about these things.

Also, you need to match the minimal validators count (very high for mainnet-preset chains! Almost 17000 validator signing keys) + properly set-up genesis timestamps and min-activation-time.