fix(antminer): read chain rate and board temps on newer stock firmware - #324
Merged
b-rowan merged 1 commit intoAug 13, 2026
Merged
Conversation
Two parsing gaps on AntMiner stock firmware 86.48-2.0.0 (seen on L9 and
L11), both of which left per-board fields null:
- chain_rate{idx} is emitted as a JSON number on this generation, but was
read with as_str(), so per-board hashrate was always None. Now accepts
either representation.
- temp_pcb{idx} does not exist on this generation; the firmware splits the
reading into temp_in_pcb_{idx} / temp_out_pcb_{idx}. Falls back to the
outlet reading when the combined key is absent.
Measured against live hardware, per board:
before: temp=None hashrate=None
after: temp=53C hashrate=6.80 GH/s
average_temperature also populates as a result, since it is derived from
the per-board readings.
Applies to both the v2020 and v2023_07 backends, which share this parser.
b-rowan
approved these changes
Aug 13, 2026
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.
Two parsing gaps on AntMiner stock firmware
86.48-2.0.0, both of which leave per-board fieldsNone. Neither is model-specific — they affect the already-supported L9 exactly as they affect an L11.The gaps
1.
chain_rate{idx}is read as a string, but this generation emits a JSON number.so
board.hashrateis alwaysNone. The values are present in the RPC stats payload:2.
temp_pcb{idx}does not exist on this generation.The firmware splits the reading into inlet/outlet pairs instead:
so
board.board_temperatureis alwaysNone. This also leavesaverage_temperatureempty, since it is derived from the per-board readings.The change
parse_f64_fieldhelper that accepts either a JSON number or a quoted string, used forchain_rate{idx}.board_temperaturefalls back totemp_out_pcb_{idx}when the combinedtemp_pcb{idx}key is absent. The outlet reading is the meaningful one for thermal purposes.Applied to both
v2020andv2023_07, which share this parser.Measured
Against live hardware, per board:
average_temperaturepopulates as a consequence. Verified on both an L9 and an L11 running this firmware.Verification
cargo fmt --all -- --check— cleancargo check --workspace— cleanNote
Board temperature could reasonably map to the 4-field temperature model added in 0.7.0 rather than collapsing to the outlet reading —
temp_in_pcb_*/temp_out_pcb_*andtemp_in_chip_*/temp_out_chip_*are all present on this firmware. I kept this change minimal and behaviour-compatible; happy to extend it if you would prefer the fuller mapping.