Author

Topic: bitcoind for ARM / Cubieboard / Raspberry Pi (Read 7046 times)

newbie
Activity: 6
Merit: 0
December 14, 2018, 02:45:44 PM
#32
Hi Guys,

I know I might be a bit late but I was trying to run a bitcoin full node on my cubieboard3 (cubietruck) and I am struggling a lot! Let's go with my questions ans see if someone is kind to asnwer me Smiley

1 - What is the minimal version of ubuntu that I need to have to run a full node?
2 - I was able to install Ubuntu Desktop 12-04 LTS and tried to install the full node. When I was click on the Bitcoin UI nothing happened. Could be because of the version for the Bitcoin core Vs the Ubuntu version?
3 - I did an update from 12-04 LTS to 14-04 LTS but since I installed the updagrade I couldn't login anymore. I actually got a warning during the installation saying that the "Unity" could not work. I ignored and continued but seems that something is wrong...
4 - Is there any other Operating System (other then Ubuntu) or something similar where I could run a full node on this cubietruck?

Here are the specs for the cubietruck (Cubieboard3):

SoC: Allwinner A20
CPU: ARM Cortex-A7 @ 1 GHz dual-core
GPU: Mali-400 MP2
display controller: unknown, supports HDMI 1080p, no LVDS support
2 GiB DDR3 @ 480 MHz
8 GB NAND flash built-in, 1x microSD slot, 1x SATA 2.0 port (Hard Disk of 2,5").
10/100/1000 RTL8211E Gigabit Ethernet
2x USB Host, 1x USB OTG, 1x CIR.
S/PDIF, headphone, VGA and HDMI audio out, mic and line-in via extended pins
Wi-Fi and Bluetooth on board with PCB antenna (Broadcom BCM4329/BCM40181)
54 extended pins including I²C, SPI
Dimensions: 11 cm × 8 cm

Thank you very much.
Cheers.
legendary
Activity: 1204
Merit: 1002
RUM AND CARROTS: A PIRATE LIFE FOR ME
Has anyone tried running Bitcoind AND a LAMP server on their cubieboard/pi/beaglebone?
sr. member
Activity: 322
Merit: 250
December 04, 2013, 05:51:52 AM
#30
Reindex on rpi only took a day or two IIRC...
Also, i wouldn't recommend writing on an SD card; just use a simple old external harddrive. (with seperate power supply, ofcourse)
sr. member
Activity: 343
Merit: 250
December 04, 2013, 05:47:33 AM
#29
Has anyone managed to get my debs working on a Cubieboard 2? I'm having trouble and I'm assuming it's something to do with bitcoind using two threads as it's a dual core machine. debug.log reports pthread errors like:

Code:
bitcoind: pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
sr. member
Activity: 343
Merit: 250
November 22, 2013, 09:41:40 AM
#28
I will try to copy over this blockchain to RPi and see if it will work there. I had same problem with it before I bought BBB, but since RPi has twice slower CPU, indexing in there would take ages. Yet, maybe with readymade index it will work now.
According to a friend of mine, a full reindex on the Pi took 4-5 days.
newbie
Activity: 25
Merit: 0
November 22, 2013, 08:47:29 AM
#27
Full reindex took a little more than 48h (I think about 96h), but now it's done and bitcoind works fine on my BeagleBone Black right now.
I will try to copy over this blockchain to RPi and see if it will work there. I had same problem with it before I bought BBB, but since RPi has twice slower CPU, indexing in there would take ages. Yet, maybe with readymade index it will work now.

IO is still a concern, I'm not sure how lond SD card would live with bitcoind running constantly on it. But I will find out, eventually.
legendary
Activity: 1792
Merit: 1008
/dev/null
November 21, 2013, 11:53:22 AM
#26
Unfortunately it doesn't work at all on my Debian. I'm not sure what's wrong or if I made a mistake somewhere, but here is what I did:
1) I've installed a fresh Debian wheezy and installed all these debs (apart from bitcoin-qt as I need no GUI).
2) I've copied over whole blockchain from a windows machine with updtodate BitcoinQt 0.8.5
3) I started bitcoind with my custom config:
Code:
paytxfee=0.0001
rpcuser=root
rpcpassword=password
rpcallowip=192.168.1.73
daemon=1
debug=1
checkblocks=20
checklevel=0
Bitcoind starts, but it:
a) always asking for database reindex and doesn't pick the index I've copied;
b) if I start it with -reindex flag - it hangs in processes with max CPU, but it doesn't respond over JSON-RPC, and even after a long time waiting shows no signs of life, so I have to just kill it.

