Pages:
Author

Topic: Advice on Raspberry pi hardware for running full BTC node - page 7. (Read 3198 times)

newbie
Activity: 3
Merit: 0
Hello everyone,

this is my new post on this forum and I didn't want to start a new topic. I am also looking to learn to run a Full Node and connect it to Coldcard + Wassabi (in the future) and all of this is new to me. I was researching a lot last couple of days but found the best information in this thread. So in short I just wanted to as you guys about opinion:

Since I'm new to RPi and to putting my hardware together as well as running Bitcoin Core and Linux in general (yes, I've been living under the rock..  Grin ) wouldn't it be easier for newbie like me to:

- Download Bitcoin Core to my spare laptop ( i5, 8Gb RAM, SSD drive) and set blockchain to sync on external SSD
- Learn Linux (i was planning to do a course on this anyway)
- Then wait for stable version of new RPi and buy components (I've already looked into that so I know what I need) and learn to set it up there (preferably running over TOR?)
- Set the blockchain directory on RPi to that external SSD I've downloaded it on my laptop
- Enjoy compact size Full Node running 24/7 and then learn to use command line / SSH to broadcast transactions from my ledger to a multisig guarded by Cold Card (prefferably going throu Wassabi first for annonimity)?

Interested in your opinions. If this is wrong place I'm sorry, I'll post it somewhere else.

Cheers!

(all of this is what I've learned on Twitter, I've been lurking in this space for a while but never on this forum. Forgive me if those questions are super dumb)
legendary
Activity: 1638
Merit: 1329
Stultorum infinitus est numerus
I moved Bitcoin core to another device at 64% and the HD is now reporting errors on two machines. Errors also on Bitcoin core asking to rebuild the database. I can still access my HD. Sigh... I guess that means either the data or HD or both are corrupt? Letting core repair just starts the sync again from the beginning.  Cry

Try reindexing the Blockchain most likely while attempting to copy there were a few block files stuck mid-download or mid-index and resulted in corruption, reindexing should help you with that. If possible, it's probably better if you just download/sync it on your computer (to make sure everything works) and then just move the files to the external SSD/HDD which you can then connect to RPI.
legendary
Activity: 1463
Merit: 1135
I moved Bitcoin core to another device at 64% and the HD is now reporting errors on two machines. Errors also on Bitcoin core asking to rebuild the database. I can still access my HD. Sigh... I guess that means either the data or HD or both are corrupt? Letting core repair just starts the sync again from the beginning.  Cry
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
I think the Pi can also be powered by connecting to the GPIO pins. I'm not sure if that's a good idea as you typically want to power the Pi "normally", and any power hungry devices should either have their own power, or just connect as few as you can directly to the Pi.

A powered hub makes sense if you're connecting several USB devices, like more than one hard drive or SSD.

The Pi is actually good to run a full node since power consumption 24/7/365 is going to be like less than $1 a month, depending on where you live. I've seen figures close to $5 to $10 per year.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
I have serious concern whether this cable are able to power-on Raspberry Pi (which could have up to 4 USB device) and an external drive.
Have you used the cable on Raspberry Pi and other USB device without problem (no blinking red LED on Raspberry Pi) ?

Yes, I have 3 of them in use now. I was going to build another one and was looking for the same cable.
The Pi in theory can only have 3 USB devices because it is taking up one. But, so long as you have enough amps coming out of the 5V wall adapter it works fine.

It's more to keep it neat. 

-Dave
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
So I had a few of these cables:






Basically you plugged a power source into the microUSB female end
The male micro USB went into the RPi
The USB went into the RPi and the other end went into an external USB drive.
The 5V from the power source was what powered the USB drive.

Very nice for doing things like this, it kept the cable mess to a minimum.
I can't find any more of them, does anybody know where I can snag a few.

Thanks,
Dave
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
Oh, sorry, my bad, I was talking for other hardware that have more RAM, (so other than RPi, that is). That other hardware would rarely be turned off or shut down, so if chainstate can be rebuilt upon restarting, that would be ok then? Not using pruning mode.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
So that Bitcoin doesn't get confused and think the chainstate folder has died and gone to heaven, you put a link telling it where to look for it in /home//.bitcoin, cos that's where Bitcoin looks for the chainstate folder

What happens if this chainstate folder is deleted (or died and gone to heaven) ? Wouldn't this be perfect to place in a ramdisk if you have the hardware?

Or you copied everything from another machine to this one, except for the chainstate foder?
legendary
Activity: 3430
Merit: 3079
ok!

your Pi has a main disk (SD card usually)

The top of the tree is / (which is equivalent to C:\ on Windows)

You're always logged into a user account

That account has all it's files at /home/, the name is probably the default name chosen by Raspbian

Bitcoin puts all it's config files in /home//.bitcoin

One of those folders gets read and written to constantly during syncing, and that one (.bitcoin/chainstate) can be put on a fast disk (e.g. SSD) to speed sync up massively

So that Bitcoin doesn't get confused and think the chainstate folder has died and gone to heaven, you put a link telling it where to look for it in /home//.bitcoin, cos that's where Bitcoin looks for the chainstate folder

Like this:

Code:
ln -s / /home//.bitcoin/chainstate

If you do ls -lh /home//.bitcoin you'll see the link file in there, and it'll also show you where the link is pointing to




Then, open a new file called bitcoin.conf in /home//.bitcoin. Do  nano /home//.bitcoin/bitcoin.conf

Type dbcache=2000 into the new file, then do Ctrl-o, then Y, then press Return, then Ctrl-x (Ctrl-o is save, Ctrl-x is quit)

Now when you start bitcoin, it's using dbcache=2000 as an option. You can add other options to bitcoin.conf the same way, just open it in nano, and put only one option per line.
legendary
Activity: 1463
Merit: 1135
Core it taking its sweet time. Day 6 and 54% done.  

usual advice applies:

  • Put the /.bitcoin/chainstate folder on your fastest available disk (/chainstate is ~ 2-3GB during sync), add a symlink to it inside /.bitcoin folder
  • Increase dbcache setting in your bitcoin.conf file (or as a cmd parameter to bitcoin executable) to a healthy proportion of available RAM
  • If you're using a disk with Linux filesystems (ext3 or 4, btrfs etc), when you mount , slip in -o noatime,noreltime as an option (check man mount for full details)

so if you have e.g. 8GB RAM, smash dbcache up to 2000MB or even 4000MB. 16GB RAM, put it up to 8000MB. Big speed increases.

Also, Bitcoin Core 0.19.0.1 has improved code for syncing, translating to a ~ 5-10% speed increase (depends on how big dbcache is set). 0.19.0.1 will be out before the end of the week (probably)

Thanks for your thoughtful response. I'm sorry, maybe I should've been more clear, I've got about 2 days experience so far with terminal on the RP and I'm afraid that much of what you've written has gone over my head.   Cry   I'm only now starting to comprehend how core downloads and syncs with the network.  
59%.....  
legendary
Activity: 3430
Merit: 3079
RPi4 Bootloader EEPROM info

https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md


Should be possible to get this on regular Debian based images by adding the Raspian repo to your /etc/apt/sources.list file

one of the fixes resembles the problem @IcyGreen was having (intermittent boot issues)
legendary
Activity: 3430
Merit: 3079
Core it taking its sweet time. Day 6 and 54% done.  

usual advice applies:

  • Put the /.bitcoin/chainstate folder on your fastest available disk (/chainstate is ~ 2-3GB during sync), add a symlink to it inside /.bitcoin folder
  • Increase dbcache setting in your bitcoin.conf file (or as a cmd parameter to bitcoin executable) to a healthy proportion of available RAM
  • If you're using a disk with Linux filesystems (ext3 or 4, btrfs etc), when you mount , slip in -o noatime,noreltime as an option (check man mount for full details)

so if you have e.g. 8GB RAM, smash dbcache up to 2000MB or even 4000MB. 16GB RAM, put it up to 8000MB. Big speed increases.

Also, Bitcoin Core 0.19.0.1 has improved code for syncing, translating to a ~ 5-10% speed increase (depends on how big dbcache is set). 0.19.0.1 will be out before the end of the week (probably)
legendary
Activity: 1463
Merit: 1135
Core it taking its sweet time. Day 6 and 54% done. 

I'm downloading/syncing core to an external HD.

Question:
Can I stop core, remove the hard drive and continue the sync/download on another machine?
hero member
Activity: 1568
Merit: 544
You can compromise too, you should be able to change Raspian's boot script to not load the GUI on boot, then just take note of the command (probably the startx script in /etc/X11) that loads the GUI. Then you can make sure you know you're good on the command line, but have the option of going into the GUI still available.
Correct, that can be managed in the raspi-config
Iirc you could also log out from the gui to the command line so a reboot is not needed.
May the node end up on a hard to reach place you could enable the build inn VNC server in the raspi-config and access the gui remotely.
legendary
Activity: 3430
Merit: 3079
*If I switch off the screen while running core, is that the same as running headless or should the screen be unplugged?
No. Running it headless means that the Graphical User Interface (GUI) is not used and that it can only be controlled using the command line. The lack of the GUI means that it would take lesser resources to run it. Switching off the screen or unplugging it won't do anything as the GUI would still be running. You have to run it from command line.

this is definitely a good thing if you're going to run the Pi with Lightning too, as there'll be more RAM/CPU for Lightning to use (you can have more channels and route more payments)

The drawback is if you have a problem you can't solve quickly using your command-line knowledge. If you've got experience with any command line, linux/bash or not, you'll be more comfortable. But you might want to keep the GUI around for a while so you can solve problems in a more familiar way (but truthfully, you've got way more control on the command line, if you're feeling confident just go ahead, people here can help if you get stuck)

You can compromise too, you should be able to change Raspian's boot script to not load the GUI on boot, then just take note of the command (probably the startx script in /etc/X11) that loads the GUI. Then you can make sure you know you're good on the command line, but have the option of going into the GUI still available.

Last thing: get tmux (apt-get install tmux). It's for opening multiple command line windows, splitting the windows into sections etc (tmux let's you do this in headless more when normally you'd be pressing Ctrl-Alt-F keys to get extra terminal windows, tmux is way more flexible that that way of doing it). Makes working on the command line way faster and more versatile. You can configure it to automatically open up a bunch of windows on boot showing logging for bitcoind, openvpn etc
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
*If I switch off the screen while running core, is that the same as running headless or should the screen be unplugged?
No. Running it headless means that the Graphical User Interface (GUI) is not used and that it can only be controlled using the command line. The lack of the GUI means that it would take lesser resources to run it. Switching off the screen or unplugging it won't do anything as the GUI would still be running. You have to run it from command line.
*Core is synced 45% after 2 full days, is 4-5 days typical to download and sync core?
The synchronizing and verification process is rather tedious and it isn't uncommon for it to take a few days to synchronize. It's highly dependent on the hardware that you're synchronizing it on. You can try to speed up the process by optimizing the parameters like the dbcache etc.

*I noticed 2009-2015 synced rather quickly compared with later times. Is that because of increased transaction in the blocks?
Yes. The larger block means that there are more transactions to be validated individually. It would naturally be slower.
legendary
Activity: 1463
Merit: 1135
Would appreciate what config and set up you did, and other details.
Here's the consolidated efforts thus far.
I've got it set up in this case. Its quite open as far as enclosures go and it suits the form factor I had in mind.


RP 4, 4gb, Rasbian, updates  installed, created new super user and password, disabled pi,  I followed this tutorial exactly. https://www.maketecheasier.com/change-raspberry-pi-password/
Keyboard, mouse and the 4" screen connected, I ran /opt/vc/bin/vcgencmd measure_temp  and it idles at 46 degrees both with the screen on or off in ambient temp of ~22 degrees.
Tonight I'll try to get OpenVPN working as my first application.
 
Couple more questions while we're here if you don't mind.

*If I switch off the screen while running core, is that the same as running headless or should the screen be unplugged?

*Core is synced 45% after 2 full days, is 4-5 days typical to download and sync core?

*I noticed 2009-2015 synced rather quickly compared with later times. Is that because of increased transaction in the blocks?
hero member
Activity: 1568
Merit: 544
* I'm using heatsinks on all 4 chips and the main CPU also has a small fan over it.  I'm certain there's no heat issues yet.  I'll look for a tool to measure the heat once it's up and running the blockchain and report my findings.
Enter this command on the command line to read the cpu temp.
/opt/vc/bin/vcgencmd measure_temp

The pi as full node is only for its size and to use it headless if you would ask me.
My pick for a full node was this board. A bit in between.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
A laptop fits in a laptop bag. One of those small computer boxes, like mini desktops, might fit in a laptop bag. There are mini laptops can be bought used for cheap.

For running a full node, a laptop works fine, just upgrade the HDD / SSD, or use a combination laptop with SSD + external HDD. Most any laptop would generally have more processing power, more RAM, and ... some other things I'm forgetting at the moment; already comes with a screen, mouse (or equivalent) and keyboard, and can run your choice of operating system.

Yes, they'll cost more than a $35 pi, but remember with the pi you need to get other stuff as well just to make it run. Once you add 1TB for storage, might as well get an old laptop and upgrade the drive.

I see 10 or 11 inch mini laptops / notebooks for less than $200.

The rack server would sit at home or some other place semi-permanent.



Anyway ... he's got the pi up and running, so, glad to see some progress on this. Would appreciate what config and set up you did, and other details.
legendary
Activity: 3430
Merit: 3079
ahhhh

sounds like you've thought this through, carry on Cheesy
Pages:
Jump to: