Donate VRC/VRM for the Wiki to VBzaNDExHyFpnNvYc5QH5e4ipBZqxxPnKJ . Thank you, Joe.

Raspberry Pi

From VeriCoin & Verium Wiki
Jump to: navigation, search

The Raspberry Pi is a super cool device. Before you start using it for anything related to the VeriConomy you should learn some general information about its usage. Please consult

  1. www.raspberrypi.org
  2. YouTube Guides
  3. Google for Raspberry Pi and your language

and learn how to burn an OS image for the Pi, connect to it and edit text files. Linux knowledge is very helpful here.

Once you gathered some basic knowledge you can use the Pi to

  • mine Verium
  • run the Verium wallet
  • use it as monitoring webserver or wifi bridge
  • VeriCoin is currently not working on the Pi but this will be fixed soon...

Pre-installed Images (RPi 3B)

There are three OS-images available that have software pre-installed for different needs:

  1. Verium Mining (optimized)
  2. Verium CLI Wallet, Miner and Monitoring Webserver
  3. NOT working Verium GUI Wallet and Monitoring Webserver FIX to come.

Whatever image you want to run, you need to burn it onto an SD Card. My favourite tool to do so is

After your SD Card is burned insert it into your Pi and power it up.

Verium Miner Image

Raspberry Pi Verium Mining OS Image features:

  1. 220 H/m using the latest fireworm miner, GCC7 and moderate Overclocking on latest raspbian stretch lite
  2. Autostart configuration, Status script and Temperature Logging
  3. Awesome welcome message with Verium ASCII Logo ;)

Download: Verium_Miner_Pi.img.gz

Miner pi.png

You will need heat sinks and active cooling!

There is no Desktop in this OS, you will use command line only.

Either plug in a screen via HDMI or log in via the enabled SSH with standard

 user: pi
 password: raspberry

Mining will automatically start after boot up - consider it as a little donation and perhaps let it run a bit ;) . To configure the miner for yourself edit rc.local by (you'll find this command in the welcome screen)

 sudo nano /etc/rc.local

The mining command is at the very end, you only need to configure the second line in

/home/pi/verium/fireworm/cpuminer \
-o stratum+tcp://yourpool.com:3334 -O your_user.worker:password \
-1 3 -t 1 --api-bind 0.0.0.0:4048 --no-color >> /home/pi/verium/fireworm/mine.log &

according to your personal miner setup.

There is a simple status script in the home directory, call

 ./vrmcheck.sh

which prints out the configuration in rc.local, the last 10 lines of the miner log, CPU frequency and the current temperature.

The overclocking was configured at the end of

 sudo nano /boot/config.txt

use at own risk with proper cooling. The CPU is overclocked to 1.35 GHz and the RAM speed, too. If your device isn't booting up you can either try to downclock or switch to the wallet & webserver image and slowly overclock that.

Verium CLI Wallet & Webmonitor Image

Raspberry Pi Verium Wallet, Miner and Webmonitor OS Image features:

  1. latest Verium CLI Wallet
  2. latest fireworm miner, GCC7 on latest raspbian stretch lite
  3. running webserver including miner monitoring scripts
  4. Autostart configuration, Status script and Temperature Logging

Download: Verium_CLI_Pi.img.gz

Log in as described in the miner image.

Mining will automatically start after boot up - consider it as a little donation and perhaps let it run a bit ;) . To configure the miner for yourself as described in the miner image.

If you already have a wallet.dat copy it to

 ~/.verium/wallet.dat

Then, or if you don't have one run

 ~/create_Verium_Wallet.sh

which will start the Verium daemon, update the blockchain and tell you its status as well as your address.

You can configure to automatically start the wallet on boot up at the end of

 sudo nano /etc/rc.local

To use the miner monitor just browse to the IP address of your Raspberry Pi. You need to configure your miners in

 nano /var/www/html/minerHosts

by entering either the IP addresses of your miners in each line or you can also configure their names in /etc/hosts.

Verium GUI Vault & Webmonitor Image

NOT working Will hopefully be updated and fixed soon.

Raspberry Pi Verium GUI Vault and Webmonitor OS Image features:

  1. latest Verium GUI Vault
  2. running webserver including miner monitoring scripts

Download: Verium_GUI_Pi.img.gz

This OS has a desktop so you should plug a screen into the HDMI port.

If you already have a wallet.dat copy it to

 ~/.verium/wallet.dat

You can start the Verium Vault using the link on the desktop.

To use the miner monitor just browse to the IP address of your Raspberry Pi or by just opening the included browser. You need to configure your miners in

 nano /var/www/html/minerHosts

by entering either the IP addresses of your miners in each line or you can also configure their names in /etc/hosts.

Operating System

First step is the choice of an image for the RPi, the current "stretch" images do not work out of the box.

To get the compilation working on Raspbian Stretch see this RPi Stretch Fix.

Raspbian Jessie is unfortunately no longer working for the VRC/VRM wallets.

VeriCoin Wallet Installation

Currently the VeriCoin wallet is not running properly on the Pi. The next update that addresses the current memory issue will likely fix that. Stay tuned.

The wallet is not working due to the lack of memory (RAM) of the Pi - or you can view it as a lack of memory-friendly coding. There is a wallet software update in development that will hopefully fix the problem.

And well, I tried it a couple of times, e.g. with 2 GB swap file but that doesn't help. Compiling actually works using this fix BUT still the wallet won't stay synced which makes staking impossible.

Verium Wallet Installation

Updated for Version 1.1

The whole thing as a script: [Download Shell script], thanks to mining-pool.ovh

wget https://raw.githubusercontent.com/DJoeDt/verium/master/install_Verium_Wallet.sh
chmod +x install_Verium_Wallet.sh
./install_Verium_Wallet.sh