However, I found something interesting elsewhere. Debian Unstable repo has bitcoind package available for armhf/armel architectures, and it's last 0.8.5 version. So I installed it and it works nearly fine. Unfortunately it still doesn't like my index copy, but when I run it with -reindex - it start fine, responds over JSON-RPC and indexing goes on, I see it by the quickly increasing blocks count. Full reindex will take I think 24-48h, but I hope it will work fine afterwards.
you cant mix different arch's of leveldb databases!
newbie
Activity: 25
Merit: 0
November 18, 2013, 02:13:54 PM
#25
Unfortunately it doesn't work at all on my Debian. I'm not sure what's wrong or if I made a mistake somewhere, but here is what I did:
1) I've installed a fresh Debian wheezy and installed all these debs (apart from bitcoin-qt as I need no GUI).
2) I've copied over whole blockchain from a windows machine with updtodate BitcoinQt 0.8.5
3) I started bitcoind with my custom config:
Code:
paytxfee=0.0001
rpcuser=root
rpcpassword=password
rpcallowip=192.168.1.73
daemon=1
debug=1
checkblocks=20
checklevel=0
Bitcoind starts, but it:
a) always asking for database reindex and doesn't pick the index I've copied;
b) if I start it with -reindex flag - it hangs in processes with max CPU, but it doesn't respond over JSON-RPC, and even after a long time waiting shows no signs of life, so I have to just kill it.

However, I found something interesting elsewhere. Debian Unstable repo has bitcoind package available for armhf/armel architectures, and it's last 0.8.5 version. So I installed it and it works nearly fine. Unfortunately it still doesn't like my index copy, but when I run it with -reindex - it start fine, responds over JSON-RPC and indexing goes on, I see it by the quickly increasing blocks count. Full reindex will take I think 24-48h, but I hope it will work fine afterwards.
sr. member
Activity: 343
Merit: 250
November 18, 2013, 02:38:29 AM
#24
I was just trying to install these .debs on Ubuntu 12.04 at Beaglebone Black, but it doesn't work. Basically ubuntu repos for ARM have libboost version only 1.48 available, while these debs require 1.49. It probably can be compiled from sources, but that's not as simple as just installing some ready packages and also will probably take much time on a weak ARM CPU.
I might be able to decrease the requirements in the Debian control file, but I would need somebody to confirm whether 1.48 and 1.49 would be compatible and whether there are likely to be any linking issues.
Quote
Trying Debian Wheezy on the same hardware.
That should work as it's what the debs were designed for. You still could well struggle with only 512 MB RAM though (at least for downloading the blockchain).
newbie
Activity: 25
Merit: 0
November 17, 2013, 05:37:48 PM
#23
I was just trying to install these .debs on Ubuntu 12.04 at Beaglebone Black, but it doesn't work. Basically ubuntu repos for ARM have libboost version only 1.48 available, while these debs require 1.49. It probably can be compiled from sources, but that's not as simple as just installing some ready packages and also will probably take much time on a weak ARM CPU.

