Deploy AE Mainnet CUDA MultiGPU Miner.

Dependencies

This guide focuses on Ubuntu 18.10.

Use Airgap to generate your mining address!

First we are going to install dependencies.

sudo apt-get -qq update sudo apt-get -y upgrade sudo apt-get -qq -y install git curl autoconf build-essential ncurses-dev libssl-dev g++6 gcc-6 sudo apt-get install erlang sudo apt-get install libsodium-dev

Drivers & Cuda

Now we are going to add the GPU repository to install drivers and CUDA.

sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt install nvidia-cuda-toolkit sudo apt install nvidia-390

Reboot your mining rig.

sudo reboot

Test if its working by doing the following command.

nvidia-smi

Node Build

Now we are going to clone the multi gpu branch of the Mainnet source code.

git clone -b multi_gpu https://github.com/aeternity/epoch.git multi_gpu && cd multi_gpu

Next we are going to build the source.

make prod-build

This might take a while, depending on the speed of your disk and cpu.

Now we are going to move the compiled files to your user root folder.



mv _build/prod/rel/epoch/ ~/epoch/

Miner Build

Build the CUDA29 miner.

cd apps/aecuckoo make cuda29

we can now find the compiled cuda29 binary in priv/bin.

This file we will copy to your epoch we moved to your home folder.

cp priv/bin/cuda29 ~/epoch/lib/aecuckoo-0.1.0/priv/bin/cuda29

Generating Address

If you don’t have an address yet.

You can generate one on your rigg. But it is more safe to generate one in the Airgap Wallet. With this method your private keys don’t preside on the rig.

Go back to your user directory.



cd ~/epoch

./bin/epoch keys_gen secretpassword

Configuring.

Go back to your user directory, if your not there.

cd ~/epoch

Then we create the configuration file.

Medium tends to mess up the format, so instead of copying from below you can also copy from this file.

https://github.com/Twente-Mining/epoch.yaml/blob/master/epoch.yaml

nano epoch.yaml

Insert this file and change the beneficiary to your address and peer password

Also change “instances: 5” to the number of GPU’s you have.

---

sync:

port: 3015 keys:

dir: keys

peer_password: “secret” http:

external:

port: 3013

internal:

port: 3113 websocket:

channel:

port: 3014 mining:

beneficiary: “ak_2wQHwg9H7yXQ1u3rKHRPRGaCFKMitsPxK3G861n8rgetZYcNfT”

autostart: true

cuckoo:

miner:

executable: cuda29

extra_args: “”

instances: 5

edge_bits: 29

hex_encoded_header: true chain:

persist: true

db_path: ./chain fork_management:

network_id: ae_mainnet

now we are ready to launch the node.

Launch

Personally I like to be able to see what i’m doing so we are going to run the node in a screen while invoking foreground command so we can see its outputs.

Create the screen screen -t aenode



Now that we have entered the screen we can start the node and mining process.

./bin/epoch foreground

If all goes well the node will launch. You can disconnect from the screen by pressing the following keyboard combination.

Control + A + D

Reconnect with:

screen -x

Let it go through startup phase and initial sync.

After that has been done the mining program will be started.

With the following command you will be able to see if your gpu’s are working.

nvidia-smi

If all is good you will see the something like this.

You can also see the performance by doing this command:

tail -f log/epoch_pow_cuckoo.log | grep “total solution”

I hope this guide helps you setting up the Multi GPU software.

Feel free to share any suggestions.

Tips are welcome :

ak_2wQHwg9H7yXQ1u3rKHRPRGaCFKMitsPxK3G861n8rgetZYcNfT