Get Informed out of Data

Full width home advertisement



Post Page Advertisement [Top]

Ethereum on Raspberry pi 4 (4 or 8 GB RAM)

Ethereum on Raspberry pi 4 (4 or 8 GB RAM)

Ethereum is a global, open-source platform for decentralized applications.

On Ethereum, we can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.

The image takes care of all the necessary steps to join the Eth2.0 Onyx testnet, from setting up the environment and formatting the SSD disk to installing and running the Ethereum Eth1.0 and Eth2.0 clients as well as starting the blockchains synchronization (for both Geth Eth1.0 Goerli and Prysm Eth2.0 Beacon Chain).

You will only need to create a validator account, send the deposit of 32 Goerli ETH to the Onyx contract and start the validator systemd service.


  • Based on Ubuntu 20.04 64bit. See [1]

  • Automatic USB disk partitioning and formatting

  • Adds swap memory (ZRAM kernel module + a swap file)

  • Changes the hostname to something like “ethnode-e2a3e6fe” based on MAC hash

  • Automatically syncs Eth1 Goerli (Geth) and Eth2 Beacon Chain (Prysm)

  • Includes an APT repository for installing and upgrading Ethereum software

  • Includes a monitoring dashboard based on Grafana / Prometheus


  • Geth: 1.9.15 [5] (official binary) configured for syncing Goerli Testnets

  • Prysm: 1.0.0alpha13 [6]

    • Beacon Chain (official binary)

    • Validator binary (official binary)

  • Grafana 7.0.4 [7]



  • Raspberry 4 (model B) - 4GB or 8GB ((GB highly recommended)

  • MicroSD Card (16 GB Class 10 minimum)

  • SSD USB 3.0 disk (see storage section)

  • Power supply

  • Ethernet cable

  • 30303 Port forwarding (Eth 1.0) and 13000 port forwarding (Eth 2.0)

  • A case with heatsink and fan (Optional but strongly recommended)

  • USB keyboard, Monitor and HDMI cable (micro-HDMI) (Optional)


You will need and SSD to run the Ethereum clients (without an SSD drive there’s absolutely no chance of syncing the Ethereum blockchain). There are 2 options:

  • Use an USB portable SSD disk such as the Samsung T5 Portable SSD.

  • Use an USB 3.0 External Hard Drive Case with a SSD Disk. In our case we used a Inateck 2.5 Hard Drive Enclosure FE2011. Make sure to buy a case with an UASP compliant chip, particularly, one of these: JMicron (JMS567 or JMS578) or ASMedia (ASM1153E).

In both cases, avoid getting low quality SSD disks as it is a key component of you node and it can drastically affect the performance (and sync times). Keep in mind that you need to plug the disk to an USB 3.0 port (in blue).


1.- Download the image:

SHA256 13bc7ac4de6e18093b99213511791b2a24b659727b22a8a8d44f583e73a507cc

2.- Flash the image

Insert the microSD in your Desktop / Laptop and download the file:

Note: If you are not comfortable with command line or if you are running Windows, you can use Etcher [8]

Open a terminal and check your MicroSD device name running:

sudo fdisk -l

You should see a device named mmcblk0 or sdd. Unzip and flash the image:

sudo dd bs=1M if=ubuntu-20.04-preinstalled-server-arm64+raspi.img of=/dev/mmcblk0 conv=fdatasync status=progress

3.- Insert de MicroSD into the Raspberry Pi 4. Connect an Ethernet cable and attach the USB SSD disk (make sure you are using a blue port).

4.- Power on the device

The Ubuntu OS will boot up in less than one minute but you will need to wait approximately 7 minutes in order to allow the script to perform the necessary tasks to join the Onyx testnet (it will reboot again)

5.- Log in

You can log in through SSH or using the console (if you have a monitor and keyboard attached)

User: ethereum
Password: ethereum

You will be prompted to change the password on first login, so you will need to log in twice.

6.- Forward 30303 and 13000 ports in your router (both UDP and TCP). If you don’t know how to do this, google “port forwarding” followed by your router model.

7.- Getting console output

You can see what’s happening in the background by typing:

sudo tail -f /var/log/syslog

7.- Grafana Dashboards

There are 2 Grafana dashboards to monitor the node (see section “Grafana Dashboards below”.

See [9]

The Onyx Eth2.0 testnet

Onyx is an Eth2.0 testnet created by Prylabs according to the latest official specification for Eth2.0, the v0.12.1 [10] release (which is aimed to be the final).

In order to run an Onyx Eth 2.0 node you will need 3 components:

  • An Eth1.0 node (Goerli testnet in sync)

  • An Eth2.0 Beacon Chain (Prysm Beacon Chain in sync) connected to the Eth1.0 node

  • An Eth2.0 Validator (Prysm Validator) connected to the Beacon Chain

The image takes care of the Eth1.0 Geth and Eth2.0 Beacon Chain configurations and syncs. So, once flashed (and after a first reboot), Geth (Eth1.0 client) starts syncing the Goerli testnet and the Beacon Chain (Eth2.0 client) gets activated through the Prysm client, both as systemd services.

When the Goerli testnet sync is completed, the Beacon Chain starts syncing. Both chains are necessary as the validator needs to communicate with them (as explained below).

Activating the validator

Once Goerli and the Beacon chain are in sync you have just one task left, configure the Validator for enabling the staking process.

The image provides the Prysm validator client for running the staking process. With this validator, you will create an account with 2 keys (public and private) and get an HEX string that needs to be sent to the Eth 1.0 blockchain as data through a 32 ETH transaction.

The Beacon Chain (which is connected to the Eth1 chain) will detect this deposit (which includes the validator public key) and the Validator will be activated.

So, let’s get started. Geth Goerli testnet and the Beacon Chain are already syncing in the background. Goerli will sync in about 1 hour and the Beacon Chain in about 2 hours (so this will take 3 hours overall).

The easiest way to enable a Prysm validator is to use the Prylabs web portal to get Goerli ETH (testnet ETH) and follow their instructions:

Let’s break this down:

Step 1) Get Prysm

Nothing to do here. Prysm is already installed.

Step 2) Get GöETH — Test ETH