Trying Debian Wheezy on the same hardware.
legendary
Activity: 1792
Merit: 1122
I compiled it myself on the new cubieboard3 and is running now (I'm using BDB5.1 as I don't know how to do it with 4.8. I'm not using the wallet, anyway)
That's really the point of my .debs - compiling DB 4.8 is a bit of a pain but I wanted binary compatibility. It does work rather well though, doesn't it.

Yes, running for 10 hours and now at block 216931
sr. member
Activity: 343
Merit: 250
I compiled it myself on the new cubieboard3 and is running now (I'm using BDB5.1 as I don't know how to do it with 4.8. I'm not using the wallet, anyway)
That's really the point of my .debs - compiling DB 4.8 is a bit of a pain but I wanted binary compatibility. It does work rather well though, doesn't it.
legendary
Activity: 1792
Merit: 1122
I compiled it myself on the new cubieboard3 and is running now (I'm using BDB5.1 as I don't know how to do it with 4.8. I'm not using the wallet, anyway)
sr. member
Activity: 343
Merit: 250
this is a issue of any NAND device so far, "wear levelling" is just a nasty workaround (which often dosnt work well)
Surely then you're just saying that using SSDs have no real use in the industry (considering that their real benefit is in random I/O, and wear levelling is similar to writes being spread over the disk)?

Either way, this is all a bit off topic now. All I can say is that good quality SSDs seem to work very well for databases in my professional (hosting services) capacity, and combined with a Cubieboard, it's been running very stable now with an uptime of two weeks and not a single issue.
legendary
Activity: 1792
Merit: 1008
/dev/null
LevelDB is designed for hard disks, not SSDs. It's not only about writing blocks when they arrive but updating the databases too.
So I imagine this is more of an issue with SD cards then? I think most SSDs have wear levelling (hence they're used for all sorts of IO intensive operations, and often for databases with few issues).
this is a issue of any NAND device so far, "wear levelling" is just a nasty workaround (which often dosnt work well)
full member
Activity: 182
Merit: 100
I am working a project like this too so I'd like to know if the SD card will be ok or not. Also how long will a 32Gb card last us with the growing blockchain?
sr. member
Activity: 343
Merit: 250
LevelDB is designed for hard disks, not SSDs. It's not only about writing blocks when they arrive but updating the databases too.
So I imagine this is more of an issue with SD cards then? I think most SSDs have wear levelling (hence they're used for all sorts of IO intensive operations, and often for databases with few issues).
legendary
Activity: 1526
Merit: 1136
LevelDB is designed for hard disks, not SSDs. It's not only about writing blocks when they arrive but updating the databases too.
sr. member
Activity: 343
Merit: 250
be aware that this is a sure way to kill your SD Card
Are you sure? Blockchain writes don't typically write over the same area of card. You'll record block information, and then just leave it sitting there.

I recommend running from a SSD anyway as they're so much quicker and more reliable.
legendary
Activity: 1792
Merit: 1008
/dev/null
be aware that this is a sure way to kill your SD Card
member
Activity: 70
Merit: 10
September 27, 2013, 05:26:35 PM
#12
Awesome, I have a cubieboard 2 I will give this a try many thanks for producing this  Smiley
sr. member
Activity: 343
Merit: 250
September 27, 2013, 05:20:47 PM
#11
It's interesting to know that some people have RAM issues. I also read about a few failed attempts with the Raspberry Pi.

Seriously, get the Cubieboard. A Raspberry Pi with 1 GB RAM (and a slightly faster processor, and SATA) for just a little bit more money makes a fantastic bitcoind server. This is what the .debs were built for, and I assure you it works well in production.
staff
Activity: 4326
Merit: 8951
September 27, 2013, 04:55:34 PM
#10
I know a number of people are running bitcoind on odroid U2 http://www.hardkernel.com/renewal_2011/products/prdt_info.php?g_code=G135341370451 quite successfully.  It's super fast (for an arm), easily 32x faster than the rpi on some workloads, and not terribly expensive either.  Quad core cortex-a9 1.7GHz, 2GB dram.

(Odroid now seems to have a new 4x A15 + 4x A7 system, but I've not yet talked to anyone that has one)
legendary
Activity: 905
Merit: 1014
September 27, 2013, 03:45:44 PM
#9
As said though, I did notice that bitcoind used more than 50% of the available RAM when syncing, and this is a 1 GB box so it might be too much for a Pi. I bet it would eventually sync though (maybe with swap on SSD?) and once it's synced I bet it'll run just fine.

There's no reason you can't sync on a desktop and then copy the data directory over (or just the index files).
newbie
Activity: 5
Merit: 0
September 27, 2013, 03:34:36 PM
#8

I think the main concern would be the available RAM. I've run bitcoind on VPS's with 512mb. They run slow, especially with updating the blockchain. I've also had bitcoind crash randomly every couple of hours, but as soon as I upgraded the ram to 2GB - no crashes.

The idea of a lowcost ARM bitcoind "appliance" would be better based off of something with a bit more power:

Another member's post about https://bitcointalksearch.org/topic/m.2743058

http://images.gizmag.com/gallery_lrg/utilite-computer-3.jpg

They start at $99.

The other "small boxes" I've thought about running the bitcoind node (and tor gateway box) were:
http://media.memoryexpress.com/Images/Products/MX46361/0?Size=Large
BRIX Ultra Compact PC Kit w/ Core™ i3-3227U, HDMI, DisplayPort
Up in Canada the cost starts around $269+

Lelantos

sr. member
Activity: 343
Merit: 250
September 26, 2013, 04:57:22 AM
#7
Hi, gigatux, I was always interested about running bitcoind on raspberrypi. I see you're using a Cubieboard but, maybe it's a first step, interesting too.
What about transaction processing, after synching? Is it fast and smooth or... what ? Did you tried transferring some satoshi?
It's all working just fine here. Transaction processing (after syncing) is pretty quick and seems to be within a second - this is on real Bitcoin coin sending.

Note that the speed is probably down to a combination of this all running from a SSD (the Cubieboard has a SATA port and bitcoind is I/O intensive) and the CPU being a bit quicker (1GHz vs 700MHz for the Pi). However, I can't see the Pi giving too much trouble.
hero member
Activity: 980
Merit: 1002
September 26, 2013, 04:29:40 AM
#6
Hi, gigatux, I was always interested about running bitcoind on raspberrypi. I see you're using a Cubieboard but, maybe it's a first step, interesting too.
What about transaction processing, after synching? Is it fast and smooth or... what ? Did you tried transferring some satoshi?

Thank you!
sr. member
Activity: 343
Merit: 250
September 26, 2013, 03:45:00 AM
#5
With bitcoind just doing its thing (fully synced), here's an example of usage. It's switched between 1% and 30% each few seconds, so seems to average about 15% CPU.

Code:
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 2649 bitcoin   20   0  367m 245m 4460 S  31.7 30.1 852:06.47 bitcoind

As said though, I did notice that bitcoind used more than 50% of the available RAM when syncing, and this is a 1 GB box so it might be too much for a Pi. I bet it would eventually sync though (maybe with swap on SSD?) and once it's synced I bet it'll run just fine.
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
September 26, 2013, 03:12:20 AM
#4
When I ran bitcoind on my raspberry pi it took 100% cpu and made the system unusable.  It might have been OK after syncing was over, but I didn't have the patience to wait.  Would be interesting to hear of some successes.
sr. member
Activity: 343
Merit: 250
September 26, 2013, 02:51:41 AM
#3
Thank you. And running the full client on a cheap node is also great for security - you can dedicate the Cubie/Pi to doing this one task alone. When you're storing dozens of Bitcoins, a tiny expense for a dedicated board makes a lot of sense.
legendary
Activity: 1526
Merit: 1136
September 25, 2013, 03:46:04 PM
#2
Nicely done. Showing that you can run full nodes on really cheap devices could lead to all kinds of interesting ideas.
sr. member
Activity: 343
Merit: 250
September 24, 2013, 06:50:50 AM
#1
Dear all,

I've been experimenting with getting the official bitcoind client working on by Cubieboard (a bit like a Raspberry Pi but with SATA and more RAM).

After a fair bit of pain, I've successfully compiled this and am running it with no issues. When building the blockchain, RAM usage was above 512MB so it might not work perfectly on the Pi, but RAM usage after syncing is much lower.

I've targeted this for Debian Wheezy users but it might also work for Ubuntu users. It's compiled for armel so requires a relatively new ARM processor. The debs are basically recompiled (with dependencies slightly tweaked) source packages from Debian Wheezy and the Ubuntu ppa at https://launchpad.net/~bitcoin/+archive/bitcoin. The most difficult thing was getting db4.8 working for binary wallet.dat compatibility.

All non-repository .debs, including the bitcoind deb itself have been put up at https://bittylicious.com/downloads/.

Donations not necessary. If you like it, please feel free to link to Bittylicious or otherwise spread the word.

Marc
Jump to: