Updated on April 13, 2020

Register validators

Register validators by creating validator keys or use existing keys to deposit funds to a deposit contract on an Ethereum 1.0 node.

The following instructions allow you to register validators in a private network.

Prerequisites:

Start Hyperledger Besu

Download the genesis file that includes the deposit contract details and Ethereum 1.0 accounts, and start Besu with the genesis file:

besu --genesis-file=depositContractGenesis.json \
--data-path=data --miner-enabled=true \
--miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 \
--rpc-http-cors-origins="all" --host-whitelist="*" \
--min-gas-price=0 --rpc-http-enabled=true \
--rpc-http-port=8545 \
--rpc-http-api=ETH,IBFT,CLIQUE,DEBUG,MINER,NET,PERM,ADMIN,EEA,TXPOOL,PRIV,WEB3

Submit deposits

You can register validators and submit the required deposits from the command line.

The deposit amount required to register a validator is funded by an Ethereum 1.0 account specified using the --eth1-private-key or --eth1-keystore-file option.

Generate new validators keys

Generate the keys for the validators and send deposits to the deposit contract.

teku validator generate --deposit-amount-gwei=32000000000 \
--eth1-deposit-contract-address=dddddddddddddddddddddddddddddddddddddddd \
--eth1-endpoint=http://localhost:8545 --encrypted-keystore-enabled=false \
--keys-output-path=validator_keys \
--eth1-private-key=8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63 \
--number-of-validators=64

The command line:

Register an existing validator key

You can register an existing validator key and send deposits to the deposit contract.

teku validator register --deposit-amount-gwei=32000000000 \
--encrypted-keystore-validator-file=validator_0xa245bd5162e944efac2546bcadbba5fa2c8929ec6b03380d46fb0e8a6f49b176fecaf1939ed31532711375f873da58cf.json \
--encrypted-keystore-validator-password-file=password.txt \
--eth1-deposit-contract-address=dddddddddddddddddddddddddddddddddddddddd \
--eth1-endpoint=http://localhost:8545 \
--eth1-private-key=8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63 \
--withdrawal-public-key=b88086b629bc0144dd7efc916e46c741d7bc17e14115dcae3dcbacf9da4cb76b7edd37dec4f7b839bd7903155c911f09

The command line:

Start Teku

You need at least 64 validators to start a private Teku network.

teku --eth1-deposit-contract-address=dddddddddddddddddddddddddddddddddddddddd \
--eth1-endpoint=http://localhost:8545 --validators-key-file=validator_keys \
--p2p-port=9000 --rest-api-enabled=true --rest-api-docs-enabled=true

The command line:

Note

The default Swagger-UI documentation location is http://localhost:5051/swagger-ui.