Skip to content

Setting up the miner

Creepsky edited this page Jun 6, 2018 · 45 revisions

Most users should use the web interface http://localhost:8124 to configure the miner. If you are running a funky setup and need to tweak feel free.

The configuration file

When starting the miner, you can add an optional parameter with the relative or absolute path to the configuration file. The configuration file needs to be in properly formatted JSON. When in doubt, you can parse and validate your configuration for example here.

If you leave the optional parameter blank, the miner will look for a file named 'mining.conf' inside the execution directory or if one is not found inside the home following directory:

  • Linux: ~/.creepMiner/
  • Windows: C:\Users\You\.creepMiner\

If no config is found, a new default configuration will be created in execution directory. If the current user does not have the correct permissions, the config will be written under the home directory above.

If you are using the .deb package, the binaries are installed in /opt/creepMiner-{version}.

Configuration settings

Most of the default settings should be self explanatory, but let's have a look at each one of them.

url

Urls look always like this: <scheme>://<host>:<port>.

  • Scheme is the protocol, that is used (http, https, ftp, ftps, ...).
  • Host is the destination ip or canonical name for the ip (192.168.0.255, localhost, google, ...).
  • Port is the destination port, where the protocol is usually listening for incoming requests (80, 21, ...).

logging

The creepMiner process has extensive logging through multiple channels. Every channel has a level, which enable what is logged.

path

The path where the miner will create the log file. This is only the path (without the filename)! The filename of the logfile will be determined by the miner.

logfile

If true, a logfile will be created. Otherwise the logging into a file will be disabled.

Level

For every channel you can set the level in the configuration file. Choose between the following levels:

level description
off Disable logging.
fatal A fatal error. The application will most likely terminate. This is the highest priority.
critical A critical error. The application might not be able to continue running successfully.
error An error. An operation did not complete successfully, but the application as a whole is not affected.
warning A warning. An operation completed with an unexpected result.
notice A notice, which is an information with just a higher priority.
information An informational message, usually denoting the successful completion of an operation.
debug A debugging message.
trace A tracing message. This is the lowest priority.
all Like trace.

For example, if you set the level to information, you get every message with a level of information of higher (notice, warning, error, critical, fatal).

Destinations

There are a number of loggers in creepMiner that describe where the message is coming from. You can set for the log level for each individual logger.

logger description
config The configuration process.
general Generic messages, that don't fit anywhere else.
miner The mining process as a whole. (plot read and verify exclusive).
nonceSubmitter The nonce submission process.
plotReader The plot read process.
plotVerifier The plot verification process (read -> verifiy).
server Everything that belongs to the local webserver.
session Low level session messages (HTTP sessions for example).
socket Low level socket messages (read/send for example).
wallet Messages from the wallet.

output

There is some output in the miner, that you maybe don't want to see. This can be set in the "output" section. Every output is a boolean that indicates, if the output will be seen.

output description
dirDone Shows every plot directory that has been successfully read
lastWinner Shows the winner of the last block
nonceConfirmed Shows confirmed deadlines
nonceFound Shows found deadlines
nonceFoundTooHigh Shows found deadlines that are over the target deadline
nonceSent Shows deadlines that were send to the server
plotDone Shows every plot file that has been successfully read

progressBar

fancy

When true, the progress bar will be a visual instead of only characters.

steady

When true, the progress bar is always at the bottom of the terminal, when visible. Also it only takes max. one line.

verbose

When true, some output is truncated and uses less lines.

useColors

When true, colors are used in the terminal for output.

mining

bufferChunkCount

This is the amount of chunks in which the buffer is split. Every chunk is only used by one memory unit (plot data), even if its smaller than the chunk count.

Preferable a number 2^n.

cpuInstructionSet

This is the CPU instruction set that is used while CPU mining. It can be one of the following values: SSE2, SSE4, AVX, AVX2

For using a CPU instruction set, the miner needs to be built with this feature (see CMake flags).

databasePath

If a config file is located in the same directory as the executable, the default databasePath will be in the same dir. If this is not the case, the default path is in the creepMiner home dir.

This is the full path (directory + file + extension) to the database, that holds all statistical data, gathered on execution.

note: Should you wish to disable the database set it to blank.

getMiningInfoInterval

This interval determines how often the miner will ask for getMiningInfo. If the block height fetched on the server is higher than the one the miner has then a new block has started.

The following is checked (height | baseTarget | generationSignature | targetDeadline)

Note Setting this to low could get your ip blacklisted by pool.

gpuDevice

This is the GPU device index inside the gpuPlatform that is used during GPU mining.

