Skip to content
Paraplegic Racehorse edited this page Jun 30, 2019 · 5 revisions

ADVANCED CONFIGURATION

Advanced config options are available via config file MPM supports customized configuration via config files.

The default config file name is '.\Config.txt'. If you do not include the command line parameter -ConfigFile [Path\FileName.txt] then MPM will use the default file name. If the config file does not exist MPM will create a config file with default values. If the file name does not have an extension MPM will add .txt file name extension.

The default config file contains only the parameters which are also available per command line.

Note: More config items are added to the live configuration during runtime. For full list of available config items at runtime see the API at http://localhost:3999/config.

All items could also be added manually to the config file (use with caution as this might lead to unpredictable results). The config file is a JSON file and human readable / editable. A good primer for understanding the JSON structure can be found here: https://www.tutorialspoint.com/json/index.htm

Warning: The JSON file structure is very fragile - every comma counts, so be careful when editing this file manually. To test the validity of the structure use a web service like https://jsonblob.com (copy/paste the complete file).

Sample content of 'Config.txt'

{ 
    "Algorithm": "$Algorithm", 
    "AllowedBadShareRatio": "$AllowedBadShareRatio", 
    "API_ID": "$API_ID", 
    "API_Key": "$API_Key", 
    "APIPort": "$APIPort", 
    "BasePowerUsage": "$BasePowerUsage", 
    "BenchmarkInterval": "$BenchmarkInterval", 
    "CoinName": "$CoinName", 
    "ConfigFile": "$ConfigFile", 
    "CreateMinerInstancePerDeviceModel": true, 
    "Currency": "$Currency", 
    "Dashboard": "$Dashboard", 
    "Debug": "$Debug", 
    "Delay": "$Delay", 
    "DeviceName": "$DeviceName", 
    "DevicePciOrderMapping": "$DevicePciOrderMapping", 
    "DisableDevFeeMining": "$DisableDevFeeMining", 
    "DisableMinersWithDevFee": "$DisableMinersWithDevFee", 
    "Donate": "$Donate", 
    "ErrorAction": "$ErrorAction", 
    "ErrorVariable": "$ErrorVariable", 
    "ExcludeAlgorithm": "$ExcludeAlgorithm", 
    "ExcludeCoinName": "$ExcludeCoinName", 
    "ExcludeDeviceName": "$ExcludeDeviceName", 
    "ExcludeMinerName": "$ExcludeMinerName", 
    "ExcludeMiningCurrency": "$ExcludeMiningCurrency", 
    "ExcludePoolName": "$ExcludePoolName", 
    "HashRateSamplesPerInterval": "$HashRateSamplesPerInterval", 
    "HWiNFO64_SensorMapping": "$HWiNFO64_SensorMapping", 
    "IgnoreFees": "$IgnoreFees", 
    "IgnorePowerCost": "$IgnorePowerCost", 
    "InformationAction": "$InformationAction", 
    "InformationVariable": "$InformationVariable", 
    "Interval": "$Interval", 
    "MeasurePowerUsage": "$MeasurePowerUsage", 
    "MinAccuracy": 0.5, 
    "MinerName": "$MinerName", 
    "MinerStatusKey": "$MinerStatusKey", 
    "MinerStatusUrl": "$MinerStatusUrl", 
    "MinHashRateSamples": "$MinHashRateSamples", 
    "MiningCurrency": "$MiningCurrency", 
    "MinWorker": "$MinWorker", 
    "OutBuffer": "$OutBuffer", 
    "OutVariable": "$OutVariable", 
    "PipelineVariable": "$PipelineVariable", 
    "PoolBalancesUpdateInterval": "$PoolBalancesUpdateInterval", 
    "PoolName": "$PoolName", 
    "PowerPrices": "$PowerPrices", 
    "PricePenaltyFactor": "$PricePenaltyFactor", 
    "ProfitabilityThreshold": "$ProfitabilityThreshold", 
    "Proxy": "$Proxy", 
    "Region": "$Region", 
    "ReportStatusInterval": "$ReportStatusInterval", 
    "ShowAllMiners": "$ShowAllMiners", 
    "ShowAllPoolBalances": "$ShowAllPoolBalances", 
    "ShowMinerWindow": "$ShowMinerWindow", 
    "ShowPowerUsage": "$ShowPowerUsage", 
    "SingleAlgoMining": "$SingleAlgoMining", 
    "SSL": "$SSL", 
    "SwitchingPrevention": "$SwitchingPrevention", 
    "UserName": "$UserName", 
    "Verbose": "$Verbose", 
    "Wallet": "$Wallet", 
    "WarmupTime": "$WarmupTime", 
    "WarningAction": "$WarningAction", 
    "WarningVariable": "$WarningVariable", 
    "Watchdog": "$Watchdog", 
    "WorkerName": "$WorkerName", 
    "Pools": {}, 
    "MinersLegacy": {}, 
    "Wallets": { "BTC": "$Wallet" }, 
    "VersionCompatibility": "3.3.0" 
} 

There is a section for Pools, Miners and a general section.

Advanced configuration for Pools

Settings for each configured pool are stored in its own subsection. These settings are only valid for the named pool.

CoinName per pool [Zcash, ZeroCoin etc.]

Only mine the selected coins at the specified pool. E.g. To mine only Zcash & ZeroCoin at Zpool:

ˋˋ "ZpoolCoins": { "CoinName": [ "Zcash", "ZeroCoin" ] } ˋˋ

Note: Only the pools ending in ...Coins expose the coin name in their API.

ExcludeAlgorithm per pool

Do not use the configured algorithms for mining at the specified pool. E.g. To NOT mine Equihash and Ethash2gb at Zpool:

ˋˋ "ZpoolCoins": { "ExcludeAlgorithm": [ "Equihash", "Ethash2gb" ] } ˋˋ

ExcludeCoinName per pool [Zcash, ZeroCoin etc.]

Exclude selected coins from being mined at the specified pool. E.g. To NOT mine Zcash & ZeroCoin at Zpool:

ˋˋ "ZpoolCoins": { "ExcludeCoinName": [ "Zcash", "ZeroCoin" ] } ˋˋ

Note: Only the pools ending in ...Coins expose the coin name in their API.

ExcludeRegion per pool

Do not use the pool endpoints in select regions. This may be useful when a pool has a problem with its endpoints in some regions, e.g. https://bitcointalk.org/index.php?topic=472510.msg51637436#msg51637436. E.g. To NOT use the MiningPoolHub mining endpoints in region 'Europe':

ˋˋ "MiningPoolHub": { "ExcludeRegion": [ "Europe" ] } ˋˋ

Note: The values for 'Regions' must match the definitions in 'Regions.txt'.

MinWorker

This parameter allows to define a required minimum number of workers at the pool per algorithm. If there are less then the configured number of workers MPM will skip the affected algorithms. Wildcards (* and ?) for the algorithm names are supported. If an algorithm name/wildcard matches more than one entry then the lower number takes priority.

Important: The general '-MinWorker' value is always applied. Only algorithms matching the global workers count will eventually be handled by the per-pool config. E.g. To ignore 'Ethash*' & 'Equihash1445' algorithms at MiningPoolHub if there are less than 10 workers set MinWorker like this:

ˋˋ "MiningPoolHub": { "MinWorker": { "Ethash*": 10, "Equihash1445": 10 } } ˋˋ

Note: Not all pools support this, for more information consult the pools web page or check the MPM web GUI If -MinWorker is set on a general AND pool level, then the lower number takes priority.

NiceHash internal wallet

If you have a NiceHash internal wallet you can configure MPM/NiceHash Pool to mine to the internal address. MPM will then use the lower pool fee of 1% for calculations. To use the NiceHash internal wallet modify the NiceHash pool section (you may have to create is first). Enter your "<YOUR_NICEHASH_INTERNAL_WALLET>" (of course you need to insert the real BTC address), and set the flag '"IsInternalWallet": true':

ˋˋˋ "NiceHash": { "Wallets": { "BTC": "<YOUR_NICEHASH_INTERNAL_WALLET>" }, "IsInternalWallet": true } ˋˋˋ

Payout currency

If a pool allows payout in another currency than BTC you can set the currency you wish to be paid. By default MPM will add ALL currencies configured by $Wallet as possible payout currencies for the pool. For each pool you can statically add a section similar to this (see http://localhost:3999/config) to your config file:

ˋˋ "Zpool": { "Wallets": { "BTC": "$Wallet" }, "Worker": "$WorkerName" } ˋˋ

The payout currency is defined by this line:

ˋˋˋ "BTC": "$Wallet" ˋˋˋ

MPM will use the the wallet address from the start.bat file E.g. to change the payout currency for Zpool to LiteCoin replace the line for BTC with ˋ"LTC": "<YOUR_LITECOIN_ADDRESS>"ˋ, (of course you need to insert a real LTC address)

ˋˋˋ "Zpool": { "Wallets": { "LTC": "<YOUR_LITECOIN_ADDRESS>" }, "Worker": "$WorkerName" } ˋˋˋ

Note: Not all pools support this, for more information consult the pools web page

PricePenaltyFactor per pool

If you feel that a pool is exaggerating its estimations then set a penalty factor to lower projected projected calculations. E.g. You feel that Zpool is exaggerating its estimations by 10% - Set PricePenaltyFactor to 0.9:

ˋˋˋ "Zpool": { ... "PricePenaltyFactor": 0.9, ... } ˋˋˋ

Note: This is also a general parameter (see -PricePenaltyFactor). If both parameters - general and pool - are present, then the pool parameter takes precedence.

Regions per pool

Only use the pool endpoints is selected regions.

This may be useful when a pool has a problem with its endpoints in some regions, e.g. https://bitcointalk.org/index.php?topic=472510.msg51637436#msg51637436. E.g. To use MiningPoolHub mining endpoints in regions 'Asia' and 'US' ONLY:

ˋˋˋ "MiningPoolHub": { "Region": [ "Asia", "US" ] } ˋˋˋ

Note: The values for 'Regions' must match the definitions in 'Regions.txt'.

ZergPool(Coins) Solo/Party mining

Check the pools web page for more information first! For ZergPool(Coins) solo or party mining edit the config file as follows:

ˋˋˋ "Pools": { "ZergPool": { "PasswordSuffix": { "Algorithm": { "": "", "Equihash": ",m=solo" } } }, "ZergPoolCoins": { "PasswordSuffix": { "Algorithm": { "": "", "Equihash": ",m=solo" }, "CoinName": { "*": "", "Digibyte": ",m=solo" } } } ˋˋˋ

"*" will be appended to any algorithm / coinname. No other wildcards are allowed. All values are cumulative, so if you specify a value for algorithm AND coinname, then both values will be appended.

Advanced configuration for Miners

Settings for each configured miner are stored in its own subsection. These settings are only valid for the named miner.

ExcludeAlgorithm per miner

E.g. To exclude the Ethash3gb algorithm from any version of the AMD_NVIDIA-ClaymoreEthash miner:

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "*": { "ExcludeAlgorithm": [ "Ethash2gb" ] }, }, }, ˋˋˋ

E.g. To exclude the Ethash2gb or Blake2s algorithms from AMD_NVIDIA-ClaymoreEthash_v14.7 miner:

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "v14.6": { "ExcludeAlgorithm": [ "Blake2s", "Ethash2gb" ] }, }, }, ˋˋˋ

"" stands for ANY miner version. The algorithm name must be entered in the normalized form as returned by Get-Algorithm. If both, a version specific and generic config ("") exist, then all matching algorithms are excluded.

Disable miner developer fee per miner

Note: not all miners support turning off their built in fees, others will reduce the hashrate, check the miners web page for more information E.g. To disable the dev fee mining from any version of the AMD_NVIDIA-ClaymoreEthash miner:

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "*": { "DisableDevFeeMining": true }, }, }, ˋˋˋ

E.g. To disable the dev fee mining from AMD_NVIDIA-ClaymoreEthash_v14.7 miner:

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "v14.6": { "DisableDevFeeMining": true }, }, }, ˋˋˋ

"" stands for ANY miner version. If this setting is defined in multiple places (version specific, version generic ("") and global), then the most specific value is used.

Persistent miner configuration

Storing the miner configuration in the config file allows for easier version / miner file upgrades. There is no need to edit the miner files.

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "": { "CommonParameters": "", "Parameters": { "": " --no-crashreport", "Ethash2gb": " -ethi 9", "Ethash2gbPascal-20": " -colors" } }, "v14.6": { "CommonParameters": "", "Parameters": { "*": " --no-crashreport", "Ethash2gb": " -ethi 9", "Ethash2gbPascal-20": " -colors" } } } } ˋˋˋ

The miner name must be entered without the ending version number (e.g. for AMD_NVIDIA-ClaymoreEthash_v14.7 remove _v14.6) The algorithm name must be entered in the normalized form as returned by Get-Algorithm.

Note: All parameter values must be entered with a leading space (' ') character!

"*" stands for ANY version or ANY algorithm.

If both, specific (e.g. miner version / algorithm name) and generic config ("*") exist, then only the specific config is used. The generic config will be ignored entirely.

**Important: The miner config defined in the config file overrides all 'out-of-the-box' config that is defined in the miner definition file.

** Parameters: These settings will be added to the miner command line for the selected miner algorithm.

** CommonParameters: These settings will be added to the miner command line for ALL miner algorithms. Parameters and CommonParameters are cumulative.

Add custom miner commands

MPM stores all default miner commands (= what algos to mine) in the miner file. You can override these commands with your own by modifing the config file:

ˋˋˋ "MinersLegacy": { "AMD_NVIDIA-ClaymoreEthash": { "*": { "Commands": [ { "MainAlgorithm": "Ethash2gb", "MinMemGB": 2 "SecondaryAlgorithm": "blake2s", "SecondaryIntensity": 25, "Params": " -colors" }, { "MainAlgorithm": "ethash3gb", "MinMemGB": 2, "SecondaryAlgorithm": "blake2s", "SecondaryIntensity": 35, "Params": " -colors" } ] }, "v14.6": { "Commands": [ { "MainAlgorithm": "Ethash2gb", "MinMemGB": 2, "SecondaryAlgorithm": "blake2s", "SecondaryIntensity": 25, "Params": " -colors" }, { "MainAlgorithm": "ethash3gb", "MinMemGB": 2, "SecondaryAlgorithm": "blake2s", "SecondaryIntensity": 35, "Params": " -colors" } ] } } } ˋˋˋ

The miner name must be entered without the ending version number (e.g. for AMD_NVIDIA-ClaymoreEthash_v14.7 remove _v14.6)

The algorithm name must be entered in the normalized form as returned by Get-Algorithm. Commands must match the data structure as found in the exeisting miner files. Not all miners use the same parameters.

"*" stands for ANY version or ANY algorithm.

If both, specific (e.g. miner version / algorithm name) and generic config ("*") exist, then only the specific config is used. The generic config will be ignored entirely.

Important: The miner commands defined in the config file override all 'out-of-the-box' commands that are defined in the miner definition file.

Pre- / post miner program execution

MPM can execute any program/script/batch file on any of these events:

  • before a miner gets started (PreStopCommand)
  • after a miner got startet (PostStartCommand)
  • before a miner gets started (PreStopCommand)
  • after a miner got stopped (PostStopCommand)
  • after miner failure got detected (PostFailureCommand)

Modify the config file to define the program and its parameters. E.g.

ˋˋˋ "MinersLegacy": { "": { "PreStartCommand": "_ the command put here would be run before ANY miner gets started", "PostStartCommand": "cmd.exe /c ECHO $((Get-Date).ToUniversalTime()): Starting miner ($($Miner.Name) {$(($Miner.Algorithm | ForEach-Object {"$($)@$($Pools.$.Name)"}) -join "; ")}). >> .\Logs\minerstart.log", "PreStopCommand": "REM run this command before the miner gets stopped", "PostStopCommand": "cmd.exe /c ECHO $((Get-Date).ToUniversalTime()): Stopped miner ($($Miner.Name) {$(($Miner.Algorithm | ForEach-Object {"$($)@$($Pools.$.Name)"}) -join "; ")}). >> .\Logs\minerstop.log", "PostFailureCommand": "_ the command put here would be run after any miner failure" }, "AMD_NVIDIA-lolMinerEquihash": { "": { "PreStartCommand": "'C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe' -Profile1", "PostStartCommand": "" "PreStopCommand": "_ the command put here would be run before AMD_NVIDIA-lolMinerEquihash miner (any version) gets stopped", "PostStopCommand": "", "PostFailureCommand": "" } }, "NVIDIA-CryptoDredge": { "v0.19.1": { "PreStartCommand": "'C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe' -Profile2", "PostStartCommand": "" "PreStopCommand": "_ the command put here would be run before NVIDIA-CryptoDredge_v0.18.0 miner gets stopped", "PostStopCommand": "", "PostFailureCommand": "shutdown /r /t 10" } } } ˋˋˋ

