Configure consensus client (beacon chain and validator)

Prysm

Prysm is an Ethereum proof-of-stake client written in Go. You can use Prysm to participate in Ethereum's decentralized economy by running a node and, if you have 32 ETH to stake, a validator. If you're new to Ethereum, you may enjoy our beginner-friendly Nodes and networks explainer.

Setting up eth2(prysm) node

Hardware Requirements

  • Operating system: 64-bit Linux (i.e. Ubuntu 20.04 LTS Server or Desktop)

  • Processor: 4 core

  • Storage: 20 gb root and 2000gb EBS mounted volume

  • Ram: 16GB Ram

  • Instance Type: t3.xlarge

  • ports: 12000 udp, 13000 tcp, 30303 both tcp and udp

Node Installation steps

Mount the ebs volume

sudo file -s /dev/xvdf
sudo mkfs -t ext4 /dev/xvdf
sudo mkdir /eth_storage
sudo mount /dev/xvdf /eth_storage/
sudo chown 1000.1000 /eth_storage -R
sudo mkdir /eth_storage/prysm_storage
sudo chown 1000.1000 /eth_storage/prysm_storage -R

Check for updates

sudo apt-get update
sudo apt-update

Install prysm binaries

mkdir ~/prysm && cd ~/prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh

Create prysm service file for our node

cat > prysm.service << EOF
[Unit]
Description=eth consensus layer beacon chain service
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=ubuntu
Restart=on-failure
ExecStart=/home/ubuntu/prysm/prysm.sh beacon-chain \
  --mainnet \
  --checkpoint-sync-url=https://beaconstate.info \
  --genesis-beacon-api-url=https://beaconstate.info \
  --execution-endpoint=http://<execution_node_endpoint>:8551 \
  --jwt-secret=/secrets/jwtsecret \
  --suggested-fee-recipient=<address> \
  --accept-terms-of-use \
  --datadir /eth_storage/prysm_storage \
  --p2p-host-ip=<p2p_IP>

[Install]
WantedBy=multi-user.target
EOF

​Move the unit file to /etc/systemd/system and give it permissions.

sudo mv prysm.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/prysm.service

Enable the prysm service file

sudo systemctl daemon-reload
sudo systemctl enable prysm

Note: Do not start the service file, we will start the erigon service and prysm service altogether.

Start Prysm Node

sudo systemctl start prysm

To View logs

journalctl -fu prysm.service

Last updated