Updated on February 8, 2022
Connect to a testnet
This documentation has been updated in line with the name changes recommended by the Ethereum Foundation. The execution layer is sometimes known as “Ethereum 1.0.” The consensus layer is sometimes known as “Ethereum 2.0.”
The following instructions describe the process to connect Teku to a consensus layer testnet.
This example connects to the Prater testnet. If connecting to a different testnet,
--network option in the examples
Networks can experience stability issues and are prone to regular resets. We recommend you regularly check network and client documentation for updates.
- Install the latest stable version of Teku using a binary distribution, or with Docker.
- If running validators, install any execution client (for example Hyperledger Besu), or access a cloud-based service such as Infura.
Run validators on a testnet
Consensus layer validators need to access an execution client to onboard new validators. New validators make deposits on the execution layer testnet, and existing consensus layer validators must process the deposits to allow the validators to join.
Deposits are made into a deposit contract on the Goerli execution layer testnet.
The steps to run a consensus layer validator on a testnet are:
If using a local execution client, sync the execution layer network containing the deposit contract.
This step is only required if using a local execution client such as Besu. If using a cloud-based service such as Infura, proceed to fund your deposit account.
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 Goerli and expose the RPC-HTTP APIs.
besu --network=goerli --data-path=./goerli --rpc-http-enabled=true --rpc-http-port=8545 \ --rpc-http-api=ETH,NET,WEB3 --sync-mode=FAST --fast-sync-min-peers=2
Load the deposit account with ETH
You need an execution layer Goerli testnet account that contains the amount of
Goerli ETH (plus gas) required to activate the validator. The
requires 32 Goerli ETH per validator.
Generate the validators and send the deposits
Use the Prater Launchpad to guide you through a step-by-step process to generate your keys and send the deposits.
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. The password
file must have the same name as the key, but use the
If the Launchpad creates a key named
the password file must be named
The password file format follows
requirements (UTF-8 encoded file, unicode normalization, and control code removal).
Start the validator
Run Teku and specify the validator key files created earlier, and the text files containing the password to decrypt the validator key.
teku --network=prater --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
specify the directory to load multiple keys and passwords from.
teku --network=prater --eth1-endpoint=http://localhost:8545 \ --validator-keys=validator/keys:validator/passwords \ --rest-api-enabled=true --rest-api-docs-enabled=true \ --metrics-enabled
Once the validator is activated, view it on the beacon chain explorer at
Run a beacon chain client only
You can run a Teku beacon chain node on a network without any validators.
teku --network=prater --metrics-enabled --rest-api-enabled --rest-api-docs-enabled