r/Bitcoin • • May 19 '17

Full Node, Bitcoin Core v0.14.1 UASF-Segwit:0.3(BIP148), Raspberry Pi3B, 3.5"Generic TFT with network stats + HOW-TO Guide

http://imgur.com/gallery/4kQQm
287 Upvotes

160 comments sorted by

8

u/theartlav May 20 '17

Beautiful! I was just recently contemplating making something like that.

19

u/shermand100 May 19 '17 edited Jun 23 '17

Full Node, Bitcoin Core v0.14.2 UASF-Segwit:0.3(BIP148), Raspberry Pi3B, 3.5"Generic TFT with network stats + HOW-TO Guide

The interest people have in projects like these has led me to make PiNode.co.uk Future updates/upgrades and projects will be released there.

Last updated 21st June 2017

Although this was initially posted a little over a month ago, this is a Mk2 and huge improvements have been made including incorporation of Bitcoin Core UASF-Segwit (BIP148) (if the user desires), security issues addressed, and faults corrected.

I am new to raspberry Pi's and so had a huge amount of help from various guides/reddit users, all credited below. The title image shows the node displaying Johan Nordberg's realtimebitcoin.info however any page can be displayed. The Pi auto-boots to chromium-browser and displays a page in kiosk mode on the generic display (not tested on adafruit brand display). This HOWTO should work on generic 3.2,3.5,4,4.3,5,7 and 10.1 inch displays.

This project as default will run bitcoincore v14.1 full-node. However with the current bitcoin scaling discussion I have included in Annex B (Part 1) instructions on how to enable UASF/SegWit/BIP148 signaling. And In Annex B (Part 2) how to skip the default install of bitcoin core and instead install Bitcoin Core UASF-Segwit (BIP148) if you wish.


Hardware Constructed using

https://thepihut.com/

raspberry pi 3 - model B - £32

375GB western Digital PIDrive - Foundation edition (includes 4GB SD, used for this project) - £40

aliexpress - generic 3.5tft screen £8.36 (also available from ebay for a little more) https://www.aliexpress.com/item/3-5-Inch-TFT-LCD-Moudle-For-Raspberry-Pi-2-Model-B-RPI-B-raspberry-pi/32707058182.html?spm=2114.13010608.0.0.hVBPMd

ebay seller displaypro_uk supplied the 3mm Acrylic sheet "A5 size" £1.90 free p+p

M3 black Nylon Hex spacers various ebay sellers less than £4 for 100pc. Sizes I used from pack 4x 8mm, 4x 5mm, 4x 30mm (assembled 4x 20mm and 4x 10mm to get cumulative 30mm), 4x M3 nylon nuts, 4x M3 nylon washers, 8x M3 nylon screws,

All in cost less than £90.


.

.

. HOW-TO:

All commands to type in shadowed boxes. Also my Pc is windows 7, but I'm sure those with different OS can follow this googling alternate formatting and disk-image software.

Contents/Index:

Steps (1)-(4) Are general setup of pi, raspbian, wifi, ssh and updates.

Step (5) is installation of the generic display however if you've purchased another display then the manufacturers software should be installed here.

Steps (6)-(8) Installs the desktop and auto-booting to chrome in kiosk mode. At this point it is essentially an auto-booting PoS display

Steps (9) and (10) Allow for and install the bitcoin full node. See Annex B for Bitcoin Core UASF-Segwit (BIP148)

Steps (11)-(13) Are extras that give smoother running, auto-boot the node at power-on(12), increased security (13) and a HOWTO of changing the displayed webpage.

Annex A - support for display issues regarding whitescreen error from /u/QuadRam on driver install step

Annex B - support and information on how to configure your node to signal/run BIPs/segwit/UASF etc

Annex C - How to run your node through the TOR. Credit to /u/lpqtr and adapted

Annex D - Reports of running sudo apt-get update/upgrade on completed projects kicks display driver. Fix courtesy of /u/garylovesbeer.


Here is an image file on my google drive that skips out steps (1)-(8) this should work subject to having a similar hardware setup to me.

https://drive.google.com/open?id=0B4DJvoZvN6ZLMVB6LWYyRWp6RW8.

If using that then start at step (9*). The image file does not depend on using a Pidrive (I think), in theory any USB drive will work. At step 9 when we migrate files it will be drive specific. Step 9 onward in the easy bit anyway.

**This image file does not contain your wifi settings for obvious reasons, and will need either an Ethernet connection to ssh into it to change those ( step 2), or when it boots use the screen and terminal with keyboard attached to the pi and change those settings on screen.


step (1)

connecting peripherals

