HOW TO STAKE REDDCOIN ON RASPBERRY PI 3B+

in #cryptocurrency6 years ago (edited)

I have recently acquired a Raspberry Pi Model 3B+ which if you are unfamiliar is in short - low power usage computer.

This is the best way to stake any cryptocurrency efficiently.

I could not find any help for the Rpi 3B+, but managed to get it running with minor changes to existing methods.

Below is how I did it, and you can too!

Parts needed:

Raspberry Pi 3 Model B+
Ubuntu MATE 16.04.2 (Xenial)
Space needed: I would recommend at least 64 GB. I am using a 32 GB SD card.
Reddcoin Core client version: v2.0.0.0-92768f9-beta.

Steps
You need the OS; Ubuntu MATE. Download Ubuntu MATE for the RaspberryPi: https://ubuntu-mate.org/raspberry-pi/.

You need software to write the OS to the SD card or USB drive. I use(d) Etcher.

Download Etcher: https://etcher.io/.

Run Etcher.

Select the ubuntu-mate-...-desktop-armhf-raspberry-pi.img.xz file.

Select your SD card.

Flash.

Plug the SD card into your Raspberry Pi and plug in the power cord to turn it on.

Ubuntu MATE should boot up.

Set up Ubuntu MATE.

Connect to the internet (wired or wireless).

Open MATE Terminal ([Menu] Applications > System Tools > MATE Terminal).

Now we install..enter the following commands into the terminal you just opened (copy and paste 1 full line at a time hitting enter and waiting until the next step):

sudo apt-get update && sudo apt-get install git build-essential libqt4-dev libprotobuf-dev protobuf-compiler libtool autotools-dev autoconf libssl-dev libboost-all-dev wget pkg-config

sudo add-apt-repository ppa:bitcoin/bitcoin

sudo apt-get update

sudo apt-get install db4.8

sudo apt-get install libminiupnpc-dev

sudo apt-get install libqrencode-dev

sudo reboot

The Reddcoin wallet can be memory intensive. To prevent any crashes or freezes, add 1 GB of 'virtual' memory by creating a swap file. After your Raspberry Pi has rebooted, open MATE Terminal again and enter the following commands:

sudo fallocate -l 1G /swapfile

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

To make sure the swap file persistent (so it survives a reboot), you have to add a line to the /etc/fstab file.

In MATE Terminal, enter the following command to open the file in Pluma (text editor):

sudo pluma /etc/fstab

In Pluma, create a new line, add this text:

/swapfile none swap sw 0 0

(You should add spaces to vertically align the lines.)

Save and close the file.

Back to MATE Terminal; reboot your Pi:
sudo reboot

To see if the swap file is used after a reboot, open MATE Terminal again and run:

sudo cat /proc/swaps

you will see what you've added in the previous step now listed.

Close Terminal.

Again, open new MATE Terminal and we will Download, unpack, configure, build and install Berkeley DB (copy and paste 1 full line at a time hitting enter and waiting until the next step):

sudo wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz

sudo tar xfvz db-4.8.30.NC.tar.gz

cd db-4.8.30.NC

cd build_unix

sudo ../dist/configure --enable-cxx

sudo make

sudo make install

Set BerkeleyDB variables (in MATE Terminal):

export CPATH="/usr/local/BerkeleyDB.4.8/include"

export LIBRARY_PATH="/usr/local/BerkeleyDB.4.8/lib"

sudo pluma /etc/ld.so.conf.d/daemon-libs.conf

Add this line in Pluma:

/usr/local/BerkeleyDB.4.8/lib/

Save and close the file.

Back in MATE Terminal:

sudo ldconfig

Download the source of the Reddcoin wallet and build it (copy and paste 1 full line at a time hitting enter and waiting until the next step):

cd

git clone https://github.com/joroob/reddcoin

cd reddcoin

sudo ./autogen.sh

sudo ./configure --disable-tests

sudo make

(this will take some time; with me it took just over 1 hour)

sudo make install

I did not use the below step, it is not required but can significantly decrease the time it takes to sync blockchain of Reddcoin wallet.

Bootstrapping:

cd
(to make sure your working directory is your home directory)

Download the bootstrap file (1.45 GB): sudo wget https://github.com/reddcoin-project/reddcoin/releases/download/v2.0.0.0/bootstrap.dat.xz

Unpack the file:
xz -d bootstrap.dat.xz

After a successful unpack, your will find the file ''bootstrap.dat'' in your home folder.

On the first run of the Reddcoin Core client, it will ask for a data directory to store the blockchain and wallet data.

Start the Reddcoin Core client:

sudo $HOME/reddcoin/src/qt/reddcoin-qt

The welcome screen will appear and ask you about the data directory. I suggest a new directory in your home directory, I picked 'reddcoin'. The directory will be created with all the necessary files.

After selecting the directory, the Reddcoin Core client will start. Wait till it's fully loaded and close it.

Use the file manager (Caja) to browse to your home directory and move the ''bootstrap.dat'' file to your data directory you selected in the previous step. Your home directory is the first item in the File Manager in the left menu.

The Reddit Core client set up is completed, but you still have to sync fully with the blockchain before you can send, receive and stake.

Launch the Reddcoin Core client again:

sudo $HOME/reddcoin/src/qt/reddcoin-qt

Keep the client running until it's fully synchronized. This can take some time (it took 2 days for me).

You can see the progress in the debug window (Help > Debug window).

When the synchronization is completed, the red (out of sync) will disappear on the Overview screen!

You can now stake your Reddcoins.

To stake, you need to encrypt your wallet: Settings > Encrypt... Do not forget your password! (I recommend creating the password on an airgapped computer with a password generator, and storing this password with your wallet details on a USB drive and for maximum security print a paper copy with the details)

Your wallet will be encrypted, and the Reddcoin Core client will be closed. Launch the Reddcore Client again.

To stake, you need to unlock your wallet (by entering your password): Settings > Unlock Wallet...

Make sure "For staking only" is checked before clicking OK.

You can only stake with Reddcoins that have matured: coins have to be confirmed in your wallet for 8 hours to mature.

The grey arrow at the bottom will turn green when staking. Hover over the icon to see the progress of staking.

Extras:

Backup your wallet! ( I recommend backing up to atleast 2 locations!)
File > Backup wallet...

Start Reddit on system login.
Settings > Options

This works when using only an SD card.
I can't get this to work when using SD card (for OS) and a USB (for data/blockchain).

Adjust minimization options, so you can safely press on the red X (close/exit button).

The default browser, Firefox, stops working and crashes after updating Ubuntu MATE.

TWO OPTIONS:

  1. Downgrade to previous version of FF and disable future updates of FF until this issue is corrected.

  2. Use Chromium. - To install Chromium, enter the following in MATE Terminal:

sudo apt-get install chromium-browser

You can then access Chromium via [Menu] Applications > Internet.

If this article has helped you please share in the comments and upvote! I hope to write many more articles as the cryptocurrency space evolves. STAKE ON!

Donation Tips in RDD appreciated!

Reddcoin Address: RsQTLZhfwJ9SzUHgpjvbyYDwXhnXai9gwk