If you want general information on Etherum 2.0, we recommend checking out ethereum.org.
You can use Alchemy to support your eth2 project by running a beacon node or running a validator (note if you want to run a validator you'll have to also run a node to interact with the beacon chain). A beacon node simply maintains a view of the beacon chain and shard chain, while validators actively mine and validate new blocks (earning rewards in the process). In order to become a validator you have to stake 32 Eth. You can learn more about staking on ethereum.org and on EthHub.
There are a handful of beacon node clients to choose from, however, in this guide we'll walk you through setting up a Prysm node. The set up process should not be that different for other node clients!
HINT: If you are just getting started it is highly recommended to run an eth2 testnode prior to jumping into mainnet.
To learn more about Prysm, check out their Eth2 Documentation.
Note: The instructions below were adopted from the Prysm Getting Started Guide.
Follow this guide to install Prysm using an installation script, or if you prefer Docker check out these instructions.
During the transition period from eth1 to eth2, beacon nodes will need to monitor the eth1 chain for data. Additionally, eth2 validators are required to "burn" 32 of their ETH into an eth1 smart contract in order to become validators, which requires connection to an eth1 node.
This is where you can connect your eth2 node to Alchemy mainnet or Goerli testnet.
All you have to do is specify the --http-web3provider
flag to your Alchemy HTTP endpoint when running your Prysm node:
./prysm.sh beacon-chain --http-web3provider=https://eth-mainnet.alchemyapi.io/v2/YOUR-API-KEY
./prysm.sh beacon-chain --http-web3provider=https://eth-goerli.alchemyapi.io/v2/YOUR-API-KEY --pyrmont
docker run -it -v $HOME/.eth2:/data -p 4000:4000 -p 13000:13000 -p 12000:12000/udp --name beacon-node \gcr.io/prysmaticlabs/prysm/beacon-chain:stable \--datadir=/data \--rpc-host=0.0.0.0 \--monitoring-host=0.0.0.0 \--http-web3provider=https://eth-mainnet.alchemyapi.io/v2/YOUR-API-KEY
docker run -it -v $HOME/.eth2:/data -p 4000:4000 -p 13000:13000 -p 12000:12000/udp --name beacon-node \gcr.io/prysmaticlabs/prysm/beacon-chain:stable \--datadir=/data \--rpc-host=0.0.0.0 \--monitoring-host=0.0.0.0 \--http-web3provider=https://eth-mainnet.alchemyapi.io/v2/YOUR-API-KEY--pyrmont
Congrats! Now you've officially started running an eth2 Beacon node! 🎉
Complete steps 1 and 2 from above.
If you want to be a validator in the Pyrmont eth2 testnet prior to jumping into mainnet, you'll still need to stake 32 testnet ETH. You can request testnet ETH by joining the Prysm discord server or requesting from a facet.
The Eth2 Launchpad has a step by step process for establishing your validator:
Copy the path to the validator_keys
folder under the eth2.0-deposit-cli
directory you created during the onboarding process. For example, if your eth2.0-deposit-cli installation is in your $HOME
(or %LOCALAPPDATA%
on Windows) directory, you can then run the following commands for your operating system.
Using the Prysm installation script:
./prysm.sh validator accounts import --keys-dir=$HOME/eth2.0-deposit-cli/validator_keys
./prysm.sh validator accounts import --keys-dir=$HOME/eth2.0-deposit-cli/validator_keys --pyrmont
Using Docker
docker run -it -v $HOME/eth2.0-deposit-cli/validator_keys:/keys \-v $HOME/Eth2Validators/prysm-wallet-v2:/wallet \--name validator \gcr.io/prysmaticlabs/prysm/validator:stable \accounts import --keys-dir=/keys --wallet-dir=/wallet
docker run -it -v $HOME/eth2.0-deposit-cli/validator_keys:/keys \-v $HOME/Eth2Validators/prysm-wallet-v2:/wallet \--name validator \gcr.io/prysmaticlabs/prysm/validator:stable \accounts import --keys-dir=/keys --wallet-dir=/wallet --pyrmont
In a separate terminal window (from your beacon node), start running the validator using the command below:
Using the Prysm installation script
./prysm.sh validator
./prysm.sh validator --pyrmont
Using Docker
docker run -it -v $HOME/Eth2Validators/prysm-wallet-v2:/wallet \-v $HOME/Eth2:/validatorDB \--network="host" --name validator \gcr.io/prysmaticlabs/prysm/validator:stable \--beacon-rpc-provider=127.0.0.1:4000 \--wallet-dir=/wallet \--datadir=/validatorDB
docker run -it -v $HOME/Eth2Validators/prysm-wallet-v2:/wallet \-v $HOME/Eth2:/validatorDB \--network="host" --name validator \gcr.io/prysmaticlabs/prysm/validator:stable \--beacon-rpc-provider=127.0.0.1:4000 \--wallet-dir=/wallet \--datadir=/validatorDB \--pyrmont
Keep both terminal windows running so that your validator can receive tasks and execute validator responsibilities. You should already be aware of all the responsibilities and staking logistics for being a validator.
You can check the status of your validator using block explorers: beaconcha.in and beacon.etherscan.io.
You are now officially an Ethereum 2.0 validator, congrats! 🎉