Bug: LuxMiner hashrate uses chain_rate which diverges from GHS 5s#411
Open
wilfredallyn wants to merge 1 commit intoUpstreamData:masterfrom
Open
Bug: LuxMiner hashrate uses chain_rate which diverges from GHS 5s#411wilfredallyn wants to merge 1 commit intoUpstreamData:masterfrom
wilfredallyn wants to merge 1 commit intoUpstreamData:masterfrom
Conversation
chain_rate from the stats API is a lifetime average (matches GHS av), not real-time hashrate. This causes MinerData.hashrate to report ~54 TH/s instead of ~87 TH/s when the miner recently changed presets, because the hashrate property sums hashboard values before falling back to raw_hashrate (GHS 5s from summary API, which is correct real-time data). Remove chain_rate assignment so total hashrate correctly uses GHS 5s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: This fix depends on #410 landing first. Without it,
_get_hashrate()is unreachable soraw_hashratenever gets set, and the fallback won't work.Problem
_get_hashboards()readschain_rate{n}from LuxOS stats API to get per-hashboard hashrate. LuxOS docs say "Real hashrate, in GH/s, of the Xth hashchain," but I found that it matches avg hashrate (GHS av). WhenMinerData.hashratesums these values, it doesn't get the correct hashrate. The correct value is in_get_hashrate()which readsGHS 5sfrom the summary API.Evidence
Tested on S19K Pro running LuxOS 2025.3.6, preset 415MHz (~86 TH/s expected).
Raw summary API (
echo '{"command":"summary"}' | nc $MINER_IP 4028):Raw stats API (
echo '{"command":"stats"}' | nc $MINER_IP 4028):pyasic reported hashrate=54.0 TH/s while the miner was hashing at 87 TH/s according to LuxOS dashboard. I confirmed this value on mining pool dashboard.
Fix
Delete lines with
chain_ratein_get_hashboards(). Without per-board hashrate values,MinerData.hashratedefaults toraw_hashratewhich getsGHS 5sfrom_get_hashrate().