Skip to content

Commit 21468d8

Browse files
authored
Merge pull request #8064 from ethereum/jc-raspberrypi
update raspberry pi tutorial
2 parents d83ff80 + 660cb31 commit 21468d8

File tree

1 file changed

+53
-33
lines changed
  • src/content/developers/tutorials/run-node-raspberry-pi

1 file changed

+53
-33
lines changed

src/content/developers/tutorials/run-node-raspberry-pi/index.md

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ lang: en
77
skill: intermediate
88
published: 2022-06-10
99
source: Ethereum on ARM
10-
sourceUrl: https://ethereum-on-arm-documentation.readthedocs.io/en/latest/kiln/kiln-testnet.html
10+
sourceUrl: https://ethereum-on-arm-documentation.readthedocs.io/en/latest/
1111
postMergeBannerTranslation: page-upgrades-post-merge-banner-tutorial-ood
1212
---
1313

1414
**Ethereum on Arm is a custom Linux image that can turn a Raspberry Pi into an Ethereum node.**
1515

1616
To use Ethereum on Arm to turn a Raspberry Pi into an Ethereum node, the following hardware is recommended:
1717

18-
- Raspberry 4 (model B 8GB)
18+
- Raspberry 4 (model B 8GB), Odroid M1 or Rock 5B (8GB/16GB RAM) board
1919
- MicroSD Card (16 GB Class 10 minimum)
2020
- 2 TB SSD minimum USB 3.0 disk or an SSD with a USB to SATA case.
2121
- Power supply
@@ -38,35 +38,42 @@ Ethereum cannot be run using the popular Raspberry Pi Linux OS "Raspbian" becaus
3838

3939
## Note on execution and consensus clients {#note-on-execution-and-consensus-clients}
4040

41-
The Ethereum on Arm documentation explains how to set up _either_ an execution client OR a consensus client, except for two Ethereum testnets (Kiln and Ropsten). This optionality is only possible in advance of Ethereum's upcoming transition from proof-of-work (PoW) to proof-of-stake (PoS) known as [The Merge](/upgrades/merge).
41+
The Ethereum on Arm image includes prebuilt execution and consensus clients as services. An Ethereum node requires both clients to be synced and running. You are only required to download and flash the image and then start the services. The image is preloaded with the following execution clients:
4242

43-
<InfoBanner>
44-
After The Merge, it will not be possible to run execution and consensus clients separately—they must be run as a pair. Therefore, in this tutorial we will run a pair of execution and consensus clients together on an Ethereum testnet (Kiln).
45-
</InfoBanner>
43+
- Geth
44+
- Nethermind
45+
- Besu
4646

47-
## The Kiln Raspberry Pi 4 Image {#the-kiln-raspberry-pi-4-image}
47+
and the following consensus clients:
4848

49-
Kiln is a public testnet specifically designed for testing The Merge. Ethereum on Arm developed an image allowing users to rapidly spin up a pair of Ethereum clients on this merge testnet. The Kiln merge has already happened, but the network is still live, so it can be used for this tutorial. Ether on Kiln has no real-world value.
49+
- Lighthouse
50+
- Nimbus
51+
- Prysm
52+
- Teku
5053

51-
The Kiln Raspberry Pi 4 image is a "plug and play" image that automatically installs and sets up both the execution and consensus clients, configuring them to talk to each other and connect to the Kiln network. All the user needs to do is start their processes using a simple command. The image contains four execution clients (Geth, Nethermind, Besu and Erigon) and four consensus clients (Lighthouse, Prysm, Nimbus, Teku) that the user can choose from.
54+
You should choose one of each to run - all execution clients are compatible with all consensus clients. If you do not explicitly select a client, the node will fall back to its defaults - Geth and Lighthouse - and run them automatically when the board is powered up. You must open port 30303 on your router so Geth can find and connect to peers.
5255

