Setting up the miner

Creepsky edited this page Feb 12, 2017 · 7 revisions

Setting up the miner

The configuration file

Before starting the miner, you should look for a proper setup. A bad configured miner will stress your computer and the server.

When starting the miner, you can add an optional parameter with the relative or absolute path to the configuration file. The configuration file need to be valid JSON format. 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 dir.

Possible settings

A valid configuration file could look like this

{
	"poolUrl": "http://pool.burstcoin.sk:8124",
	"miningInfoUrl": "http://burst.lexitoshi.uk:8124",
	"walletUrl": "https://wallet.burst-team.us:8128",
	"maxPlotReaders" : 0,
	"submissionMaxRetry": 3,
	"timeout": 30,
	"maxBufferSizeMB": 128,
	"logging" : {
		"path" : "",
		"config" : "information",
		"general" : "information",
		"miner" : "information",
		"nonceSubmitter" : "information",
		"plotReader" : "information",
		"plotVerifier" : "information",
		"server" : "fatal",
		"session" : "error",
		"socket" : "off",
		"wallet" : "information"
	},
	"plots": [
		"C:\\Plots",
		"D:\\Plots"
	],
	"Start Server": true,
	"serverUrl": "http://192.168.0.999:8080",
	"miningIntensity": 5,
	"passphrase" :
	{
		"algorithm" : "",
		"decrypted" : "",
		"deleteKey" : "",
		"encrypted" : "",
		"iterations" : "",
		"key" : "",
		"salt" : "",
	}
}

Most of the present 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.999, localhost, google, ...).
  • Port is the destination port, where the protocol is usually listening for incoming requests (80, 21, ...).

poolUrl (url, required)

This is the pool, where the miner will send found nonces and wait for confirmation. You should always set the reward recipient to the account of the pool, otherwise your shares are rejected.

miningInfoUrl (url, optional)

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

walletUrl (url, optional)

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.

maxPlotReaders (number >= 0, optional, default = 0)

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.

submissionMaxRetry (number >= 0, required, default = 3)

When the pool don'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 retry the whole process. Every time the server has to verify your nonce, what 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. Have in mind that the miner is intelligent enough to see when a nonce don't have to be confirmed anymore. So it is better to use a high value instead of a low one.

timeout (real number >= 0, optional, default = 30.0)

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.

maxBufferSizeMB (integer > 0, optional, default = 128)

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

plots (array[string], required)

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, ~/, ...).

Start Server (boolean, optional, default = false)

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.

If you activate this setting, setup the server location with serverUrl.

serverUrl (url, optional)

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.

targetDeadline (string or integer >= 0, optional, default = 0)

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

miningIntensity (integer >= 0, optional, default = 1)

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.

Logging

The creepMiner logs a lot of his work. Logging is done through different channels. Every channel has a level, that says what is logged. Additionally the creepMiner logs everything into a log file.

Path (string, optional, default = "")

The path, where the miner will create the log fthe path without the filename!

Level

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

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 logger in the creepMiner, that describes from where the message is coming. You can set for every logger an own log level.

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.

Passprase

If you want to mine solo you need to enter your passphrase. Because it would against your privacy to leave it for everybody readable in the configuration file, the creepMiner is equiped with an en/decryption.

Algorithm (string, optional, default = "aes-256-cbc")

This is the algorithm that is used for en/decryption. If you want to know all algorithms that you can use, use the command

openssl --help

Decrypted (string, optional)

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 (boolean, optional, default = true)

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

Encrypted (string, optional)

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

iterations (Integer, optional, default = 0)

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

Key (string, optional)

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 (string, optional)

The salt is an additional security for your encrypted passphrase.