Bitcoin Forum
September 18, 2019, 06:34:20 AM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [GUIDE] Raspberry Pi 3 with WD PiDrive 1TB - UASF BIP-148 Bitcoin Full Node  (Read 4210 times)
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 11, 2017, 06:37:19 AM
Last edit: September 14, 2017, 11:31:53 AM by thisisbitduck
 #1

[ OUTDATED ][ WORK IN PROGRESS][ OUTDATED ]

Requirements
Raspberry Pi 3 Model B
Vilros Raspberry Pi 3 Basic Starter Kit--Clear Case Edition [Includes Wifi & Bluetooth Connectivity]

Storage
WD PiDrive BerryBoot Edition 1TB (includes 4GB SD card)
WD PiDrive Enclosure Kit

Latest release of Raspbian Jesse Lite (2017-07-05 at the time of last edit)
Torrent
ZIP

Base system setup

Assemble Raspberry Pi
Assemble PiDrive
Refer to my unboxing and assembly post.
Load Raspbian Jesse Lite onto SD card
-Linux
-Mac OS
-Windows
Enable SHH
Insert SD card into Raspberry Pi
Bundle PiDrive to Raspberry Pi
Plug in ethernet cable to Raspberry Pi
Plug in PiDrive connector
Plug in power cable from PiDrive to Raspberry Pi
Plug in USB from PiDrive to Raspberry Pi
Plug in power cable from wall plug to PiDrive connector
Plug in power to wall
Find Raspberry Pi IP address
Check your router or use IP scanning software
SSH into Raspberry Pi
Open a terminal
Code:
ssh pi@RASPBERRY_PI_IP_ADDRESS
At the prompt type "yes" and press enter
Password is "raspberry"
WARNING! CHANGE PASSWORD NOW!
Code:
passwd
OPTIONAL
Enable wifi
Code:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Add the following to the bottom of the file
Code:
network={
      ssid="YOUR_WIFI_ROUTER_NAME"
      psk="YOUR_WIFI_ROUTER_PASSWORD"
}
Press ctrl+O
Press 'enter'
Press ctrl+X
Code:
sudo reboot
Remove ethernet cable if WiFi is chosen

Expand the filesystem
Find Raspberry Pi IP address if you switched to wifi
SSH into Raspberry Pi
Code:
sudo raspi-config
Select "advanced options"
Select "expand filesystem"
Select "<Ok>"
Select "<Finish>"
Select "<Yes>"
Raspberry Pi will reboot

PiDrive Setup
SSH into Raspberry Pi

List hard drives
Code:
sudo fdisk -l
Look for a device named /dev/sdX - this is the PiDrive (sda, sdb, sdc, )

Partition drive
Code:
sudo fdisk /dev/sdX
At the prompt type in "d"  to delete partitions until there are no partitions
At the prompt type in "n" for new
At the prompt type in "p" for primary
At the prompt type in "1" for partition number
At the prompt press enter for defaults
At the prompt press enter for defaults
At the prompt type in "w" and press enter for write
This will use the full disk as storage

Format PiDrive
Code:
sudo mkfs.ext4 /dev/sdX1
At the prompt type in "y" and press enter
Create mount point for PiDrive
Code:
sudo mkdir /mnt/pidrive

Get PiDrive UUID
Code:
sudo blkid
Copy the quoted field from PARTUUID="COPYME" for drive /dev/sdX1
Code:
sudo nano /etc/fstab
Add "PARTUUID=COPYME /mnt/pidrive/ ext4 defaults 0 0" to bottom of file

Increase and Initialize swap file
Code:
sudo nano /etc/dphys-swapfile
change “CONF_SWAPSIZE=100” to “CONF_SWAPSIZE=1000”
Code:
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
Reboot

Verify mounting of PiDrive
SSH into Raspberry Pi
List mounts
Code:
df -h
Verify "/dev/sdX1" is mounted on "/mnt/pidrive"