53-
Download the Raspberry Pi image from [Ethereum on Arm](https://ethereumonarm-my.sharepoint.com/:u:/p/dlosada/ES56R_SuvaVFkiMO1Tgnf6kB7lEbBfla5c2c18E3WQRJzA?download=1) and verify the SHA256 hash:
56+
## Downloading the Image {#downloading-the-image}
57+
58+
The Raspberry Pi 4 Ethereum image is a "plug and play" image that automatically installs and sets up both the execution and consensus clients, configuring them to talk to each other and connect to the Ethereum network. All the user needs to do is start their processes using a simple command.
59+
60+
Download the Raspberry Pi image from [Ethereum on Arm](https://ethereumonarm-my.sharepoint.com/:u:/p/dlosada/Ec_VmUvr80VFjf3RYSU-NzkBmj2JOteDECj8Bibde929Gw?download=1) and verify the SHA256 hash:
5461

5562
```sh
5663
# From directory containing the downloaded image
57-
shasum -a 256 ethonarm_kiln_22.03.01.img.zip
64+
shasum -a 256 ethonarm_22.04.00.img.zip
5865
# Hash should output: 485cf36128ca60a41b5de82b5fee3ee46b7c479d0fc5dfa5b9341764414c4c57
5966
```
6067

61-
Note that for users that do not own a Raspberry Pi but do have an AWS account, there are ARM instances available that can run the same image. Instructions and the AWS image are available to download from Ethereum on Arm (https://ethereum-on-arm-documentation.readthedocs.io/en/latest/kiln/kiln-testnet.html).
68+
Note that images for Rock 5B and Odroid M1 boards are available at the Ethereum-on-Arm [downloads page](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/quick-guide/download-and-install.html).
6269

6370
## Flashing the MicroSD {#flashing-the-microsd}
6471

6572
The MicroSD card that will be used for the Raspberry Pi should first be inserted into a desktop or laptop so it can be flashed. Then, the following terminal commands will flash the downloaded image onto the SD card:
6673

6774
```shell
6875
# check the MicroSD card name
69-
sudo fdisk -I
76+
sudo fdisk -l
7077

7178
>> sdxxx
7279
```
@@ -75,8 +82,8 @@ It is really important to get the name correct because the next command includes
7582

7683
```shell
7784
# unzip and flash image
78-
unzip ethonarm_kiln_22.03.01.img.zip
79-
sudo dd bs=1M if=ethonarm_kiln_22.03.01.img of=/dev/mmcblk0 conv=fdatasync status=progress
85+
unzip ethonarm_22.04.00.img.zip
86+
sudo dd bs=1M if=ethonarm_kiln_22.04.00.img of=/dev/mmcblk0 conv=fdatasync status=progress
8087
```
8188

8289
The card is now flashed, so it can be inserted into the Raspberry Pi.
@@ -92,57 +99,70 @@ User: ethereum
9299
Password: ethereum
93100
```
94101

95-
The user can then choose the execution-consensus client combination they wish to run, and start their systemctl processes as follows (example runs Geth and Lighthouse):
102+
The default execution client, Geth, will start automatically. You can confirm this by checking the logs using the following terminal command:
96103

97-
```shell
98-
sudo systemctl start geth-lh
99-
sudo systemctl start lh-geth-beacon
104+
```sh
105+
sudo journalctl -u geth -f
100106
```
101107

102-
The logs can be checked using
108+
The consensus client does need to be started explicitly. To do this, first open port 9000 on your router so that Lighthouse can find and connect to peers. Then enable and start the lighthouse service:
103109

104-
```shell
105-
# logs for Geth
106-
sudo journalctl -u geth-lh -f
107-
#logs for lighthouse
108-
sudo journalctl -u lh-geth-beacon -f
110+
```sh
111+
sudo systemctl enable lighthouse-beacon
112+
sudo systemctl start lighthouse-beacon
113+
```
114+
115+
Check the client using the logs:
116+
117+
```sh
118+
sudo journalctl -u lighthouse-beacon
109119
```
110120

111-
The specific service names for every combination of clients are available at the [Ethereum on Arm docs](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/kiln/kiln-testnet.html#id2). They can be used to update the commands provided here for any combination.
121+
Note that the consensus client will sync in a few minutes because it uses checkpoint sync. The execution client will take longer - potentially several hours, and it will not start until the consensus client is already finished syncing (this is because the execution client needs a target to sync to, which the synced consensus client provides).
122+
123+
With the Geth and Lighthouse services running and synced, your Raspberry Pi is now an Ethereum node! It is most common to interact with the Ethereum network using Geth's Javascript console, which can be attached to the Geth client on port 8545. It is also possible to submit commands formatted as JSON objects using a request tool such as Curl. See more in the [Geth documentation](geth.ethereum.org).
124+
125+
Geth is preconfigured to report metrics to a Grafana dashboard which can be viewed in the browser. More advanced users might wish to use this feature to monitor the health of their node by navigating to `ipaddress:3000`, passing `user: admin` and `passwd: ethereum`.
112126

113127
## Validators {#validators}
114128

115-
In order to run a validator you must first have access to 32 testnet ETH, which must be deposited into the Kiln deposit contract. This can be done by following the step-by-step guide on the [Kiln Launchpad](https://kiln.launchpad.ethereum.org/en/). Do this on a desktop/laptop, but do not generate keysthis can be done directly on the Raspberry Pi.
129+
A validator can also be optionally added to the consensus client. The validator software allows your node to participate actively in consensus and provides the network with cryptoeconomic security. You get rewarded for this work in ETH. To run a validator, you must first have 32 ETH, which must be deposited into the deposit contract. **This is a long-term commitment - it is not yet possible to withdraw this ETH!**. The deposit can be made by following the step-by-step guide on the [Launchpad](https://launchpad.ethereum.org/). Do this on a desktop/laptop, but do not generate keysthis can be done directly on the Raspberry Pi.
116130

117131
Open a terminal on the Raspberry Pi and run the following command to generate the deposit keys:
118132

119133
```
120-
cd && deposit new-mnemonic --num_validators 1 --chain kiln
134+
sudo apt-get update
135+
sudo apt-get install staking-deposit-cli
136+
cd && deposit new-mnemonic --num_validators 1
121137
```
122138

123139
Keep the mnemonic phrase safe! The command above generated two files in the node's keystore: the validator keys and a deposit data file. The deposit data needs to be uploaded into the launchpad, so it must be copied from the Raspberry Pi to the desktop/laptop. This can be done using an ssh connection or any other copy/paste method.
124140

125141
Once the deposit data file is available on the computer running the launchpad, it can be dragged and dropped onto the `+` on the launchpad screen. Follow the instructions on the screen to send a transaction to the deposit contract.
126142

127-
Back on the Raspberry Pi, a validator can be started. This requires importing the validator keys, setting the address to collect rewards, then starting the preconfigured validator process. The example below is for Lighthouse—instructions for other consensus clients are available on the [Ethereum on Arm docs](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/kiln/kiln-testnet.html#lighthouse):
143+
Back on the Raspberry Pi, a validator can be started. This requires importing the validator keys, setting the address to collect rewards, and then starting the preconfigured validator process. The example below is for Lighthouse—instructions for other consensus clients are available on the [Ethereum on Arm docs](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/):
128144

129145
```shell
130146
# import the validator keys
131-
lighthouse-kl account validator import --directory=/home/ethereum/validator_keys --datadir=/home/ethereum/.lh-geth/kiln/testnet-lh
147+
lighthouse account validator import --directory=/home/ethereum/validator_keys
132148

133149
# set the reward address
134-
sudo sed -i '<ETH_ADDRESS>' /etc/ethereum/kiln/lh-geth-validator.conf
150+
sudo sed -i 's/<ETH_ADDRESS>' /etc/ethereum/lighthouse-validator.conf
135151

136152
# start the validator
137-
sudo systemctl start lh-geth-validator
153+
sudo systemctl start lighthouse-validator
138154
```
139155

140156
Congratulations, you now have a full Ethereum node and validator running on a Raspberry Pi!
141157

158+
## More details {#more-details}
159+
160+
This page gave an overview of how to set up a Geth-Lighthouse node and validator using Raspberry Pi. More detailed instructions are available on the [Ethereum-on-Arm website](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/index.html).
161+
142162
## Feedback appreciated {#feedback-appreciated}
143163

144164
We know the Raspberry Pi has a massive user base that could have a very positive impact on the health of the Ethereum network.
145-
Please dig into the details in this tutorial, try running on other testnets or even Ethereum Mainnet, check out the Ethereum on Arm GitHub, give feedback, raise issues and pull requests and help advance the technology and documentation!
165+
Please dig into the details in this tutorial, try running on testnets, check out the Ethereum on Arm GitHub, give feedback, raise issues and pull requests and help advance the technology and documentation!
146166

147167
## References {#references}
148168

0 commit comments

Comments
 (0)