Skip to content

Commit

Permalink
v4.3.4.3
Browse files Browse the repository at this point in the history
Changes:
- Core: Renamed algorithm 'Blake3Ironfish'  to 'IronFish'

Enhancements:
- Brains: Add error logging
- Core / Includes.psm1: Optimize Get-Rate (less disk reads)
- Legacy & Web GUI / Pool data: Show Price in mBTC when $UsemBIT -eq $true
- Legacy GUI: Optimize table draw speed
- Web GUI: Add 'Primary Pool (Variant)' & 'Secondary Pool (Variant)' columns to miner tables (hidden by default)

Fixes:
- BalanceTracker not updating PoolsLastEarnings data (regression from 4.3.0.0)
- Brains: Convert null values to 0
- Brains: Convert numeric string values to numbers
- Brains: Invalid Plus price calculation (Regression from v4.3.4.1)
- Core: Core crash when receiving $null from DataReaderJob

Miner updates:
- GMiner-v3.34
- Rigel-v1.4.4
- TeamRedMiner-v0.10.11
  • Loading branch information
UselessGuru committed Apr 23, 2023
1 parent 117a2e0 commit 1887c83
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 76 deletions.
30 changes: 27 additions & 3 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,37 @@ Known issues:
- Balance Tracker / Earnings Graph: Date change take does not respect local time zone (accumulated data is calculated in GMT time)
- Increasing memory consumption over time (PWSH will eat up memory despite aggressive variable cleaning & garbage collection)

ChangeLog NemosMiner 4.3.4.3 23.04.2023
=======================================

Changes:
- Core: Renamed algorithm 'Blake3Ironfish' to 'IronFish'

Enhancements:
- Brains: Add error logging
- Core / Includes.psm1: Optimize Get-Rate (less disk reads)
- Legacy & Web GUI / Pool data: Show Price in mBTC when $UsemBIT -eq $true
- Legacy GUI: Optimize table draw speed
- Web GUI: Add 'Primary Pool (Variant)' & 'Secondary Pool (Variant)' columns to miner tables (hidden by default)

Fixes:
- BalanceTracker not updating PoolsLastEarnings data (regression from 4.3.0.0)
- Brains: Convert null values to 0
- Brains: Convert numeric string values to numbers
- Brains: Invalid Plus price calculation (Regression from v4.3.4.1)
- Core: Core crash when receiving $null from DataReaderJob

Miner updates:
- GMiner-v3.34
- Rigel-v1.4.4
- TeamRedMiner-v0.10.11


ChangeLog NemosMiner 4.3.4.2 18.04.2023
=======================================

Fixes:
- BalancesTracker: Crash when using HashCrypto or MiningDutch pools
- Brains / ZergPool: Change sort order to select best paying currency
- Brains / ZergPool: Default pool fee not set (Regression from 4.3.4.1)
- Brains: Invalid Plus price calculation (Regression from v4.3.4.1)
Expand All @@ -40,8 +65,8 @@ Fixes:
- SRBMinerMulti-v2.2.4: Could not generate miner objects for CryptoHashing pool

Pools:
- MiningPoolHub: Removed Coin variant, renamed MiningPoolHubCoins to MiningPoolHub
- MiningPoolHub: Added *Plus variant
- MiningPoolHub: Removed MiningPoolHubCoin variant, renamed MiningPoolHubCoins to MiningPoolHub
- MiningPoolHub: Added MiningPoolHubPlus variant

Miner updates:
- GMiner-v3.32
Expand Down Expand Up @@ -226,7 +251,6 @@ Enhancements:

Fixes:
- 'MiningDutch' BalanceTracker blocking all other balances if pool is down
- BalanceTracker not updating PoolsLastEarnings data (regression from 4.3.0.0)

