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

Joes Mining Walkthrough

From VeriCoin & Verium Wiki
Revision as of 13:41, 29 November 2017 by Joe rondx (Talk | contribs) (Miner Installation)

Jump to: navigation, search

Joes Verium Mining Walkthrough

While I am learning to mine Verium I decided to put a wiki together. My main source is [birtys guide], which is wonderfully detailed. I have linked some other references and also have copied advices from the Slack channel.

Overview

 - You need a wallet software where your Verium is stored.
 - You need a mining software to mine Verium and store it in your wallet.

Before you start you should make sure you have a rough plan about what you want to do. The wallet should run 24/7 to keep the network stable. Thus an energy efficient device is mandatory these days. It doesn't need much computing power. For the beginning I used a Raspberry Pi 3 as it is a nice platform to try around and learn. Of course the Pi is not a powerful mining machine but it can run the mining software and serve as energy efficient wallet.

Wallet Installation

Updated for Version 1.1

First step is the choice of an image for the RPi, the current "stretch" images do not work. Raspbian Jessie is what works [Raspbian Jessie].

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 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.

Get in touch

While this is running it might be worth visiting the official website: [Vericoin & Verium] (you can find GUI Wallets for Windows, Mac OS,... there)

A more detailed guide can be found [here] .

And in the meantime the Forum is another interesting place: [Forium]

Again it is time to browse around [Verium Slack Channel invite]...

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 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. further wallet commands

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 (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).

Veriumvaultaddress 0.png

If you run the wallet on e.g. Windows you open your Verium Vault and click on Receive in the menu to the left. On the right side your address will appear.


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.

Other Mining software:

 Slack: !tools

[@darkwofultima's GUI Miner ]

[@yatteers's Window's Miner]

 Slack: !conf

[Technical support files]

Mining Solo/Pool

Rumours advice to have at least 15000 H/min for solo mining.

 Slack: !hashcomp

[Spreadsheet]

 Slack !hashcomp2

[Verium Hashrate Comparison (solo mining only)]

Using Ubuntu instead of Windows can increase your Hashrate by 10-20% .

 Slack: !pools
 

[beertendr]

[bloxstor]

[mining-pool.ovh]

[poolinat0r 1]

[poolinat0r 2]

[poolium]

[poolsloth]

Reminder: when solomining there is zero downtime, zero pool fees, zero withdrawal fees, zero trust, zero dependency, plus all transaction fees per block!

For solo mining read

 Slack: !solo

[Birty's Guide]

[Drawde's Guide]


Odroid XU4 specials

The whole thing as a script (ARM Miner + XU4 Setup): [Download Shell script]

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

Image for XU4

I have tested like 6 different images that are available for the XU4 platform.

For the beginning I recomment the [DietPi image] because its included diet-config tool already supports lots of the configurations you want to set. [Direct Link to image]

For best performance I use [Odroids minimal image] or [Armbians headless 3.x kernel].

Special images by Odroid God birty: [XU4 Miner images]

Downclocking (yes, down!) the XU4 CPU

To prevent throttleing due to heat it may actually increase your hashrate if the CPU doesn't run at 2 GHz (max). Even if you can prevent throttleing at 2GHz it is anyhow now worth it: you might get 10-15 H/m more but it costs about 2 Watts (out of 12) to get this last increase - so it won't pay back, for Details: [HC1 power benchmark].

Install the utility (or use DieuPi config)

 sudo apt-get install cpufrequtils

use it directly

 sudo cpufreq-set -c 7 -u 1.9GHz -r

and make the change permanent by creating a config file

 sudo nano /etc/default/cpufrequtils 

with the following settings

 ENABLE="true"
 GOVERNOR="performance"
 MAX_SPEED=1900000
 MIN_SPEED=1900000

Now the CPU should always run at constant speed. This also saves a reasonable amount of power.

Overclocking the XU4 RAM

On the boot-FAT-Partition edit the boot.ini

 sudo nano boot.ini

Find

 ddr_freq

and change the value to 933

 # DRAM Frequency
 # Sets the LPDDR3 memory frequency
 # Supported values: 933 825 728 633 (MHZ)
 setenv ddr_freq 933

Make sure before bootz to

 # set DDR frequency
 dmc ${ddr_freq}  
 

Downclocking the XU4 GPU

Install this utility

 sudo apt-get install sysfsutils
 

Then edit

 sudo nano /etc/sysfs.conf
 

and insert the following line

 # Put GPU into powersave mode (= Downclocking it)
 devices/platform/11800000.mali\:/devfreq/11800000.mali\:/governor = powersave
 

then start the service

 sudo service sysfsutils start

Effect: reduced the power consumption by 0.7 – 0.8W, SOC will be 1-3°C cooler 

[GPU for headless]

Another way might be

 sudo nano /etc/rc.local

and add this line before exit 0

 echo powersave > /sys/devices/platform/11800000.mali\:/devfreq/11800000.mali\:/governor

Swapfile

Verium is memory intensive, so we increase the swap file (or use DieuPi config)

 sudo fallocate -l 1G /var/swapfile
 sudo chmod 600 /var/swapfile
 sudo mkswap /var/swapfile
 sudo swapon /var/swapfile

check it with

 free -h

and configure that permanently

 sudo echo "/var/swapfile    none    swap    sw    0    0" >> /etc/fstab

Processes

Further optimization can be done by checking the process tree

 pstree -p

and disable/deinstall stuff that isn't needed. KILL 'EM ALL!

I did not find it yet but if you come across ads7846 remove it.

 modprobe -r ads7846
 tee /etc/modprobe.d/blacklist-ads7846.conf <<< "ads7846"

XU4 hardware

The key is to exchange the thermal tape of the heatsink with some good thermal paste, decreases the temperature by 10 degrees (C) using same testing conditions. Also get the under side cooled as well.

To save electricity you may turn down the power supplies voltage with a screw driver.

Check sd card slot heat.

Random links

Top Verium Hardware:

 AMD Opteron 6276, many cores, plenty of fast ram

energy does not concern me

miner logs

miner monitor

script Colors nice

useful commands in this context