gpuPlatform

This is the GPU platform index that is used during GPU mining.

intensity

The mining intensity sets the amount of verifier threads, that verify plot files asynchronously read by the plotfile-reader.

Every verifier reads a part of a plotfile with the size of maximal maxBufferSizeMB MB.

In sum, never more then maxBufferSizeMB MB of RAM are used.

maxBufferSizeMB

This is the maximal global amount of RAM used during the mining process. All plot readers share the same cumulative amount so try find a high enough value to supply all readers with memory. Otherwise RAM can become a bottleneck.

If the value is 0, the miner will use as much memory as it needs. This can cause problems on very large files.

maxPlotReaders

This value sets the amount of asynchronous plot readers. Every plot reader reads a list of plot files inside a plot directory (or device).

If this value is 0 (default), as many plot readers will be created as plot devices exist.

passphrase

If you want to mine solo you need to enter your passphrase. The password is encrypted by creepMiner to protect your wallet.

algorithm

This is the algorithm that is used for en/decryption of your password. If you want to know all the algorithms that are available, use the command:

openssl --help

decrypted

If you enter your passphrase into this field, the creepMiner will encrypt it and write the encrypted version of it in the field Encrypted. After encryption the miner will clear this field!

DeleteKey

If this field is true, the key is erased after every start of the miner.

encrypted

This is where the encrypted version of your passphrase is located. It is automatically set when you first enter the passphrase into decrypted.

iterations

This field basically says how strong your passphrase gets encrypted (how often).

key

This is the passphrase for your encrypted passphrase. Without it, it is not possible to decrypt it again! In combination with DeleteKey = true, this field gets deleted after every start of the creepMiner. This is done for security reasons. The key is like the password for your passphrase. It is your choice to let it stand in the config or to type it in every time after restart of the creepMiner.

Remember: if you set DeleteKey = false, an attacker can get your key and decrypt your passphrase, because the whole algorithm is open source!

salt

The salt is an additional security for your encrypted passphrase.

plots

This setting shows the miner every directory with plotfiles inside of it. The miner will parse the paths and will create for every partitions (C:, D:, ...) a separate thread for reading. This is done for performance reasons.

On Linux, this can get a problem, because the file tree looks different, here the partitions become the top directory of the path (/media, ~/, ...).

Example:

        "plots" : [
            "/media/drive-a", <---- traditional way
            {
                "path" : "/media/drive-b", <---- same as above but
                "type" : "sequential"      <---- more verbose
            },
            {
                "path" : [
                    "x:\\plots", <---- all of these 
                    "y:\\plots", <---- drives will be
                    "z:\\plots"  <---- read sequentially
                ],
                "type" : "sequential"
            },
            {
                "path" : "z:/plots", <---- this is also valid on Windows
                "type" : "parallel"  <---- all files in z:/plots are read in parallel 
            }
        ],

processorType

This is the processing unit that is used during mining. It can be one of the following values:

CPU, CUDA, OPENCL

When using CPU, cpuInstructionSet is used as the CPU instruction set for the CPU.

rescanEveryBlock

Indicates, if the plot files inside the plots are scanned before the start of every block. This can be useful to add new plot files without having to shut down the miner.

submissionMaxRetry

When the pool can't confirm a sent nonce in timeout seconds, the miner will retry to send it and wait for another confirmation maximum submissionMaxRetry times. The problem with the confirmations is, that almost every nonce is confirmed, but sometimes the server don't send it due to high workload. So the miner thinks the server didn't get the nonce and will retry the whole process. Every time the server has to verify your nonce, it causes a higher workload.

You should set this setting to a value between 2 and 10. The more miners are mining at a pool, the more unconfirmed nonces you could get. Keep in mind that the miner is intelligent enough to see when a nonce doesn't need to be confirmed anymore. So it is better to use a high value instead of a low one.

submitProbability

This determines the dynamic target deadline. E.G. A submitprobability of 0.9 chooses the tragetDL each round such that you submit a dl in 90% of rounds.

To disbale dynamic target deadline set this to 0 and then it will submit everyting bellow whats specified in targetDeadline

targetDeadline

Found nonces need to have a lower deadline then this value to be submitted. If targetDeadline is 0 (default), this feature is ignored.

The target deadline can be given as a number (for example "targetDeadline" : 12345), which represents the total seconds of the deadline, or as a formatted string (for example "targetDeadline" : "1y 2d 12:34:56").

The formatted string look like this:

[<n>y] [<n>m] [<n>d] <nn>:<nn>:<nn>

where n is a number >= 0 and values inside [...] are optional.

