Here is how I compiled the latest stable version of bitcoind (v0.10.0rc2 at the time of writing) on my Raspberry Pi.
Firstly I installed Raspbian on an SD Card. I'm doing this as a proof of concept, so I'm using a 64GB SD Card just to prove that it works. In future, the blockchain won't fit on a 64GB SD Card, so I'll either migrate to a larger SD Card or move the blockchain over to an external hard drive (more likely, as this is the cheaper option).
Installation Stepssudo apt-get update && sudo apt-get dist-upgrade
Skipped the step to install Berkeley DB v4.8 as don't need a wallet on the Bitcoin Node.
sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev
mkdir ~/bitcoin
cd ~/bitcoin
git clone -b v0.10.0rc2 git://github.com/bitcoin/bitcoin.git
cd bitcoin
./autogen.sh
./configure --disable-wallet --without-miniupnpc
make
strip ~/bitcoin/bitcoin/src/bitcoind
strip ~/bitcoin/bitcoin/src/bitcoin-cli
sudo cp -a ~/bitcoin/bitcoin/src/bitcoind /usr/local/bin/
sudo cp -a ~/bitcoin/bitcoin/src/bitcoin-cli /usr/local/bin/
cd ~/bitcoin
mv bitcoin bitcoin-0.10.0rc2
ReferencesThe above steps were modified from instructions from
http://blog.pryds.eu/2014/06/compile-bitcoin-core-on-raspberry-pi.html?m=1 and
https://github.com/spesmilo/electrum-server/blob/master/HOWTO.mdBootstrapping the blockchainI already had a bitcoin node on a laptop running Linux Mint 16, so I copied the blockchain onto the SD Card from the the laptop.
The laptop installation was my first node. To bootstrap the blockchain, I downloaded bootstrap.dat (a previous copy of the block chain) using BitTorrent (Transmission on Linux) and put it in the Bitcoin Core data directory before starting bitcoind.
https://bitcoin.org/en/downloadWhile the laptop was unpacking bootstrap.dat to create a local copy of the blockchain, the CPU usage was pretty high. I suspect this step would take a long time on the Raspberry Pi (and may need more RAM too).
The Bitcoin Core data directory is:
~/.bitcoin
From
https://github.com/bitcoin/bitcoin/blob/master/doc/bootstrap.mdTo start bitcoind manuallybitcoind
To stop bitcoindbitcoin-cli stop
To get informationbitcoin-cli getinfo
To start bitcoind automatically at startupcrontab -e
Add this line to the end:
@reboot /usr/local/bin/bitcoind &
Performance on the Raspberry PiI have forwarded port 8333 on my router to the Raspberry Pi, and the RPi has been running a fully up to date (i.e. has all blocks, fully downloaded) blockchain for nearly 4 hours now:
pi@raspberrypi7 ~ $ uptime
14:48:17 up 3:51, 1 user, load average: 0.22, 0.14, 0.22
pi@raspberrypi7 ~ $ bitcoin-cli getinfo
{
"version" : 100000,
"protocolversion" : 70002,
"blocks" : 339279,
"timeoffset" : -1,
"connections" : 19,
"proxy" : "",
"difficulty" : 43971662056.08957672,
"testnet" : false,
"relayfee" : 0.00001000,
"errors" : ""
}
Load averages of around 0.2 means that the Raspberry Pi still has plenty of time to twiddle its thumbs while dealing with its duties as a bitcoin node.
2015-01-26 performance update:The Raspberry Pi has been running a fully up to date (i.e. has all blocks, fully downloaded) blockchain for 9 days now:
pi@raspberrypi7 ~ $ uptime
21:24:33 up 9 days, 10:27, 1 user, load average: 1.10, 0.98, 0.92
pi@raspberrypi7 ~ $ bitcoin-cli getinfo
{
"version" : 100000,
"protocolversion" : 70002,
"blocks" : 340525,
"timeoffset" : -1,
"connections" : 67,
"proxy" : "",
"difficulty" : 43971662056.08957672,
"testnet" : false,
"relayfee" : 0.00001000,
"errors" : ""
}
From ifconfig:
RX bytes:789344501 (752.7 MiB) TX bytes:4062070803 (3.7 GiB)
With 67 connections: Load averages of around 1 means that the Raspberry Pi is able to perform its duties as a bitcoin node, however it is near its limit in terms of handling the load.
2015-01-27 update:From ifconfig:
RX bytes:1543876865 (1.4 GiB) TX bytes:2343796284 (2.1 GiB)
I was wondering why the TX bytes shown under ifconfig had gone down - how could that be possible? The answer: the Raspberry Pi is a 32-bit machine and when the bytes counter hits 4 GiB it resets to 0! So if tracking how much upload traffic your Bitcoin Node is serving is important, the RPi is not the ideal platform.