Skip to content
Permalink
Browse files

V. 5.5.1: Bugfix and NiceHash CryptonightV8 algorithm

V. 5.5.1: Bugfix and NiceHash CryptonightV8 algorithm
  • Loading branch information...
cryptoprofitswitcher committed Oct 17, 2018
2 parents 8d2a5b5 + 2831cd5 commit 6362fa17b39aa6ca12cc22d710fc2a3afa837e10
@@ -6,7 +6,7 @@
<TrimUnusedDependencies>true</TrimUnusedDependencies>
<LinkDuringPublish>true</LinkDuringPublish>
<ShowLinkerSizeComparison>true</ShowLinkerSizeComparison>
<Version>5.5.0</Version>
<Version>5.5.1</Version>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
@@ -38,12 +38,18 @@
<None Update="Coins\Quantum.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="NicehashAlgorithms\CryptonightV8.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="XmrStak\amd_heavy.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="XmrStak\amd_lite.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="XmrStak\amd_v8.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="XmrStak\amd_v7.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -112,6 +118,9 @@
<None Update="JceMiner\config_v7.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="JceMiner\config_v8.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="JceMiner\jce_cn_gpu_miner64.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -0,0 +1,19 @@

"cpu_threads_conf" :
[
{ "cpu_architecture" : "auto", "affine_to_cpu" : 0, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 2, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 4, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 6, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 8, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 7, "use_cache" : true },
{ "cpu_architecture" : "auto", "affine_to_cpu" : 10, "use_cache" : true },
],

"gpu_threads_conf" :
[
{ "mode" : "GPU", "worksize" : 16, "alpha" : 64, "beta" : 16, "gamma" : 4, "delta" : 4, "epsilon" : 4, "zeta" : 4, "index" : 0, "multi_hash":1920 },
{ "mode" : "GPU", "worksize" : 16, "alpha" : 64, "beta" : 16, "gamma" : 4, "delta" : 4, "epsilon" : 4, "zeta" : 4, "index" : 0, "multi_hash":1920 },
{ "mode" : "GPU", "worksize" : 16, "alpha" : 64, "beta" : 16, "gamma" : 4, "delta" : 4, "epsilon" : 4, "zeta" : 4, "index" : 1, "multi_hash":1872 },
{ "mode" : "GPU", "worksize" : 16, "alpha" : 64, "beta" : 16, "gamma" : 4, "delta" : 4, "epsilon" : 4, "zeta" : 4, "index" : 1, "multi_hash":1872 },
]
BIN +0 Bytes (100%) JceMiner/jce_cn_gpu_miner64.exe
Binary file not shown.
@@ -12,6 +12,7 @@ namespace CryptonightProfitSwitcher.Miners
{
public class SrbMiner : IMiner
{
private int _customPort;
private Process _process;
private Mineable _mineable;
private IMiner _cpuMiner;
@@ -22,7 +23,7 @@ public double GetCurrentHashrate(Settings settings, DirectoryInfo appRootFolder)
double gpuHashrate = 0;
try
{
int port = _mineable.SRBMinerApiPort;
int port = _customPort > 0 ? _customPort : _mineable.SRBMinerApiPort;
var json = Helpers.GetJsonFromUrl($"http://127.0.0.1:{port}", settings, appRootFolder, CancellationToken.None);
dynamic api = JObject.Parse(json);
gpuHashrate = api.hashrate_total_now;
@@ -85,6 +86,27 @@ public void StartMiner(Mineable mineable, Settings settings, string appRoot, Dir
space = " ";
}

if (!userDefindedArgs.Contains("--apienable"))
{
args += $"{space}--apienable";
space = " ";
}

int portIndex = userDefindedArgs.IndexOf("--remoteport");
if (portIndex == -1)
{
if (mineable.SRBMinerApiPort > 0)
{
_customPort = mineable.SRBMinerApiPort;
args += $"{space}--apiport {_customPort}";
space = " ";
}
}
else
{
_customPort = Int32.Parse(userDefindedArgs[portIndex + 1]);
}

if (!String.IsNullOrEmpty(mineable.SRBMinerExtraArguments))
{
args += space + mineable.SRBMinerExtraArguments;
@@ -0,0 +1,92 @@
{
/* GENERAL CONFIGURATION - ALWAYS NEEDED */

// Displayed name, can be anything.
"DisplayName": "CryptonightV8",
// Api ID listed on nicehash.com/doc-api, needed to get profit data
"ApiId": 34,
// Mining algorithm of coin, can be CryptonightV7, CryptonightV8, CryptonightHeavy, CryptonightLite, CryptonightBittube, CryptonightStellite, CryptonightHaven or CryptonightMasari
"Algorithm": "CryptonightV8",
// Used Miner, can be XmrStak, CastXmr, SRBMiner or JceMiner (Recommended: XmrStak)
"Miner": "SRBMiner",
// Path to script that runs before the miner starts, can be null.
// For example:: Path to batch file that sets specific OverdriveN settings for this algorithm
"PrepareScript": null,
// Enables or disables this algorithm, can be true or false (default: true)
"Enabled": true,

/* OVERRIDE SETTINGS - NOT NEEDED */

// Override the expected hashrate, can be a number or null.
"OverrideExpectedHashrate": null,
// Override the profit timeframe, can be Live, Day or null.
"OverrideProfitTimeframe": "Live",
// On the determination of the most profitable algorithm, the actual estimated profit will be multiplied by this.
// Can be a decimal or null. It is recommended to prefer NiceHash algorithms.
"PreferFactor": 10.15,

/* AUTO POOL CONFIGURATION - NEEDED FOR CASTXMR OR IF POOL CONFIG FILE IS NOT DIRECTLY SET */

"PoolAddress": "cryptonightv8.eu.nicehash.com:3367",
"PoolWalletAddress": "31zXAFVEeksCYSnxfGz9VE9Dk6WXfijpuy.Worker",
"PoolPassword": "x",
"PoolUseTls": false,
"PoolTlsFingerprint": "",
"PoolWeight": 1,
"PoolRigId": "",

/* XMR-STAK CONFIGURATION - NEEDED IF MINER IS XMRSTAK OR FOR CPU MINING*/

// Path to Xmr-Stak executable
"XmrStakPath": "$PlatformSpecificXmrStakPath",
// Path to Xmr-Stak config file
"ConfigPath": "XmrStak/config.txt",
// Port of the Xmr-Stak Json API, should match the port in the config file of Xmr-Stak.
"XmrStakApiPort": 4000,
// Path to Xmr-Stak cpu config file, can be null.
"CpuPath": "XmrStak/cpu_v7.txt",
// Path to Xmr-Stak amd gpu config file, can be null.
"AmdPath": "XmrStak/amd_v8.txt",
// Path to Xmr-Stak nvidea gpu config file, can be null.
"NvidiaPath": null,
// Set the path to Xmr-Stak pool config file directly (can be null, if you use AUTO POOL CONFIGURATION)
"PoolsPath": null,

/* CASTXMR CONFIGURATION - NEEDED IF MINER IS CASTXMR */

// Path to CastXmr executable
"CastXmrPath": "CastXmr/cast_xmr-vega.exe",
// Extra arguments for setting the GPUs or tuning
"CastXmrExtraArguments": "-G 0,1",
// Set if you want to also start Xmr-Stak for CPU Mining
"CastXmrUseXmrStakCPUMining": true,
// Port of the CastXmr JSON Api (0 = default (7777))
"CastXmrApiPort": 0,

/* SRBMINER CONFIGURATION - NEEDED IF MINER IS SRBMINER*/

// Path to SRBMiner executable
"SRBMinerPath": "SRBMiner/SRBMiner-CN.exe",
// Path to SRBMiner config file
"SRBMinerConfigPath": "SRBMiner/config_v8.txt",
// Port of the SRBMiner REST API, should match the port in the config file of SRBMiner.
"SRBMinerApiPort": 21555,
// Set the path to SRBMiner pool config file directly (can be null, if you use AUTO POOL CONFIGURATION)
"SRBMinerPoolsPath": null,
// Extra arguments that will be passed over to SRBMiner, can be a string or null
"SRBMinerExtraArguments": null,
// Set if you want to also start Xmr-Stak for CPU Mining
"SRBMinerUseXmrStakCPUMining": true,

/* JCEMINER CONFIGURATION - NEEDED IF MINER IS JCEMINER */

// Path to JceMiner executable
"JceMinerPath": "JceMiner/jce_cn_gpu_miner64.exe",
// Path to JceMiner config (can be null <- then auto configuration will be used)
"JceMinerConfig": "JceMiner/config_v8.txt",
// Port of the JceMiner JSON Api (0 = auto)
"JceMinerApiPort": 0,
// Extra arguments for JceMiner
"JceMinerExtraArguments": null

}
@@ -20,7 +20,7 @@ namespace CryptonightProfitSwitcher
{
internal static class Program
{
private const int VERSION = 9;
private const int VERSION = 10;

private static IMiner _currentMiner;
private static Mineable _currentMineable;
@@ -1 +1 @@
dotnet publish -c ReleaseLinux -r ubuntu.14.04-x64
dotnet publish -c ReleaseLinux -r ubuntu.14.04-x64 -o ./bin/publish/CryptonightProfitSwitcher_ubuntu64
@@ -0,0 +1 @@
dotnet publish -c Release -r win-x64 -o ./bin/publish/CryptonightProfitSwitcher_win64
@@ -20,7 +20,7 @@ It is optimized for **Windows** but also works for **Linux**.
- **Profit data:** [MineCryptoNight API](http://minecryptonight.net/api), [CryptUnit API](https://www.cryptunit.com/api/), [miner.rocks API](https://miner.rocks/), [cryptoknight.cc API](https://cryptoknight.cc/), [MoneroOcean](https://moneroocean.stream)
- **Multiple profit switching strategies:** Maximize fiat profit, maximize coin reward or a combination
- **Manual mode:** You can switch between automatic mode and manual mode where you select the coin / NiceHash algorithm yourself
- **Supports all algorithms:** CryptonightV7, CryptonightHeavy, CryptonightLiteV7 and the variants of Bittube, Stellite and Haven Protocol
- **Supports all algorithms:** CryptonightV7, CryptonightHeavy, CryptonightLiteV7 and the variants of Bittube, Stellite, Masari and Haven Protocol
- **Supports all coins:** That are mineable using the miners
- **Supports all pools:** That are supported by the miners

@@ -32,7 +32,7 @@ It is optimized for **Windows** but also works for **Linux**.
3. Optimize the Xmr-Stak config
1. Go to the folder *Xmr-Stak*
2. Edit the *cpu_v7.txt*, *cpu_heavy.txt*, *cpu_lite.txt* according to your CPU.
3. Edit the *amd_v7.txt*, *amd_heavy.txt*, *amd_lite.txt* according to your GPU.
3. Edit the *amd_v7.txt*, *amd_v8.txt*, *amd_heavy.txt*, *amd_lite.txt* according to your GPU.
4. Set your pool mined coins
1. Go to the folder *Coins*
2. Delete the existing coins you don't want to mine
@@ -47,7 +47,7 @@ It is optimized for **Windows** but also works for **Linux**.
6. Start *CryptonightProfitSwitcher.exe* (Optional: As administrator)
7. PROFIT!!!

You can also use it with Cast XMR or SRBMiner. The steps are similar like above.
You can also use it with Cast XMR, SRBMiner or JCE Miner. The steps are similar like above.
Just look at the comments in the JSON files and you will understand how to use other miners.

### Default configuration
@@ -56,8 +56,8 @@ If you download the latest release, there will be a default configuration:

- CPU: AMD Ryzen 1600X
- GPU: AMD Vega 64 + AMD Vega 56
- Coins: Bittube, Graft, Haven Protocol, Loki, Stellite, AEON, Electroneum, MoneroOcean
- NiceHash: CryptonightV7, CryptonightHeavy
- Coins: Bittube, Graft, Haven Protocol, Loki, Masari, Stellite, AEON, MoneroOcean
- NiceHash: CryptonightV8, CryptonightV7, CryptonightHeavy
- Miner: XmrStak

You have to change the default configuration for your setup, see **How to use?**.
@@ -23,6 +23,6 @@
"gpu_conf" :
[
{ "id" : 0, "intensity" : 120, "worksize" : 16, "threads" : 2},
{ "id" : 1, "intensity" : 96, "worksize" : 16, "threads" : 2},
{ "id" : 1, "intensity" : 104, "worksize" : 16, "threads" : 2},
]
}
@@ -0,0 +1,8 @@

"gpu_threads_conf" : [
{ "index" : 0, "intensity" : 1920, "worksize" : 16, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : false },
{ "index" : 0, "intensity" : 1920, "worksize" : 16, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : false },
{ "index" : 1, "intensity" : 1872, "worksize" : 16, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : false },
{ "index" : 1, "intensity" : 1872, "worksize" : 16, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : false },
],
"platform_index" : 0,
@@ -1 +1 @@
9
10

0 comments on commit 6362fa1

Please sign in to comment.
You can’t perform that action at this time.