Running a Bitcoin Full Node

Reading Time: 4 minutes

Running a Bitcoin Full Node seems an ungrateful job. It doesn’t pay the way mining does but it still incurs expenses. However I have decided to launch my own node for a couple of reasons.

Improving the Quality of the Bitcoin Network

Without full nodes, bitcoin transactions would be impossible. Bitcoin full nodes validate transactions and keep them in the mempool until a miner picks them up and includes them in a newly minted block. Each Bitcoin full node keeps a copy of the entire blockchain, making it possible for thin wallets1 to verify payments, calculate balances and submit transactions.

Despite the importance of these nodes for the Bitcoin ecosystem, there are only about 9,300 nodes running on the Bitcoin network at time of writing, as reported by Coin Dance. Only about 6,400 of these are Bitcoin Core (i.e. BTC-compatible) nodes. Bitcoin has a market cap of $76bn and $1.8bn circulation per 24 hours (as reported by coinmarketcap.com) and this huge amount of money depends on a meager number of nodes. Not cool, man.

A Way to Give Something Back

Although it is still too early for me to say I have profited from Bitcoin, I am a strong believer in the future of this cryptocurrency. I want to contribute to the stability and the accessibility of the network by launching my own Bitcoin Full Node.

Getting to Know the Blockchain Better

This is the fun part. The full node software (Bitcoin Core) comes with a rich API that allows programmatic access to all parts of the blockchain. I am currently reading Mastering Bitcoin, 2nd Edition by Andreas Antonopoulos, which is considered by many to be the most complete technical guide to Bitcoin and the blockchain. Running my own Bitcoin full node will allow me to play around with the API without worrying that I will be ‘stealing’ bandwidth and processing power from other nodes.

Finding Work for an Intel NUC (Celeron N2820)

I have an Intel NUC Kit DN2820FYKH that I bought some 3 years ago and have adored ever since. It served me very well for a long while, but was only gathering dust for more than a year. Running a Bitcoin Full Node seems like a good use of this adorable little computer and I hope it will do the job well.

The CPU (a 2C/2T Celeron N2820 with a 7.5W TDP) seems quite underpowered for the task. The initial deployment stage, when the node builds its own copy of the blockchain, is computation intense. I have no idea how long this will take. Perhaps two weeks? Once the node catches up, I hope CPU power will suffice.

I equipped the node with a Hitachi Travelstar 1TB 5,400 RPM hard disk, so it should have ample room for the growing blockchain. Using a SSD to store the block chain has significant performance benefits, but I ultimately decided against it. A 256 GB drive would get full rather quickly; a 512 GB drive would be too expensive for me. Yes, I know I can run the node in pruned mode, which greatly reduces storage (from 150 GB to 5 GB) but I think this defeats the purpose of ‘fullness’.

Running Bitcoin Core under Linux or Windows?

The Bitcoin Core software, which is required to run a Bitcoin Full Node, can be run under Windows, MacOS or Linux equally well. I don’t have a Mac and I didn’t want to spend $100 on a Windows license, so my choice was simple. There is a Bitcoin Core repository for Ubuntu, and the installation consisted of the following shell commands (bitcoin is the daemon, bitcoin-qt is the GUI version):

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get bitcoin bitcoin-qt

I launched the Bitcoin Core Wallet from the GUI, and went to Options->Main to enable Start Bitcoin Core on system login. And that was all! So far, my little NUC has synced about 5% of the blockchain in two hours. It has processed all transactions made before April 2013.

Performance Expectations

While processing older blocks, each new Bitcoin full node tends to be network-limited. Processing speed depends mainly on the response of other Bitcoin full nodes that supply the raw data for each transaction. The NUC has a very weak CPU and AES-NI support is sadly missing. The 15-minute load average keeps steady around 0.80-0.90. The machine uses about 1.8GB RAM out of 4GB available. So far, so good! However Bitcoin started to pick up traction in 2013 and the number of transactions per block began to increase rapidly. Once my NUC reaches these bigger blocks, I expect the process to become CPU-limited.

Update #1: After about 12 hours, the node has caught up with the blockchain until November 2015 (total progress: approx 36.3%). There are now about 101,000 blocks remaining. As expected, things are moving much more slowly now, and the CPU 15-minute load average is much higher now — approx. 2.60. Memory load stays the same (1.8 GB).

Update #2: It’s been now 36 hours and my node has synced the blockchain until June 2016 (total progress: approx 53.5%). About 68,000 blocks remain. CPU 15-minute load average is now up to 3.13, memory load is unchanged (1.8GB).

Bitcoin Core Wallet building local copy of blockchain
Bitcoin Core Wallet building local copy of blockchain

Update #3: Almost there! Another day later, node has less than 1 year to sync (total progress: approx 60.7%) with some 56,000 blocks remaining. CPU 15-minute load average holds steady around 2.50-3.10, memory load stays at 1.8GB. May I hope that all will be done in less than 48 hours from now? Let’s see…
Final Update! After 6 full days of work, my full node has caught up with blockchain and is now fully operational. Lessons learned? If I had to do this all over again, I would have done it a bit differently. My NUC is clearly underpowered, and what took 6 days to me would take just 6 hours on an Amazon EC2 t2.xlarge (4 cores) and cost $1.50 plus transfer costs (another $13-15).

 

In Conclusion

As I get familiar with the Bitcoin Core software, I will share my experience here. If I convince only five more people to run their own Bitcoin full nodes, I will consider this a success. Are you up to the task?

 

Have you used a NUC or another mini PC to run Bitcoin Core? What is your experience with running a full node? Anything worth sharing with a newbie like me? Let me know in the comments below.

Please consider supporting this blog by clicking on the banner below when purchasing bitcoin equipment.
Ledger Nano S - The secure hardware wallet