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 August 18, 2022

Connect to Mainnet

Note

This documentation has been updated in line with the name changes recommended by the Ethereum Foundation. The execution layer was previously known as “Ethereum 1.0.” The consensus layer was previously known as “Ethereum 2.0.”

The following instructions provide the steps run validators on the consensus layer 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 upgrade of the consensus layer.

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

Prerequisites:

Run validators on Mainnet

Consensus layer validators need to access an execution client to onboard new validators. New validators make deposits on the execution layer, and existing consensus layer validators must process the deposits to allow the new validators to join.

Deposits are made into a deposit contract on the execution layer Mainnet. The deposit contract address is 0x00000000219ab540356cBB839Cbe05303d7705Fa.

The steps to run a consensus layer validator on Mainnet are:

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

    Note

    This step is only required if running your own execution 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 execution layer network

This step is only required if running your own execution client.

This example uses Besu as an execution client, 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 Ethereum Staking 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 one or more beacon node API endpoints 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 [email protected].