Skip to content
You are reading the Teku development version documentation and some features may not be available in the stable release. You can switch to the stable version using the version box at the bottom of the screen.

Updated on April 27, 2021

Connect to MainNet

The following instructions provide the steps run validators on the Ethereum 2.0 MainNet. You can also use Teku to run a beacon node only.

Warning

If staking funds on the network, the funds are locked until transfers are enabled in a future phase of the Ethereum 2.0 network.

Use the ETH2 staking checklist as a guide to secure your validator keys and hardware.

Prerequisites:

Run validators on MainNet

Ethereum 2.0 validators need to access an Ethereum 1.0 client to onboard new validators. New validators make deposits into Ethereum 1.0, and existing Ethereum 2.0 validators must process the deposits to allow the new validators to join Ethereum 2.0.

Deposits are made into a deposit contract on the Ethereum 1.0 MainNet. The deposit contract address is 0x00000000219ab540356cbb839cbe05303d7705fa.

The steps to run an Ethereum 2.0 validator on MainNet are:

  1. If running your own Ethereum 1.0 client, sync the Ethereum 1.0 network containing the deposit contract.

    Note

    This step is only required if running your own Ethereum 1.0 client such as Besu. If using a cloud-based service such as Infura, proceed to sync the beacon node.

  2. Sync the Teku beacon node with the beacon chain.

  3. Generate the validator keys and send the deposit to the deposit contract.

  4. Create a password file for each validator key.

  5. Start Teku with the validator keys.

Sync the Ethereum 1.0 network

This step is only required if running your own Ethereum 1.0 client.

This example uses Besu to connect to Ethereum 1.0, but any client can be used. Configure Besu to connect to MainNet and expose the RPC-HTTP APIs.

Example

besu --rpc-http-enabled=true --rpc-http-port=8545 \
--rpc-http-api=ETH,NET,WEB3 --fast-sync-min-peers=2

Sync the beacon node

Sync the beacon node to ensure the network is synced before registering the validator.

Note

Before network launch there will be no data to sync.

Example

teku --metrics-enabled --rest-api-enabled

Syncing is complete when the head slot reaches the current slot.

Generate the validators and send the deposits

Important

Ensure your Ethereum account has enough ETH to cover the required deposit amount (32 ETH) plus gas.

Use the MainNet Launchpad to guide you through a step-by-step process to generate your keys and send the deposits.

Note

Remember the passwords that you used to create the validator keys, because you need it to create the validator password files.

Create a password file for each validator key

For each validator key, create a text file containing the password to decrypt the key.

Teku allows you to specify individual keys and passwords in the command line, or you can specify folders from which to load keys and passwords. If specifying folders, then password files must have the same name as the keys, but use the .txt extension.

Example

If the Launchpad creates a key named keystore-m_12381_3600_0_0_0-1596485378.json, then the password file must be named keystore-m_12381_3600_0_0_0-1596485378.txt.

Info

The password file format follows EIP-2335 requirements (UTF-8 encoded file, unicode normalization, and control code removal).

Start the validator

You can run the Teku validator as a single process with the beacon node, or you can run the validator client on a separate machine.

Important

If running validators as a split process, then connect the validator to the running beacon node. Otherwise you need to stop the running beacon node and restart it by supplying the validator keys.

Once the validator is activated, view it on the beacon chain explorer at https://beaconcha.in/validator/<validatorPublicKey>.

You can also use Prometheus and Grafana to monitor your nodes.

Run the validator and beacon node as a single process

To run the beacon node and validator client as a single process, stop the running beacon node started previously, and restart it by specifying the validator key files created earlier, and the text files containing the password to decrypt the validator key.

Example

teku --eth1-endpoint=http://localhost:8545 \
--validator-keys=validator/keys/validator_888eef.json:validator/passwords/validator_888eef.txt \
--rest-api-enabled=true --rest-api-docs-enabled=true \
--metrics-enabled

Alternatively, use --validator-keys to specify the directory to load multiple keys and passwords from.

Example

teku --eth1-endpoint=http://localhost:8545 \
--validator-keys=validator/keys:validator/passwords \
--rest-api-enabled=true --rest-api-docs-enabled=true \
--metrics-enabled

Run the validator on a separate machine

If running the validator client on a separate machine to the beacon node, then run Teku using the vc or validator-client subcommand, and specify the location of the beacon node’s API endpoint using --beacon-node-api-endpoint.

You also need to specify the validator key files created earlier, and the text files containing the password to decrypt the validator key.

Example

teku validator-client --beacon-node-api-endpoint=http://192.10.10.101:5051 \
--validator-keys=validator/keys/validator_888eef.json:validator/passwords/validator_888eef.txt

Alternatively, use --validator-keys to specify the directory to load multiple keys and passwords from.

Example

teku validator-client --beacon-node-api-endpoint=http://192.10.10.101:5051 \
--validator-keys=validator/keys:validator/passwords
Questions or feedback? You can discuss issues and obtain free support on Teku Discord channel.
For paid professional support by Consensys, contact us at quorum@consensys.net.