Update and upgrade system
Code:
sudo apt-get update
sudo apt-get upgrade
Press enter to download and install packages

Setup
Install required packages
Code:
sudo apt-get install git autoconf libevent-dev libtool libssl-dev libboost-all-dev libminiupnpc-dev
Press enter

Download and compile Bitcoin UASF BIP148
Code:
mkdir ~/bin
cd ~/bin
git clone git://github.com/UASF/bitcoin -b 0.14-BIP148
cd bitcoin
./autogen.sh
./configure --enable-upnp-default --disable-wallet --disable-bench --disable-zmq --without-gui --prefix=/usr/
make
make check
ONLY IF ALL THE TESTS PASS!
Code:
sudo make install
rm -R ~/bin

Create Bitcoin storage folder and user
Code:
sudo mkdir -p /mnt/pidrive/.bitcoinData/
sudo useradd -r bitcoind
sudo chown bitcoind:bitcoind /mnt/pidrive/.bitcoinData

Create Bitcoin system service
Code:
sudo nano /lib/systemd/system/bitcoind.service
Add
Code:
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target

[Service]
User=bitcoind
Group=bitcoind

Type=forking
PIDFile=/mnt/pidrive/.bitcoinData/bitcoind.pid
ExecStart=/usr/bin/bitcoind -daemon -pid=/mnt/pidrive/.bitcoinData/bitcoind.pid \
-conf=/etc/bitcoin/bitcoin.conf -datadir=/mnt/pidrive/.bitcoinData -disablewallet

Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5

[Install]
WantedBy=multi-user.target
Run
Code:
sudo ln -s /lib/systemd/system/bitcoind.service /etc/systemd/system/multi-user.target.wants/bitcoind.service

Create Bitcoin.conf
Code:
sudo mkdir /etc/bitcoin
sudo nano /etc/bitcoin/bitcoin.conf
Paste this example configuration file for more options
Add these to the bottom
Code:
maxmempool=50
rpcuser=makeupanyusernamehere
rpcpassword=makeupanysecretpasswordhere
Run
Code:
sudo service bitcoind start
Bitcoin will start at when Raspberry Pi boots
Forward port 8333 for Raspberry Pi IP address on your router to enable more than 8 connections.


Status of node

Status of Bitcoin
Code:
bitcoin-cli -datadir=/mnt/pidrive/.bitcoinData/ -conf=/etc/bitcoin/bitcoin.conf getinfo

Size of /mnt/pidrive/.bitcoinData
Code:
sudo du /mnt/pidrive/.bitcoinData/ -h

Future of Project
Expand guide to include advanced configurations
UI for remote monitoring
Cleanup - Code blocks / Formatting
Secure distro
Optimize distro / Fork
Automate installation
Automate updates
Translations welcome
Suggestions welcome

THANKS TO EVERYONE IN THE COMMUNITY

-Full Node, Bitcoin Core v0.14.1 UASF-Segwit:0.3(BIP148), Raspberry Pi3B, 3.5"Generic TFT with network stats + HOW-TO Guide
-Ok, I'm finally annoyed enough to do this. Can someone link me an explanation of how to set up a UASF node on linux?
-My original published guide

REPORT ANY BUGS OR ERRORS IN COMMENTS
1568788460
Hero Member
*
Offline Offline

Posts: 1568788460

View Profile Personal Message (Offline)

Ignore
1568788460
Reply with quote  #2

1568788460
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568788460
Hero Member
*
Offline Offline

Posts: 1568788460

View Profile Personal Message (Offline)

Ignore
1568788460
Reply with quote  #2

1568788460
Report to moderator
1568788460
Hero Member
*
Offline Offline

Posts: 1568788460

View Profile Personal Message (Offline)

Ignore
1568788460
Reply with quote  #2

1568788460
Report to moderator
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 12, 2017, 09:38:16 AM
Last edit: June 17, 2017, 10:53:15 PM by thisisbitduck
 #2