We need 32 ETH to stake (it is fake ETH as this is a tesnet). Prylabs created a faucet with a great UI so you can easily get 32.5 Goerli ETH.

You will need a web3 provider to use the faucet. Install Metamask browser extension (if you don’t have it running yet). Create an account and set the network to “Goerli test network” (on the top of the Metamask screen). Now, click once in “Metamask” and then click “Need GoETH?” button. Confirm the transaction.

Once funded, you will see something like this:

You are 0x0b2eFdbFB8EcaF7F4eCF6853cbd5eaD86510d63C and you have 32.5 GöETH.

Step 3). Generate a validator public / private key

Go to your Raspberry Pi console and run the following command (make sure you are logged in with your ethereum user):

validator accounts create

Press return to confirm the default path

Enter a password twice (you will need it later to run the validator so write it down and be careful). Once finished, your account will be created (under the /home/ethereum/.eth2validators directory) containing, among other info, your validator keys. Additionally you will get the deposit data as follows (this is an example):

========================Deposit Data=======================
***Enter the above deposit data into step 3 on***

Copy this data (just the hexadecimal part, from 0x to the last number), go back to step 3 of Prylabs website and paste it into the field “Your validator deposit data”.

Step 4) Start your beacon chain & validator clients

Beacon chain is already running in the background so let’s configure the validator. Just edit the /etc/ethereum/prysm-validator.conf file and replace “changeme” string with your password (you can use nano or vim editors). Now run:

sudo systemctl enable prysm-validator && sudo systemctl start prysm-validator

Check if everything went right by running:

sudo systemctl status prysm-validator

Step 5) Send a validator deposit

We are almost there. Just click the “Make deposit” button and confirm the transaction.


Now you need to wait for the validator to get activated. In time, the beacon chain will detect the 32 ETH deposit (which contains the validator public key) and the system will put your validator in queue. These are the validator status that you will see during the activation process:


  • DEPOSITED (the beacon chain detected the 32 ETH deposit with your validator public key)

  • PENDING (you are in a queue for being activated)


Grafana Dashboards

We configured 2 Grafana Dashboards to let users monitor both Eth1.0 and Eth2.0 progress. To access the dashboards just open your browser and type your Raspberry IP followed by the 3000 port:

user: admin
passwd: ethereum

There are 3 dashboards available:

  • Geth Goerli: Eth1.0 node status

  • Prysm Validator: Eth2.0 validator status

  • Ethereum on ARM node: Raspberry Pi board Status

Lot of info here. You can see for example if Geth is in sync by checking (in the Blockchain section) if Headers, Receipts and Blocks are aligned or easily find the validator status.

No comments:

Post a Comment

Bottom Ad [Post Page]