Skip to content

To store config and notes about how to build and operate an ETH 2.0 Beacon and Validator node

Notifications You must be signed in to change notification settings

chrishobcroft/prysmconfig

Repository files navigation

prysmconfig

To store config and notes about how to build and operate an ETH 2.0 Beacon and Validator node

Running Beacon and Validator (Single Server)

Get a server

Best is to do it on your localhost.

  • then you'll need to be logged in as a user called ubuntu with sudo privileges, or edit the files

Exoscale Medium (512Mb, 1 x 2198 MHz, 10 GB)

Also maybe try Digital Ocean

Network Settings

Open the following ports in the firewall to allow INGRESS tcp connections:

  • 22 - to allow ssh connections
  • 13000 - to allow improved p2p connectivity
  • 3000 - to allow remote access to Grafana
  • 4000 - to allow remote access to the Beacon Node

Very Quick Start

sudo apt -y install wget git tar g++

wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
git clone https://github.com/prysmaticlabs/prysm.git
cd prysm/beacon-chain
/usr/local/go/bin/go run main.go

Tested on clean @Exoscale Ubuntu 20.04 LTS image with 2GB RAM (no swap), 2 x 2198 MHz CPU

Quick Start

sudo apt update
sudo apt -y upgrade
sudo apt -y install build-essential

wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/prysmaticlabs/prysm.git
cd prysm/beacon-chain
go build
./beacon-chain

Installation Commands

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo nano /etc/fstab

Add this to /etc/fstab

/swapfile swap swap defaults 0 0

then continue

sudo apt update -y && sudo apt upgrade -y
wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
rm go1.14.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
sudo nano ~/.profile

Add this to .profile

export PATH=$PATH:/usr/local/go/bin

and then continue:

cd ~
git clone git@github.com:prysmaticlabs/prysm.git

cd ~/prysm/beacon-chain
go build
cd ~/prysm/validator
go build
cd ~/prysm/slasher
go build

cd ~/prysm/validator
./validator accounts create

Make deposits at https://prylabs.net/participate


cd ~

wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/beacon-chain.service
wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/validator.service
wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/slasher.service

sudo mv *.service /etc/systemd/system

sudo systemctl enable /etc/systemd/system/beacon.service
sudo systemctl enable /etc/systemd/system/validator.service
sudo systemctl enable /etc/systemd/system/slasher.service





wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/prometheus.service
sudo mv prometheus.service /etc/systemd/system

sudo systemctl enable /etc/systemd/system/prometheus.service

wget https://github.com/prometheus/prometheus/releases/download/v2.18.1/prometheus-2.18.1.linux-amd64.tar.gz

tar -zxvf prometheus-2.18.1.linux-amd64.tar.gz
rm prometheus-2.18.1.linux-amd64.tar.gz

cd prometheus-2.18.1.linux-amd64
rm prometheus.yml
wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/prometheus.yml

sudo systemctl start prometheus.service




wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/grafana.service
sudo mv grafana.service /etc/systemd/system
sudo systemctl enable /etc/systemd/system/grafana.service

wget https://dl.grafana.com/oss/release/grafana-7.0.1.linux-amd64.tar.gz

tar -zxvf grafana-7.0.1.linux-amd64.tar.gz
rm grafana-7.0.1.linux-amd64.tar.gz

sudo systemctl start grafana.service

curl -OL https://github.com/nbarrientos/cryptowat_exporter/archive/e4bcf6e16dd2e04c4edc699e795d9450dee486ab.zip
unzip e4bcf6e16dd2e04c4edc699e795d9450dee486ab.zip
mv cryptowat_exporter-e4bcf6e16dd2e04c4edc699e795d9450dee486ab/ cryptowat_exporter
rm e4bcf6e16dd2e04c4edc699e795d9450dee486ab.zip
cd cryptowat_exporter
go build

wget https://raw.githubusercontent.com/chrishobcroft/prysmconfig/master/cryptowat_exporter.service
sudo mv cryptowat_exporter.service /etc/systemd/system
sudo systemctl enable /etc/systemd/system/cryptowat_exporter.service
sudo systemctl start cryptowat_exporter.service
sudo journalctl -f --unit=cryptowat_exporter.service



sudo reboot

Notes

  • TO DO: Telegram Bot Alerting stuff

  • Tail logs with

sudo journalctl -f --unit=beacon.service
sudo journalctl -f --unit=validator.service
sudo journalctl -f --unit=slasher.service
sudo journalctl -f --unit=prometheus.service
sudo journalctl -f --unit=grafana.service
  • Wait for beacon node to sync

  • Apply / Generate Keys

    • Note, in absence of a key, the process above will generate a key - delete this.

About

To store config and notes about how to build and operate an ETH 2.0 Beacon and Validator node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published