Skip to content

Commit

Permalink
Merge pull request #2013 from nicehash/master-handshake
Browse files Browse the repository at this point in the history
add Handshake algorithm, nbminer update
  • Loading branch information
S74nk0 authored Apr 3, 2020
2 parents 5561537 + 0a45132 commit a2d83ec
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/Miners/NBMiner/NBMiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ private string AlgoName
{
get
{
if (_algorithmSecondType != AlgorithmType.NONE) return "eaglesong_ethash";
if (_algorithmSecondType != AlgorithmType.NONE)
{
if(_algorithmType == AlgorithmType.Eaglesong) return "eaglesong_ethash";
else if(_algorithmType == AlgorithmType.Handshake) return "hns_ethash";
}
return PluginSupportedAlgorithms.AlgorithmName(_algorithmType);
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/Miners/NBMiner/NBMinerPlugin.PluginSupportedAlgorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ public partial class NBMinerPlugin
new SAS(AlgorithmType.Eaglesong),
// new SAS(AlgorithmType.DaggerHashimoto), // needs different protocol settings
new SAS(AlgorithmType.Eaglesong, AlgorithmType.DaggerHashimoto) { NonDefaultRAMLimit = 4UL << 30 },
new SAS(AlgorithmType.Handshake),
new SAS(AlgorithmType.Handshake, AlgorithmType.DaggerHashimoto) { NonDefaultRAMLimit = 4UL << 30 },
}
},
{
DeviceType.AMD,
new List<SAS>
{
new SAS(AlgorithmType.Eaglesong, AlgorithmType.DaggerHashimoto) { NonDefaultRAMLimit = 4UL << 30 },
new SAS(AlgorithmType.Handshake),
new SAS(AlgorithmType.Handshake, AlgorithmType.DaggerHashimoto) { NonDefaultRAMLimit = 4UL << 30 },
}
}
},
Expand All @@ -46,6 +50,7 @@ public partial class NBMinerPlugin
{ AlgorithmType.GrinCuckarood29, "cuckarood" },
{ AlgorithmType.Eaglesong, "eaglesong" },
{ AlgorithmType.DaggerHashimoto, "ethash" },
{ AlgorithmType.Handshake, "hns" },
}
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/Miners/NBMiner/NBMinerPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public NBMinerPlugin()
// https://github.com/NebuTech/NBMiner/releases/
MinersBinsUrlsSettings = new MinersBinsUrlsSettings
{
BinVersion = "v27.7",
BinVersion = "v28.1",
ExePath = new List<string> { "NBMiner_Win", "nbminer.exe" },
Urls = new List<string>
{
"https://github.com/NebuTech/NBMiner/releases/download/v27.7/NBMiner_27.7_Win.zip", // original
"https://github.com/NebuTech/NBMiner/releases/download/v28.1/NBMiner_28.1_Win.zip", // original
}
};
PluginMetaInfo = new PluginMetaInfo
Expand All @@ -42,7 +42,7 @@ public NBMinerPlugin()

public override string PluginUUID => "6c07f7a0-7237-11e9-b20c-f9f12eb6d835";

public override Version Version => new Version(8, 5);
public override Version Version => new Version(9, 0);
public override string Name => "NBMiner";

public override string Author => "[email protected]";
Expand Down
1 change: 1 addition & 0 deletions src/NHM.Common/Enums/AlgorithmType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public enum AlgorithmType
//[Obsolete("UNUSED Algorithm")]
Cuckaroom = 49,
GrinCuckatoo32 = 50,
Handshake = 51,
#endregion // NiceHashAPI
}

Expand Down
4 changes: 2 additions & 2 deletions src/NiceHashMiner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.6")]
[assembly: AssemblyFileVersion("3.0.0.6")]
[assembly: AssemblyVersion("3.0.0.7")]
[assembly: AssemblyFileVersion("3.0.0.7")]
3 changes: 2 additions & 1 deletion src/NiceHashMiner/ViewModels/Models/MiningData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public DeviceMiningStats Stats

public IEnumerable<Hashrate> Speeds => Stats?.Speeds?.Select(s => (Hashrate) s);

public double Payrate => TimeFactor.ConvertFromDay((Stats?.TotalPayingRateDeductPowerCost(BalanceAndExchangeRates.Instance.GetKwhPriceInBtc()) ?? 0) * 1000 );
public double Payrate => TimeFactor.ConvertFromDay((Stats?.TotalPayingRate() ?? 0) * 1000 );
//public double Payrate => TimeFactor.ConvertFromDay((Stats?.TotalPayingRateDeductPowerCost(BalanceAndExchangeRates.Instance.GetKwhPriceInBtc()) ?? 0) * 1000 );

public double FiatPayrate => BalanceAndExchangeRates.Instance.ConvertFromBtc(Payrate / 1000);

Expand Down
4 changes: 2 additions & 2 deletions src/NiceHashMinerLauncher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.6")]
[assembly: AssemblyFileVersion("3.0.0.6")]
[assembly: AssemblyVersion("3.0.0.7")]
[assembly: AssemblyFileVersion("3.0.0.7")]
2 changes: 1 addition & 1 deletion src/Tools/MinerPluginsPacker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static void CheckPluginMetaData(IMinerPlugin plugin)
}
}

private static int[] _supportedMajorverLinks = new int[] { 3, 4, 5, 6, 7, 8 };
private static int[] _supportedMajorverLinks = new int[] { 3, 4, 5, 6, 7, 8, 9 };
private static bool IsMajorVersionLinkSupported(int major)
{
return _supportedMajorverLinks.Contains(major);
Expand Down

0 comments on commit a2d83ec

Please sign in to comment.