You dont have to put in the whole string when you dont need portions of it.

Here are some examples

formatted string seconds
1d 00:00:00 86400
1m 00:00:00 2629800
15d 12:34:56 1341296

timeout

Every communication with the server has a maximum waiting time of timeout seconds. If you set this value too low, the server has no time to react to your request. When the session is closed after a timeout, the server can't send you the response, although it could. It is a lose-lose situation, because you don't get your needed informations, and the server is spending time with pointless requests.

You should set this setting to a value between 20 and 60 seconds. The more active miners the pool has, the higher this value should be.

Most people use a single URL, if you using a multi mining setup or would like to use fallback URL's then please see that section.

The format looks something like this for non fallback.

"submission" : "http://pool.creepminer.net:8124",

Fallback URLs (Introduced in 1.9.0)

Mining information and submissions will be fetched from the first specified URL. If it has an error, it will fail over to the next URL specified.

The logic

When the miner detects an error (Timeout, no connection, error messages E.G. 400, 404, 500) it will then pick the next address specified.

  • miningInfo - getMiningInfoInterval * timeout
  • submission - submissionMaxRetry * timeout
"miningInfo" : [
    "https://master-miner:8124",
    "http://pool.creepminer.net:8124"
],
"submission" : [
    "http:///master-miner:8124",
    "http://pool.creepminer.net:8124"
],

submission

This is the uri, where the miner will send found nonces and wait for confirmation. Can be a pool or a wallet (when solo mining).

miningInfo

From here the miner will get mining instructions for new blocks. You can leave this setting empty. Then it will be set to poolUrl.

wallet

From here the miner will fetch all wallet data, for example the name of the accounts or the last winner. It can be an online wallet or a local wallet, run by you.

If you leave the value empty ("wallet" : ""), all wallet features are disabled.

proxy (Introduced in 1.9.0)

If your miner is behind a proxy, you may use the proxy feature to route your traffic through it.

"proxy" : "proxy.net:3218" <-- proxy with no authentication required
"proxy" : "user@proxy.net:3218" <-- with username
"proxy" : "user:password@proxy.net:3218" <-- with username & password

walletRequestRetryWaitTime

This value sets the wait time between every non successful wallet request.

walletRequestTries

This value sets the maximal tries for a wallet request.

workerName

This value sets worker name.

useInsecurePlotfiles

If you set this option to true, the miner will use also plotfiles, that can cause undefined behaviour while doing so. These are for example plotfiles, that are read while plotted, or have a malformed staggersize.

wakeUpTime

int >= 0, default = 0

When set to a value > 0, the wake up function is used every wakeUpTime seconds. The miner will send simple read instruction to all HDDs, to prevent them from sleeping.

webserver

activeConnections

The amount of open connection handlers, that are processing incoming requests to the webserver.

calculateEveryDeadline

If true, the miner will calculate every incoming deadline, that needs to be forwarded. Otherwise the miner will try to parse the deadlines from predefined fields inside the request.

connectionQueue

The amount of places in the list of connections, that are handled, whenever an active connection handler has time for it. When the queue is full, no more connections can be accepted, until the queue has 1 place left again.

credentials

pass

This value is the value of the password for the webserver. It will be hashed by the miner, when a plain-password is set.

user

This value is the value of the username for the webserver. It will be hashed by the miner, when a plain-user is set.

certificate (currently only supported on windows)

pass

This value is the password for the certificate. It will not be hashed by the miner.

path

Full path and name of certificate, E.G. "D:\creepMiner\certs\localhost.pfx"

cumulatePlotsizes

If true, the miner adds the total plot size amount of all miners, that submit deadlines to the webserver.

forwardMinerNames

If true, the real name of the deadline submitting miner is forwarded to the destination, instead of the name of the forwarding creepMiner.

note: For multi mining setup this should be set to false on your master node.

forwardUrls

This is the whitelist for all URLs, that are allowed to be forwarded by the miner. The strings are read as a regex value.

example:

"forwardUrls" : [
   "^/burst&requestType=getMiningInfo$", <-- this will allow getMiningInfo requests
   "^/burst&requestType=getAccount&accountId=\\d+$" <-- this will allow getAccount requests with dynamic account ids
]

note: For multi mining setup this should be set to false on your master node.

start

If you want, you can activate a local http server, run by the miner. There you can see informations of the mining process and simple controls.

url

On this url the miner will deploy the http server. Keep in mind, that your port has to be unused.

If you want to make the http server accessible from outside of the local computer, keep in mind to set the server url to the url, that the other computer see when they speak with yours.