Miner updates:
- NanoMiner-v3.7.7
Expand Down
2 changes: 1 addition & 1 deletion Data/Algorithms.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"blake2bbtcc": "Blake2bBtcc",
"blake2bglt": "Blake2bGlt",
"blake2bsha3": "Blake2bSha3",
"blake3ironfish": "Blake3Ironfish",
"blake3ironfish": "Ironfish",
"chainox": "0x10",
"chukwa": "Argon2Chukwa",
"chukwav2": "ArgonChukwaV2",
Expand Down
24 changes: 24 additions & 0 deletions Data/CoinNames.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$PAC": "PacCoin",
"ABS": "Absolute",
"ABY": "Artbyte",
"ACG": "Aurumcrypto",
"ACM": "Actinium",
"ACP": "Anarchistsprime",
"ADOT": "Alterdot",
Expand Down Expand Up @@ -41,6 +42,7 @@
"B2G": "Bitcoin2gen",
"BBC": "BBC Coin",
"BBR": "Boolberry",
"BBTC": "BlakeBitcoin",
"BCA": "Atom",
"BCD": "BitDiamond",
"BCH": "BitcoinCash",
Expand All @@ -57,6 +59,7 @@
"BGL": "Bitgesell",
"BHD": "Bithold",
"BIN": "Binarium",
"BIT": "Bitnet",
"BITC": "BitCash",
"BLACK": "Blackchain",
"BLAS": "Blakestar2",
Expand Down Expand Up @@ -101,6 +104,8 @@
"CAT": "CatalansCoin",
"CBE": "Combode",
"CBS": "Cerberus",
"CBTC": "Classicbit",
"CCC": "Ceilingcat",
"CCX": "Conceal",
"CFX": "Conflux",
"CHC": "ChainCoin",
Expand Down Expand Up @@ -156,10 +161,13 @@
"DVT": "Devault",
"DYN": "Dynamic",
"DYNAMO": "DynamoCoin",
"EAC": "Earth",
"EFL": "Egulden",
"EGEM": "EtherGem",
"ELI": "Eli",
"ELLA": "Ellaism",
"ELT": "Electron",
"EMC": "Emer",
"EMC2": "Einsteinium",
"EMD": "Emerald Crypto",
"EMRALS": "Emrals",
Expand Down Expand Up @@ -225,6 +233,7 @@
"GOL": "Goldiam",
"GOLD": "GoldCash",
"GPBS": "BritishPoundCoin",
"GRAMS": "Partychain",
"GRFT": "Graft",
"GRIM": "GrimCoin",
"GRIMM": "Grimm",
Expand All @@ -241,6 +250,10 @@
"GXG": "GroinCoin",
"GXX": "GravityCoin",
"HANA": "HanaCoin",
"HashTap_bcd": "Hashtap",
"HashTap_globalhash": "Hashtap",
"HashTap_hex": "Hashtap",
"HashTap_rental": "Hashtap",
"HATCH": "Hatch",
"HBC": "HotelbyteCoin",
"HCASH": "HCash",
Expand Down Expand Up @@ -296,12 +309,14 @@
"LBC": "Lbryio",
"LBTC": "LitebitCoin",
"LCC": "LiteCash",
"LCN": "Lyn",
"LCNT": "Lucent",
"LCP": "Litecoin Plus",
"LDC": "LeedCoin",
"LEVO": "LevoCoin",
"LINC": "Linc",
"LINX": "Linx",
"LIT": "Lithium",
"LITB": "LightBit",
"LNC": "Blocklancer",
"LOG": "WoodCoin",
Expand Down Expand Up @@ -343,6 +358,7 @@
"MOTA": "MotaCoin",
"MRL": "Morelo",
"MSR": "Masari",
"MTBC": "MateableCoin",
"MUSIC": "MusiCoin",
"MWC": "MimbleWimbleCoin",
"MWC29": "MimbleWimbleCoin",
Expand Down Expand Up @@ -392,6 +408,7 @@
"PGO": "PengolinCoin",
"PHC": "Profithunter",
"PHL": "Placeholders",
"PHO": "Photon",
"PINK": "PinkCoin",
"PIRL": "Pirl",
"PLE": "Plenteum",
Expand Down Expand Up @@ -467,6 +484,7 @@
"SKC": "SkeinCoin",
"SMART": "SmartCash",
"SMLY": "SmileyCoin",
"SOH": "Stohn",
"SONO": "Sono",
"SOV": "Sovereign",
"SPACE": "Mvc",
Expand Down Expand Up @@ -521,6 +539,8 @@
"UBQ": "UBIQ",
"UFO": "UfoProject",
"UIS": "Unitus",
"UMO": "Umolecule",
"UNO": "Unobtanium",
"UPX": "Uplexa",
"URALS": "UralsCoin",
"URX": "Uranium-x",
Expand All @@ -531,6 +551,7 @@
"VECO": "Veco",
"VEGI": "Veggie",
"VEIL": "Veil",
"VGC": "5G",
"VHH": "Volkshash",
"VIA": "ViaCoin",
"VIC": "Victorim",
Expand All @@ -541,11 +562,13 @@
"VLS": "Veles",
"VOLLAR": "VDimension",
"VOT": "VoteCoin",
"VPRM": "Vaporum",
"VRG": "Verge",
"VRM": "VeriumReserve",
"VRSC": "Verus",
"VTC": "VertCoin",
"WATC": "WhatCoin",
"WCN": "Wide",
"WDC": "WorldCoin",
"WDF": "WildfireCoin",
"WHL": "WhaleCoin",
Expand Down Expand Up @@ -584,6 +607,7 @@
"XMY": "Myriad",
"XNC": "Xenios",
"XOL": "Xolentum",
"XOR": "Oracol",
"XRC": "Bitcoin Rhodium",
"XRD": "Raven Dark",
"XRG": "Ergon",
Expand Down
8 changes: 4 additions & 4 deletions Includes/Core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Do {
}
}
}
Remove-Variable Worker
Remove-Variable Worker -ErrorAction Ignore
}
If ($Config.BadShareRatioThreshold -gt 0) {
$Miner.WorkersRunning.Pool.Algorithm | ForEach-Object {
Expand Down Expand Up @@ -670,7 +670,7 @@ Do {
$NewMiners = [Miner[]]@()
Get-ChildItem -Path ".\Miners\*.ps1" | ForEach-Object {
& $_
} | Select-Object | ForEach-Object {
} | ForEach-Object {
Try {
$_ | Add-Member MinDataSample ([Int]($Config.MinDataSample * (($_.Algorithms | Select-Object | ForEach-Object { $Config.MinDataSampleAlgoMultiplier.$_ }), 1 | Measure-Object -Maximum).Maximum))
$_ | Add-Member ProcessPriority $(If ($_.Type -eq "CPU") { $Config.CPUMinerProcessPriority } Else { $Config.GPUMinerProcessPriority })
Expand Down Expand Up @@ -970,7 +970,7 @@ Do {
$Variables.WatchdogTimers = @($Variables.WatchdogTimers | Where-Object { $_ -notin $WatchdogTimers })
}
}
Remove-Variable Worker
Remove-Variable Worker -ErrorAction Ignore
$Miner.SetStatus([MinerStatus]::Idle)
$Miner.Info = ""
$Miner.WorkersRunning = @()
Expand Down Expand Up @@ -1147,7 +1147,7 @@ Do {
PoolRegion = $Worker.Pool.Region
}
}
Remove-Variable Worker
Remove-Variable Worker -ErrorAction Ignore
}
}
ElseIf ($Miner.DataCollectInterval -ne $DataCollectInterval -or $Config.CalculatePowerCost -ne $Variables.CalculatePowerCost) {
Expand Down
86 changes: 36 additions & 50 deletions Includes/Include.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Class Miner {
hidden StopDataReader() {
If ($this.DataReaderJob) {
# Before stopping read data
If ($this.DataReaderJob.HasMoreData) { $this.Data += @($this.DataReaderJob | Stop-Job | Receive-Job) }
If ($this.DataReaderJob.HasMoreData) { $this.Data += @($this.DataReaderJob | Stop-Job | Receive-Job | Select-Object) }
$this.DataReaderJob | Get-Job | Remove-Job | Out-Null
$this.DataReaderJob = $null
}
Expand Down Expand Up @@ -1005,19 +1005,16 @@ Function Get-CommandLineParameter {
Function Get-Rate {
# Read exchange rates from min-api.cryptocompare.com, use stored data as fallback
$RatesCacheFileName = "Cache\Rates.json"
$RatesCache = Get-Content -Path $RatesCacheFileName -ErrorAction SilentlyContinue | ConvertFrom-Json -ErrorAction SilentlyContinue
If (-not $Variables.Rates) { $Variables.Rates = Get-Content -Path $RatesCacheFileName -ErrorAction SilentlyContinue | ConvertFrom-Json -ErrorAction SilentlyContinue }

If (-not $RatesCache.Values) { $RatesCache = [PSCustomObject]@{ } }
$RatesValues = $RatesCache.Values
$AllCurrencies = $RatesCache.Currencies
# Use stored currencies from last run
If (-not $Variables.BalancesCurrencies -and $Config.BalancesTrackerPollInterval) { $Variables.BalancesCurrencies = $AllCurrencies }
If (-not $Variables.BalancesCurrencies -and $Config.BalancesTrackerPollInterval) { $Variables.BalancesCurrencies = $Variables.Rates.PSObject.Properties.Name | Where-Object { $_ -eq ($_ -replace "^m") } }

$Variables.AllCurrencies = @(@($Config.Currency) + @($Config.Wallets.Keys) + @($Config.ExtraCurrencies) + @($Variables.BalancesCurrencies)) -replace "mBTC", "BTC" | Sort-Object -Unique

If (-not $Variables.Rates.BTC.($Config.Currency) -or (Compare-Object @($Variables.Rates.PSObject.Properties.Name | Select-Object) @($Variables.AllCurrencies | Select-Object) | Where-Object SideIndicator -eq "=>") -or ($Variables.RatesUpdated -lt (Get-Date).ToUniversalTime().AddMinutes(-(3, $Config.BalancesTrackerPollInterval | Measure-Object -Maximum).Maximum))) {
Try {
$RatesValues = [PSCustomObject]@{ BTC = [PSCustomObject]@{} }
$Rates = [PSCustomObject]@{ BTC = [PSCustomObject]@{} }
$TSymBatches = @()
$TSyms = "BTC"
$Variables.AllCurrencies | Where-Object { $_ -ne "mBTC" } | Select-Object -Unique | ForEach-Object {
Expand All @@ -1033,26 +1030,43 @@ Function Get-Rate {

$TSymBatches | ForEach-Object {
(Invoke-RestMethod "https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC&tsyms=$($_)$($Config.CryptoCompareAPIKeyParam)&extraParams=$($Variables.Branding.BrandWebSite) Version $($Variables.Branding.Version)" -TimeoutSec 5 -ErrorAction Ignore).BTC | ForEach-Object {
$_.PSObject.Properties | ForEach-Object { $RatesValues.BTC | Add-Member @{ "$($_.Name)" = ($_.Value) } }
$_.PSObject.Properties | ForEach-Object { $Rates.BTC | Add-Member @{ "$($_.Name)" = ($_.Value) } -Force }
}
}

If ($RatesValues) {
$Currencies = ($RatesValues.BTC | Get-Member -MemberType NoteProperty).Name
If ($Currencies = $Rates.BTC.PSObject.Properties.Name) {
$Currencies | Select-Object | Where-Object { $_ -ne "BTC" } | ForEach-Object {
$Currency = $_
$RatesValues | Add-Member $Currency ($RatesValues.BTC.PSObject.Copy()) -Force
($RatesValues.$Currency | Get-Member -MemberType NoteProperty).Name | ForEach-Object {
$RatesValues.$Currency | Add-Member $_ ([Double]$RatesValues.BTC.$_ / $RatesValues.BTC.$Currency) -Force
$Rates | Add-Member $Currency ($Rates.BTC | ConvertTo-Json -WarningAction SilentlyContinue | ConvertFrom-Json) -Force
$Rates.$Currency.PSObject.Properties.Name | ForEach-Object {
$Rates.$Currency | Add-Member $_ (($Rates.BTC.$_ / $Rates.BTC.$Currency) -as [Double]) -Force
}
}

# Add mBTC
If ($Config.UsemBTC) {
$Currencies = $Rates.BTC.PSObject.Properties.Name
$Currencies | ForEach-Object {
$Currency = $_
$mCurrency = "m$($Currency)"
$Rates | Add-Member $mCurrency ($Rates.$Currency | ConvertTo-Json -WarningAction SilentlyContinue | ConvertFrom-Json) -Force
$Rates.$mCurrency.PSOBject.Properties.Name | ForEach-Object {
$Rates.$mCurrency | Add-Member $_ ([Double]$Rates.$Currency.$_ / 1000) -Force
}
}
$Rates.PSOBject.Properties.Name | ForEach-Object {
$Currency = $_
$Rates.PSOBject.Properties.Name | Where-Object { $_ -in $Currencies } | ForEach-Object {
$mCurrency = "m$($_)"
$Rates.$Currency | Add-Member $mCurrency ([Double]$Rates.$Currency.$_ * 1000) -Force
}
}
}
Write-Message -Level Info "Loaded currency exchange rates from 'min-api.cryptocompare.com'.$(If ($MissingCurrencies = Compare-Object $Currencies $Variables.AllCurrencies -PassThru) { " API does not provide rates for '$($MissingCurrencies -join ', ')'." })"
$Variables.Rates = $RatesValues
$Variables.Rates = $Rates
$Variables.RatesUpdated = (Get-Date).ToUniversalTime()

$RatesCache | Add-Member @{ Currencies = $Variables.AllCurrencies } -Force
$RatesCache | Add-Member @{ Values = $RatesValues } -Force
$RatesCache | ConvertTo-Json -Depth 5 | Out-File -FilePath $RatesCacheFileName -Encoding utf8NoBOM -Force -ErrorAction SilentlyContinue
$Variables.Rates | ConvertTo-Json -Depth 5 | Out-File -FilePath $RatesCacheFileName -Encoding utf8NoBOM -Force -ErrorAction SilentlyContinue
}
}
Catch {
Expand All @@ -1066,27 +1080,6 @@ Function Get-Rate {
}
}
}

If ($Config.UsemBTC) {
# Add mBTC
$Currencies = ($Variables.Rates.BTC | Get-Member -MemberType NoteProperty).Name
$Currencies | ForEach-Object {
$Currency = $_
$mCurrency = "m$($Currency)"
# $Variables.Rates | Add-Member $mCurrency ($Variables.Rates.$Currency | ConvertTo-Json -WarningAction SilentlyContinue | ConvertFrom-Json)
$Variables.Rates | Add-Member $mCurrency ($Variables.Rates.$Currency.PSObject.Copy()) -Force
($Variables.Rates.$mCurrency | Get-Member -MemberType NoteProperty).Name | ForEach-Object {
$Variables.Rates.$mCurrency | Add-Member $_ ([Double]$Variables.Rates.$Currency.$_ / 1000) -Force
}
}
($Variables.Rates | Get-Member -MemberType NoteProperty).Name | ForEach-Object {
$Currency = $_
($RatesValues | Get-Member -MemberType NoteProperty).Name | Where-Object { $_ -in $Currencies } | ForEach-Object {
$mCurrency = "m$($_)"
$Variables.Rates.$Currency | Add-Member $mCurrency ([Double]$Variables.Rates.$Currency.$_ * 1000) -Force
}
}
}
}

Function Write-Message {
Expand Down Expand Up @@ -2918,11 +2911,11 @@ Function Add-CoinName {
# This lets us ensure only one thread is trying to write to the file at a time.
$Mutex = New-Object System.Threading.Mutex($false, "$($PWD -replace '[^A-Z0-9]')_CoinData")

# Attempt to aquire mutex, waiting up to 1 second if necessary. If aquired, update the coin names file and release mutex. Otherwise, display an error.
# Attempt to aquire mutex, waiting up to 1 second if necessary. If aquired, update the coin names file and release mutex
If ($Mutex.WaitOne(1000)) {

If (-not $Variables.CurrencyAlgorithm.$Currency) {
$Variables.CurrencyAlgorithm.$Currency = $Algorithm
$Variables.CurrencyAlgorithm.$Currency = Get-Algorithm $Algorithm
$Variables.CurrencyAlgorithm | Get-SortedObject | ConvertTo-Json | Out-File -Path ".\Data\CurrencyAlgorithm.json" -ErrorAction SilentlyContinue -Encoding utf8NoBOM -Force
}
If (-not $Variables.CoinNames.$Currency) {
Expand All @@ -2941,17 +2934,10 @@ Function Get-CoinName {
[String]$Currency
)

If ($Currency) {
If ($Variables.CoinNames.$Currency) {
Return $Variables.CoinNames.$Currency
}

$Variables.CoinNames = Get-Content -Path ".\Data\CoinNames.json" | ConvertFrom-Json
If ($Variables.CoinNames.$Currency) {
Return $Variables.CoinNames.$Currency
}
If ($Variables.CoinNames.$Currency) {
Return $Variables.CoinNames.$Currency
}
Return $null
Return
}

Function Get-EquihashCoinPers {
Expand Down
Loading

0 comments on commit 1887c83

Please sign in to comment.