Author

Topic: Bitcoin node on OpenWRT router question (Read 1727 times)

legendary
Activity: 3430
Merit: 3080
May 05, 2014, 07:28:02 AM
#12
What about an old laptop, 2GB RAM, 1.6 Ghz Atom processor? Is that over the top or would it barely handle it? I don't want to run a node that would just slow the network down and do more harm then good...

That would be much better than the RPi.


We are talking about a Raspberry Pi and the ODROID-U3 now, the second one has a quad core. So what is the reasonable CPU to handle the node, is the Atom good enough?

ODROID would suit the task best of all IMO. Very low power usage (probably much lower than your Atom laptop) and multi-core too. Drawbacks are that hardkernel.com don't take bitcoin still, and the EMMC cards might be as flaky as SD cards when used in long term always-on deployment.

hardkernel.com are missing a trick, bitcoin node would be an ideal use for their hardware, and South Korea (where their company is based) has growing awareness of cryptocurrencies, yet they still accept only wire transfers and PayPal. Maybe there's a reseller where you could pay with something more civilised.
newbie
Activity: 24
Merit: 0
Ok so the router is out of the question Smiley I was thinking that if the router can handle seeding +20 torrents in the size of a few GB with a connection limit set to 500 and it does not slow it down that it could power a node.

What about an old laptop, 2GB RAM, 1.6 Ghz Atom processor? Is that over the top or would it barely handle it? I don't want to run a node that would just slow the network down and do more harm then good...

We are talking about a Raspberry Pi and the ODROID-U3 now, the second one has a quad core. So what is the reasonable CPU to handle the node, is the Atom good enough?

staff
Activity: 4284
Merit: 8808
I can't recommend people stay away from the RPI strongly enough. They are obscenely slow even for their clockrate. I'd say they're more in competition with small microcontrollers, but they're also notoriously unreliable.

I've had much better luck with the odroid products, e.g. http://hardkernel.com/main/products/prdt_info.php?g_code=G138733896281  which is a much better value.  Coupled with a large emmc (e.g. 64gb) it should run a reasonably respectable bitcoin node. The beaglebones are nice ... but at the price the odroids have a lot more memory and performance.
legendary
Activity: 3430
Merit: 3080
Well I had no idea that the work a node does is so intensive, I always thought the miners are doing the heavy work and the nodes are just picking up those few kbytes of traffic and adding it to the chain...

Acting as a relay node is only hard work for something with such low computing resources as a typical router. Bitcoin verifies the signatures of transactions it receives from other peers, this is hard on a processor that is chosen for use in a modern router. It's possible that a more specialised router might be available today that could handle it. I think something with a 1 GHz processor and 1GB RAM would be comfortable. Maybe there's something out there that can make use of that specification.

A Raspberry Pi or a Beaglebone class of device can just about do the job, as they have versions with 750-1000 MHz processors and 512MB RAM. From my experience with the Pi, it's still a bit stilted with only one processing core, you can't really do anything but the most undemanding tasks while the bitcoin client is running (without heavily impacting the responsiveness of the machine).

newbie
Activity: 24
Merit: 0
I am trying to achieve the same as installing Bitcoin-qt on a computer and run a (full) node. Not for myself but for the network.
legendary
Activity: 1232
Merit: 1094
What do you want to achieve?  Do you want the node for your own use?

One of the benefit of lots of full nodes is for users who use Bloom filters.

SPV clients need full nodes to scan the blockchain and find their transactions for them.

If you accept 32 incoming connections, then you can support (on average) 4 SPV nodes.  The number of full nodes is limited and (apparently) falling.

The number of SPV users is (full nodes) * (avg number of incoming connections accepted) / 8.

While in most p2p protocols, SPV users would be leeches, SPV adds value to the system by increasing the number of people using the system for transactions.

You could create a node which just serves merkle blocks.  It wouldn't have to do any verification at all.  Like SPV clients, it just assumes the longest chain is valid.

I don't think this would reduce security by much.  SPV clients can already be tricked by a 51% attack.
newbie
Activity: 24
Merit: 0
Well I had no idea that the work a node does is so intensive, I always thought the miners are doing the heavy work and the nodes are just picking up those few kbytes of traffic and adding it to the chain...

I am still eager to contribute to the network since I have a fast internet plug. I will think about investing in a small PC to do the job..

But I am still interested in this openwrt (even if a brick my router Smiley ), if anyone has more experience or thoughts please give some input
legendary
Activity: 3430
Merit: 3080
I believe it's been ~500 MB for several versions, at least since I first used the core client (back at version 0.5.0). You're right that the unprocessed transactions are likely not a significant proportion of that ~500MB memory footprint, as the block size is limited to <1MB (although I'm not sure how the memory pool behaves with respect to transactions that are valid but will not be included as part of a block solution, I would expect there must be an upper limit to the number of transactions in the memory pool to prevent DOS attacks)

Swap could work, would be maybe worth trying as an experiment. Flash drive would be better, as mentioned. You could likely find a cheap SATA-2 64MB SSD on eBay that would be fast enough to make the outcome of any test more useful for such a project. From my experience running bitcoin qt on a Raspberry Pi, I predict the router would still struggle to function properly. If it did work acceptably as a bitcoin node and as a router, I'd wonder how long the router might last with the extra load on the processor.

I was also giving some thought to whether OpenWRT would have all the appropriate libraries that bitcoind might need, but it's possible that the way bitcoind is compiled packages the libraries into the executable. Someone with some real experience of bitcoin development can hopefully answer that question.

Don't let me put you off too much though, I'd be very pleased if someone managed to find a good solution to this with a bit of experimenting. Just don't fry/brick your only router!
jr. member
Activity: 56
Merit: 1
It is dependent on the number of unspent outputs. So the memory size required is strongly correlated with the number of transactions being made. You can't solve the problem with a HDD, it is too slow, you need a high capacity flash drive.
newbie
Activity: 24
Merit: 0
wow, didn't know it was so memory hungry since the average block size is like 0.25 MB..

Is this growing as the number of transactions per second increase or is this 375MB a constant since ever?

But this problem could be solved by creating a swap partition on the external hdd I think.

legendary
Activity: 3430
Merit: 3080
I think RAM will be the most significant problem there. Even with the -disablewallet parameter, bitcoin-qt uses ~375MB of memory, and that's when it's not verifying blocks. I just tested to see if bitcoind uses some small amount less than qt, but it seems to use identical RAM with or without -disablewallet (which leads me to think the option has no function with bitcoind).

So, before you could assess whether a typical router processor could do the job (while simultaneously doing internet serving and firewalling etc), you'd need a unit with 768-1024MB RAM to be comfortable. I not sure that such a device exists right now, although I'd be interested to hear if it does.
newbie
Activity: 24
Merit: 0
Hello, I ask for help regarding the setup of a bitcoin node. I heard that the number of nodes is dropping and I want to start my own. Since I don't have a computer on 24/7 I was thinking about setting it up on my router (asus rt-n16 running openwrt).

First is this router capable enough to run a node? The specs are: 480Mhz Broadcom CPU, 128MB RAM and an external 500GB hdd for the blockchain.

I have a 20/20 Mbit fiber connection which I think would suffice.

So where I really need help is with the software, if anyone did this already and was willing to share the experience it would save me some time. Is there an up to date port for openwrt available somewhere (my searching turned up older versions of bitcoin-qt for openwrt)?

Jump to: