asic-rs telemetry T1a: PSU serial + chip/HB type + best-share
build-test-release / release (push) Successful in 16m44s

Extend vendored asic-rs to scan more per-firmware telemetry (round 19 #10
follow-up, tier 1 sub-batch A). All new values ride on existing DataFields
(Psu/Hashboards/BestShare) and commands already fetched, so no new core
DataField plumbing and no extra network round-trips. Patch 0023.

Vendored (asic-rs):
- PsuInfo gains `serial`. Braiins v26_04 parse_psu corrected to read model_name
  + fw_version (it used the numeric type code as the model and dropped the fw
  version) and to capture serial_number. ePIC / WhatsMiner v1/v2 report no serial.
- BoardData gains `chip_type` (e.g. "BM1370") + `hashboard_model` (e.g.
  "A3HB70601"); Braiins miner/hw/hashboards populates both.
- best_share (all-time) wired for Antminer v2020 and WhatsMiner v1/v2 from the
  already-fetched summary "Best Share" (those backends had the empty default).
- refresh-checksums --all; existing braiins/antminer/whatsminer fixture tests pass.

GUI:
- MinerRow gains chip_type, hashboard_model, psu_serial; populated in to_row.
- New columns: Chip, HB model, PSU serial. Best share now populates for Antminer
  and WhatsMiner (column already existed).

Feasibility analysis (5-agent, all firmwares) recorded in memory; further tiers
(fan %, rolling hashrate averages, difficulty/shares, temp thresholds, WhatsMiner
V3 / VNish PSU serial) follow. Confirmed genuinely-unavailable: fan max RPM,
WhatsMiner/LuxOS real logs, chip type on Antminer/LuxOS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
This commit is contained in:
2026-09-23 14:01:33 -06:00
co-authored by Claude Opus 4.8
parent fbec05f141
commit c48e6bf7d1
17 changed files with 352 additions and 17 deletions
+27 -3
View File
@@ -473,6 +473,11 @@ pub struct MinerRow {
pub board_code: String,
/// Mining algorithm (e.g. "SHA256", "Scrypt", "Equihash"), from asic-rs.
pub algorithm: String,
/// ASIC chip type/model (e.g. "BM1370") and hashboard model/part
/// (e.g. "A3HB70601"), where the firmware reports them (round 19 #10:
/// WhatsMiner, Braiins, ePIC; not exposed by Antminer/LuxOS). Empty = unknown.
pub chip_type: String,
pub hashboard_model: String,
/// Whether the hashboards carry a PIC MCU. asic-rs does not report this over
/// the network, so it is a best-effort inference (model-string heuristic):
/// `None` = unknown, `Some(true)` = PIC, `Some(false)` = noPIC. True
@@ -516,6 +521,9 @@ pub struct MinerRow {
/// PSU identity + rated voltage envelope, when the firmware reports it (round
/// 17 R5 / G15; ePIC today). `psu_version` is blank when unknown.
pub psu_version: String,
/// PSU serial number where the firmware reports it (round 19 #10: Braiins,
/// WhatsMiner V3, VNish). Empty = unknown.
pub psu_serial: String,
pub psu_voltage_min_v: Option<f64>,
pub psu_voltage_max_v: Option<f64>,
/// Current structured tuning target, rendered for display (e.g. "2832 W",
@@ -1077,6 +1085,7 @@ pub enum Column {
/// PSU identity + rated voltage envelope (round 17 R5). Populated where the
/// firmware exposes PSU info (ePIC today).
PsuVersion,
PsuSerial,
PsuVMin,
PsuVMax,
FanCount,
@@ -1088,6 +1097,8 @@ pub enum Column {
ApiVersion,
Cpu,
BoardCode,
ChipType,
HbType,
Algorithm,
Pic,
Locked,
@@ -1120,7 +1131,7 @@ pub enum Column {
/// Every column, in registry order. Ip first, then the default-visible set
/// (UI-SPEC order), then all remaining metrics.
pub const ALL_COLUMNS: [Column; 56] = [
pub const ALL_COLUMNS: [Column; 59] = [
Column::Ip,
Column::Hashrate,
Column::Health,
@@ -1145,6 +1156,7 @@ pub const ALL_COLUMNS: [Column; 56] = [
Column::OutletTemp,
Column::PsuFan,
Column::PsuVersion,
Column::PsuSerial,
Column::PsuVMin,
Column::PsuVMax,
Column::FanCount,
@@ -1156,6 +1168,8 @@ pub const ALL_COLUMNS: [Column; 56] = [
Column::ApiVersion,
Column::Cpu,
Column::BoardCode,
Column::ChipType,
Column::HbType,
Column::Algorithm,
Column::Pic,
Column::Locked,
@@ -1235,6 +1249,7 @@ impl Column {
Column::OutletTemp => "Outlet temp",
Column::PsuFan => "PSU fan (RPM)",
Column::PsuVersion => "PSU version",
Column::PsuSerial => "PSU serial",
Column::PsuVMin => "PSU Vmin",
Column::PsuVMax => "PSU Vmax",
Column::FanCount => "Fans",
@@ -1246,6 +1261,8 @@ impl Column {
Column::ApiVersion => "API ver",
Column::Cpu => "CPU",
Column::BoardCode => "Control Board",
Column::ChipType => "Chip",
Column::HbType => "HB model",
Column::Algorithm => "Algorithm",
Column::Pic => "PIC",
Column::Locked => "Access",
@@ -1279,6 +1296,7 @@ impl Column {
Column::RejectRatio => 90,
Column::BoardHashrate | Column::BoardVoltage | Column::BoardFrequency => 130,
Column::PsuVersion => 100,
Column::PsuSerial => 150,
Column::PsuVMin | Column::PsuVMax => 90,
Column::Firmware => 110,
Column::FwVersion => 130,
@@ -1299,6 +1317,8 @@ impl Column {
Column::ApiVersion | Column::Light => 90,
Column::Cpu => 70,
Column::BoardCode => 70,
Column::ChipType => 90,
Column::HbType => 110,
Column::Algorithm => 100,
Column::Pic => 70,
Column::Locked => 90,
@@ -1503,6 +1523,7 @@ impl Column {
}
Column::PsuFan => num(r.psu_fan_rpm, 0, ""),
Column::PsuVersion => r.psu_version.clone(),
Column::PsuSerial => r.psu_serial.clone(),
Column::PsuVMin => r.psu_voltage_min_v.map(|v| format!("{v:.2} V")).unwrap_or_default(),
Column::PsuVMax => r.psu_voltage_max_v.map(|v| format!("{v:.2} V")).unwrap_or_default(),
Column::FanCount => count(r.fan_count),
@@ -1522,6 +1543,8 @@ impl Column {
Column::ApiVersion => r.api_version.clone(),
Column::Cpu => r.cpu.clone(),
Column::BoardCode => r.board_code.clone(),
Column::ChipType => r.chip_type.clone(),
Column::HbType => r.hashboard_model.clone(),
Column::Algorithm => r.algorithm.clone(),
Column::Pic => match r.pic_present {
// A per-board PIC MCU is a known Antminer-hashboard property. Show
@@ -1578,7 +1601,8 @@ impl Column {
Column::Ip | Column::Model | Column::Brand | Column::Submodel | Column::Mac
| Column::Hostname | Column::Serial => (0, "Identity"),
Column::Firmware | Column::FwVersion | Column::ApiVersion | Column::Algorithm
| Column::Pic | Column::Cpu | Column::BoardCode => (1, "Firmware & board"),
| Column::Pic | Column::Cpu | Column::BoardCode | Column::ChipType
| Column::HbType => (1, "Firmware & board"),
Column::Health | Column::HealthPower | Column::HealthFans | Column::HealthBoards
| Column::Status | Column::Error | Column::Locked | Column::Light
| Column::OperatingState => (2, "Health & status"),
@@ -1591,7 +1615,7 @@ impl Column {
}
Column::Fan1 | Column::Fan2 | Column::Fan3 | Column::Fan4 | Column::PsuFan
| Column::FanCount | Column::ExpectedFans => (5, "Cooling"),
Column::TotalChips | Column::PsuVersion | Column::PsuVMin
Column::TotalChips | Column::PsuVersion | Column::PsuSerial | Column::PsuVMin
| Column::PsuVMax => (6, "Hardware"),
Column::Worker | Column::PoolAccount | Column::PoolUrl | Column::Pool1Url
| Column::Pool1Worker | Column::Pool2Url | Column::Pool2Worker | Column::Pool3Url
+10
View File
@@ -1048,6 +1048,15 @@ async fn to_row(miner: &dyn Miner) -> MinerRow {
selected: false,
caps,
algorithm,
// ASIC chip type + hashboard model, from the first board that reports them
// (uniform across boards); empty where the firmware doesn't expose them
// (round 19 #10).
chip_type: data.hashboards.iter().find_map(|b| b.chip_type.clone()).unwrap_or_default(),
hashboard_model: data
.hashboards
.iter()
.find_map(|b| b.hashboard_model.clone())
.unwrap_or_default(),
pic_present,
write_locked,
errors,
@@ -1103,6 +1112,7 @@ async fn to_row(miner: &dyn Miner) -> MinerRow {
(None, None) => String::new(),
})
.unwrap_or_default(),
psu_serial: data.psu.as_ref().and_then(|p| p.serial.clone()).unwrap_or_default(),
psu_voltage_min_v: data.psu.as_ref().and_then(|p| p.voltage_min),
psu_voltage_max_v: data.psu.as_ref().and_then(|p| p.voltage_max),
tuning_target_label,