I turned my Raspberry Pi 4 from an Ethereum Node into a Bitcoin Node. As a bitcoin node, it requires less in the way of compute power and consumes less bandwidth than my Ethereum node. The blockchain also fits on the same hard drive.
The Ethereum 2.0 migration has started as of the time of this writing, with the genesis blocks of the 2.0 proof-of-stake chain having been written. Running an Ethereum node and Bitcoin node on the same hardware allowed me to realize how much more the Ethereum ecosystem consumes in the way of compute resources and memory, when compared to Bitcoin. Running an Ethereum node is far more demanding on CPU, disk I/O, and bandwidth than running a Bitcoin node, despite ETH having less than 20% of the market cap of Bitcoin. I’m guessing that this is one of the reasons that Ethereum has started to move to the proof-of-stake version 2.0 of it’s network.
Running an Ethereum node is far more demanding on CPU, disk I/O, and bandwidth than running a Bitcoin node, despite ETH having less than 20% of the market cap of Bitcoin.
At the time of this writing, the cryptocurrency asset class market cap (all currencies) has recently passed $1 Trillion. Bitcoin stands around $720 Billion, while ETH is just under $140 Billion.
- Raspberry Pi 4 ($35)
- 500 GB SSD ($50)
- USB 3.0 to SATA adapter ($10)
Total Cost: $95
I used my Raspberry Pi 4 with the same Western Digital Blue SSD that I used to start running my Ethereum node last month. Together with a SATA-to-USB-3 adapter, these things can be purchased for less than $100. This gives the ability to independently verify transactions on the Bitcoin blockchain. Verifying transactions is an important thing to do if you plan to transfer Bitcoin (Don’t Trust, Verify).
I had my Pi 4 running Ubuntu Server 20.10. I flashed the image directly to the SSD using my personal laptop and the Raspberry Pi Imager application. This allowed me to boot the Pi directly from SSD (rather than MicroSD), which provides performance improvements due to greater disk I/O capabilities.
I built the software and dependencies from scratch, and the links I found from the main Bitcoin website and GitHub code repositories were all that I needed to get through that exercise. Kudos to the community for providing adequate documentation in that regard.
Computer Resource Consumption
The Bitcoin node, for the most part, consistently utilizes less than 20% of the available power from my CPU cores. I’ll see occasional spikes to 30-40% usage from time to time on a single CPU core, but for the most part it stays below 20%. It uses very little RAM - On average I’m seeing slightly more than 1.0GB RAM used, which leads me to think that a 2GB Pi model would be enough to run a Bitcoin node (I have the 8GB model).
The only other use I have for my Pi at the moment is that I’m using it as a tracker-blocking DNS resolver for my home network via Pi-Hole. The Pi-Hole software also runs a small web server so that I can see the metrics of DNS requests being blocked. These things work just fine while the bitcoin node runs in the background. I haven’t had to restart anything since I started running the Bitcoin Node.
The Bitcoin node does consume a nontrivial amount of bandwidth on a daily basis - anywhere from 1.3 - 2.3 GB/day of blockchain data. The average daily Bitcoin blockchain data download has been between 1.5 to 2 GB.
The average daily Bitcoin blockchain data download has been between 1.5 to 2 GB.
I leave my node online as a resource for others to download blockchain data. With the Bitcoin core software’s default configuration of connections, the daily upload amount has ranged from 21 - 34 GB. I’ve noticed that I’ll usually have around 70-90 peers connected. I don’t pay my ISP for extra bandwidth, so I’ll be reducing my number of allowed connections to 25 using the
maxconnections setting in my
.conf file. Of course, every node has the option to turn off incoming connections entirely. However, that goes against the whole decentralized ethos of the network when a node only consumes, but doesn’t contribute, data to the network. I think that allowing 25 nodes to connect to mine feels like a good balance between avoiding ISP overuse charges while still taking an active role in growing the Bitcoin network.
Of course, every node has the option to turn off incoming connections entirely. However, that goes against the whole decentralized ethos of the network when a node only consumes, but doesn’t contribute, data to the network.
One of the big criticisms of the Bitcoin network is that it uses a lot of energy. One way to minimize the amount of energy consumed by Bitcoin nodes is to use computers that minimize power consumption. The Raspberry Pi 4 typically consumes just 600mA of energy. Running on a 5V supply, this means that the Pi consumes 3 Watts of electricity, which equates to 2.16 kWh (the number on your electricity bill). In most places in the US, this is less than $0.50 cents worth of electricity per month. A Bitcoin node running 24/7 on a Raspberry Pi costs less in electricity per month than daily use of an electric tea kettle or coffee maker.
A Bitcoin node running 24/7 on a Raspberry Pi costs less in electricity per month than daily use of an electric tea kettle or coffee maker.
I’m having a lot of fun with this project, and I plan to keep the Bitcoin node running for the forseeable future. I’ll continue to write about future topics and projects that I do with the Pi and/or Bitcoin network. Thanks for reading!
Feel free to share this on the platform of your choice using the links below.