[ WORK IN PROGRESS ]

CHANGES:

17062017 - Bitcoin core 14.2 released. This will compile 14.2.
Lizzie_Girl
Full Member
***
Offline Offline

Activity: 234
Merit: 100


✦✦✦✦ Refine Medium &#1


View Profile
June 12, 2017, 01:59:24 PM
 #3

I want to know something. Why do people run nodes ? I know we need them so maybe out of good heartedness but can't you profit from nodes and make some bitcoins ? Or have I got it all wrong ? If so how ?

✦✦✦✦
Refine
Medium ✦✦✦✦

◆ ◆ ◆ ◆
BUY TOKEN

Join ICO
◆ ◆ ◆ ◆
Facebook[/col
or]
[/url]
[url=http://"[url]https://twitter.com/refinemedium/[/url]"]Twitter
[/url]
[url=https://youtube.com/channel/]YouTube[/url]
[url=https://www.linkedin.com/company/refinemedium/about/][color=#012C43
]LinkedIn
[/b][/url]
Telegram
•••••••• HURRY UP!!! GET XRM
TOKEN
••••••••
cloverme
Legendary
*
Offline Offline

Activity: 1498
Merit: 1041


SpacePirate.io


View Profile WWW
June 12, 2017, 02:38:08 PM
 #4

I want to know something. Why do people run nodes ? I know we need them so maybe out of good heartedness but can't you profit from nodes and make some bitcoins ? Or have I got it all wrong ? If so how ?

There's an article here: http://www.coindesk.com/bitcoin-nodes-need/

In short, it's just to provide decentralized consensus as to support the community. You can't make any bitcoins running a node. In the early days, the bitcoin client could also mine, but the functionality was removed in version 0.13.0. Mining is widely considered to be only applicable to asic hardware now for bitcoin.
freemanjackal
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

FINANCIAL FREEDOM, PROFESSIONAL STRATEGY


View Profile
June 12, 2017, 03:47:31 PM
 #5

but rigth now,  cant i run a  node and mine with asic hardaware? what is the dicotomy on that, i can do both  right?
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 12, 2017, 05:34:21 PM
Last edit: June 12, 2017, 09:25:55 PM by thisisbitduck
 #6

I want to know something. Why do people run nodes ? I know we need them so maybe out of good heartedness but can't you profit from nodes and make some bitcoins ? Or have I got it all wrong ? If so how ?

I run a node as a hobby and to secure the network. I'm interested in the technology and want to see it develop further, and this aspect interests me the most currently.

I'm turning over ideas in my head about how to incentivize nodes.

but rigth now,  cant i run a  node and mine with asic hardaware? what is the dicotomy on that, i can do both  right?

Are you asking if the mining hardware can also run nodes? I'm not familiar with mining hardware or setups or if they integrate this.

Quote
Does node count determine activation?

No. Users that decide to enforce the new rules will only follow blocks that conform to the existing rules which will in turn cause miners to activate SegWit. A UASF could be enforced by any number of economic nodes, although hash power may only choose to follow such rules if there was significant economic weight behind it.

- UASF.co
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 12, 2017, 08:52:32 PM
 #7

Guide has been ported to the forum and formatted.

Please report any errors or issues in this thread Smiley

Next step: Automation
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 13, 2017, 11:36:13 PM
 #8

Does anyone know how to build installers?

I'm talking about ncurses looking installers for configuring in cli.

Or point me in the right direction.
thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 17, 2017, 10:53:36 PM
 #9


UPDATE:

17062017 - Bitcoin core 14.2 released. This will compile 14.2.
Solarboy
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 17, 2017, 08:49:11 AM
Last edit: July 21, 2017, 05:26:09 PM by Solarboy
 #10

Good walk through!!

But somehow after days of running, the bitcoind process will no longer run.
I even tried re-installation on a Raspberry pi 3 (hard disk has 2Gb swap space, 30G for root and 430Gb for the blockchain)

Nothing works even after cold reboot.
Sudo service bitcoind start/restart shows:
Bitcoind.service main process exited, code=killed, status=6/ABORT
UNIT BITCOIND SERVICE ENTERED FAILED STATE


I tried to google for solution and even walked through the instructions but nothing worked.

SOLVED. What helped was performing following command
sudo chown bitcoind:bitcoind /mnt/pidrive/.bitcoinData -R

and after a sudo service bitcoind start all came back to life!

Now running  Bitcoin 14.2-BIP148-SegWit 1.0

Update July 21st:
Please note the guide will setup a bitcoin full node using IP v4.
If you want to run on Rpi IP v6, this is possible but do not forget to install IP v6, port-forward on IPv6 on your router, and also check on bitnodes.21.co
the IPv6 address of the (same) full node.

some notes I've made on my IPv6 implementation:

enable/load IPv6 on startup of your Raspberry, by connecting over SSH with your Rpi ( ssh pi@<address_of_your_pi, for example on Mac OSX).
when logged onto the Raspberry:
sudo nano /etc/modules

add on the last line in the displayed file /etc/modules : ipv6
and save (CTRL-X, Yes).
Reboot your Raspberry (e.g. Sudo reboot -h 0)
connect again with SSH and log on as pi:
modify dhcpcd.conf using : 'sudo nano /etc/dhcpcd.conf'

Find the line mentioning 'slaac private' and place a hash-tag ('#') in front of 'slaac private' (to comment the line out) and
add the following line:
slaac hardware
Save the file (CTRL-X, Yes). Now upon reboot the IP v6 address is based upon hardware address (MAC) of your ethernet interface on the Pi.

With command 'ifconfig' you can see the IPv4 and IPv6 address of the Pi (IPv6 is now fixed, and derived from the hardware).

Ping test on IPv4: ping <ip-address RPI>, e.g. 'ping 192.168.1.40'
Ping test on IPv6 (using Mac OSX): ping6 <IPv6-address RPI>, e.g 'ping6 2001:980:ce79:1:ba27:ebff:fe76:63a2' will ping on IPv6 level your RPI.

netstat -na | grep 8333 shows all IPv4 & IPv6 connections using port 8333.

Reminder: do not forget to separately enlist/enter your IPv6-address in the port-forward on your router, and also test for connectivity on the
https://bitnodes.21.co website. If all goes well, your Raspberry will both service IPv4 requests as well as IPv6 requests.

thisisbitduck
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
July 23, 2017, 07:15:56 AM
 #11

Thanks for the comment!

Useful information for others Smiley

I don't have IPV6 so I didn't think to add this.

I had the same issue when I got behind and had to sync on another computer (moved).

I used this to fix the permissions: https://www.devroom.io/2011/12/13/recursively-fixing-file-and-directory-permissions/

Also, as of this posting, this builds UASF 1.0
Solarboy
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
September 20, 2017, 09:06:09 AM
 #12

When installing a node, include some security steps: https://makezine.com/2017/09/07/secure-your-raspberry-pi-against-attackers/
Solarboy
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
September 24, 2017, 10:23:27 PM
 #13

To update to version 0.15.0.1 i have used following steps (don’t worry, full nodes are still valusble for the bitcoin network and this release supports ofcourse BIP148):

The new release of Bitcoin software can be used now for the full node, and is found on https://bitcoin.org/bin/bitcoin-core-0.15.0/
the git clone command needs to point to the new location.
First stop the bitcoind service on the Raspberry PI:

sudo service bitcoind stop
and then follow these steps:

mkdir ~/bin
cd ~/bin
git clone git://github.com/bitcoin/bitcoin -b -0.15
cd bitcoin
./autogen.sh
./configure --enable-upnp-default --disable-wallet --disable-bench --disable-zmq --without-gui --prefix=/usr/
make
make check

after that:

sudo make install
rm -R ~/bin
sudo service bitcoind start
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!