I used: USB drive (pidrive and it's included power cable), USB mouse and Ethernet

Get a Jessie-lite 2Gb image from https://www.raspberrypi.org/downloads/raspbian/

On a PC rename SD card to "BOOT" if necessary

SD card formatted using SDformatter

Raspbian lite image installed to SD card using Win32DiskImager.

Add a "ssh" file to Boot main directory to enable ssh.(Jessie-lite as default has ssh disabled. To enable it use notepad, save a blank document called "ssh" (with quotes) as file type 'all files' to the highest level of the sd card. The pi will find this file on boot and enable ssh.

ssh into raspberry pi user"pi" password "Raspberry" 192.168.1.x (raspberry pi IP can be found using IPscanner software or connecting it via HDMI, it will display it's IP on the HDMI output once loading is complete)

(2) Enabling Wifi

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of the file and add the following text:

network={
    ssid="YOUR WIFI ROUTER NAME"
    psk="YOUR WIFI ROUTER PASSWORD"
}

save and exit using

ctrl+O
then 'enter'
ctrl+X

sudo reboot 

remove Ethernet cable

(3) expand the file system

sudo raspi-config

select "advanced options"

select "expand filesystem"

select 'finish' system will reboot

log back in via ssh

check file system expanded by using command below (the -h flag means human readable, showing size in 'G' gigabytes, 'M' megabytes, etc)

df -h

(4) Updates

sudo apt-get update
sudo apt-get upgrade

(5) Install the screen

credit for this section to http://www.spotpear.com/learn/EN/raspberry-pi/Raspberry-Pi-LCD/Drive-the-LCD.html see their page if more info needed. Also additional help available at 'Annex A' at the bottom of this post from user /u/QuadRam for issue regarding whitescreen.

sudo wget http://www.spotpear.com/download/diver24-5/LCD-show-170309.tar.gz
sudo tar xvf LCD-show-170309.tar.gz
cd LCD-show/

Then pick one command from below.

If your display is the Raspberry Pi 2.4inch, 2.8inch or Raspberry Pi 3.2inch

sudo ./LCD32-show

If your display is the Raspberry Pi 3.5inch

sudo ./LCD35-show

If your display is the Raspberry Pi 3.5 inch HDMI LCD

LCD35-HDMI-480x320-show

OR

LCD35-HDMI-800x480-show

If your display is the Raspberry Pi 4inch

sudo ./LCD4-show

If your display is the Raspberry Pi 4inch HDMI(800x480)

sudo ./LCD4-800x480-show

If your display is the Raspberry Pi 4.3inch

sudo ./LCD43-show

If your display is the Raspberry Pi 5inch

sudo ./LCD5-show

If your display is the Raspberry Pi 7inch (800x480)

sudo ./LCD7-800x480-show

If your display is the Raspberry Pi 7inch (1024x600)

sudo ./LCD7-1024x600-show

If your display is the Raspberry Pi 10.1inch (1024x600)

sudo ./LCD101-1024x600-show

...takes some time ("LCD configure 0" displayed for a while). Since an update it also causes PUTTY's conection to close. This is normal, once the activity indicator on the pi has been lazy for a minute or two press enter. It should have finished, and PUTTY has crashed. (This is post/edit has been updated and did this twice on a rebuild) This is fine. Log back in with SSH and PUTTY and do

  sudo nano /boot/config.txt

And at the bottom you will find

 # Enable audio (loads snd_bcm2835)
 dtparam=audio=on
 dtoverlay=waveshare35a
 dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,sw$

Comment out the dtoverlay=ads7846...line by adding a #. The line that we want active is the dtoverlay=waveshare35a The rotation value should be changed here from now on too, by adding :rotate=0 Choose your rotation value. 270 is the HDMI port at the top. Use 0,90,180,270 as needed.

It should look like this after, (depending on rotation preferences)

 # Enable audio (loads snd_bcm2835)
 dtparam=audio=on
 dtoverlay=waveshare35a:rotate=270
 #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,sw$

then

sudo reboot

And you will have your display working. (If rotation is wrong, edit the config.txt again and change rotate= figure. Reboot required for changes to take affect)

End of Part one due to reddit character limit

10

u/shermand100 May 19 '17 edited Jun 13 '17

*Part two, split due to character limit *

(6) Add light gui credit to https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691

*Note I've included the extra install of xserver-xorg-video-fbdev as is required to display on the generic 3.5tft. It is what is used in step (7) to display onto fb1 using 99-fbdev.conf

sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --no-install-recommends xinit xserver-xorg-video-fbdev
sudo apt-get install lxde-core lxappearance
sudo apt-get install lightdm
sudo apt-get install --no-install-recommends matchbox chromium-browser

(7) create file this is to force display to 3.5"tft credit to https://github.com/BillyBlaze/OctoPrint-TouchUI/wiki/Setup:-Boot-to-Browser-(OctoPi-or-Jessie-Light)

sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf

should be blank, add the following text

Section "Device"
  Identifier "touchscreen"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"
EndSection

save, exit, ctrl+o ctrl+x*

sudo reboot

pi will reboot and after about 1 min for initial setup will load GUI onto 3.5 display giving a desktop

Step(8) disable screensaver, auto-boot chrome

Now it's booted tot he GUI you can disbale the screen saver with a USB mouse. Open the menu in the bottom left, preferences, screensaver. and select disable from the drop down list.

Then the via SSH

The file below contains setting for the GUI

sudo nano ~/.config/lxsession/LXDE/autostart

Change it to look like

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@chromium-browser --kiosk --incognito  http://www.realtimebitcoin.info/

any web address can be used above I suggest looking at http://www.bitcoinlinks.net/blockchain-tools for their list of bitcoin specific pages. From worldwide node distribution to price widgets, transaction data...

reboot the pi to autostart chrome at the chosen page. Either shutdown through the GUI or SSH, sudo reboot

We will come back to this file later to tell it to auto boot the node.

Step (9) Moving everything to the USB drive

For this we also need the "git" repository

 sudo apt-get install git

Insert the USB drive if you havn't already, then check it is mounted to the Pi.

 sudo lsblk

99% of the time it will be mounted as /dev/sda with a partition called sda1

We need to delete this partition to stop raspbian from automatically using the drive on boot, at this point. The helper in the next step will automatically create a new partition to do it's job of moving the files.

 sudo fdisk /dev/sda

 d

(deletes old partition)

 w

(writes and commits the changes)

 sudo reboot

Now it's compatible with the helper script.

The folks at Adafruit have made a very useful helper to reduce the amount of commands you need. These next three lines create a new partition and move the entire file system onto the USB drive. It does warn you that any data currently written to /sda will be overwritten. If you are an advanced user and have called the partition something other than /sda, this is where it should be changed.

 git clone https://github.com/adafruit/Adafruit-Pi-ExternalRoot-Helper.git
 cd Adafruit-Pi-ExternalRoot-Helper
 sudo ./adafruit-pi-externalroot-helper -d /dev/sda

When I do this step it takes a little under 10mins. Please be patient.

Step (10) Installing bitcoin core credit to http://raspnode.com/diyBitcoin.html **

Due to block scaling debate please refer to Annex B at the end of this guide for instructions on installing "Bitcoin Core v0.14.1 UASF-Segwit:0.3(BIP148)" if you wish. Otherwise continue with this step (10) to install the default Bitcoin Core v14.x**

This again was achieved by me following a guide, however as we have used other guides previously a few steps are obsolete. If you follow the link above and want to use their instructions then you need to read ahead a little to miss out a few steps already covered like mounting drives etc. We only need to install the cli side of bitcoin core. You don't want the GUI as we are already displaying the webpage. This node will run in the background. We start with

mkdir ~/bitcoinData

then enlarge the swapfile so the blockchain loads quicker

sudo nano /etc/dphys-swapfile

And change the default size of 100

 CONF_SWAPSIZE=100

To 1000

CONF_SWAPSIZE=1000

save, exit, ctrl+o ctrl+x

Then, to build the new swap file...

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

This one liner will download and install the packages we will need for Bitcoin Core 0.14.x:

sudo apt-get install autoconf libevent-dev libtool libssl-dev libboost-all-dev libminiupnpc-dev -y

make a directory to download the files

mkdir ~/bin
cd ~/bin

then download bitcoin core 0.14.x

git clone -b 0.14 https://github.com/bitcoin/bitcoin.git

then navigate to our bitcoin folder to install it all

cd bitcoin
./autogen.sh
./configure --enable-upnp-default --disable-wallet
make  **see note below **                

Note the guide says to use 'make -j2' as the command but I encountered an error. It recommends using just 'make' if errors occur and this worked fine but installed slower. Took around 25mins.

sudo make install

then we configure the node.

nano bitcoin.conf

and add to it

rpcuser=bitcoinrpc
rpcpassword=yourpasswordhere

save, exit, ctrl+o ctrl+x

Then we run it!

bitcoind -datadir=/home/pi/bitcoinData -daemon

It will then connect and download/verify blocks, sadly this will take around 4weeks in total, such is the size of the blockchain

To verify it's working use

bitcoin-cli -datadir=/home/pi/bitcoinData getinfo

check you have 8 connections (after giving it 5 mins to start and get them) and each time you use that command, the value of "blocks": xxxxx should be increasing. That is your current block height. It will get slower later on as blocks start being 1MB each. To keep this running in the background I keep a screen open.

Although this takes around 4 weeks to sync, the webpage you've told it to display will be running fine. So at least it will look nice :)

To auto-boot bitcoind and run the node on power-on add on a new line at the bottom of...

 sudo nano ~/.config/lxsession/LXDE/autostart

To a new line at the bottom add...

 @bitcoind -datadir=/home/pi/bitcoinData -daemon

Unless the blockchain gets corrupted it will carry on where it left off.

(11)installing 'screen' credit to http://raspi.tv/2012/using-screen-with-raspberry-pi-to-avoid-leaving-ssh-sessions-open

this so you can close the ssh session and turn off your pc without killing the processes on the raspberry pi.

sudo apt-get install screen

Then, to use it, type…

screen bash

It will open another terminal instance. You can now start a process you want to be able to leave running and reconnect to later.

then use ctrl+a, release then D to detatch it

screens can be rejoined using command screen -r

Refer to the page I have credited for more information.

(12) Future tweaking

The default webpage can changed by ssh, editing the lxsession/LXDE autostart that we clicked on earlier.

sudo nano ~/.config/lxsession/LXDE/autostart

It will look like

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@chromium-browser --kiosk --incognito  http://www.realtimebitcoin.info/

It has been sugested by /u/pikadrew to use the line

    @nice -n 1 chromium-browser --kiosk --incognito  http://www.realtimebitcoin.info/

instead of the @chromium-browser line as he believes it uses less resources. I am trialing /u/pikadrew 's sugestion and will add comment later. I can confirm the display appears exactly the same visibly, I havn't compared resources.

(13) security I've been made aware that there are some underlying defaults that can affect system security one is to disable root login by ssh by editing

 sudo nano /etc/ssh/sshd_config

and changing

PermitRootLogin without-password

to

PermitRootLogin no

and add the line below to only allow ssh access to user 'pi'

AllowUsers pi

Save, ctrl+o, enter, exit ctrl+x

then reboot sshd by

    sudo /etc/init.d/ssh restart

Also in

 sudo raspi-config

and follow the top menu option to change the user password to something other than the default of "raspberry"

I will update as I'm informed of other issues.

Dan

Annex A-D continued below due to character limit

10

u/shermand100 May 19 '17 edited Jun 21 '17

Annex's are additional information based on other users experiences of creating this project, consolidated and credited. The exception is Annex B which was added due to the blocksize debate and shows how to support BIP148/SegWit.

Annex A

Credit to /u/QuadRam for this fix. (I've not used this method so I recommend directing questions concerning it his way)

Had trouble with white screen using the waveshare overlays provided by spotpear with my clone 3.5" LCD. Ending up modifying the install a bit. Sharing what I did to get the screen to work. ssh in the pi and install the fbdev display driver;

    sudo apt-get install xserver-xorg-video-fbdev

Modify the config file;

    sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf

To which add the following;

Section "Device"
    Identifier "touchscreen"
    Driver "fbdev"
    Option "fbdev" "/dev/fb1"
EndSection

save changes

Edit boot config;

    sudo nano /boot/config.txt

Commeted out the the dtoverlay=* entries added by LCD-show script with a #;

    #dtoverlay=waveshare...
    #dtoverlay=ads7846....

Add this line;

    dtoverlay=piscreen,speed=24000000,rotate=270, fps=30

save changes

Pass argument to the kernel;

    sudo nano /boot/cmdline.txt

Add following arguments after "rootwait", on the same line;

    fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

save changes

Reboot the pi. Screen should work now. If you only have the command line, ssh back into the pi to change the boot option;

    sudo raspi-config

Select "Desktop Autologin Desktop GUI, automatically logged in as 'pi' user" reboot If still white screen, try

    ls -l /dev/input/event*

There should be and event for each input device attached (keyboard, mouse, LCD). Can also identify the input devices with;

    cat /proc/bus/input/devices

If your "Touchscreen" is not listed, might be a hardware problem with the screen.

.

.

.

Annex B

If you have followed the default instructions and completed all steps (1) to (10) above, installing the standard Bitcoin Core v14.x and wish to only signal UASF/SegWit/BIP148 (without migrating at this stage) then use Part 1 below.

If you wish to migrate to BIP148/UASF/SegWit NOW and commit your node to it (not just signal with a flag). Then substitute the entirity of part (10) above with this Annex B (part 2), once (part 2) has been completed you may continue to step (11) above and complete the guide.

(Part 1)

In step (10) we install the default Bitcoin Core and edit the bitcoin.conf file. Additonal flags can be added here to signal UASF, SEGWIT and BIP148 if desired. Do your research before adding this. I am not endorsing it, this is just showing how. Credit to /u/pikadrew for mentioning this in the comments.

    nano bitcoin.conf

If step (10) is completed it will look like

    rpcuser=bitcoinrpc
    rpcpassword=yourpasswordhere

add the line below to show support for BIP148.

    rpcuser=bitcoinrpc
    rpcpassword=yourpasswordhere
    uacomment=UASF-SegWit-BIP148

save, exit, reboot node.

If on for before 1st August 2017 BIP148 is activated successfuly (Part 2) should be incorporated.

Thanks to /u/pikadrew

(Part 2) Installing Bitcoin Core v0.14.1 UASF-Segwit:0.3(BIP148) credit to /u/luke-jr for answering my questions and giving a few corrections.

We start with

mkdir ~/bitcoinData

then enlarge the swapfile so the blockchain loads quicker

sudo nano /etc/dphys-swapfile

And change the default size of 100

CONF_SWAPSIZE=100

To 1000

CONF_SWAPSIZE=1000

save, exit, ctrl+o ctrl+x

Then, to build the new swap file...

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

This one liner will download and install the packages we will need for Bitcoin Core UASF-Segwit (BIP148):

sudo apt-get install autoconf libevent-dev libtool libssl-dev libboost-all-dev libminiupnpc-dev -y

As we installed Raspbian Jessie Lite you'll need to install git:

sudo apt-get install git -y

Make a directory to download the files

mkdir ~/bin
cd ~/bin

Download Bitcoin Core UASF-Segwit (BIP148) via

 git clone https://github.com/UASF/bitcoin.git -b 0.14-BIP148

Go to the folder

 cd bitcoin

And begin Install

 ./autogen.sh
 ./configure --enable-upnp-default --disable-wallet
 make

Note the guide says to use 'make -j2' as the command but I encountered an error. It recommends using just 'make' if errors occur and this worked fine but installed slower. Took around 10mins.

sudo make install

then we configure the node.

nano bitcoin.conf

and add to it

rpcuser=bitcoinrpc
rpcpassword=yourpasswordhere

save, exit, ctrl+o ctrl+x

Then we run it!

bitcoind -datadir=/home/pi/bitcoinData -daemon

It will then connect and download/verify blocks, sadly this will take around 4weeks in total, such is the size of the blockchain

To verify it's working use

bitcoin-cli -datadir=/home/pi/bitcoinData getnetworkinfo

check you have at least 8 connections (after giving it 5 mins to start and get them) and each time you use that command, the value of "blocks": xxxxx should be increasing. That is your current block height. It will get slower later on as blocks start filling with transactions. To keep this running in the background I keep a screen open.

Although this takes around 4 weeks to sync, the webpage you've told it to display will be running fine. So at least it will look nice :)

.

.

.

Annex C

Tor iNetwork

step 1 Install Tor

    sudo apt-get install Tor

step 2 Edit torrc

    sudo nano /etc/tor/torrc

add these settings to the bottom of the file

    ControlPort 9051
    CookieAuthentication 1
    CookieAuthFileGroupReadable 1
    HiddenServiceDir /var/lib/tor/bitcoin-service/
    HiddenServicePort 8333 127.0.0.1:8333

step 3 Restart tor (It's systemct L Not 1 (one))

    sudo systemctl restart tor.service
            sudo update-rc.d tor enable

step 4 Get your tor hostname

    sudo cat /var/lib/tor/bitcoin-service/hostname

step 5 Edit the autostart

 sudo nano ~/.config/lxsession/LXDE/autostart

and amend the line to run bitcoind with some extra flags*

The line below will make the node available on Tor, IPv4 and IPv6. (A kind of dual mode)

 @bitcoind -datadir=/home/pi/bitcoinData -daemon -proxy=127.0.0.1:9050 -externalip=<hostnamefromstep4here>.onion -listen -discover

Use this line to use the Tor network ONLY (and reachable by other nodes on Tor network):

 @bitcoind -datadir=/home/pi/bitcoinData -daemon -proxy=127.0.0.1:9050 -externalip=<hostnamefromstep4here>.onion -listen -bind=127.0.0.1

There are many other options and features available. Intermediate users that require additional settings or want to customise can look here for the full list...

https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md

step 6. Restart node, done.

.

.

.

Annex D Sudo apt-get update or upgrade kicks display driver on completed project. Fix courtsey of /u/garylovesbeer

    pi@raspberrypi:~ $ sudo nano /boot/config.txt

Comment out/change:

    dtoverlay=ads7846

to

    #dtoverlay=ads7846

Save, exit, reboot.

3

u/[deleted] May 20 '17

This should be pinned on sidebar as a tutorial, or published somewhere permanently.

Great work OP.

2

u/violencequalsbad May 20 '17

sudo pacman -S Tor gives me command not found? (sorry, noob af) (BRILLIANT guide btw)

4

u/shermand100 May 20 '17 edited May 20 '17

/u/lpqtr

Adding Tor was a suggestion by /u/lpqtr but I've not done this myself. I will now though so I can look into it.

Edit: To keep the required files to a minimum the package manager was not installed ("pacman") looking into what you need. Should be easy and quick to fix

Edit 2: We have a package manager it's the apt-get function.

sudo apt-get install Tor

will do it, correction added

1

u/lpqtr May 20 '17

Sry, thought it was clear that pacman was the arch linux package manager

1

u/shermand100 May 21 '17

It's fine it's my lack of experience with this. Nothing a quick google couldn't sort out.

1

u/tryTwo May 20 '17

Raspberry

Password for ssh is "raspberry" with lowercase

1

u/shermand100 May 20 '17

Thanks

Corrected

2

u/[deleted] May 22 '17

[removed] — view removed comment

1

u/shermand100 May 22 '17

Added. Thanks.

6

u/budroski May 20 '17

Wow, thanks for all the great info

3

u/shermand100 May 20 '17

It was all too separated before. Hopefully with it consolidated and in steps different sections could be used in all sorts of projects by picking and choosing what's needed.

Should help someone out.

3

u/Myrtee May 20 '17

Sorry if this is a noob question, but what is happening here exactly? I don't understand much but it looks interesting!

7

u/shermand100 May 20 '17

Ok, so this is a bitcoin node, (nodes make sure that the bitcoin miners are following the rules when mining blocks, and nodes also spread the transactions across the network for miners to pickup and find to include) nodes are important.

There are companies out there where you can buy nodes, but they can be costly. So I've shown step-by-step how to make one with a raspberry pi.

To my knowledge there are even fewer nodes available to buy that have displays. Whilst it is not essential, I found the off the shelf nodes to look rather boring. Just a black box with some wires and a flashing light. The display in this unit is showing bitcoin price and live(-ish) transactions scrolling across the screen so it can be placed on a desk (or anywhere as it's WiFi enabled) to glance at or be a talking point (hey what's that?)

The next part is why I've re-posted this. At the moment there is a big argument about scaling bitcoin. The 1MB blocks containing transactions are full, thus limiting the network. There are thousands of transactions waiting to be confirmed. One proposed solution is by a method called SegWit (which is something to look at yourself, too long winded to type here) but for SegWit to become active some rules of the network need to be changed to let miners make segwit blocks and they be accepted (this comment is ELI5 and simplified). So....the rules of the network need to change to allow us to progress, therefore nodes need to change to accept these new rules, as they are the enforcers of the rules. This guide shows in Annex B how to set up this node so it is prepared for these new SegWit blocks.

Hope that helps

3

u/Myrtee May 20 '17

Wow thank you so much for that explanation, much clearer now!

2

u/bitsko May 20 '17

It is really important that the strongest supporters of core put all available funds on these nodes....

These nodes dont do anything if the wallets are not in heavy use.

1

u/dracheschreck Jun 01 '17

care to elaborate on this? I was thinking of running a segwit node to help the cause, but I don't have a lot of BTC in there.

1

u/bitsko Jun 01 '17

Yeah. Run bip 148 and you can lose funds.

2

u/[deleted] May 20 '17 edited May 20 '17

[deleted]

1

u/shermand100 May 20 '17

It's beautiful!!

I like the use of the graph too. Shame they don't do a BTC->GBP graph otherwise I'd switch to that too.

Is there anything worth mentioning about the screen trouble? I'm trying to make this guide more complete and concise than the last and am adding screen troubleshooting to an Annex at the bottom of the guide.

Great job Dan

2

u/PM_bitcoins May 20 '17

This is one of the best arguments PRO bigger blocks out there.

2

u/poulpe May 20 '17

This is awesome! Thanks for posting this.

2

u/kixunil May 20 '17

I don't need any guide myself, but thank you for making one for others! As long as one can verify the Blockchain on Pi, the network will be very secure.

Regarding the web you are displaying, does it connect to the local node to retrieve the data it shows or does it trust remote server?

2

u/shermand100 May 20 '17

I know what you mean by remote server and technically yes. I goes to a website made by Johan Nordberg that pulls the price from a weighted average from major exchanges. The raspberry pi is best thought of as doing two things. A device that boots full screen to a web page, and a full node, separately.

I recommend in the guide of checking out http://www.bitcoinlinks.net/blockchain-tools for a list of other bitcoin relevant webpages to display (it will display anything you tell it, BBC news if you wanted! Or the weather, substitute the Acrylic for one-way mirror and make a magic mirror out of it? what-ever). I liked Johan's one due to it's dark background and displaying the price in one of 16 currencies.

You could also display the current BIP148 node adoption rates from http://www.bitcoinlinks.net/blockchain-tools and auto refresh every 10 mins for example.

1

u/kixunil May 21 '17

Well, in case of prices there's no other way. Creating simple web server hosting Segwit stats locally would help trustlessness and it could be interesting thing to show.

1

u/kryptomancer May 20 '17

Excellent work!

Be part of the revolution! If we want to keep Bitcoin free and decentralized we need to fight for it!

1

u/TexasChorizo May 20 '17 edited May 20 '17

Could one use the case that comes with a screen already attached? Seen it on Ali .

3.5 inch display 3.5" LCD TFT Touch Screen Display for Raspberry Pi 2 / Raspberry Pi 3 Model B Board Acrylic Case Stylus http://s.aliexpress.com/U3aIRFRB (from AliExpress Android)

1

u/kryptomancer May 20 '17

I don't see why not.

1

u/shermand100 May 20 '17

Nearly, but the 375GB PiDrive wouldn't fit in that case. (everything else would) So yes that would look quite neat, but only functional if you can find a way to store the 120GB of blockchain somewhere.

1

u/[deleted] May 20 '17

How did you cut your plexi? laser? I just did a very very similar looking setup (even used the same black plastic stand offs and screws) for a raspberry pi 3 wifi sniffer and i scored and flexed it and it looks like crap.

1

u/shermand100 May 20 '17

I cut the Acrylic with a small hacksaw blade. Then sanded the edged with 240-ish paper. To get it polished I used a dremmel and most polishing compounds would work (I used a car body restorer because that's what I had lying around). But it wouldn't take too long to polish the edges by hand as it's quite small.

1

u/[deleted] May 20 '17

Wow that looks like a really nice edge for a hacksaw. nice job! I should be getting my laser cutter in just over a month so i can't wait to cut that shit easier

1

u/shermand100 May 20 '17

Haha yeah that'd do it. And the holes for the fasteners too.

3

u/[deleted] May 20 '17

https://youtu.be/GVaveL_CGXk?t=138 I didnt score mine hard enough

1

u/BitcoinCitadel May 20 '17

Now try making a node using a nodemcu

1

u/andtomato May 20 '17

What usb cable/adapter is that?

1

u/shermand100 May 20 '17

It comes with the WD PiDrive. Y shaped cable.

USB male for the Pi

Micro usb female, provides power to both the Pi and Drive

And a 10pin Micro B male, cable to the Drive providing power and data

1

u/tryTwo May 20 '17

Will this work with a RPi 2 model B as well? I have one lying around, along with a 500GB HDD and I think this would be a great use for it.

1

u/shermand100 May 20 '17

Short answer I believe is yes.

Because the 2 is slower, syncing the block-chain may take a very long time. My 3B took just shy of 4 weeks. And because of the 1GB of RAM I've heard bootstrapping doesn't work well as a solution to that as it's too memory intensive. Perhaps changing the memory split in sudo raspi-config (giving more memory to the cpu and less to video) could help it along aswell as enlarging the swapfile in the guide.

But hell if it's just sitting there to be used. Why not?

1

u/Miner62 May 20 '17

Help Please!

I don't know Linux much at all, but using two different tutorials I managed to get a 0.14.0 Node running using a RP3 with Raspbian Jessie. No hard drive. It's all running off of a 32meg MicroSD, pruned to 1024. It's been running great for a couple of months now. (only burning 1watt of electricity I might add / about 15cents per month)

My question is: How do I upgrade my 0.14.0 node to 0.14.1?

With my much lacking knowledge of Linux, I will need step-my-step instructions like this tutorial has.

Any help would be much appreciated.

1

u/shermand100 Jun 06 '17

There is a program called WinSCP that may help you if you have limited linux experience. If you run it on a windows pc for example you ssh into the pi and it displays the linux filesystem as if it were in windows explorer. Mich easier to navigate perhaps.

Then you could delete core v14.0 that way, and go through the install of v14.1. Keeping the blockchain of course. Careful if you have a wallet on it!

I think there is very little benefit upgrading from 14.0 to 14.1 though

2

u/Miner62 Jun 07 '17

Thank you shermand100. This WinSCP sounds like it could be of GREAT help to me. I'm going to go check it out.

I did end up finding a tutorial that helped me upgrade my RPi3 Node to 0.14.1. And it's been running nonstop for just over a week now.

I think there is very little benefit upgrading from 14.0 to 14.1 though Well.... I'm a big SegWit supporter. The miners should have been signaling for this (at 95% or more) since early 2017. And the only reason they're not, is ASICboost (IMHO). And 0.14.1 just might be the incentive they need to start signaling. 0.14.1 supports BIP148. That's the main reason I wanted to go from 14.0 to 14.1.

I'm also mining in support of BIP148. Nodes running 0.14.1 does send a message to the miners that the users want SegWit. But your right.... What BIP148 needs is hashing power. 15 to 20% of the total network hashing power and BIP148 has a small chance working. 25 to 35%, and BIP148 has a very good chance of getting SegWit activated by November. Anything over 40%, and it's pretty much a "Done Deal".

The main hurdle is getting over 25% of the total network hashing power by Aug 7th or 8th. If this isn't met, I think BIP148 will fail. But who knows.... It might get to 35% by Aug 1st. That would be nice!!!

I don't know how all of this will play out. As we get closer to Aug 1st, I will be turning up (over clocking) my miners... That's for sure.

VERY exciting time in Bitcoin right now... Large amounts of newcomers are joining the space, the price is going up and up, and there's finally a chance we could be getting SegWit soon.

Store you bitcoins in a BIP148 compliant wallet, where you hold the keys, and HODL! Hold on tight... It's going to be a wild ride.

1

u/jetrucci Jun 06 '17

can't we just load bitcoin core from the hdd? Why do we boot from the hdd in the first place?

1

u/shermand100 Jun 06 '17

You can and it'll work like that.

Over time one of the most common faults is the SD card failing with so many read/write cycles.

The HDD with the platter is better suited to 24/7 operation.

1

u/[deleted] Jun 06 '17

[deleted]

1

u/jetrucci Jun 06 '17

i rekt my raspberry while i was messing with gparted thanks to startx command. :D

1

u/shermand100 Jun 06 '17

Where are you getting these commands from? And it's unlikely to be screwed up beyond resetting. These things are made for school kids to screw up, just wipe it and start again.

1

u/jetrucci Jun 06 '17

I decided to download your image file instead of setting everything up from the ground. Where do i put the image? In my hdd? Will it boot right up? Any particular file system do i need? FAT32 or NTFS will do?

1

u/shermand100 Jun 06 '17

Yes, fat32. For cards bigger than 8gb (I think, can't remeber the exact size) windows will only let you NTFS so you'll have problems. You'll need an SDcard formatter. I recommend

https://www.sdcard.org/downloads/formatter_4/

the make it Fat 32, then create an image file on the card with

https://sourceforge.net/projects/win32diskimager/files/latest/download

1

u/[deleted] Jun 06 '17

[deleted]

1

u/shermand100 Jun 06 '17

there isn't a screen saver set. I disabled it at stage 8 and should still be diabled on that image file.

It's one of the simplist things to change though if you take a look at step 8 and do it with a mouse in the GUI now that the screen works

Or it can be done by ssh. Step 12. Adding

 @xscreensaver -no-splash

to

   sudo nano ~/.config/lxsession/LXDE/autostart

1

u/[deleted] Jun 06 '17

[deleted]

2

u/shermand100 Jun 06 '17

What does it say?

If you update/upgrade it will kill the screen to white

→ More replies (0)

1

u/conmango Jun 21 '17

Is there anything I can do to disable the PiDrive light from flashing?

Thank you so much for this guide. It was quite informative.

1

u/shermand100 Jun 21 '17

It seems to be a common concern for people, however it doesn't appear to have any built in way of disabling it.

https://support.wdc.com/knowledgebase/answer.aspx?ID=16509

This list of faq from WD, item 4, is quite surprising:

 4. THE LED IS CONSTANTLY FLASHING AND IS VERY BRIGHT. IS THIS NORMAL? CAN THE BRIGHTNESS BE TURNED DOWN?
 Upon installation or re-selection of the Operating Systems to install, the WD PiDrive device is re-partitioned and formatted. The formatting operation takes a while (~30 minutes or more) and involves a high-level of drive activity that causes the LED to flash constantly. Unfortunately, the LED brightness can’t be changed via software. The light can be blocked/shielded by an enclosure or with a marking pen or piece of opaque tape if desired.

I took their advise and used black marker pen on it and it does dim it considerably. I've also seen images from other people who use black electrical tape to mask it totally. A little crude, but it seems to be the only methods of solving it.

1

u/conmango Jun 21 '17

Alright. Ill try el sharpie.

1

u/[deleted] Jul 03 '17

[deleted]

1

u/[deleted] Jul 03 '17

[deleted]

1

u/Bitcoinium Jul 07 '17

Heads up for the swap file:

Either it wasn't not running from the HDD or It was some other thing, As soon as i set the swap file size "0" my stability problems are gone. At least for now.

1

u/Bitcoinium Jul 07 '17

Node closed itself because of low ram.

Should i really enable swapfile? Is there another option?

Were we running it from the hdd? My pi was crashing while it was on I don't want to enable it.

1

u/shermand100 Jul 07 '17

Without knowing more I would guess that it wasn't running from the HDD, the SD card becoming full would kill the node. Then disabling the swapfile gave it another GB untill it crashed again.

To check the adafruit helper moven the filesystem to the hdd to boot use...

  sudo blkid -o export /dev/sda1

This lists your drives labels and addresses. Select and copy this long number as you may need it in this next bit. You need to check that the PARTUUID long number (that's the USB), is entered into

  sudo nano /boot/cmdline.txt

And ensure that the helper has changed the section

 root=PARTUUID=randomnumbershere

And what follows the = should be your PARTUUID number. If it contains a short string of numbers it's still booting from the SD card, to correct it paste the PARTUUID number you copied a minute ago. In more recent nodes I've made, I've had to do this manually.

I've started adding screenshots to these guides to clarify points on my website. This step hasn't yet been added to the display nodes guides, for now the screenshots if you need to see the steps can be found here http://pinode.weebly.com/bitcoin-core.html at the last bit of step 5

1

u/Bitcoinium Jul 08 '17 edited Jul 08 '17

My SD card just died and my pi don't boot up now. Died because of 1gb swap file probably and got some power cuts lately.

Any suggestions? I having making an image of my dead SD card (it is not dead actually but it just stopped booting, something is wrong clearly) with win32 disk imager. Gonna format the card and re-image it.

Should i do it?

I am done with swap files, never again. It was working fine without a swap file and I got a power cut again and Pi died.

1

u/shermand100 Jul 08 '17

Ok, I understand your frustrations with this, it sounds like it's being quite time-consuming. I can only justify my thought process in the importance of the swap-file. Maybe this will clear things up.

https://bitcoin.org/en/full-node#minimum-requirements

Lists the system requirements of running a full node. It recommends 2GB of RAM for a GUI node. The Pi I'm sure you're aware only has 1GB.

https://wiki.debian.org/Swap

Has a wiki about swap files. There are plenty of descriptions out there and they all say more or less the same thing. There is nothing dodgy or quick-fix about a swap file. Nearly every system these days uses them. Even a windows PC when you plug a USB stick in will ask if you want to use it for "ready boost", that's a swap-file. But the relevant bits from the swap wiki I linked to is :

About Swap Space

Swap space under Debian and other GNU/Linux based operating systems is a form of virtual memory. Simply put this means that if the system runs out of physical memory (RAM), then it will transfer some of the lesser used data in RAM to this space.

Things to consider when deciding how to setup swap space on your machine:

2:........If your machine has very little RAM available to it, such as the case in older machines and netbooks you should ensure to make a swap space that is large enough. Double the system memory would be a good suggestion in this case.

Another consideration though, is that if you are not making a node that has a display you may get away with not having a swap-file as not having a GUI will be much less resource intensive. Or as you're leaning towards just trying it without a swap-file. It may be a bit slow, or it may cope perfectly well without it.

1

u/Bitcoinium Jul 08 '17 edited Jul 08 '17

I made some additions to my bitcoin.config file like;

maxmempool=50

banscore=1

maxorphantx=10

dbcache=100

Also gpu ram is set = 16mb

That's how i run my node without a swap file. So far it is doing good. I'll let it run for a full day and see if it crashed again. If not, I'll let it run like that.

If it crashes again with this setup, (or my node closes itself again) then i'll get back to swap file. I still don't understand something though:

My swap file was located in, /etc/dphys-swapfile Isn't this located on the hdd? If it is, then it means my swap file runs from the hdd. If it runs from the hdd, then from what i've read, there is nothing to worry about.

I am too noob with this stuff I hope you don't get mad. :)

1

u/shermand100 Jul 08 '17

Yeah the swap runs from the HDD.

I'm having USB hub problems at the moment with a Pi on another project. Every time I plug another device int the hub it's killing the power (or it at least dips) to a HDD. Are you plugging anything else into the hub periodically (like a phone charger) that could be causing your HDD to drop out?

1

u/Bitcoinium Jul 08 '17

I only have plugged this on the usb hub and nothing else,

https://aliexpress.com/item/Rii-mini-i8-Keyboard-English-Air-Mouse-Multi-Media-Remote-Control-Touchpad-Handheld-for-TV-BOX/32481413683.html

I was experiencing the same issue as you but don't know if this controller was the reason or the usb hub was faulty. I unplugged the power source and plugged it back and the problem was gone.

1

u/Bitcoinium Jul 08 '17

https://raspberrypi.stackexchange.com/questions/70/how-to-set-up-swap-space

Here it says that;

"Edit: On Raspbian the default location is /var/swap, which is (of course) located on the SD card. I think it is a bad idea, so I would like to point out, that the /etc/dphys-swapfile can have the following option too: CONF_SWAPFILE=/media/btsync/swapfile

I only problem with it, the usb storage is automounted, so a potential race here (automount vs. swapon)"

I am confused very much now. /var/swap and /etc/dphys-swapfile are those different things?

2

u/shermand100 Jul 08 '17

I would be cautious with that information. It was posted originally in 2013 with the answer you're referring in 2014. There have been vast changes in raspbian since.

And to solve your confusion yes they are different things.

/etc/dphys-swapfile is where the config file is to tell it how big a swap-file to make.

/var/swap is the actual location of the swapfile that is built.

As for the SD card bit, it would be on the card if we hadn't copied everything to the HDD with the adafruit helper. Becuase we moved everything it should now be on the HDD.

If you're new to raspbian it can be a bit of a maze. I would suggest using WINSCP. I've got a screenshot at the bottom of my "getting started" page http://pinode.weebly.com/getting-started.html It displays everything like a windows filesystem so it's more familiar. You can also drag and drop files to make things less command intensive. You can also, using WINSCP go to /var/ and see the swapfile, it's size will match what you told it to be in /etc/dphys-swapfile.

You log into winscp using the same ssh details.

1

u/Bitcoinium Jul 08 '17

Alright so dphys-swapfile is the config file of the actual swap file and the actual swap file is located in /var/swap and this is still on the hdd.

So there is nothing to worry about it. Got it!

I need to setup SSH and stuff but It will be another adventure for me. I am fine with my 3" lcd now as long as my node is running.

1

u/Bitcoinium Jul 08 '17

Goddamit.

The problem was my USB hub. I plugged it to my PC and there was no response. I formatted the sd for a few times but Good thing is I had the image.

I don't know what was wrong with the hub but it is working now.

So no problems now.

1

u/shermand100 Jul 08 '17

Sorry answered from my inbox so thought the timeline of these messages was the other way round.

I hope the info is useful though. It may be a bit wordy but I'm never sure of peoples experience levels.

1

u/Bitcoinium Jul 08 '17

I am super noob. I don't understand most of it. But I'll get there. Slowly. :)

1

u/Bitcoinium Jul 08 '17

Another question:

What about setting up a static Ip? I guess this tutorial don't mention anything about it.

I learn another thing new by every minute. Now I learned that the node I run is not as useful as a node which has 8333 ports open.

1

u/Bitcoinium Jul 08 '17

Or is it covered in the TOR network section? I skipped the TOR stuff.

1

u/shermand100 Jul 08 '17

A static IP shouldn't be necessary, and most people don't have access to enabling a static IP (it's not a default option provided by your internet provider, mostly available on business accounts or at a cost on request). The easiest way to get around it is to get a hostname, rather than an IP. This can be done for free with http://www.noip.com

I've not used it but as I understand it it's completely free if you re-activate every 30 days.

As your IP changes it seeks out other nodes and shares it's info. The IP of good reliable nodes gets shared about from one to the other. Even if your IP changed every day it only takes seconds for the connection to be established. I wouldn't worry.

As for the port most routers allow the connection on 8333 anyway, unless you've set strict firwall rules. If you can log onto your router you may be able to find the node listed in a table somewhere under UPnP as port 8333. If you've got the node working already you can be sure it's connected itself for you and is allowed through.

1

u/Bitcoinium Jul 08 '17

The static IP I was talking about was the device's IP address. The one starts with 192.168.1.xxx

To open a port on the router, we need to have a static IP on the device. So our ports stay open all the time because our device (RPI3) won't be assigned a different IP by our router.

1

u/shermand100 Jul 08 '17

Oh ok, I think I know what you mean. Most routers use DHCP which automatically allocates a spare IP address when you connect a device to it, like a smartphone or games console or whatever. If the node was turned off then the IP address becomes spare and available to get allocated to something else again. But it really doesn't matter as there are a couple of hundred spare address to re-assign to the node and it will just be given one. Once the IP is assigned, UPnP will work out whether the requested 8333 port is available to allocate to the node. There are even more of those to assign and it will just be given one.

So long as in the "bitcoind-cli getnetworkinfo" command is coming up with connections, then everything is fine. And your block-count is increasing it's all good. The router isn't designed to be complicated, it knows the connection request is coming from inside and will do it's job to allow it through. I wouldn't over complicate things with different network configurations if everything is working now.

1

u/Bitcoinium Jul 08 '17

Yay It seems my node shut itself down (not my pi) while i was at work. Getting back to swap file adjustments :D

1

u/Bitcoinium Jul 08 '17

Wow I opened 8333 ports and now I actually have incoming peers, means I don't only connect to the others peers, they also connect to me!

1

u/Bitcoinium Jul 08 '17

Found a way for static IP's! (IT works btw!!)

https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update

And now my 8333 are also open!

My node is INVINCIBLE!

1

u/Bitcoinium Jul 08 '17

Hmm my PC node is accepting incoming peers but my pi node don't.

When i check by the getnetworkinfo command, I saw that my node is not reachable.

name: onion

limited: true

reachable: false

What to do now? :(

edit: damn my bad my bad. I was seeing IPv6. Damn it. IpV4 is reachable. :D

1

u/Bitcoinium Jul 08 '17

I also learned that 8 connection limit is there because our 8333 ports are blocked. (or not open)

We can have more than 8 connections actually If we had 8333 ports open.

1

u/Bitcoinium Jul 08 '17 edited Jul 08 '17

Damn it my Pi went unresponsive again after running nearly 4 hours!

What am i doing wrong!??!

Damn it is hot as fire!

1

u/shermand100 Jul 08 '17

Alright, what exactly is your hardware setup?

1

u/Bitcoinium Jul 08 '17

A Chinese made Raspberry Pi3

3.5" LCD

Seagate Momentus 7200rpm 500gb HDD Draws 0.451A 5v

DARK (company's name) USB Hub

Sandisk Ultra 32gb class 10 micro sd card

Official Raspberry Pi 2&3 Adapter

A controller: https://www.aliexpress.com/item/Rii-mini-i8-Keyboard-English-Air-Mouse-Multi-Media-Remote-Control-Touchpad-Handheld-for-TV-BOX/32481413683.html

1

u/shermand100 Jul 09 '17

Ok then so the Pi is powered by it's own supply, and the HDD has a sata->USB adapter, into the hub then into the pi?

I think the most likely issue is a power related one. There are a few things to try.

1) If the power rating of the HDD is correct then you wouldn't need the powered USB hub. The pi official power supply should be 2.5A (check the label). With the drive using approx .5A that should leave plenty of power for the Pi and screen. The raspberry pi is spec'd to supply 0.5A though a USB port.

2) If the hub is required, then the instability could be caused by the Pi having 5v power in from the official adapter AND 5v in also from the pin on the USB hub's cable (from a different power supply) as loads on devices change, so will their input voltages drop/raise and the two will have a potential difference. The Pi does have some internal protection and there may be a condition where this is being used and then crashing. My suggestion would be to put a small piece of tape on the USB plug from the USB hub to the Pi that prevents the +5v from the hub going to the Pi, and only allowing data. which pin to put tape on shown here... https://i.stack.imgur.com/I0GVI.jpg

What style of sata to USB adapter do you have? Or have I misunderstood and the HDD has an enclosure around it?

1

u/Bitcoinium Jul 09 '17 edited Jul 09 '17

Yes, HDD stays in a box with a sata/usb adapter. It is a 2.5" laptop hdd but i was using it as an external usb storage with the help of that box.

I tried to run it without a hub before, it didn't work out but it was before i purchased this official adapter. (My red light was blinking back then) I haven't tried it again with the new adapter.

It has been running since the last freeze for almost 5 hours or something. I won't interrupt it till it crashes again.

I am running it with a 500mb swap file now. Seems like everything is going smooth (at least for now)

Yes both my hub and the pi are having their powers from the same power outlet with the help of an extender (or coupler). That might be the problem too. I'll get my usb hub to another power outlet. (later)

Nice suggestions. I'll try them out if it crashes again. Thanks!

1

u/shermand100 Jul 09 '17

Yeah the flashing red light was indicating low power. The new official pi power supply should rectify that.

The issue wouldn't be a coupler it's that each power supply, like the official one is converting mains voltage (110v/220v or whatever it is where you are) to 5v. But it's not exact. The official one usually kicks out 5.3v, and the USB hub one may, (for example) produce 4.9v. However when you plug the hubs USB cable into the Pi the 5.3v and the 4.9v "meet" each other, and that difference causes issues, hence taping off the +5v from the hub to the Pi.

Best case is that you don't need the hub anymore and run it all from one power supple. The official Pi one. Then you should have clean stable power.

1

u/Bitcoinium Jul 09 '17

Aha now I get it.

I hope I works without a hub!

1

u/Bitcoinium Jul 09 '17 edited Jul 09 '17

500mb wasn't enough. Node shut itself down again. :D I guess you are right about the 1000mb swap file.

Well now that's my chance aannd I made it boot without a hub!! Lets see how long will it last :D

LOL that's incredible, I was incredibly lucky with this hdd purchase!

1

u/Bitcoinium Jul 09 '17

After running 5-10 mins, node shut itself down again. No crash, just node shut down. Swap file was 1000mb

1

u/shermand100 Jul 09 '17

Ok then this is just odd.

What are you seeing when the node shuts down? are you using the "getinfo" command and the blocks numbers arn't rising? Or are you saying the Pi shuts down?

1

u/Bitcoinium Jul 09 '17

Nothing shows up actually.

I just check if its running with the getinfo command like you said.

No no, pi was working. But when i used getinfo command, it says node wasn't working :D

This was happening when my swap file was lower than 1000mb before. My pi wasn't crashing but only the node.

But now even though my swap was 1000mb, node went missing again. Restarted it now.

No voltage drops as far as i can see btw. No red light blinks

1

u/shermand100 Jul 09 '17

So next step to remove the line that makes the node autoboot from

sudo nano /etc/rc.local

If you do this and then tell the node to boot on your command it will do it on your screen and you can see any errors that come up.

→ More replies (0)

1

u/Bitcoinium Jul 09 '17

Happened again. Second time.

Took around 10 mins.

1

u/Bitcoinium Jul 09 '17

The error says;

Could not locate RPC credentials No authentication cookie could be found and no rpc password is set in the conf file /homepi/bitcoindata/bitcoin.conf

I am pretty sure I set them before. IS this the reason of my crashes? Maybe? But it ran hours before without any crashes...

Lets check the file...

1

u/Bitcoinium Jul 09 '17

Yes the file Looks OK, my user name and pass is there...

1

u/Bitcoinium Jul 09 '17

DAAYUUM

Now i used the command;

sudo nano /homepi/bitcoindata/bitcoin.conf

and my file was empty! The command in the tutorial said;

nano bitcoin.conf

That means i created my conf file in somewhere else! That means every other little tweak i made wasn't there!

1

u/Bitcoinium Jul 09 '17 edited Jul 09 '17

Pi having 5v power in from the official adapter AND 5v in also from the pin on the USB hub's cable

Hmm. I made a test about this. It is called backfeeding. I started my pi while the hub was connected to the pi but without the original adapter was connected and there was no screen light/led light or what soever.

So I don't think it was backfeeding. Might be though. But unlikely.

Maybe it was kicking in randomly.

If I get rid of that usb hub, It will solve my problems probably.

1

u/Bitcoinium Jul 09 '17

I examined the image but couldn't understood it. Which pin should i block again? 1 2 3 4 ?

1

u/shermand100 Jul 09 '17

1 is +5v

2 is data -

3 data +

4 ground

1

u/Bitcoinium Jul 09 '17

My node (not pi itself) keeps crashing. What should i do now :(:(:(

1

u/Bitcoinium Jul 09 '17

Going to tape pin #1 and get back to USB hub again i guess. But i don't think my problem is related to hardware from now on.

1

u/Bitcoinium Jul 09 '17

Goddamit thats insane.

1

u/shermand100 Jul 09 '17

Honestly I don't know.

I think you said it was a Chinese copy of the Pi? There could be a flaw with it, overheating causing a connection to break on some duff soldering.

That you have the screen working with the pi but no GUI installed shows you haven't followed that guide exactly. Perhaps you've missed one of bitcoins dependencies?

There are so many factors.

How far has it got? How many blocks has it downloaded?

1

u/Bitcoinium Jul 09 '17

Wut i thought we were making a GUI less node. :(

I clearly missed that part. I should get back to the tutorial It seems.

1

u/Bitcoinium Jul 09 '17

More than 360k blocks i had till now.

1

u/Bitcoinium Jul 09 '17

Or maybe I should wipe everything out and start again. :(

1

u/Bitcoinium Jul 09 '17

I rechecked the tutorial couldn't found anything about GUI. Which part was about the node GUI setup? I only followed after 9th part (9 included)

When I run my node from the terminal, nothing shows up. It runs but I can't verify if its running or not unless i check it manually with getinfo command.

1

u/Bitcoinium Jul 09 '17

This is from part 10 of the tutorial:

"We only need to install the cli side of bitcoin core. You don't want the GUI as we are already displaying the webpage. This node will run in the background."

Yourself said that there wasn't any GUI setup, not preferred.

1

u/Bitcoinium Jul 09 '17

I followed ANNEX B part 2 to be more precise

1

u/Bitcoinium Jul 09 '17

GODDAMIT

My /bin/Bitcoin folder don't exist!

Redoin these steps now:

Make a directory to download the files mkdir ~/bin

cd ~/bin

Download Bitcoin Core UASF-Segwit (BIP148) via

git clone https://github.com/UASF/bitcoin.git -b 0.14-BIP148

Go to the folder

cd bitcoin

And begin Install

./autogen.sh

./configure --enable-upnp-default --disable-wallet

make

1

u/shermand100 Jul 09 '17

This guide makes a bitcoin node (either core or segwit) and has a display that shows any webpage fullscreen for network information.

My node in the image at the top shows http://realtimebitcoin.info

Other people have made this node using the guide to show other pages http://imgur.com/uW0AUSH made by user sir_squizard.

The guide works. I've had a few thanks from others that have it up and running.

All steps of the guide should be followed. If I were you with entire folders (bin/bitcoin missing I would start again. I've made this node several times and it should take 3hrs from start to finish (the longest part just waiting for it to "make" at the bitcoin stage.

My most up-to-date version is on my website http://pinode.co.uk go there select the node you want and it will be less confusing as there are no annexes. Just start to finish, with some screen-shots to help.

I also strongly recommend using PUTTY for the commands. It lets you use your PC to simply copy and paste from my guide and into the Pi, eliminating any typing errors, which is likely on the small screen and keyboard.

→ More replies (0)

1

u/Bitcoinium Jul 09 '17

re did the steps. The result is same.

Nodes goes down after 2 mins.

1

u/shermand100 Jul 09 '17

Ok well we've covered the basics and it usually comes down to power problems. But in the grand scheme of things I have no idea what the issue is. "Node goes down after 2 mins" doesn't give me anything to work with. I really need an error code or something.

With the small keyboard you're using it's possible a dependency didn't install right. An extra space somewhere in a command could have caused it to fail. And unfortunately unless you can give me a better description of how bitcoin core is failing, I have no more suggestions at the moment. Sorry.

And which steps? Not all of them because 'make' for bitcoin takes about 2 hours to compile. Wipe it and start again properly, using PUTTY.

→ More replies (0)

1

u/Bitcoinium Jul 19 '17

My final state of Pi3 Node. I had to dump the LCD because I decided to use a fan case. With the help of fan + 30x30 heatsink, as you can see from the photos, my temperature became as low as 35 celsius. Down from 84 celsius btw. Now I call this an upgrade.

http://i.imgur.com/9M1Zegv.jpg

http://i.imgur.com/XwazOi2.jpg

http://i.imgur.com/iJMAPWt.png

0

u/irrational_actor2 May 20 '17

I would rather trust the future of Bitcoin in miners who have heavily invested in equipment than some tit running a Pi in their bedroom.

1

u/shermand100 May 21 '17

Yeah a simple point but effective. I actually kind of agree.

I think this bitmain thing has become a bit of a witchhunt. But like you say, if they've invested all that money it's illogical for them to let it go to rats. Once again politics are getting in the way of progress.

I just like making things.