Skip to content

Commit

Permalink
v6.3.11
Browse files Browse the repository at this point in the history
Improvements:
- Core: Minor code optimizations
- Pool 'MiningDutch': Query additional API 'https://www.mining-dutch.nl/api/v1/public/pooldata/?method=totalstat' for hashrate & worker data
  • Loading branch information
UselessGuru committed Oct 26, 2024
1 parent 59f2b09 commit e4ca1f6
Show file tree
Hide file tree
Showing 117 changed files with 501 additions and 476 deletions.
4 changes: 2 additions & 2 deletions Balances/HashCryptos.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\HashCryptos.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/HiveON.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\Hiveon.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/MiningDutch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\MiningDutch.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/MiningPoolHub.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\MiningPoolHub.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/NiceHash External.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\NiceHash Internal.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

If (-not $Config.NiceHashWalletIsInternal) {
Expand Down
4 changes: 2 additions & 2 deletions Balances/NiceHash Internal.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\NiceHash Internal.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

If ($Config.NiceHashWalletIsInternal) {
Expand Down
4 changes: 2 additions & 2 deletions Balances/ProHashing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\ProHashing.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/ZergPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\ZergPool.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
4 changes: 2 additions & 2 deletions Balances/Zpool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Balances\Zpool.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

$Name = [String](Get-Item $MyInvocation.MyCommand.Path).BaseName
Expand Down
6 changes: 3 additions & 3 deletions Brains/HashCryptos.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Brains\MiningDutch.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

using module ..\Includes\Include.psm1
Expand Down Expand Up @@ -52,7 +52,7 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {

Do {
Try {
$AlgoData = Invoke-RestMethod -Uri $PoolConfig.PoolStatusUri -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
$AlgoData = Invoke-RestMethod -Uri "https://hashcryptos.com/api/status" -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
$APICallFails = 0
}
Catch {
Expand Down
36 changes: 23 additions & 13 deletions Brains/MiningDutch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Brains\MiningDutch.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

using module ..\Includes\Include.psm1
Expand Down Expand Up @@ -50,32 +50,42 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {

Write-Message -Level Debug "Brain '$BrainName': Start loop$(If ($Duration) { " (Previous loop duration: $Duration sec.)" })"


Do {
Try {
$AlgoData = Invoke-RestMethod -Uri $PoolConfig.PoolStatusUri -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
If ($AlgoData.message) {
# Only 1 request every 10 seconds allowed
$APICallFails ++
Start-Sleep -Seconds $PoolConfig.PoolAPIretryInterval
If (-not $AlgoData) {
$AlgoData = Invoke-RestMethod -Uri "https://www.mining-dutch.nl/api/status" -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
}
Else {
$APICallFails = 0
If (-not $TotalStats) {
$TotalStats = Invoke-RestMethod -Uri "https://www.mining-dutch.nl/api/v1/public/pooldata/?method=totalstats" -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
}
$APICallFails = 0
}
Catch {
If ($APICallFails -lt $PoolConfig.PoolAPIAllowedFailureCount) { $APICallFails ++ }
Start-Sleep -Seconds ([Math]::max(60, ($APICallFails * 5 + $PoolConfig.PoolAPIretryInterval)))
}
} While ((-not $AlgoData -or $AlgoData.message) -and $APICallFails -lt $Config.PoolAPIallowedFailureCount)
} While (-not ($AlgoData -and $TotalStats) -and $APICallFails -lt $Config.PoolAPIallowedFailureCount)

$Timestamp = [DateTime]::Now.ToUniversalTime()

If ($AlgoData) {
ForEach ($Algo in $AlgoData.PSObject.Properties.Name) {
If ($AlgoData -and $TotalStats) {
# Change numeric string to numbers, some values are null
$AlgoData = ($AlgoData | ConvertTo-Json) -replace ': "(\d+\.?\d*)"', ': $1' -replace '": null', '": 0' | ConvertFrom-Json
$TotalStats = ($TotalStats | ConvertTo-Json) -replace ': "(\d+\.?\d*)"', ': $1' -replace '": null', '": 0' | ConvertFrom-Json

ForEach ($Algo in $AlgoData.PSObject.Properties.Name) {
$AlgorithmNorm = Get-Algorithm $Algo
$BasePrice = If ($AlgoData.$Algo.actual_last24h) { $AlgoData.$Algo.actual_last24h } Else { $AlgoData.$Algo.estimate_last24h }

$AlgoData.$Algo | Add-Member Updated $Timestamp -Force
If ($AlgoStats = $TotalStats.result.Where({ $_.Algorithm -eq $Algo })) {
$AlgoData.$Algo | Add-Member hashrate_shared $AlgoStats.hashrate -Force
$AlgoData.$Algo | Add-Member hashrate_solo $AlgoStats.hashrate_solo -Force
$AlgoData.$Algo | Add-Member workers_shared $AlgoStats.workers -Force
$AlgoData.$Algo | Add-Member workers_solo $AlgoStats.workers_solo -Force
}
Remove-Variable AlgoStats

If ($PoolVariant) {
# Reset history when stat file got removed
Expand Down Expand Up @@ -146,7 +156,7 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {
$_.Exception | Format-List -Force >> "Logs\Brain_$($BrainName)_Error_$(Get-Date -Format "yyyy-MM-dd").txt"
$_.InvocationInfo | Format-List -Force >> "Logs\Brain_$($BrainName)_Error_$(Get-Date -Format "yyyy-MM-dd").txt"
}
Remove-Variable AlgoData -ErrorAction Ignore
Remove-Variable AlgoData, TotalStats -ErrorAction Ignore

$Duration = ([DateTime]::Now - $StartTime).TotalSeconds
$Durations += ($Duration, $Variables.Interval | Measure-Object -Minimum).Minimum
Expand Down
8 changes: 4 additions & 4 deletions Brains/ProHashing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Brains\ProHashing.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

using module ..\Includes\Include.psm1
Expand Down Expand Up @@ -53,10 +53,10 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {
Do {
Try {
If (-not $AlgoData) {
$AlgoData = (Invoke-RestMethod -Uri $PoolConfig.PoolStatusUri -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout).data
$AlgoData = (Invoke-RestMethod -Uri "https://prohashing.com/api/v1/status" -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout).data
}
If (-not $CurrenciesData) {
$CurrenciesData = (Invoke-RestMethod -Uri $PoolConfig.PoolCurrenciesUri -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout).data
$CurrenciesData = (Invoke-RestMethod -Uri "https://prohashing.com/api/v1/currencies" -Headers $Headers -UserAgent $UserAgent -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout).data
}
$APICallFails = 0
}
Expand Down
8 changes: 4 additions & 4 deletions Brains/ZPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Brains\ZPool.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

using module ..\Includes\Include.psm1
Expand Down Expand Up @@ -50,10 +50,10 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {
Do {
Try {
If (-not $AlgoData) {
$AlgoData = Invoke-RestMethod -Uri $PoolConfig.PoolStatusUri -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
$AlgoData = Invoke-RestMethod -Uri "https://www.zpool.ca/api/status" -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
}
If (-not $CurrenciesData) {
$CurrenciesData = Invoke-RestMethod -Uri $PoolConfig.PoolCurrenciesUri -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
$CurrenciesData = Invoke-RestMethod -Uri "https://www.zpool.ca/api/currencies" -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
}
$APICallFails = 0
}
Expand Down
6 changes: 3 additions & 3 deletions Brains/ZergPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<#
Product: UG-Miner
File: \Brains\ZergPool.ps1
Version: 6.3.10
Version date: 2024/10/20
Version: 6.3.11
Version date: 2024/10/26
#>

using module ..\Includes\Include.psm1
Expand Down Expand Up @@ -49,7 +49,7 @@ While ($PoolConfig = $Config.PoolsConfig.$BrainName) {

Do {
Try {
$AlgoData = Invoke-RestMethod -Uri $PoolConfig.PoolStatusUri -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout
$AlgoData = Invoke-RestMethod -Uri "https://zergpool.com/api/status" -Headers @{ "Cache-Control" = "no-cache" } -SkipCertificateCheck -TimeoutSec $PoolConfig.PoolAPItimeout

$APICallFails = 0
}
Expand Down
10 changes: 9 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Known issues:
- UG-Miner has issues with new Windows Terminal when the default terminal application is set to 'Let windows decide' or 'Windows Terminal'.
-> It is recommended to set it to 'Windows Console Host'

Changelog UG-Miner 6.3.11 2024/10/26
====================================

Improvements:
- Core: Minor code optimizations
- Pool 'MiningDutch': Query additional API 'https://www.mining-dutch.nl/api/v1/public/pooldata/?method=totalstat' for hashrate & worker data


Changelog UG-Miner 6.3.10 2024/10/20
====================================

Expand Down Expand Up @@ -84,7 +92,7 @@ Changelog UG-Miner 6.3.5 2024/09/14
===================================

Fixes:
- Rigel-v1.19.0: 'HeavyHashKarlsenV2' & 'HeavyHashPyrinV2' algorithms not working
- Miner 'Rigel-v1.19.0': 'HeavyHashKarlsenV2' & 'HeavyHashPyrinV2' algorithms not working


Changelog UG-Miner 6.3.4 2024/09/13
Expand Down
2 changes: 1 addition & 1 deletion Config/Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"BalancesTrackerPollInterval": 0,
"BenchmarkAllPoolAlgorithmCombinations": true,
"CalculatePowerCost": true,
"ConfigFileVersion": "6.3.10",
"ConfigFileVersion": "6.3.11",
"CPUMinerProcessPriority": -2,
"CPUMiningReserveCPUcore": 1,
"CryptoCompareAPIKeyParam": "af9b92255132dac6d1560c6eb1e04067d9fc0fb4c6630df00fb1d055bf858352",
Expand Down
1 change: 1 addition & 0 deletions Data/CoinNames.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"HTA": "Historia",
"HTH": "Homeless",
"HTN": "Hoosat",
"HUSH": "Hush",
"HWI": "Hawaii",
"HYP": "Hypra",
"IBH": "Ibithub",
Expand Down
4 changes: 2 additions & 2 deletions Data/CurrencyAlgorithm.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ARRR": "Equihash2009",
"ARW": "Equihash1927",
"ATH": "Ethash",
"AUR": "Qubit",
"AUR": "MyriadGroestl",
"AUS": "Scrypt",
"AVN": "MinotaurX",
"AVS": "Ethash",
Expand Down Expand Up @@ -316,7 +316,7 @@
"SHAHE": "X16rv2",
"SHND": "SHA256",
"SKY": "SHAndwich256",
"SKYDOGE": "SHAndwich256",
"SKYDOGE": "Skydoge",
"SKYT": "Ghostrider",
"SLX": "Ethash",
"SMART": "Keccak",
Expand Down
Loading

0 comments on commit e4ca1f6

Please sign in to comment.