Now, let's install a beacon node and validator. We'll require
Docker to accomplish this, to check if docker is already installed on your system type the following in your command prompt/terminal
docker -v
If not installed head to the
docker installation guide.
Now, as we have Docker installed let’s pull docker image for beacon node and validator.
docker pull gcr.io/prysmaticlabs/prysm/beacon-chain:latest
docker pull gcr.io/prysmaticlabs/prysm/validator:latest
We are going to run our beacon node now.
docker run -it -v $HOME/prysm:/data -p 4000:4000 -p 13000:13000 --name beacon-node gcr.io/prysmaticlabs/prysm/beacon-chain:latest --datadir=/data --p2p-host-ip --min-sync-peers 7
We have included the --p2p-host-ip and --min-sync-peers 7 flags to improve peering.
NOTE: It is recommended to open up port 13000 on your local router to improve connectivity and receive more peers from the network.
Useful commands
The following are some useful commands for interacting with the beacon chain node.
- To stop the beacon chain docker:
docker stop beacon-node
- To restart the beacon node, issue the following command:
docker start -ai beacon-node
- To delete a corrupted container, issue the following command:
docker rm beacon-node
- To recreate a deleted container and refresh the chain database, issue the start command with an additional --clear-db parameter:
docker run -it -v $HOME/prysm:/data -p 4000:4000 -p 13000:13000 --name beacon-node gcr.io/prysmaticlabs/prysm/beacon-chain:latest
--datadir=/data --clear-db --p2p-host-ip --min-sync-peers 7
Staking ETH: Running a validator client
As soon as the beacon node is up, the chain will be waiting for you to deposit 3.2 Goerli ETH (in mainnet it's equivalent to 32 ETH) into a
validator deposit contract in order to activate the validator. Every staked 3.2 Goerli ETH represents a validator, in order to stake more ETH, we need to run multiple validator clients. We'll explain how to get some free ETH to deposit in the next section...