"*" stands for ANY miner or ANY miner version. The miner name must be entered without the ending version number (e.g. for NVIDIA-CryptoDredge_v18.0 remove _v18.0)

Important: If two or more entries match, then the more specific entry is executed.

Double quotes (") or backslashes must be escaped with backslash as shown below.

To execute simple batch file commands you need to use 'cmd.exe /c '.

You can also use any MPM internal variables or simple powershell code like this:

ˋˋˋ "PreStartCommand": "$(if (($Miner.Algorithm | Select-Object -Index 0) -eq "MTP") {"'C:\Program Files\Tools\MSI Afterburner\MSIAfterburner.exe' -Profile1"})", "PostStartCommand": "cmd.exe /c ECHO $((Get-Date).ToUniversalTime()): Started miner ($($Miner.Name) {$(($Miner.Algorithm | ForEach-Object {"$($)@$($Pools.$.Name)"}) -join "; ")}). >> .\Logs\minerstart.log" ˋˋˋ

Advanced general configuration

Settings in this section affect the overall behaviour of MPM and will take precedence over command line parameters.

DevicePciOrderMapping

Some miners (currently Claymore*, Gminer, lolMinerEquihash, Nanominer, SRBMinerCryptonight & Wildrig) enumerate the GPU devices based on the PCI deviceID. All other miners use the device order as returned by the OpenCL API.

The result of the two ordering methods can be differnt and will lead to invalid device selectons where two miners, e.g. Gminer and ClaymoreDual, are selecting different device IDs, but as a consequence will finally end up running on the same GPU causing errors.

To manually override the PCI deviceID mapping create a section in the config file similar to this:

ˋˋˋ { ... "DevicePciOrderMapping": { "GPU#00": "0", "GPU#01": "1", "GPU#02": "3", "GPU#03": "2" }, ... } ˋˋˋ

Note: In most cases there is no need for this extra mapping and all miners will operate just fine. This mapping only applies to miners using the PCI deviceID for the device enumeration. More info can be found here: https://github.com/nanopool/nanominer/issues/30 https://github.com/develsoftware/GMinerRelease/issues/18

Ignore pool and miner fees

Beginning with version 3.1.0 MPM makes miner and pool fees part of the profitability calculation. This will lead to somewhat lower, but more accurate profit estimates. To ignore miner and pool fees (as older versions did) add '"IgnoreFees": true' to the general section:

ˋˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "IgnoreFees": true, ... } ˋˋˋ

PricePenaltyFactor

Default factor with which MPM multiplies the prices reported by ALL pools. The default value is 1 (valid range is from 0.1 to 1.0). E.g. You feel that MPM is exaggerating its profit estimations by 20% for ALL pools - Set PricePenaltyFactor to 0.8:

ˋˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "PricePenaltyFactor": 0.8, ... } ˋˋˋ

Note: This is also a pool parameter (see PricePenaltyFactor per pool). If both parameters - general and pool - are present, then the pool parameter takes precedence.

To show miner windows

By default MPM hides most miner windows as to not steal focus. All miners write their output to files in the Log folder. To show the miner windows add '"ShowMinerWindow": true' to the general section:

ˋˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "ShowMinerWindow": true, ... } ˋˋˋ

Note: Showing the miner windows disables writing the miner output to log files. Miners of API type 'Wrapper' will remain hidden.

Pool Balances

MPM can gather the pending BTC balances from all configured pools. To display the balances of all enabled pools (excluding those that are excluded with -ExcludeMinerName) on the summary screen and in the web GUI add '"ShowPoolBalances": true' to the general section:

ˋˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "ShowPoolBalances": true ... } ˋˋˋ

To display the sum of each currency in the balances (depending on 'ShowPoolBalancesExcludedPools' including those that are excluded with 'ExcludeMinerName') and the exchange rates for all currencies on the summary screen add '"ShowPoolBalancesDetails": true' to the general section:

`ˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "ShowPoolBalancesDetails": true, ... } ˋˋˋ

To display the balances of all pools (including those that are excluded with -ExcludeMinerName) on the summary screen and in the web GUI add '"ShowPoolBalances": true' to the general section:

ˋˋˋ { ... "SwitchingPrevention": "$SwitchingPrevention", "ShowPoolBalancesExcludedPools": true ... } ˋˋˋ

Note: Only balances in BTC are listed, other currencies are currently not supported.