Skip to content

Epic miner

Jhelison Uchoa edited this page Dec 21, 2022 · 2 revisions

Table of contents

Epic miner user guide

Miners are responsible for processing the transactions in the blockchain. When a batch of transactions is processed, the first one responsible for processing it gains a reward and the fees on those transactions. That involves both computing power and luck. There are three algorithms that help produce the blocks.

Epic miner installation and basic guide can be found here.

Mining can be done using these algorithms:

RandomX

RandomX is a Proof-of-Work (PoW) algorithm optimized for general-purpose CPUs. It uses randomized program executions with several memory-hard techniques to achieve the following goals:

  • Prevention of the development of single-chip ASICs;
  • Minimize the efficiency advantage of specialized hardware over general-purpose CPUs.

Mining Epic with CPUs requires a contiguous allocation of 2 GB of physical RAM, 16 KB of L1 cache, 256 KB of L2 cache, and 2 MB of L3 cache per mining thread. Windows 10 devices require 8 GB or more RAM.

ProgPow

Programmatic Proof-of-Work (ProgPow) is an algorithm that depends on memory bandwidth and core computation of randomized math sequences, which take advantage of many of a GPU’s computing features and thereby efficiently capture the total energy cost of the hardware. As ProgPow is specifically designed to take full advantage of commodity GPUs, it is both difficult and expensive to achieve significantly higher efficiencies through specialized hardware.

Cuckoo (CuckAToo31+)

CuckAToo31+ is an ASIC friendly permutation of the Cuckoo Cycle algorithm developed by Dutch computer scientist, John Tromp. A relative of the ASIC resistant CuckARoo29, CuckAToo31+ generates random bipartite graphs and presents miners with the task of finding a loop of given length ‘N’ passing through the vertices of that graph.

This is a memory bound task, meaning the solution time is bound by memory bandwidth rather than raw processor or GPU speed. As a result, the Cuckoo Cycle algorithms produce less heat and consume significantly less energy than traditional PoW algorithms. The ASIC-friendly CuckAToo31+ allows efficiency improvements over GPUs by using hundreds of MB of SRAM while remaining bottlenecked by memory I/O. Although CuckAToo is intended to be mined by ASICs in the future, it can also be mined well using 11GB+ GPUs.

Configuring your epic-miner

To configure your miner, open the epic-miner.toml.

Additional configuration: ProgPow

If you are going to mine with ProgPow, you will need to set some additional parameters in the epic-miner.toml. Open the epic-miner.toml with your preferred text editor and find the following line:

[[mining.gpu_config]]
device = 0
driver = 2

The device parameter sets your GPU ID if you have multiple GPUS, if you only have one, leave it with the value of 0. You may want to use device numbers in the same PCI Bus ID enumeration order as used by non-CUDA programs. To do this set the CUDA_​DEVICE_​ORDER environment variable to PCI_BUS_ID in your shell. The default value of this variable is FASTEST_FIRST. More info on this can be found here. Note that this is available only in CUDA 7 and later.

Multi-GPU Mining

If you want to mine using multiple GPUs just copy and paste the lines shown in the section Additional configuration: ProgPow, changing the device parameter to match your GPUs ID and the type of driver that will be used in each one with the parameter driver. Following there is an example of how to mine with the 2 GPUs (NVIDIA) using CUDA:

[[mining.gpu_config]]
device = 0
driver = 1

[[mining.gpu_config]]
device = 1
driver = 1

Additional configuration: RandomX

If you are going to mine with RandomX, you will need to set some additional parameters in the epic-miner.toml. Open the epic-miner.toml with your preferred text editor and find the following lines:

[mining.randomx_config]
threads = 1
jit = false
large_pages = false
hard_aes = false

You can specify the desired number of threads used by the RandomX algorithm by setting its value in the variable threads. Check the RandomX design in order to have a clear understanding about the value of the variables above. After you finish all your modifications, save and close the file.

Additional configuration: Cuckoo

If you are going to mine with Cuckoo, you will need to set some additional parameters in the epic-miner.toml. Open the epic-miner.toml with your preferred text editor and find the following lines:

[[mining.miner_plugin_config]]
plugin_name = "cuckatoo_lean_cpu_compat_31"
[mining.miner_plugin_config.parameters]
nthreads = 4

In plugin_name you can specify what type of cuckoo algorithm you will be using. The cuckaroo_29 is being deprecated, so the miner will not work if you use any of its variants (cuckaroo_cpu_avx2_29, cuckaroo_cpu_compat_29). To get all plugins available, execute the following command in the terminal:

ls /opt/epic-miner/bin/plugins

You will get something like this as output:

cuckaroo_cpu_avx2_19.cuckooplugin    cuckatoo_lean_cpu_avx2_31.cuckooplugin    cuckatoo_mean_cpu_avx2_31.cuckooplugin
cuckaroo_cpu_compat_19.cuckooplugin  cuckatoo_lean_cpu_compat_19.cuckooplugin  cuckatoo_mean_cpu_compat_19.cuckooplugin
cuckatoo_mean_cpu_avx2_19.cuckooplugin cuckatoo_lean_cpu_compat_31.cuckooplugin  cuckatoo_mean_cpu_compat_31.cuckooplugin

Then, just put the desired plugin name without .cuckooplugin extension in the plugin_name variable.

You can also specify the number of threads that a plugin will use in the variable nthreads.

After you finish all your modifications, save and close the file.

If you want more details about the cuckoo plugins, there are more examples of how to use the cuckoo plugins in the epic-miner.toml.