It will do what is described in the step-wise Manual Verium Wallet Installation .

In case you see ERRORS like -No such file... - it actually helps to run the script again since probably the installation of the dependencies failed.

Wallet Configuration & Usage

The wallet should run now, but we need to go to its directory

cd verium/wallet/src

and get info about this by:

./veriumd getinfo 

Now stop the wallet

./veriumd stop

It is configured in

nano verium.conf

scroll to its very end, the lines to configure are

addnode=vrmsupernode.vericoin.info
addnode=vrmsupernode3.vericoin.info
server=1
listen=1
daemon=1
rpcuser=YourSoloMiningName
rpcpassword=YourSoloMiningPassword
rpcallowip=YourAccessIP
rpcallowip=localhost 

You have to configure the IPs of the machines that should be able to connect. If you mine solo you have to come up with a username and a password for your miners to access the wallet.

Now start the wallet again

./veriumd 

The most important thing right now is your wallets address gotten by

 ./veriumd getaddressesbyaccount ""

Finally backup by

cp ~/.verium/wallet.dat somewhere/save/wallet.dat

To restore your wallet just do a fresh installation and replace the new wallet.dat with your saved one.

Store & Secure both VeriCoin & Verium in One Paper Wallet [Paper Wallet Link]

Learn how to use the Verium Daemon

./veriumd help

will print a wall of text with commands and

./veriumd help [command]

explains each further. Here are some [further wallet commands].

Verium Miner Installation

The Mining software can be installed on the Pi in the same way it works on the Odroid XU4 (a high end SBC) - similarly on other Linux systems.

The whole thing as a script for fireworm miner (RPi & ARM version): Download Shell script

wget https://raw.githubusercontent.com/DJoeDt/verium/master/1wayARM_fireworm_install.sh
chmod +x 1wayARM_fireworm_install.sh
./1wayARM_fireworm_install.sh

The whole thing as a script for effectstocause miner (RPi & ARM version): Download Shell script

wget https://github.com/DJoeDt/verium/raw/master/install_Verium_Miner_ARM.sh
chmod +x install_Verium_Miner_ARM.sh
./install_Verium_Miner_ARM.sh

It will do what is described in the following stepwise manual way.

In a Terminal start with (you need internet access)

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -f -y

During the download you could check out a Mining Pool.

The Miner needs this

sudo apt-get install git automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev

Special thanks go to birty again for his guide.

Clone the verium Miner

git clone https://github.com/effectsToCause/veriumMiner

Again time, so maybe check your wallet, the blocks and your wallets address.

For the RPi the Miner needs configuration. On a standard Linux machine just GOTO build.sh. Configure RPi here:

nano veriumMiner/algo/scrypt.c

Find:

ARM_NEON

and change the succeeding lines (First into second)

#define SCRYPT_MAX_WAYS 3
#define SCRYPT_MAX_WAYS 1
#define HAVE_SCRYPT_3WAY 1
//#define HAVE_SCRYPT_3WAY 1
#define scrypt_best_throughput() 3
#define scrypt_best_throughput() 1
void scrypt_core_3way(uint32_t *X, uint32_t *V, int N);
void scrypt_core     (uint32_t *X, uint32_t *V, int N);

By this the settings are changed from 3-way to 1-way which uses less RAM per thread (128MB instead of 384, RPi can run 4 threads and only has 1GB RAM).

Now the second configuration is done in here

 nano veriumMiner/build.sh

and add -mfpu=neon

 ./configure --with-crypto --with-curl CFLAGS="-O2 $extracflags -DUSE_ASM -pg"
 ./configure --with-crypto --with-curl CFLAGS="-O2 $extracflags -DUSE_ASM -mfpu=neon -pg”

This enables the use of the ARM CPU feature NEON.

Finally it is time to build the miner (Linux GOTO here)

 cd veriumMiner
 ./build.sh
 

Ready to mine! Mine! Mine! But oh no, the blockchain download is not yet complete...

To start right away a pool is very helpful at this time.

To directly test the miner you can start with the following command, but be aware: it will mine for me ;)

 ./cpuminer -o stratum+tcp://pool-eu.bloxstor.com:3003 -u VEXMki29ycW5vSt3MmdM5iwHqsHux91EMr.Guide -p GuidePwd

Of course you want to mine for yourself, but you may consider that testline as a donation for this guide. Let's get you up and running, you need to know your wallets address, in the command above the cryptical sting after '-u ' is my wallets address. If you run your wallet by the verium deamon (veriumd) you run

 ~/verium/src/veriumd getaddressesbyaccount ""

and your address is in the reply.

At first you might want to watch the miners output in an ssh window. The second step would be to use nohup or tmux to suppress the output and run the miner in background. Finally you can add the command to /etc/rc.local (no nohup needed there).

Once you got your address (I assume you have copied it) you are ready to choose a mining pool. The Bloxstor mining pool was my choice mainly because it has a very user friendly tool to get started. Bloxstor Getting Started It will guide you through the setup even better than I can and at the end it simply outputs your personal mining command.

GCC 7 Installation

Based on [1] (Building instructions: [2]

Clone binaries:

 git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git

and install them

 cd raspberry-pi-gcc-binary
 tar xf gcc-7.2.0.tar.bz2
 sudo mv gcc-7.2.0 /usr/local

Now add the new GCC to your path:

 echo 'export PATH=/usr/local/gcc-7.2.0/bin:$PATH' >> ~/.bashrc
 source ~/.bashrc

Notes

Swap File adjustment:

 sudo nano /etc/dphys-swapfile 

configure

 CONF_SWAPSIZE=100

to your desired size (100 means 100 MB).

Links