Take internal working notes and bench details out of the public repo
AGENTS.md, HANDOFF.md, code-review-report.md, the implementation plan and the aftermarket parity roadmap described the internal bench, its addresses and in-house firmware; they now live in the private miner-firmware workspace and are git-ignored here. The remaining docs and the fixture header no longer point at them or at local infrastructure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
name: public-benchmark-pages
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [build-test-release]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: alkane-toolkit-public-benchmark-pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: alkane-verify
|
||||
container:
|
||||
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install SSH client
|
||||
run: bash ci/ensure-build-deps.sh ssh
|
||||
- name: Render measured benchmark history
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: python3 ci/bench_history.py render
|
||||
- name: Publish public benchmark page
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
BENCH_PAGES_DEPLOY_KEY: ${{ secrets.BENCH_PAGES_DEPLOY_KEY }}
|
||||
run: python3 ci/publish-bench-pages.py toolkit
|
||||
- name: Clean generated page
|
||||
if: always()
|
||||
run: python3 ci/cleanup-generated.py
|
||||
@@ -2,3 +2,8 @@
|
||||
**/target
|
||||
.claude/
|
||||
__pycache__/
|
||||
# Internal working notes live outside this public repository.
|
||||
/AGENTS.md
|
||||
/HANDOFF.md
|
||||
/CLAUDE.md
|
||||
code-review-report*.md
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
# AGENTS.md - alkane-toolkit
|
||||
|
||||
Short standing orders for working in this repo. Read `HANDOFF.md` first on any
|
||||
resume; it names the live threads. Parent project rules live in
|
||||
`../AGENTS.md` (bench discipline, live-fleet-ops).
|
||||
|
||||
## Build / run (this machine)
|
||||
|
||||
- Never build or run inside the synced repo tree (noexec, slow FS). Cargo target
|
||||
is `~/.cache/alkane-tk-target` (set in `~/.cargo/config.toml`, not committed);
|
||||
wx builds go to `~/.cache/wxbuild` / `~/.cache/wx-3.3.3-linux`.
|
||||
- `scripts/build-wx-linux.sh` (once) then `scripts/build-gui-linux.sh` (release).
|
||||
- CI sets `CARGO_TARGET_DIR=target` and removes target, coverage, bench, and
|
||||
release staging after each job, including failed runs. For local builds,
|
||||
run `scripts/clean-old-builds.sh` at the end of each task; keep only the
|
||||
current release binary and the pinned wxWidgets cache.
|
||||
- The GUI is pure-Rust wxWidgets on the vendored, patched `wx-rs`
|
||||
(`thirdparty/wx-rs/wx-rs-0.2.0-patched`). When you change it, record the
|
||||
change with `python3 scripts/wx_rs_patches.py capture NAME "Subject"` and
|
||||
commit both; CI runs `scripts/wx_rs_patches.py check`.
|
||||
- OS differences in Rust go in `alkane_core::platform` (config dir, private
|
||||
files, null device, console-less helper processes), not inline `cfg`s.
|
||||
|
||||
## Development / review / visual-feedback loop
|
||||
|
||||
Every UI change goes through this loop before it is considered done:
|
||||
|
||||
1. Edit, then `scripts/ui-selftest.sh` -- builds and runs the app headless in
|
||||
`ALKANE_SELFTEST` mode: it renders the bench-fleet fixtures through the real
|
||||
widgets and compares the table cells + KPIs to the expected hardware output.
|
||||
Non-zero exit = a regression. Also run `cargo test -p alkane-gui --offline`
|
||||
for the transform-layer unit tests.
|
||||
2. `scripts/ui-screenshot.sh out.png` -- captures the running UI to a PNG on a
|
||||
private Xvfb display (never the real desktop). Defaults to the offline
|
||||
fixtures (`ALKANE_FAKE_SCAN`) so the shot is deterministic; `--live` scans
|
||||
the network. Eyeball the PNG for layout regressions.
|
||||
3. Only after both pass, wire in real hardware (a live scan) per parent rules.
|
||||
|
||||
Headless X gotcha: the GTK window only maps under Xvfb with `GDK_BACKEND=x11`
|
||||
set; without it the app runs but never shows a window. The scripts set it.
|
||||
|
||||
Windows: `scripts/build-gui-windows.sh` cross-builds the `.exe`;
|
||||
`scripts/ui-selftest-windows.sh` runs the same self-test under Wine, and
|
||||
`. scripts/windows-cross-env.sh` lets `cargo test --target x86_64-pc-windows-gnu`
|
||||
run the unit tests under Wine. Bridge (C++) changes must work on both wxGTK
|
||||
and wxMSW, where the table is wx's generic data view; see docs/windows.md.
|
||||
Real-Windows checks use the Win11 VM (docs/windows.md, "Native Windows runner").
|
||||
|
||||
## Offline modes (no hardware needed)
|
||||
|
||||
- `ALKANE_FAKE_SCAN=1` -- feed `crates/alkane-gui/src/fixtures.rs` (the 9 bench
|
||||
boards' expected output) instead of scanning. Use for demos and screenshots.
|
||||
- `ALKANE_SELFTEST=1` -- run the workflow self-test and exit (see the loop).
|
||||
|
||||
Keep the fixtures in step with the bench inventory (`HANDOFF.md` section 7).
|
||||
|
||||
## Conventions
|
||||
|
||||
- Keep discovery, protocol parsing, artifact checks, flash safety, and GUI runtime in Rust. Use Python for CI, release, reporting, and host tests only.
|
||||
- Confidence tags (CONFIRMED/DERIVED/EXTERNAL) on doc claims; cite file paths.
|
||||
- Single-line imperative commit summaries.
|
||||
- No emojis in any file (parent-project + global rule).
|
||||
-144
@@ -1,144 +0,0 @@
|
||||
# HANDOFF — alkane-toolkit
|
||||
|
||||
**For:** resuming this work in Claude Code (or any fresh agent session).
|
||||
**Read order:** this file → `docs/IMPLEMENTATION-PLAN.md` → `docs/UI-SPEC.md` → `docs/adr/000{1,2,3}*.md` → `README.md`.
|
||||
Parent project: `~/Ultron/projects/miner-firmware/` (its `HANDOFF.md`, `AGENTS.md` and `MEMORY-SNAPSHOT/` hold the bench context and standing orders — read them before touching real hardware).
|
||||
|
||||
## 1. What this repo is
|
||||
|
||||
`alkane-toolkit` = cross-platform desktop toolkit (pure-Rust GUI on wxWidgets)
|
||||
to install **stock or alkaneOS** on ASIC miner control boards, whatever they
|
||||
currently run. Sibling repo `~/Ultron/projects/miner-firmware/alkane-sdk/`
|
||||
owns the board doctrine (`docs/install-methods.md` = the invariants) and the
|
||||
board metadata (`boards/*/board.yml`); this toolkit mechanizes those recipes.
|
||||
|
||||
- Remote: `https://gitea.bluefla.re/blueflare/alkane-toolkit` (private, branch `main`, tip `b264cdd6`)
|
||||
- GitHub is DEAD (account suspended): never touch github remotes; old ones are kept as `github-suspended` in sibling clones
|
||||
- Gitea auth: token in `~/.config/gitea/token`, askpass helper `~/.config/gitea/askpass` (user `noah`, admin). For git: `export GIT_ASKPASS=~/.config/gitea/askpass GIT_TERMINAL_PROMPT=0`
|
||||
|
||||
## 2. Current state (2026-09-15)
|
||||
|
||||
**Ships today (M1 primary view):**
|
||||
- Discovery via vendored **asic-rs 0.8.1** (MinerFactory::scan_stream over the configured CIDR list)
|
||||
- UI-SPEC primary view: 6 KPIs (Total/Hashing/Slow/Not hashing/total hashrate/est. power), scan-ranges editor, Excel-style filter panel, columns panel, sortable + drag-reorderable table with row checkboxes, IP pinned first, default order hashrate → power → chip temp → cooling → firmware → pool worker → model/status
|
||||
- Pure-Rust GUI on wxWidgets: vendored wx-rs 0.2.0 **extended by patches** (upstream stubs Linux and had no widgets) + vendored wxWidgets 3.3.3 (static monolithic GTK3)
|
||||
- **Visually verified working** (off-screen Xvfb screenshots): table renders below the header full-width; all dialogs (Scan ranges / Filter / Columns) open, apply, and close without crashing; header-click sort, column hide, and row-checkbox all work.
|
||||
|
||||
**Fixed 2026-09-15 (this session), with regression tests:**
|
||||
- **Table rendered in the top-left corner** instead of below the header: the dvlc was created but never added to the sizer. `rebuild_table` now adds it to the root sizer (proportion 1, EXPAND) and re-runs the panel layout; `add_stretch(1)` (which ate all vertical space) removed.
|
||||
- **App crashed (abort) on most buttons**: the dialog `root` sizers passed `ALIGN_CENTRE_VERTICAL` to a *vertical* sizer, tripping a wxWidgets consistency assert whose default handler pumps a nested event loop; the 1 s scan timer then re-entered the single `dispatch` while it still held the `App` `RefCell` borrow → `RefCell already borrowed` → non-unwinding panic → abort. Fixed the invalid flags, and hardened `dispatch` into two phases (build under the borrow, `show_modal` outside it) with `try_borrow_mut` so any future nested re-entry drops the event instead of aborting.
|
||||
- Header-click sort mapped the clicked column through `view.order` (wrong when a column was hidden) → now maps through `display_columns()`. Drag-reorder likewise (`ViewState::apply_visible_reorder`, splices visible order back into the full order so hidden columns are never dropped). Row-selection checkbox now survives a table refresh.
|
||||
|
||||
**Feature round 2026-09-15 (operator requests, verified by live bench scan + selftest):**
|
||||
- Redesigned KPI header: colour-coded cards (green Hashing / amber Slow / red Not hashing / blue Hashrate), big value over small label, theme-aware.
|
||||
- Light/dark mode follows the system (wxSystemSettings + `set_appearance_system`); custom KPI colours adapt.
|
||||
- SI-formatted hashrate/power everywhere (KPIs + columns): prefix chosen so the mantissa is 1-999, 1 decimal below 100 (e.g. `685 TH/s`, `21.3 kW`, `95.0 TH/s`). Note: strict "<=2 digits" would render 685 TH/s as `0.7 PH/s`; the 3-sig-fig form reads better - flag if you want the strict form.
|
||||
- Scan ranges accept CIDR, single IP, `A.B.C.D-E.F.G.H` full ranges, and `A.B.C.D-N` short ranges (`scan::parse_line`).
|
||||
- Scan progress bar across the top of the table + status-bar text (`scan_stream_with_ip` gives per-address progress); the inline "scan done" text is gone.
|
||||
- Out-of-range miners are dropped when a scan starts (rows retained by the new target set).
|
||||
- Columns panel exposes **every** scannable `MinerData` metric (~30, model.rs `Column`), with All / None / Defaults.
|
||||
- Excel-style filter panel built out: per-category value checklists (numeric columns excluded), per-column All/None, Apply/Reset/Cancel, "(blank)" handling.
|
||||
- Sort direction shown as an ASCII marker in the header (`^`/`v`); native `SetSortOrder` was rejected because it re-sorts the store lexically and fought the numeric sort.
|
||||
- Double-click a row opens `http://<ip>` in the default browser (`wxLaunchDefaultBrowser`).
|
||||
- Filter panel horizontal layout can get wide with many category columns (no scrolled-window in the bridge yet); it is resizable. Live text-search within a filter column is not implemented.
|
||||
|
||||
**Feature round 2 (2026-09-16, operator requests):**
|
||||
- Scan-ranges button is a fixed "Scan ranges" label (no longer grows with the ranges).
|
||||
- Dark-mode KPI cards fixed: colours derive from the live system theme luminance (`palette()` reads `system_color`), not `is_dark()` which mis-detected some GTK dark themes.
|
||||
- Checkbox column removed; the table is multi-select (`wxDV_MULTIPLE`, ctrl/shift-click), selection tracked by IP so it survives scan refreshes.
|
||||
- Rescan replaced by Play / Pause / Stop; auto-rescan interval editable in the scan-ranges dialog (`scan::load/save_auto_secs`, `~/.config/alkane-toolkit/auto-rescan-secs.txt`). Timer-driven scheduler with a countdown.
|
||||
- Status bar shows the last-probed IP during a scan and a countdown to the next scan when idle (no more "scan complete" text).
|
||||
- Default sort is IP-ascending with a header chevron; IP is column 0 and sortable.
|
||||
- Choose-columns dialog is a `wxRearrangeCtrl` (check to show, up/down or drag to reorder); exposes every metric incl. Pool 1/2/3 URL + worker (`MinerRow.pools`).
|
||||
- Column drag-reorder in the table moves the whole column with its data on drop (native GTK shows only the header ghost during the drag - not changeable without a custom-drawn table).
|
||||
- Row separation: `wxDV_ROW_LINES` (thin separators). GTK3's native dataview has no zebra striping (SetAlternateRowColour is generic-only; `:nth-child` CSS is GTK4-only). A `wxbr_apply_zebra_css` hook is in place for GTK4; true zebra on GTK3 needs a custom `wxDataViewVirtualListModel` with `GetAttrByRow` - deferred.
|
||||
- `build.rs` now adds `pkg-config --cflags gtk+-3.0` so the bridge can call GTK directly.
|
||||
|
||||
**Deferred - item 11 (right-click multi-config menu):** intersection-of-config context menu that writes to live miners via asic-rs `HasMinerControl`/`SupportsConfigs` (fault light, power limit, tuning, restart, pause/resume, pool config). The wx bridge for it (popup menu + context-menu event) is already in place; the apply-to-live-hardware layer + confirm-before-apply is the next round.
|
||||
|
||||
**Dev / review / visual-feedback loop (see AGENTS.md):**
|
||||
- `scripts/ui-selftest.sh` — headless workflow self-test: `ALKANE_SELFTEST` mode renders the bench-fleet fixtures through the real widgets and compares the table cells + KPIs to the expected hardware output (13 checks; exit non-zero on any mismatch). `cargo test -p alkane-gui` runs the transform-layer unit tests (10).
|
||||
- `scripts/ui-screenshot.sh [out.png] [--live]` — off-screen (private Xvfb) screenshot for visual review; defaults to the offline `ALKANE_FAKE_SCAN` fixtures.
|
||||
- Offline modes: `ALKANE_FAKE_SCAN=1` feeds `crates/alkane-gui/src/fixtures.rs` (the 9 bench boards) instead of scanning; `ALKANE_SELFTEST=1` runs the self-test and exits.
|
||||
- Headless X gotcha: the GTK window only maps under Xvfb with `GDK_BACKEND=x11` set (the scripts do this).
|
||||
|
||||
**Not done yet (open threads, in rough priority):**
|
||||
1. Windows: DONE 2026-11-02 (docs/windows.md, ADR 0004) -- cross-built with mingw-w64, tested under Wine in CI and natively on the Win11 VM runner, released with every version. macOS still needs a Mac to link.
|
||||
2. ARP/ICMP pre-pass for link-up-but-silent boards (M1 scope, spec'd in plan §5, not implemented)
|
||||
3. Column order/visibility *persistence* to `ui.conf` (spec'd in UI-SPEC "Implementation notes"). Visibility (Columns dialog) and drag-reorder both work in-session; only the save/restore across runs is missing.
|
||||
4. Sort-direction indicator in headers; per-model "Slow" bands (currently flat 80% of expected); model-derived power estimates for units that don't report wattage
|
||||
5. M2: verify-image port (magic/min-size/integrity) + artifact registry expansion (`crates/alkane-artifacts/data/manifest-seed.csv` = 14 sha256'd bench artifacts; bulk archives 3.7GB/624MB not hashed)
|
||||
6. M3+: first install pathway (zynq-7010 stock↔stock, proven on the bench S17), then per plan §7. Note **no alkaneOS build exists** (SDK boards all "bake"), so installs are stock↔stock only until the SDK produces artifacts.
|
||||
|
||||
## 3. How to build / run (this machine)
|
||||
|
||||
```sh
|
||||
cd ~/Ultron/projects/miner-firmware/alkane-toolkit
|
||||
scripts/build-wx-linux.sh # once: wx 3.3.3 → ~/.cache/wx-3.3.3-linux (out-of-tree)
|
||||
scripts/build-gui-linux.sh # release build (needs WX_RS_WXCONFIG, script sets it)
|
||||
/usr/local/bin/alkane-toolkit # installed binary; or ~/.cache/alkane-tk-target/release/alkane-toolkit
|
||||
```
|
||||
|
||||
Needs a display (user's desktop session has DISPLAY=:0). Headless smoke test:
|
||||
`timeout 15 xvfb-run -a /usr/local/bin/alkane-toolkit` — rc 124 = ran until killed (good), rc 139 = crash.
|
||||
|
||||
## 4. Machine quirks (these cost hours — don't re-learn them)
|
||||
|
||||
- **The synced project mount is noexec** for newly-written files: never build or execute anything inside the repo tree. wx builds go to `~/.cache/wxbuild`, cargo target to `~/.cache/alkane-tk-target` (set machine-locally via `~/.cargo/config.toml`, NOT committed).
|
||||
- **`cargo vendor vendor` DELETES unmanaged directories under vendor/**. Hand-made trees live in `thirdparty/` (wxwidgets, wx-rs). Only cargo-managed crate sources are in `vendor/` (341 crates; offline builds via committed `.cargo/config.toml`).
|
||||
- **/tmp tmpfs is 100% full** (bench artifacts live there — do not clean). Build outputs must not go to /tmp.
|
||||
- The FS is very slow for many-file operations: `git add` of thirdparty/wxwidgets (~10k files) takes ~20 min; extraction of the wx tarball will blow a 120 s timeout. Run big FS operations as background jobs and poll.
|
||||
- sudo: `sudo -S -p '' <cmd> < ~/.sudopass` (non-interactive).
|
||||
- Rust 1.97.1, cargo, gdb, xvfb-run, mingw-w64, gtk3 dev, pcre2 dev all installed.
|
||||
|
||||
## 5. Architecture map
|
||||
|
||||
```
|
||||
crates/
|
||||
alkane-core/ domain types (stub — next milestone fills it)
|
||||
alkane-discovery/ asic-rs dependency wired (engine lives in alkane-gui/scan.rs today)
|
||||
alkane-access/ stub (SSH/foothold layer, M3+)
|
||||
alkane-flash/ stub (write/verify engines, M3+)
|
||||
alkane-artifacts/ manifest-seed.csv (14 artifacts w/ sha256)
|
||||
alkane-cli/ stub bin
|
||||
alkane-gui/ THE APP (bin "alkane-toolkit"): main.rs, model.rs, scan.rs, ui.rs
|
||||
thirdparty/
|
||||
wxwidgets/wxWidgets-3.3.3/ pristine dist tarball tree (+ VERSION sha256, patches/ empty)
|
||||
wx-rs/wx-rs-0.2.0-patched/ the used crate (path dep) + VERSION + patches/:
|
||||
0001 linux/GTK3 wx-config build path (build.rs; handles full-path .a in --libs!)
|
||||
0002 Rust widget bindings (src/widgets.rs: Widget API + single event dispatcher)
|
||||
0003 C++ widget bridge (cpp_src/widgets_bridge.cpp: panel/sizers/static text/
|
||||
button/textctrl/checkbox/checklistbox/dialog/dvlc/timer/destroy)
|
||||
0004 upstream fixes (Linux get_client_size branch; init render/handle_events —
|
||||
upstream left them UNINITIALIZED: 5ms render timer calls garbage in release)
|
||||
vendor/ cargo-managed ONLY (341 crates, offline)
|
||||
scripts/ build-wx-linux.sh, build-gui-{linux,windows,macos}.sh
|
||||
docs/ IMPLEMENTATION-PLAN.md, UI-SPEC.md, adr/0001-0003
|
||||
```
|
||||
|
||||
Key implementation facts (don't re-derive):
|
||||
- **Event model**: ONE C callback (`wxbr_set_widget_event_fn`) → Rust `set_event_handler(Handler)`; all events funnel through `ui::dispatch` (thread_local APP). Event kinds: ButtonClicked(id), DvlcValueChanged(row,col), DvlcHeaderClick(col), DvlcReordered, TimerTick(id).
|
||||
- **Table semantics**: `view.order` = creation order = display order; toggle col is creation idx 0 (bool variants only); `dvlc_col_at_pos()` maps display→creation after a drag; store rows are appended in filtered+sorted view order, so store row == `view_idx[row]`. Header click sort cycles asc→desc→off and refills.
|
||||
- **Scan thread**: std thread + own tokio runtime + std mpsc; a 1 s wx Timer drains it (`App::drain_scan`). Ranges: `~/.config/alkane-toolkit/scan-ranges.txt` (default 10.255.1.0/24), parse via `scan::parse_cidr`.
|
||||
- **asic-rs API**: `MinerFactory::from_subnet("a.b.c.d/p")`, `.scan_stream()` → `Stream<Item=Box<dyn Miner>>`; `Miner::get_data().await -> MinerData` (trait at `asic_rs::core::traits::miner::Miner`); `HashRate.clone().as_unit(HashRateUnit::TeraHash).value`; `Power::as_watts()`, `Temperature::as_celsius()`, `AngularVelocity::as_rpm()`; pools: `MinerData.pools[].pools[]` with `.user/.active`.
|
||||
- **wx 3.3 API gotchas hit**: `store->GetValueByRow(v,row,col)` (not GetValue), `GetColumnPosition()` (no GetColumnAt), `--enable-dataview` doesn't exist, `--disable-stc --without-catch2 --disable-tests` needed only if using the GitHub source export (the dist tarball in thirdparty/ is complete — just chmod +x configure).
|
||||
|
||||
## 6. Verification evidence
|
||||
|
||||
- `cargo build --workspace --offline` clean (network-independent; all sources vendored)
|
||||
- `cargo test -p alkane-gui --offline`: 10 transform-layer unit tests pass (KPIs, sort, filter, cell formatting, slow band, hidden-column mapping, drag-reorder splice, selection-survives-upsert).
|
||||
- `scripts/ui-selftest.sh`: 13/13 checks pass end-to-end through the real widgets (KPI labels, row count, every cell matches the model, slow/not-hashing spot checks, IP is first text column).
|
||||
- Visual review via `scripts/ui-screenshot.sh` (off-screen Xvfb): confirmed the table renders below the header, and drove every button with xdotool (open/apply/cancel each dialog, header sort, column hide, row check) with zero crashes/panics.
|
||||
- Git: previous tip `b264cdd6` pushed to gitea (gitea repo `size` field updates lazily — that commit has 16k files/4.9M insertions incl. the wx tree).
|
||||
- Still open: eyeball on the **real bench fleet** (`--live`). The visual + interaction checks above used the offline fixtures; a live run against the 9 boards on 10.255.1.0/24 is the remaining confidence step.
|
||||
|
||||
## 7. Bench fleet context (for the scan you'll see)
|
||||
|
||||
9 boards live on 10.255.1.0/24: S17 stock (.112, root+EMPTY password, legacy SSH algos), S19 xil OurOS (.166), S19j Pro bb OurOS (.152), S19k Pro cv OurOS (.167), S21 Pro aml stock (.149), WhatsMiner H3 (.126), H616 (.131), M50 CB4 (.148 — random MAC, address moves), WardenOS dev (.115). Scanning is read-only and routine; the `live-fleet-ops` rules (no auth bursts, gentle on prod 10.2.1.0/24) are standing orders in AGENTS.md. Never install/flash anything without the operator explicitly asking.
|
||||
|
||||
## 8. Conventions for this repo
|
||||
|
||||
- Confidence tags (CONFIRMED/DERIVED/EXTERNAL) on claims in docs; cite file paths.
|
||||
- Commit style so far: single-line imperative summaries, no sign-off noise.
|
||||
- Repo-level rules now live in `AGENTS.md` (dev/review/visual loop, offline modes, build discipline). Keep it short.
|
||||
- When you change the vendored wx-rs: edit `thirdparty/wx-rs/wx-rs-0.2.0-patched/`, regenerate the matching `patches/NNNN-*.patch` via `diff -u` against the pristine crate (tarball URL+sha in `thirdparty/wx-rs/VERSION`), and confirm the patch set reconstructs the patched tree before committing both.
|
||||
@@ -1,17 +1,18 @@
|
||||
# Alkane Toolkit
|
||||
|
||||
[](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||
[](LICENSE)
|
||||
|
||||
The code quality grade reports GUI Clippy and first-party Rust formatting checks
|
||||
from the last successful main build. Test coverage has a separate badge.
|
||||
The badges link to the [project site](https://blueflare.gitea.bluefla.re/alkane-toolkit/): the [manual](https://blueflare.gitea.bluefla.re/alkane-toolkit/manual/),
|
||||
the [code-quality dashboard](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) (how the grade is set, coverage by
|
||||
crate and file) and the [benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/).
|
||||
|
||||
Desktop miner discovery and monitoring. The Rust GUI uses wxWidgets through
|
||||
a patched [wx-rs bridge](thirdparty/wx-rs). In-app image flashing is disabled
|
||||
@@ -42,8 +43,7 @@ macOS is not built.
|
||||
aftermarket firmware to stock.
|
||||
|
||||
Discovery is read-only. Control and restore actions change miners. Check the
|
||||
selected devices before applying them. See the [implementation plan](docs/IMPLEMENTATION-PLAN.md)
|
||||
and [firmware matrix](docs/aftermarket-parity-roadmap.md) for planned coverage.
|
||||
selected devices before applying them.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -55,8 +55,8 @@ WX_RS_WXCONFIG="$HOME/.cache/wx-3.3.3-linux/bin/wx-config" \
|
||||
|
||||
Keep build output off the source share. `main` runs full CI and publishes
|
||||
qualifying releases; `next` builds `-rc` candidates. Badges measure host
|
||||
code, not installation support. See the public
|
||||
[benchmark history](https://blueflare.gitea.bluefla.re/alkane-benchmarks/toolkit/).
|
||||
code, not installation support. See the
|
||||
[benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/).
|
||||
|
||||
## Firmware safety
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ vendor/*|thirdparty/asic-rs/*)
|
||||
# resources, embedded assets). ui.rs/fixtures.rs/bin
|
||||
# match the UI arm above first, so they still bump Z, not Y.
|
||||
backend=true ;;
|
||||
*) : ;; # docs, HANDOFF, README, thirdparty/wxwidgets tree: no bump
|
||||
*) : ;; # docs, README, thirdparty/wxwidgets tree: no bump
|
||||
esac
|
||||
done <<< "$changed"
|
||||
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""Publish a measured benchmark page to the public, data-only Pages repo."""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
PAGES_REPO = "ssh://git@gitea.bluefla.re:2222/blueflare/alkane-benchmarks.git"
|
||||
GUARD_REPO = "https://gitea.bluefla.re/blueflare/alkane-benchmarks.git"
|
||||
GUARD_COMMIT = "ea160545c49bc419a245692deda8dd7db7a611eb"
|
||||
PAGES_HOST = "gitea.bluefla.re"
|
||||
PAGES_HOST_FINGERPRINT = "SHA256:lqB5cmC9E5HNeg/lkzdOwQ++I8A70Wx7lnNs6liN24g"
|
||||
PAGES_HOST_KEY = "[gitea.bluefla.re]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1II6NkmRW+QAd+Wj+7qbNrA8Oo+/N/WRog4hELskn/"
|
||||
|
||||
|
||||
def run(*args: str, env: dict[str, str] | None = None,
|
||||
cwd: Path | None = None) -> subprocess.CompletedProcess[str]:
|
||||
return subprocess.run(args, env=env, cwd=cwd, text=True,
|
||||
capture_output=True, check=True)
|
||||
|
||||
|
||||
def current_main_sha() -> str:
|
||||
api = os.environ["GITHUB_API_URL"].rstrip("/")
|
||||
repo = os.environ["GITHUB_REPOSITORY"]
|
||||
token = os.environ["GITEA_TOKEN"]
|
||||
request = Request(f"{api}/repos/{repo}/branches/main",
|
||||
headers={"Authorization": f"token {token}"})
|
||||
with urlopen(request, timeout=20) as response:
|
||||
branch = json.load(response)
|
||||
return branch["commit"]["id"]
|
||||
|
||||
|
||||
def publish(site: str) -> None:
|
||||
if os.environ.get("GITHUB_REF") != "refs/heads/main":
|
||||
raise ValueError("benchmark Pages publication requires main")
|
||||
sha = os.environ["GITHUB_SHA"]
|
||||
if current_main_sha() != sha:
|
||||
print("Skipping benchmark page from a superseded main commit")
|
||||
return
|
||||
page = Path("bench-site/index.html").read_bytes()
|
||||
if not page.startswith(b"<!doctype html>") or len(page) > 1_048_576:
|
||||
raise ValueError("invalid benchmark page")
|
||||
with tempfile.TemporaryDirectory(prefix="alkane-pages-") as directory:
|
||||
temporary = Path(directory)
|
||||
guard_checkout = temporary / "guard"
|
||||
run("git", "clone", "--quiet", "--single-branch", "--branch", "next",
|
||||
GUARD_REPO, str(guard_checkout))
|
||||
guard_source = run("git", "show", f"{GUARD_COMMIT}:ci/validate_site.py",
|
||||
cwd=guard_checkout).stdout
|
||||
guard_script = temporary / "validate_site.py"
|
||||
guard_script.write_text(guard_source)
|
||||
run("python3", str(guard_script), "--page", site,
|
||||
str(Path("bench-site/index.html").resolve()))
|
||||
key = os.environ["BENCH_PAGES_DEPLOY_KEY"]
|
||||
if not key.startswith("-----BEGIN OPENSSH PRIVATE KEY-----"):
|
||||
raise ValueError("missing benchmark Pages deploy key")
|
||||
key_path = temporary / "deploy_key"
|
||||
key_path.write_text(key.rstrip("\n") + "\n")
|
||||
key_path.chmod(0o600)
|
||||
known_hosts = temporary / "known_hosts"
|
||||
known_hosts.write_text(PAGES_HOST_KEY + "\n")
|
||||
fingerprint = run("ssh-keygen", "-lf", str(known_hosts)).stdout.split()[1]
|
||||
if fingerprint != PAGES_HOST_FINGERPRINT:
|
||||
raise ValueError("benchmark Pages SSH host key changed")
|
||||
git_env = os.environ.copy()
|
||||
ssh_command = (f"ssh -i {shlex.quote(str(key_path))} -o IdentitiesOnly=yes "
|
||||
f"-o UserKnownHostsFile={shlex.quote(str(known_hosts))} "
|
||||
"-o StrictHostKeyChecking=yes -o ConnectTimeout=10")
|
||||
git_env["GIT_SSH_COMMAND"] = ssh_command
|
||||
git_env["GIT_TERMINAL_PROMPT"] = "0"
|
||||
checkout = temporary / "site"
|
||||
run("git", "clone", "--quiet", "--single-branch", "--branch", "gh-pages",
|
||||
PAGES_REPO, str(checkout), env=git_env)
|
||||
run("git", "config", "user.name", "Alkane CI", cwd=checkout)
|
||||
run("git", "config", "user.email", "ci@bluefla.re", cwd=checkout)
|
||||
for attempt in range(3):
|
||||
if current_main_sha() != sha:
|
||||
print("Skipping benchmark page from a superseded main commit")
|
||||
return
|
||||
run("git", "fetch", "--quiet", "origin", "gh-pages", env=git_env,
|
||||
cwd=checkout)
|
||||
run("git", "checkout", "-q", "-B", "bench-publish", "origin/gh-pages",
|
||||
cwd=checkout)
|
||||
destination = checkout / site / "index.html"
|
||||
destination.parent.mkdir(exist_ok=True)
|
||||
destination.write_bytes(page)
|
||||
run("git", "add", f"{site}/index.html", cwd=checkout)
|
||||
changed = subprocess.run(("git", "diff", "--cached", "--quiet"),
|
||||
cwd=checkout, check=False)
|
||||
if changed.returncode == 0:
|
||||
print(f"{site} benchmark page is already current")
|
||||
return
|
||||
if changed.returncode != 1:
|
||||
raise RuntimeError("cannot compare benchmark page")
|
||||
run("git", "commit", "-q", "-m",
|
||||
f"Update {site} benchmarks for {sha[:10]} [skip ci]", cwd=checkout)
|
||||
pushed = subprocess.run(("git", "push", "--quiet", "origin",
|
||||
"HEAD:gh-pages"), env=git_env, cwd=checkout,
|
||||
text=True, capture_output=True, check=False)
|
||||
if pushed.returncode == 0:
|
||||
print(f"Published {site} benchmark page for {sha[:10]}")
|
||||
return
|
||||
if attempt == 2:
|
||||
raise RuntimeError(f"benchmark Pages push failed: {pushed.stderr.strip()}")
|
||||
raise RuntimeError("benchmark Pages publication did not complete")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("site", choices=("sdk", "os", "toolkit"))
|
||||
publish(parser.parse_args().site)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,111 +0,0 @@
|
||||
# Code review report -- Round 19
|
||||
|
||||
A multi-agent review of the Round 19 changes (columns, scan fast-path +
|
||||
concurrency, per-firmware log delegation, export dialog, the wx-rs bridge
|
||||
alignment/tooltip work, and the bench-delta CI badge). Four reviewers ran in
|
||||
parallel across correctness, reliability/concurrency, the C++ bridge + UI, and
|
||||
security/CI. Every finding was re-read against the code before it was acted on.
|
||||
|
||||
## Verdict
|
||||
|
||||
Ready to ship. No Critical findings. The one High (a single miner's telemetry
|
||||
panic could abort the whole scan) is fixed with per-miner panic isolation. The
|
||||
Mediums (right-aligned zebra fill, the scan-concurrency ceiling, and the
|
||||
board-voltage/frequency sort key) are fixed. The tooltip hit-test Medium is
|
||||
resolved by the Health-column uniform-slot fix. The remaining items are Lows and
|
||||
documented tradeoffs. CI run 95 was green (93 unit tests + 9 microbenchmarks +
|
||||
the headless self-test), and the fixes re-check clean (`cargo check --tests`,
|
||||
`clippy --no-deps -D warnings`).
|
||||
|
||||
## Scope
|
||||
|
||||
Round 19 source only: `crates/alkane-gui/src` (model.rs, ui.rs, scan.rs,
|
||||
log_scan.rs, export.rs, fixtures.rs, main.rs, presets.rs), `ci/`
|
||||
(bench-badge.py, gen-badges.py), `.gitea/workflows/release.yml`, and the two
|
||||
changed wx-rs bridge files (`src/widgets.rs`, `cpp_src/widgets_bridge.cpp`).
|
||||
Vendored asic-rs and the wxWidgets tree were out of scope (read-only, and the
|
||||
CIFS mount cannot be recursed safely).
|
||||
|
||||
## Fixed
|
||||
|
||||
- **[High] No panic isolation around per-miner telemetry** (scan.rs). asic-rs
|
||||
backends parse miner-controlled data; a panic in one miner's `get_data` unwound
|
||||
the whole scan thread, aborting every other miner and leaving the Round-19
|
||||
partial identity rows stranded. `to_row` is now wrapped in
|
||||
`AssertUnwindSafe(..).catch_unwind()`, so a panicked miner is skipped (keeping
|
||||
its partial identity row) and the sweep continues. (`panic = "unwind"` in the
|
||||
release profile makes this effective.)
|
||||
- **[Medium] Zebra stripe missing on the left of right-aligned colored columns**
|
||||
(widgets_bridge.cpp, SegmentRenderer::Render). Right-aligning the colored
|
||||
columns (round 19 #21) anchored the zebra fill at the content's left edge, so
|
||||
the left portion of each cell kept the base colour. The fill now over-spans the
|
||||
column in both directions and lets the cell-DC clip trim it.
|
||||
- **[Medium] Health-column tooltip landed on the wrong icon** (widgets_bridge.cpp).
|
||||
The per-icon advance used a different formula in GetSize, DrawShape, and the
|
||||
tooltip hit-test, so the slot boundaries drifted. All three now use one uniform
|
||||
fixed-width slot (see the Health-column change below), so the hit-test lines up.
|
||||
- **[Medium] Scan-concurrency ceiling too high** (scan.rs). The user-adjustable
|
||||
cap allowed 512; the code documents that 128 is fully reliable and 192 already
|
||||
dropped responders (which read as phantom faults). Ceiling lowered to 256.
|
||||
- **[Medium] Board voltage/frequency sort key averaged placeholder zeros**
|
||||
(model.rs). Those columns store 0.0 for a board with no reading (rendered "-"),
|
||||
but the sort/filter key averaged the zeros too, mis-ranking miners. A new
|
||||
`avg_positive` helper skips non-positive entries (board hashrate keeps a plain
|
||||
average -- a 0.0 there is a genuinely idle board).
|
||||
- **[Low] Accepted/rejected share summation could overflow** on miner-controlled
|
||||
counts (scan.rs, model.rs) -- now `saturating_add`.
|
||||
- **[Low] Orphaned doc comment**: `efficiency_display`'s docs had attached to
|
||||
`reject_ratio`; reordered.
|
||||
- **[Low] Stale comment** ("3 combined columns" -> two after the Boards removal).
|
||||
|
||||
## Health-column follow-up (operator-reported)
|
||||
|
||||
The right-aligned Health column did not line up across rows: every miner is
|
||||
padded to the same NUMBER of component-icon slots, but the individual glyphs
|
||||
(bolt, brain, fan, chip, gap) have different widths, so flush-right the columns
|
||||
drifted. Fixed by giving every health icon a UNIFORM fixed-width slot in both
|
||||
`SegmentRenderer::GetSize` and `DrawShape` (each glyph centred in its slot), and
|
||||
left-aligning the icon columns (Health/Access/Light) so the block anchors at a
|
||||
consistent left edge. The tooltip hit-test uses the same uniform slot, which also
|
||||
resolves the tooltip Medium above.
|
||||
|
||||
## Accepted / documented tradeoffs
|
||||
|
||||
- **Security (Low, release.yml):** the badge push-back passes the ephemeral,
|
||||
repo-scoped Gitea run token via `git -c http.extraheader`; it is never logged,
|
||||
but is briefly visible in the runner's process argv. Acceptable on the single
|
||||
single-tenant capped runner.
|
||||
- **`[skip release]` (Info):** Gitea recognises `[skip ci]`, not `[skip release]`,
|
||||
so the badges-only commit does trigger a second workflow run -- but that run cuts
|
||||
no release (compute-version.sh treats `badges/*`, including bench-baseline.json,
|
||||
as no-bump), which is the intended, verified behaviour.
|
||||
- **Paused-blue can mask a faulty board (#19):** a paused miner's detected boards
|
||||
all render blue by design; power/control/fans keep their true colours.
|
||||
- **`do_export` opens the save dialog under the App borrow:** harmless
|
||||
(`try_borrow_mut` drops re-entrant timer ticks; the native save dialog emits no
|
||||
wx widget events), the scan channel just buffers while it is open.
|
||||
|
||||
## Verified sound (no change)
|
||||
|
||||
- Fast-scan partial/full ordering: `buffer_unordered` polls inline on the
|
||||
single block_on thread and the partial is sent before the future awaits
|
||||
`get_data`, so a full row never precedes its own partial; the UI `upsert_into`
|
||||
keys by IP, so the full row replaces the partial (preserving selection).
|
||||
- WhatsMiner log fallback: `naming::brand` returns "WhatsMiner", which matches the
|
||||
case-insensitive brand gate, so WhatsMiner correctly routes to the fault-code
|
||||
view.
|
||||
- Every new Column arm is internally consistent (is_numeric <-> sort_key <->
|
||||
num_value <-> cell blank logic); `timestamp_utc` matches UTC over 200k samples;
|
||||
the export column subset keeps headers and values aligned; the bench-badge
|
||||
parser handles all nine bench line formats and the weighted delta is correct;
|
||||
`tail()` never panics on a non-UTF8 boundary.
|
||||
|
||||
## Automated verification
|
||||
|
||||
- `cargo check --release --tests -p alkane-gui` -- clean (local).
|
||||
- `cargo clippy -p alkane-gui --no-deps --release --bins -- -D warnings` -- clean.
|
||||
- CI run 95 (v0.65.0): 93 unit tests + 9 microbenchmarks + headless self-test all
|
||||
pass; coverage 44%.
|
||||
- Right-alignment verified from a headless screenshot of the built binary; the
|
||||
Health-column and paused-blue changes are verified in the next release's
|
||||
screenshot.
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Bench-fleet fixtures: the expected hardware output of the 9 boards on
|
||||
//! 10.255.1.0/24 (see ../../../HANDOFF.md section 7 and the parent project's
|
||||
//! MEMORY-SNAPSHOT). These are the reference values the workflow tests compare
|
||||
//! Fixture fleet: the expected hardware output of nine representative miners
|
||||
//! (one per control-board family / firmware). These are the reference values
|
||||
//! the workflow tests compare
|
||||
//! the application's actual output against, and the rows the offline
|
||||
//! `ALKANE_FAKE_SCAN` demo mode renders. Only miners that respond become rows,
|
||||
//! so there is no synthetic "offline" fixture.
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
# Toolkit plan
|
||||
|
||||
Drafted 2026-09-14. This is an installer design reference. See the
|
||||
[README](../README.md) for current delivery status.
|
||||
|
||||
## Scope
|
||||
|
||||
The Toolkit is planned to install stock or Alkane OS from stock,
|
||||
Vnish/AnthillOS, Braiins OS+, LuxOS, ePIC UMC, BixBit, and WardenOS.
|
||||
The SDK owns board data, image packers, and build outputs. The Toolkit
|
||||
owns discovery, access, execution, verification, and the operator UI.
|
||||
An entry in this plan is a target, not a shipping install path.
|
||||
|
||||
The source rules are [SDK install methods](https://gitea.bluefla.re/blueflare/alkane-sdk/src/branch/main/docs/install-methods.md),
|
||||
[firmware recipes](https://gitea.bluefla.re/blueflare/alkane-sdk/src/branch/main/install/from-firmware/README.md),
|
||||
and `boards/*/board.yml`. The bench evidence cited below includes the
|
||||
S17 NAND restore (2026-09-14), WhatsMiner network updates and `/data`
|
||||
overlay, Amlogic stock capture, and Braiins CV bootloader analysis.
|
||||
|
||||
## Install pipeline
|
||||
|
||||
```
|
||||
discover -> classify -> root access -> pack -> backup -> transfer -> write
|
||||
-> verify write -> select boot -> reboot -> verify live
|
||||
-> verify after at least two unattended power cycles
|
||||
```
|
||||
|
||||
Each `{board, source OS}` recipe supplies typed parameters to one engine
|
||||
([ADR 0001](adr/0001-recipes-as-data.md)). Each stage must be resumable
|
||||
or idempotent and write an audit record. The GUI and CLI use the same
|
||||
engine; board facts come from the SDK. WhatsMiner package builders must
|
||||
match captured vendor output byte for byte when ported from Python.
|
||||
|
||||
## Safety requirements
|
||||
|
||||
1. Refuse writes to bootloader and secure partitions in the engine.
|
||||
2. Verify a positive marker and liveness over an independent channel,
|
||||
then pass at least two unattended power cycles.
|
||||
3. Treat a dropped SSH session after root-initiated reboot as possible
|
||||
success; reclassify over the liveness channel.
|
||||
4. Bind each image packer to its board and verify boot-switch state.
|
||||
5. Require a live serial console before kernel or boot-adjacent writes.
|
||||
6. Verify image digest and format before writing, and read back over an
|
||||
independent channel. Protect live earners from broad auth attempts;
|
||||
teardown requires explicit operator authorization in the audit log.
|
||||
|
||||
These requirements encode recorded UBI volume-name and installer-exit
|
||||
false positives. The SDK documents the per-board recovery path.
|
||||
|
||||
## Components
|
||||
|
||||
| Component | Planned responsibility |
|
||||
| --- | --- |
|
||||
| `alkane-core` | Board, OS, artifact, partition, stage, and safety types |
|
||||
| `alkane-discovery` | Vendored asic-rs 0.8.1 scan, CIDR lists, classification, and a planned ARP/ICMP pre-pass for silent boards |
|
||||
| `alkane-access` | SSH with legacy algorithms, Bitmain and WhatsMiner port 4028 clients, and serial transport where network receive is broken |
|
||||
| `alkane-flash` | SSH stream transfer for minimal BusyBox, MTD/eMMC writes, board packers, readback, U-Boot environment updates, LuxOS installer, and IMAGEWTY tooling |
|
||||
| `alkane-artifacts` | SHA-256 manifest and image magic, size, and integrity checks; seed manifest has 14 bench artifacts |
|
||||
| `alkane-cli` | Headless bench and scripting commands for the same engine |
|
||||
| `alkane-gui` | Rust wxWidgets UI through patched wx-rs ([ADR 0002](adr/0002-gui-bindings.md)); primary view in [UI spec](UI-SPEC.md) |
|
||||
|
||||
Access details include the WhatsMiner `update_firmware` token and
|
||||
AES-ECB/u32-LE chunk framing, old stock SSH algorithms, and serial
|
||||
base64/bzip2 transfer for A113D. Flash recipes must retain the
|
||||
single-block U-Boot environment readback and per-board format checks.
|
||||
|
||||
## Bench pathways
|
||||
|
||||
The matrix records physical install observations. It does not prove that
|
||||
the Toolkit implements them. The recipe schema must represent each row.
|
||||
|
||||
| Board (SoC) | Proven installs | Foothold on stock | Transfer | Hard rules |
|
||||
|---|---|---|---|---|
|
||||
| am335x-bb (S19j Pro) | 5/5 network-only (stock, LuxOS, ePIC, Braiins, Vnish -> OurOS), round-tripped | `miner:miner` + update-daemon loopback RCE | SSH/SFTP | autoboot abort = ESC with 1 s window (catcher first, then power); mtd0-3 never written; bootloader written last; no SD boot proven; NAND is the only net |
|
||||
| zynq-7010 (S19) | stock->OurOS, Vnish->OurOS network-only | `miner:miner` + loopback RCE | SSH/SFTP | PS RSA eFuse is per-unit; read 0xF800D010 before planning; FIT unverified branch is the entry; autoboot 0 s (keys must pre-flood); stock console echoes but no getty |
|
||||
| zynq-7010 (S17) | stock NAND restore verified by CRC through U-Boot (2026-09-14) | stock `root` with EMPTY password; legacy SSH algos (dh-group1-sha1, ssh-rsa, aes128-cbc) | ymodem over serial for NAND writes; SSH for userspace | board mtd char/block reads return EIO; verify only via U-Boot `nand read`+`crc32`; ymodem splits at ≤2047 blocks; `reboot -f` no-ops from RAM-boot (sysrq `b`) |
|
||||
| a113d (BHB42XXX) | 5/5 | `miner:miner` + loopback RCE; `amlenv.py` edits env in-band over SSH (`/dev/nand_env`) | SSH (net), U-Boot env is the boot switch | UBI volume name is order-dependent (`nvdada_log`/`umc_os_rootfs`/`overlay`); detect live, never hardcode; per-OS DHCP lease differs (false DARK trap; a failed self-report downgrades to WARNING, SSH fingerprint decides) |
|
||||
| a113d hardened (S21 Pro) | stock restore via env swap; two root paths | `miner:miner`; daemon injection char-whitelisted (dead); use `eclipse`/`updatem` forged `{type:root}` package -> sudoers -> root | SSH or serial-only (base64/bzip2, ~10 KiB/s, ~11 min install) | stock busybox has no wget/nc/tftp/curl/gzip/xz; console arg must be `ttyAML0`+`meson` earlycon or the board boots blind and the install looks failed |
|
||||
| cv1835 (S19k Pro) | 3/3 buildable (LuxOS no asset, ePIC wrong silicon excluded) | `miner:miner` + `/nvdata/rroot` (non-permanent; p7 reformat destroys it; gate on `rroot -c id`) or loopback RCE | SSH pipe (`cat >`, busybox has no wget/tftp/nc) | Vnish/Braiins are RAM overlays on stock kernel; exit while overlay is live; eMMC boot0 eFuse-hook units cannot SD-recover; golden copy at raw LBA 0x300000 is the only net; serial catch needs 3 ms flood |
|
||||
| allwinner H3/H6/H616 (WhatsMiner) | rooted `/data` overlay survives genuine reinstall (proven on H616); genuine network update executed on H3 + H616 | `admin:admin` uid-300 shell; root via `/data/rootshell` overlay (persists) or rooted SD image | 4028 API `update_firmware` (AES-ECB + md5crypt token, ≤1 MB chunks); IMAGEWTY SD-burn for rooted card | package format 0x9A5BA57C forgeable (MD5+CRC only); 8889 binary daemon AES key unknown; not implementable, use 4028; H616 payload key eFuse/OP-TEE-bound; H3 rootfs.fex LUKS (only /data slices editable); random MAC -> DHCP moves |
|
||||
|
||||
Antminer port 4028 uses `{"command":...}`; WhatsMiner uses
|
||||
`{"cmd":"get_version"}`. SSH banner and KEX help classify old stock.
|
||||
|
||||
## Milestones
|
||||
|
||||
| Phase | Exit condition |
|
||||
| --- | --- |
|
||||
| M0 | Workspace, CI, vendored asic-rs/wxWidgets/wx-rs, and Rust GUI decision recorded |
|
||||
| M1 | Nine-board bench discovery view, scan ranges, filters, columns, and silent-board classification |
|
||||
| M2 | Artifact registry and image verification, including bulk archives and per-model corpus |
|
||||
| M3 | Zynq-7010 stock restore, then Alkane OS installation after SDK release qualification; readback, boot switch, liveness, and persistence gates |
|
||||
| M4 | Guided SD recovery builders and verified image burn |
|
||||
| M5 | WhatsMiner, A113D, CV1835, and AM335x install pathways |
|
||||
| M6 | Install wizard, progress and cancel, audit log, and platform packaging |
|
||||
|
||||
The SDK now builds rootfs artifacts for all seven boards. No production
|
||||
image or Toolkit installation pathway is qualified. The first install
|
||||
milestone remains blocked by release evidence and installer implementation.
|
||||
Bench validation closes each milestone; do not exercise live earners
|
||||
without explicit authorization.
|
||||
|
||||
## Open questions
|
||||
|
||||
- Which stock image version is canonical for each board? The bench corpus
|
||||
has an S17 restore image; other stock packages need selection.
|
||||
- Which SDK release should the installer pin after board and simulator
|
||||
gates pass?
|
||||
- Which of Linux, Windows, and macOS must ship in the first GUI package?
|
||||
|
||||
## References
|
||||
|
||||
- [SDK install rules](https://gitea.bluefla.re/blueflare/alkane-sdk/src/branch/main/docs/install-methods.md)
|
||||
- [SDK firmware recipes](https://gitea.bluefla.re/blueflare/alkane-sdk/src/branch/main/install/from-firmware/README.md)
|
||||
- `bench-wiki/boards/` and `MEMORY-SNAPSHOT/` in the parent workspace
|
||||
- `crates/alkane-artifacts/data/manifest-seed.csv`
|
||||
- `scratch/wm-install-build/` package and IMAGEWTY builders in the parent workspace
|
||||
@@ -61,6 +61,6 @@ Rules:
|
||||
## Consequences
|
||||
|
||||
- The repo grows by the vendored sources (one-time; git-compressed).
|
||||
- Offline/reproducible builds on any machine, including the bench Pi.
|
||||
- Offline/reproducible builds on any machine.
|
||||
- Updating either dependency is mechanical, reviewable, and never
|
||||
entangles our changes with upstream files.
|
||||
|
||||
@@ -1,468 +0,0 @@
|
||||
# Firmware parity
|
||||
|
||||
This plan covers configuration and telemetry parity. It excludes firmware
|
||||
installation. The original audit was read-only and made no live miner changes.
|
||||
|
||||
It compares the Toolkit with Braiins Toolbox/BOS, LuxOS/luxminer, ePIC
|
||||
PowerPlay/UMC, WhatsMinerTool/btminer, Vnish, and stock Antminer. Sources
|
||||
include the Toolkit baseline audit, vendor API/help surfaces, and the
|
||||
read-only device checks listed under [Verification](#verification).
|
||||
|
||||
At the audit point, Antminer support covered 15 of 58 features fully and
|
||||
15 partially (about 39% weighted parity). WhatsMiner covered 12 of 30
|
||||
fully and 5 partially (about 48%). Missing work centers on structured
|
||||
tuning, cooling, fan control, auto-scaling, network settings, and CLI
|
||||
coverage. The gap list below records each feature and its evidence.
|
||||
|
||||
## Parity matrices
|
||||
|
||||
Legend: our_support = have / partial / missing. UI = exposed in GUI right-click menu today.
|
||||
CLI = exposed in committed `miner_probe` today (uncommitted local-only additions are marked
|
||||
`local`). Toolkit columns: B = Braiins toolbox/BOS, L = LuxOS/luxminer, V = VNish, E = ePIC/
|
||||
PowerPlay, S = stock Antminer. A dot means that toolkit exposes the feature.
|
||||
|
||||
### Antminer
|
||||
|
||||
Category C = config, T = telemetry/scan.
|
||||
|
||||
| # | Feature | Cat | B | L | V | E | S | our_support | asic-rs trait | UI | CLI |
|
||||
|---|---------|-----|---|---|---|---|---|-------------|---------------|----|-----|
|
||||
| 1 | Discovery + make/model/fw ID | T | . | . | . | . | . | have | MinerFactory + Validate + GetDeviceInfo | yes | scan |
|
||||
| 2 | Device identity (mac/serial/host/ctrl-board/versions/PIC) | T | . | . | . | . | . | have | GetMAC/GetHostname/GetSerialNumber/GetControlBoardVersion/GetApiVersion/GetFirmwareVersion | yes | scan |
|
||||
| 3 | Live telemetry core (hr/exp-hr/watts/eff/temps/fans/state/uptime/light) | T | . | . | . | . | . | have | GetHashrate/GetExpectedHashrate/GetWattage/GetHashboards/GetFans/GetOperatingState/GetIsMining/GetUptime/GetLightFlashing | yes | no |
|
||||
| 4 | Per-hashboard telemetry (board_name/chip_type/multi-window) | T | . | . | . | . | . | partial | GetHashboards | yes | no |
|
||||
| 5 | Fan RPM + commanded duty ratio | T | . | . | . | . | . | partial | GetFans | yes | no |
|
||||
| 6 | Pool list + extended per-pool share stats | T | . | . | . | . | . | partial | GetPools | yes | no |
|
||||
| 7 | Best share + session best share | T | . | . | . | . | . | missing | GetBestShare/GetSessionBestShare (empty impls) | no | no |
|
||||
| 8 | PSU info (model/hw/fw/voltage range) | T | . | . | . | . | | missing | none (new GetPsuInfo) | no | no |
|
||||
| 9 | Fluid / immersion temperature | T | . | . | . | | | partial | GetFluidTemperature (BOS empty; VNish impl) | yes | no |
|
||||
| 10 | Tuning target read (configured + scaled) | T | . | . | . | . | | partial | GetTuningTarget/GetScaledTuningTarget | yes | no |
|
||||
| 11 | Tuner / power / hashrate constraints read | T | . | . | | . | | partial | GetTuningCapabilities (BOS have; Lux limits missing) | yes | no |
|
||||
| 12 | Cooling constraints read | T | . | . | | . | | missing | none (new GetCoolingCapabilities) | no | no |
|
||||
| 13 | DPS / hashboard / scaling constraints read | T | . | . | | . | | missing | none (new) | no | no |
|
||||
| 14 | Advanced keyed settings read (22 keys) | T | . | | | | | missing | none (new AdvancedSettings) | no | no |
|
||||
| 15 | Network config read (ip/mask/gw/dns/proto) | T | . | . | . | . | | partial | partial (GetMAC/GetHostname drop the rest) | no | no |
|
||||
| 16 | Diagnostics data-collection archive | T | . | | | . | | partial | ReadLogs (compose) | no | no |
|
||||
| 17 | Firmware update check (read only) | T | . | . | . | . | | have | UpgradeFirmware::check_firmware_update | no | no |
|
||||
| 18 | Structured messages / events / appeals | T | . | . | . | . | . | have | GetMessages | yes | no |
|
||||
| 19 | Per-chip health detail (score/errors) | T | | . | | | | partial | DataField::Chips (reduced) | no | no |
|
||||
| 20 | Per-chip frequency array | T | | . | | | | missing | none (frequencyget unused) | no | no |
|
||||
| 21 | Temp-control targets read | T | . | . | . | . | | missing | none (Lux tempctrl / ePIC shutdowntemp unmapped) | no | no |
|
||||
| 22 | Limits / bounds read | T | | . | | . | | missing | none (Lux limits / ePIC capabilities partial) | no | no |
|
||||
| 23 | Operating-state / paused (derived) | T | . | . | . | . | | partial | GetOperatingState (Lux missing/derivable) | yes | no |
|
||||
| 24 | Perpetual-tune / ATM / DPS status read | T | . | . | | . | | missing | none (ePIC perpetualtune / Lux atm unmapped) | no | no |
|
||||
| 25 | Scheduler / idle-periods read | T | | | | . | | missing | none | no | no |
|
||||
| 26 | Fault / locate light on-off | C | . | . | . | . | . | have | SetFaultLight | yes | local |
|
||||
| 27 | Pause mining | C | . | . | . | . | . | have | Pause | yes | no |
|
||||
| 28 | Resume mining | C | . | . | . | . | . | have | Resume | yes | no |
|
||||
| 29 | Restart / reboot | C | . | . | . | . | . | have | Restart | yes | no |
|
||||
| 30 | Configure pools (write) | C | . | . | . | . | . | have | SupportsPoolsConfig | yes | local |
|
||||
| 31 | Set power limit / power target (watts) | C | . | . | . | . | . | have | SetPowerLimit (VNish masked) | yes | local |
|
||||
| 32 | Set tuning percent / throttle | C | | | . | | | have | SetTuningPercent | yes | no |
|
||||
| 33 | Set hashrate target + tuner-mode + reset + steps | C | . | . | . | . | | missing | SupportsTuningConfig (BOS false) | no | no |
|
||||
| 34 | Named preset / profile select | C | | . | . | . | | partial | SupportsPresets + SupportsTuningConfig::Preset | no | no |
|
||||
| 35 | Custom profile create / remove | C | | . | | | | missing | none (profilenew/profilerem) | no | no |
|
||||
| 36 | Per-board voltage + frequency override | C | | . | . | . | | missing | SupportsTuningConfig::Manual (unwired) | no | no |
|
||||
| 37 | Cooling config (mode/temps/fan-pause/min-fans/range) | C | . | . | . | . | | missing | partial (SupportsTemperatureConfig/FanConfig defaults) | no | no |
|
||||
| 38 | Manual fan control | C | | . | | . | . | missing | SupportsFanConfig (antminer/epic true; unwired UI) | no | no |
|
||||
| 39 | Temperature / thermal-limit config | C | . | . | . | . | | partial | SupportsTemperatureConfig (VNish only) | no | no |
|
||||
| 40 | DPS / auto-scaling config | C | . | | | . | | missing | SupportsScalingConfig (epic true; BOS false) | no | no |
|
||||
| 41 | ATM auto-thermal-tuning (min/max profile + windows) | C | | . | | | | missing | none (new SupportsAutoTuningConfig) | no | no |
|
||||
| 42 | Perpetual-tune config (algo + target) | C | | | | . | | missing | none (new; overlaps auto-tuning trait) | no | no |
|
||||
| 43 | Timezone config | C | . | | . | . | | partial | SupportsTimezoneConfig (backends done, UI/CLI missing) | no | no |
|
||||
| 44 | Change password | C | . | | . | . | | partial | ChangePassword (backends done, UI/CLI missing) | no | no |
|
||||
| 45 | Factory reset | C | . | | . | | | partial | FactoryReset (backends done, UI/CLI missing) | no | no |
|
||||
| 46 | Network config write (dhcp/static) | C | . | . | . | . | | missing | none (new SupportsNetworkConfig) | no | no |
|
||||
| 47 | Advanced keyed settings write | C | . | | | | | missing | none (new AdvancedSettings) | no | no |
|
||||
| 48 | Remove tuned profiles (force retune) | C | . | | | | | missing | none | no | no |
|
||||
| 49 | Stock miner mode (high/normal/low/sleep) | C | . | | | | . | missing | SupportsTuningConfig::MiningMode (stock impl, unwired) | no | no |
|
||||
| 50 | Chip health check trigger | C | | . | | | | missing | none (healthchipset) | no | no |
|
||||
| 51 | Reset miner (process restart, no reboot) | C | | . | | | | missing | none (reset_miner unwired) | no | no |
|
||||
| 52 | Kill (hard-stop) | C | | . | | | | missing | none | no | no |
|
||||
| 53 | Hostname set | C | . | . | . | . | | missing | none (mostly install-time on Lux) | no | no |
|
||||
| 54 | Coin type select | C | | | | . | | missing | none (/coin) | no | no |
|
||||
| 55 | Board enable / disable | C | | | | . | | missing | none (/boardenable) | no | no |
|
||||
| 56 | Scheduler / idle-periods write | C | | | | . | | missing | none (/scheduler) | no | no |
|
||||
| 57 | Shutdown-temp / critical-temp / overdrive / idle-on-loss | C | | | | . | | missing | none (ePIC misc setters) | no | no |
|
||||
| 58 | Custom contract apply (Braiins pool) | C | . | | | | | missing | none (niche) | no | no |
|
||||
|
||||
Antminer totals: have 15, partial 15, missing 28 (of 58).
|
||||
|
||||
### WhatsMiner
|
||||
|
||||
Toolkit column W = WhatsMinerTool / btminer API (:4028 read + :8889 or 4028-token write).
|
||||
btminer notes: :4028 is anonymous read-only; privileged writes go to :8889 (AES-ECB + md5-crypt
|
||||
token) or 4028 with host_sign token. Confirmed writes on stock BTMiner: update_pools,
|
||||
restart_btminer, set_power_pct, reboot, poweroff, update_network, update_password, restore_factory,
|
||||
restore_dhcp, update_power_mode, update_coin_type. Confirmed NOT on stock 4028: set_freq,
|
||||
set_voltage, set_led, adjust_power (LED/per-board tuning live in the ~40% uncharted :8889 space).
|
||||
|
||||
| # | Feature | Cat | W | our_support | asic-rs trait | UI | CLI |
|
||||
|---|---------|-----|---|-------------|---------------|----|-----|
|
||||
| 1 | Discovery + make/model/fw ID | T | . | have | MinerFactory + Validate | yes | scan |
|
||||
| 2 | Device identity (mac/serial/model/control-board) | T | . | have | GetMAC/GetSerialNumber/GetDeviceInfo | yes | scan |
|
||||
| 3 | Live telemetry core (hr/exp/watts/eff/temps/fans/uptime) | T | . | have | GetHashrate/GetWattage/GetHashboards/GetFans/GetUptime | yes | no |
|
||||
| 4 | Ambient / environment temperature | T | . | have | GetFluidTemperature (ambient) | yes | no |
|
||||
| 5 | PSU fan RPM | T | . | have | GetFans (PSU fan, WhatsMiner-only) | yes | no |
|
||||
| 6 | Pool list + accepted/rejected | T | . | have | GetPools | yes | no |
|
||||
| 7 | Best share + session best share | T | . | missing | GetBestShare/GetSessionBestShare (empty) | no | no |
|
||||
| 8 | PSU info (get_psu: model/vout/true-power) | T | . | missing | none (new GetPsuInfo) | no | no |
|
||||
| 9 | Error codes / health messages (get_error_code) | T | . | have | GetMessages | yes | no |
|
||||
| 10 | Operating state / paused | T | . | missing | GetOperatingState (not populated for WM) | no | no |
|
||||
| 11 | Power-mode read (high/normal/low) | T | . | missing | none | no | no |
|
||||
| 12 | Per-board detail (freq/chips/serial/voltage) | T | . | partial | GetHashboards | yes | no |
|
||||
| 13 | Fault / locate light on-off | C | . | have | SetFaultLight (supports=true) | yes | local |
|
||||
| 14 | Restart / reboot | C | . | have | Restart | yes | no |
|
||||
| 15 | Pause mining | C | . | have | Pause | yes | no |
|
||||
| 16 | Resume mining | C | . | have | Resume | yes | no |
|
||||
| 17 | Configure pools (write, 3 slots) | C | . | have | SupportsPoolsConfig | yes | local |
|
||||
| 18 | Set power limit (watts) | C | . | partial | SetPowerLimit (v1/v2/v3; error-swallow bug r15 #4) | yes | local |
|
||||
| 19 | Power-mode set (high/normal/low/sleep) | C | . | partial | SupportsTuningConfig (v2/v3 true; MiningMode unwired) | no | no |
|
||||
| 20 | Set power percent | C | . | missing | none (set_power_pct; SetTuningPercent false for WM) | no | no |
|
||||
| 21 | Poweroff device | C | . | missing | none (distinct from pause) | no | no |
|
||||
| 22 | Change password (update_password) | C | . | missing | ChangePassword (WM supports=false) | no | no |
|
||||
| 23 | Network config (update_network / restore_dhcp) | C | . | missing | none (new SupportsNetworkConfig) | no | no |
|
||||
| 24 | Factory reset (restore_factory) | C | . | missing | FactoryReset (WM supports=false) | no | no |
|
||||
| 25 | Coin type select (update_coin_type) | C | . | missing | none | no | no |
|
||||
| 26 | Timezone / NTP config | C | . | missing | SupportsTimezoneConfig (WM false) | no | no |
|
||||
| 27 | Fan / cooling config | C | . | missing | SupportsFanConfig (WM false) | no | no |
|
||||
| 28 | Per-board freq / voltage tuning | C | . | missing | none (not on stock 4028; :8889 uncharted) | no | no |
|
||||
| 29 | Structured tuning config (target) | C | . | partial | SupportsTuningConfig (v2/v3 true; unwired UI/CLI) | no | no |
|
||||
| 30 | Restore miner setting (revert config) | C | . | missing | none | no | no |
|
||||
|
||||
WhatsMiner totals: have 12, partial 5, missing 13 (of 30).
|
||||
|
||||
---
|
||||
|
||||
## Gaps
|
||||
|
||||
Each gap gives: asic-rs backend work, ui.rs ConfigAction / action wiring, miner_probe/CLI surface,
|
||||
clean-integration note, hardware verification plan (IP/model + read-back + restore), and priority.
|
||||
Standard UI wiring for any NEW capability (a compile break otherwise), applied throughout below:
|
||||
(1) add bool to `struct MinerCaps` (model.rs); (2) add to `MinerCaps::intersect` and `any_control()`;
|
||||
(3) set it in the caps literal in scan.rs `to_row` from the matching `supports_*()`; (4) add a
|
||||
`ConfigAction` variant with label()/progress_label(); (5) add an apply_action arm calling the
|
||||
`&dyn Miner` trait method; (6) add ID_CTX_* const + a gated `menu.menu_append` block + a handler
|
||||
arm in ui.rs; (7) add a `miner_probe` subcommand. Any NEW setter trait must join the
|
||||
`SupportsConfigs` supertrait bundle (traits/miner.rs) and get a `ConfigField` variant
|
||||
(config/collector.rs) or it will not dispatch on `&dyn Miner`.
|
||||
|
||||
HARD constraint reflected in every verification plan: config-WRITE tests run on a bench/lab unit
|
||||
or a unit pulled from production during a maintenance window, NEVER on the live production units
|
||||
that are read-only (BOS .83/.27, LuxOS .60/.67, ePIC .6/.10, the WhatsMiner fleet). Read paths
|
||||
verify against those live units.
|
||||
|
||||
### High priority
|
||||
|
||||
G1. Commit a full write CLI in miner_probe (all makes).
|
||||
- Backend: none (reuse existing traits).
|
||||
- CLI: promote uncommitted local-only modes into committed subcommands and add config verbs:
|
||||
`light <ip> <on|off>`, `pause`, `resume`, `restart`, `setpools <ip> <url> <user> <pass>`,
|
||||
`config power <ip> <watts>` (was `setpl`), plus every new config verb below. Each does
|
||||
arg-parse + capability gate + constraint clamp before the call.
|
||||
- Integration: the CLI mirrors the GUI ConfigAction set one-to-one; a shared apply layer keeps
|
||||
them from diverging.
|
||||
- HW verify: read-only verbs vs live units (`miner_probe scan`, hashrate). LED is reversible even
|
||||
on production (does not disturb hashing): set on -> read state true -> set off -> read false.
|
||||
Disruptive verbs (pause/restart/power) on bench only.
|
||||
- Priority: HIGH (unblocks scripted fleet ops; every UI action is CLI-invisible today).
|
||||
|
||||
G2. Structured tuning: power target + hashrate target + tuner-mode + reset + relative steps.
|
||||
- Backend: implement `SupportsTuningConfig` for BraiinsV2604 (set_tuning_config: HashRate -> PUT
|
||||
performance/hashrate-target, Power -> reuse SetPowerLimit path; switching target type flips
|
||||
tuner_mode); flip supports_tuning_config -> true. Stock Antminer v2020/v2023_07 already map
|
||||
`TuningTarget::MiningMode` Low/Normal/High (unwired). WhatsMiner v2/v3 already true.
|
||||
- UI: `ConfigAction::HashrateTarget(f64)` (or unified TuningTarget action) + MinerCaps.tuning_config
|
||||
gate + dialog offering power|hashrate|default clamped to tuner_constraints.
|
||||
- CLI: `config hashrate <ip> <ths>`, `config tuner <ip> default`, `config mode <ip> <high|normal|low>`.
|
||||
- Integration: one generic tuning action routes to per-make backends; clamp via GetTuningCapabilities.
|
||||
- HW verify: bench BOS S19J Pro (hashrate_target 70.75-252.57 TH/s) - record tuner_mode+target,
|
||||
set, read back configuration/miner + tuner-state, restore original. NEVER on .83/.27.
|
||||
- Priority: HIGH.
|
||||
|
||||
G3. Named preset / profile select.
|
||||
- Backend: LuxOS - impl `SupportsPresets::get_presets` from `profiles` (21 dynamic steps, list
|
||||
live never hardcoded) and `SupportsTuningConfig::set_tuning_config(Preset(name)) -> rpc.profileset`
|
||||
(flip privileged=true; see G16). VNish get_presets already true. ePIC - map Tune Presets from
|
||||
/capabilities and `POST /tune` / `POST /perpetualtune`.
|
||||
- UI: MinerCaps.tuning_config + `ConfigAction::Preset(String)` + ID_CTX_PRESET dialog populated
|
||||
live from get_presets(). Note the existing GUI "Presets" button is unrelated (view layouts).
|
||||
- CLI: `presets <ip>` (list), `setpreset <ip> <name>`.
|
||||
- HW verify: LuxOS bench (.67 shows config Profile=495MHz/Step -2) - snapshot Profile, profileset
|
||||
another, read back, restore. NEVER on .60/.67 production.
|
||||
- Priority: HIGH.
|
||||
|
||||
G4. Cooling configuration (largest missed config family).
|
||||
- Backend: BOS - impl `SupportsTemperatureConfig` (hot/dangerous/target) + `SupportsFanConfig`
|
||||
(Auto{target_temp,idle_speed} / Manual{fan_speed}) + a NEW cooling-mode trait/enum
|
||||
CoolingMode{Auto,Manual,Immersion} + fan-pause (mode/runtime/pwm) + min-required-fans +
|
||||
custom-fan-range on a CoolingConfig aggregate (endpoint from a web capture; do not execute).
|
||||
LuxOS - add rpc.tempctrlset + wire tempctrl/fanctrl. ePIC - POST /fanspeed, /fans/minimum,
|
||||
/shutdowntemp, /criticaltemp.
|
||||
- UI: `ConfigAction::Cooling(CoolingConfig)` + gate + dialog whose ranges come from cooling
|
||||
constraints (new CoolingCapabilities read, G8).
|
||||
- CLI: `config cooling <ip> --mode ... --target-temp ... --hot-temp ...`.
|
||||
- HW verify: bench BOS/LuxOS/ePIC - record cooling/state + config temps + fan duty, set (e.g.
|
||||
target-temp to current), read back, restore. NEVER on production.
|
||||
- Priority: HIGH.
|
||||
|
||||
G5. Manual fan control.
|
||||
- Backend: LuxOS impl `SupportsFanConfig` -> rpc.fanset(speed|-1, min_fans) (already
|
||||
privileged=true); antminer/epic backends already report supports_fan_config=true (unwired).
|
||||
ePIC POST /fanspeed.
|
||||
- UI: MinerCaps.fan + `ConfigAction::Fan(FanConfig)` + ID_CTX_FAN dialog (Auto vs Manual %,
|
||||
clamped to limits FanSpeed range).
|
||||
- CLI: `fans <ip>` (read FANCTRL) + `setfan <ip> <speed|-1>`.
|
||||
- HW verify: LuxOS bench (.60 FANCTRL FanMinSpeed 20, MinFans 1) - snapshot, fanset 80, read
|
||||
~80, restore fanset -1 (auto). Never below thermally safe speed. NEVER on production.
|
||||
- Priority: HIGH.
|
||||
|
||||
G6. Auto-scaling config: BOS DPS + LuxOS ATM + ePIC PerpetualTune.
|
||||
- Backend: BOS impl `SupportsScalingConfig::set_scaling_config` (power_step/min_power_target/
|
||||
shutdown/duration); note ScalingConfig lacks hashrate_step/on_start_percent/mode - extend it or
|
||||
carry via set_tuning_config's Option<ScalingConfig>. LuxOS + ePIC need a dedicated core
|
||||
`SupportsAutoTuningConfig` trait + AtmConfig/PerpetualTuneConfig struct (min/max profile, three
|
||||
temp windows, startup/post-ramp timings, algorithm select) added to the SupportsConfigs bundle
|
||||
with a ConfigField::Atm so the collector iterates it. ePIC: POST /perpetualtune{,/algo,/reset,
|
||||
/errorthrottle} with algorithms VoltageOptimizer/BoardTune/ChipTune/PowerTune (min/max from
|
||||
/capabilities).
|
||||
- UI: `ConfigAction::Dps` / `ConfigAction::Atm` / `ConfigAction::PerpetualTune` + gates + dialogs
|
||||
fed by the constraints reads (G8).
|
||||
- CLI: `config dps <ip> on|off [...]`, `atm <ip>` / `setatm <ip> ...`, `config perpetualtune <ip> ...`.
|
||||
- HW verify: bench per make - record current config, set current-equivalent params, read back,
|
||||
restore off/original. NEVER on production.
|
||||
- Priority: HIGH.
|
||||
|
||||
G7. Per-board voltage + frequency override.
|
||||
- Backend: LuxOS add rpc.voltageset/frequencyset/frequencystop; handle
|
||||
`TuningTarget::Manual{boards:(freq,voltage)}` in set_tuning_config (exact type match, no new
|
||||
trait). ePIC POST /tune/clock/{all,board,chip}, /tune/voltage, /tune/config/chip. Determine
|
||||
per-board vs per-chip grammar on the bench first (Lux frequencyget returns 126 per-chip freqs).
|
||||
- UI: reuse tuning-config dialog with an Advanced manual per-board mode, clamped to limits.
|
||||
- CLI: `setmanual <ip> <board> <freq> <voltage>`.
|
||||
- HW verify: bench with CONSOLE access only (bad voltage can damage a board) - snapshot
|
||||
voltageget/frequencyget, apply small delta, read back, restore via profileset(default).
|
||||
- Priority: HIGH.
|
||||
|
||||
G8. Constraints / limits / capabilities scan reads (plumbing for every dialog above).
|
||||
- Backend: BOS parse cooling_constraints + dps_constraints + hashboards_constraints from the
|
||||
already-fetched WEB_CONSTRAINTS response into new CoolingCapabilities/ScalingCapabilities/
|
||||
HashboardCapabilities. LuxOS parse `limits` (PowerTarget 1000-4000, AtmMinutes 1-1440, AtmTemp
|
||||
1-10, FanSpeed -1..100, MinFans 0-4, Frequency 100-1000 step 5-25, BypassVoltage 11.5-15.5).
|
||||
ePIC parse /capabilities (Default Clock/Voltage/Hashrate, Tune Presets, PerpetualTune min/max,
|
||||
Psu Info).
|
||||
- UI/CLI: not necessarily a visible column; required to validate/clamp dialog inputs. `limits <ip>`,
|
||||
`capabilities <ip>`.
|
||||
- HW verify: read-only on live units (already captured on .83, .60, .6). No restore.
|
||||
- Priority: HIGH (blocks safe write dialogs).
|
||||
|
||||
G9. Best share + session best share scan.
|
||||
- Backend: BOS impl GetBestShare from WEB_MINER_STATS /miner_stats/best_share (or best_share_str
|
||||
for large diffs; verified 130601978 live on .83; session stays None - BOS has no session field).
|
||||
LuxOS add DataField::BestShare -> summary /SUMMARY/0/Best Share and SessionBestShare ->
|
||||
/SUMMARY/0/Best Session Share (verified 638881749 live on .60). WhatsMiner map btminer summary
|
||||
best-share. All reuse already-fetched responses.
|
||||
- UI: populates the two existing MinerRow columns that no backend fills today.
|
||||
- CLI: appears in `scan` extended output.
|
||||
- HW verify: read-only vs live units, assert equals the API value. No restore.
|
||||
- Priority: HIGH (cheap, two dead columns).
|
||||
|
||||
### Medium priority
|
||||
|
||||
G10. Timezone config (BOS/VNish/ePIC).
|
||||
- Backend: COMPLETE (SupportsTimezoneConfig; BOS GraphQL setTimezone, ePIC POST /timezone). No
|
||||
asic-rs work.
|
||||
- UI: `ConfigAction::Timezone(Tz)` + MinerCaps.timezone gate + dialog populated from
|
||||
get_timezone_config's available list.
|
||||
- CLI: `config timezone <ip> <IANA>`.
|
||||
- HW verify: bench - read current tz, set to same, read back, restore. Low risk.
|
||||
- Priority: MEDIUM (pure wiring).
|
||||
|
||||
G11. Change password (BOS/VNish/antminer/ePIC; WhatsMiner needs backend).
|
||||
- Backend: COMPLETE for BOS/VNish/antminer/ePIC (ChangePassword; re-auths on success). WhatsMiner
|
||||
gap - impl update_password over the :8889/4028-token path (supports currently false).
|
||||
- UI: `ConfigAction::ChangePassword(String)` + gate + dialog; GUI must update saved credentials on
|
||||
success (change_password takes &mut self and re-auths).
|
||||
- CLI: `config password <ip> <newpass>`.
|
||||
- HW verify: bench only - change to temp password then back; verify get_data() still authenticates.
|
||||
NEVER on production (a failed change locks the toolkit out).
|
||||
- Priority: MEDIUM.
|
||||
|
||||
G12. Factory reset (BOS/VNish/antminer; WhatsMiner needs backend).
|
||||
- Backend: COMPLETE for BOS/VNish/antminer (FactoryReset; distinct from restore.rs stock-firmware
|
||||
flow). WhatsMiner gap - impl restore_factory (supports currently false).
|
||||
- UI: `ConfigAction::FactoryReset` + gate + STRONG double-confirm dialog.
|
||||
- CLI: `config factory-reset <ip> --yes`.
|
||||
- HW verify: bench only, destructive - read config before/after. NEVER on production.
|
||||
- Priority: MEDIUM (low frequency, but backend already there).
|
||||
|
||||
G13. Pool config completeness + LuxOS session-bug fix.
|
||||
- Backend: LuxOS - flip addgroup/groupquota/removegroup/addpool/switchpool/enablepool/disablepool
|
||||
to privileged=true (they currently send no session_id, so writes fail on password-set units);
|
||||
add the missing rpc.removepool. Extend build_pools_dialog with incremental ops
|
||||
(switch/enable/disable/quota/remove) beyond wholesale replace-all.
|
||||
- UI: richer pools dialog; caps.pools already wired.
|
||||
- CLI: committed `setpools` already planned in G1; add per-op verbs.
|
||||
- HW verify: sacrificial bench NOT pointed at a production pool - reproduce the "Missing session_id"
|
||||
error on a password-set bench unit, then confirm privileged=true fixes it; restore original pools.
|
||||
- Priority: MEDIUM (correctness bug on locked units).
|
||||
|
||||
G14. Enrich per-hashboard / fan / pool telemetry (fetched-but-discarded fields).
|
||||
- Backend: BOS add fan target_speed_ratio (commanded duty) to FanData; add stale_shares/
|
||||
last_difficulty/generated_work/last_share_time/per-pool best_share to PoolData; add board_name/
|
||||
chip_type to BoardData. LuxOS retain per-chip Score/ReadErrors/WriteErrors/BadHashCount from
|
||||
healthchipget. All from already-fetched responses.
|
||||
- UI: tooltips / detail panels; additive.
|
||||
- CLI: extended `scan` / `healthchip <ip>`.
|
||||
- HW verify: read-only vs live units, assert new fields populate (BOS fan duty 0.63 on .83, Lux
|
||||
per-chip Score 88-102 on .60). No restore.
|
||||
- Priority: MEDIUM.
|
||||
|
||||
G15. PSU info scan (BOS/ePIC/WhatsMiner).
|
||||
- Backend: add core PsuInfo struct (model, hw/fw version, min/max voltage, serial, true-power) +
|
||||
GetPsuInfo trait + MinerData field. BOS reads WEB_MINER_DETAILS /psu_info; ePIC /capabilities
|
||||
Psu Info; WhatsMiner get_psu (unauth read).
|
||||
- UI: MinerRow detail/tooltip.
|
||||
- CLI: appears in scan detail.
|
||||
- HW verify: read-only (BOS .83 psu APW121215d/e 11.96-15.2V; ePIC .6 PSU Type 117). No restore.
|
||||
- Priority: MEDIUM.
|
||||
|
||||
G16. Network config read + write (all makes).
|
||||
- Backend: add core NetworkInfo struct + GetNetworkInfo (read) and NetworkConfig struct +
|
||||
SupportsNetworkConfig (write, added to the SupportsConfigs bundle + ConfigField::Network). BOS
|
||||
GET/PUT /network; LuxOS `config` read + rpc.netset; ePIC GET/POST /network + /wifi; WhatsMiner
|
||||
update_network / restore_dhcp. Confirm grammar on bench first.
|
||||
- UI: address/protocol MinerRow columns (read); `ConfigAction::Network(NetworkConfig)` +
|
||||
ID_CTX_NETWORK dialog (write) behind explicit confirm + warning. Pre-fill from the read.
|
||||
- CLI: `net <ip>` (read), `config network <ip> dhcp|static [...] --yes`.
|
||||
- HW verify: read-only for the read side vs live units. Write on a bench unit with SERIAL/CONSOLE
|
||||
access ONLY (a wrong static config strands the miner; note the LuxOS fleet uses 1:1 NAT so netset
|
||||
rewrites the miner's real interface). Change hostname (benign) then restore; do NOT change IP on a
|
||||
remotely-managed unit.
|
||||
- Priority: MEDIUM (read side); network-write is high-risk, gate hard.
|
||||
|
||||
G17. Structured messages / per-chip health / temp-target / operating-state reads (LuxOS + ePIC).
|
||||
- Backend: LuxOS map tempctrl targets (Target/Hot/ChipTarget/WaterInlet) + derive GetOperatingState
|
||||
from config CurtailMode/IsTuning/SystemStatus + frequencyget per-chip array. ePIC map
|
||||
PerpetualTune status + Scheduler read + HBStatus.
|
||||
- UI: optional columns + detail panels; operating-state feeds the Paused column with real state.
|
||||
- CLI: `tempctrl <ip>`, `freqs <ip>`.
|
||||
- HW verify: read-only vs live (Lux .60 tempctrl Target 45/ChipTarget 83; CurtailMode/IsTuning
|
||||
present). Derived paused state verified after a bench curtail sleep. No restore for reads.
|
||||
- Priority: MEDIUM.
|
||||
|
||||
G18. WhatsMiner power-mode set + set-power-percent + poweroff.
|
||||
- Backend: wire WhatsMiner v2/v3 SupportsTuningConfig MiningMode (high/normal/low) via
|
||||
update_power_mode; add set_power_pct path; add poweroff (distinct from pause). Note the r15 #4
|
||||
set_power_limit error-swallow bug should be fixed while here.
|
||||
- UI: mode selector via the generic tuning action (G2); poweroff as a maintenance menu item with
|
||||
strong confirm.
|
||||
- CLI: `config mode <ip> <high|normal|low>`, `config power-pct <ip> <pct>`, `poweroff <ip> --yes`.
|
||||
- HW verify: bench WhatsMiner (M30S-class) - read summary, set mode, read back, restore; poweroff
|
||||
characterized on bench then power-cycle to recover. NEVER on the live fleet.
|
||||
- Priority: MEDIUM.
|
||||
|
||||
### Low priority
|
||||
|
||||
G19. BOS advanced keyed settings (read + write, 22 keys with danger-gating).
|
||||
- Backend: new AdvancedSettings trait (keyed map + static metadata: type/default/status/min_version/
|
||||
enum/min-max/depends-on from `advanced list`); read is safe/additive, write requires danger
|
||||
confirm. Transport from a web capture; do not execute writes.
|
||||
- UI: Advanced-settings editor panel validating against metadata, explicit confirm for
|
||||
status=dangerous keys.
|
||||
- CLI: `advanced-get <ip> [--key K|--all]`, `advanced set <ip> <key=value> [--force]`, `advanced reset`.
|
||||
- HW verify: read-only vs .83 (22 keys captured). Write on bench, benign key (mdns_enabled) only.
|
||||
- Priority: LOW-MEDIUM (read side medium, write low).
|
||||
|
||||
G20. LuxOS maintenance: reset-miner / kill / chip-health-check / custom-profile create-remove.
|
||||
- Backend: add rpc.reset_miner wiring (CLI-only), rpc.healthchipset, rpc.profilenew/profilerem.
|
||||
kill semantics to be characterized on bench first (recommend omit from fleet GUI).
|
||||
- UI: profile create/delete under the preset submenu; reset-miner/kill CLI-only.
|
||||
- CLI: `resetminer <ip>`, `healthchip <ip> [set ...]`, `profilenew/profilerem`.
|
||||
- HW verify: bench only.
|
||||
- Priority: LOW.
|
||||
|
||||
G21. ePIC misc setters: coin type, board enable/disable, scheduler/idle-periods, shutdown/critical
|
||||
temp, overdrive, idle-on-connection-lost, hostname.
|
||||
- Backend: POST /coin, /boardenable + /disableboardonfailure + /enableboardsonidle, /scheduler +
|
||||
/scheduler/idleperiods, /shutdowntemp + /criticaltemp, /overdrive, /idleonconnectionlost, /hostname.
|
||||
- UI: grouped under an ePIC advanced/maintenance submenu (most are ePIC-specific, gate on make).
|
||||
- CLI: matching `config <verb> <ip> ...`.
|
||||
- HW verify: bench ePIC (.6/.10 are read-only production).
|
||||
- Priority: LOW.
|
||||
|
||||
G22. Diagnostics collect + firmware update-check surfacing + BOS custom-contract.
|
||||
- Backend: none new (compose get_data + read_logs + config + constraints into a tarball); surface
|
||||
check_firmware_update current-vs-latest. Custom-contract is niche Braiins-pool - document/defer.
|
||||
- UI: "Collect diagnostics..." menu item; optional update badge.
|
||||
- CLI: `collect <ip> [-o dir]`.
|
||||
- HW verify: read-only compose vs .83.
|
||||
- Priority: LOW.
|
||||
|
||||
---
|
||||
|
||||
## Implementation order
|
||||
|
||||
Round A - CLI foundation and cheap wins (unblocks everything else):
|
||||
- G1 (commit write CLI), G9 (best-share/session-best-share), G8 (constraints/limits/capabilities
|
||||
reads), G14 (fetched-but-discarded telemetry), G13 backend session-bug fix (LuxOS privileged=true).
|
||||
Rationale: G8 is required plumbing for the write dialogs; G1/G9/G14 are low-risk and immediately
|
||||
visible; the LuxOS session fix is a correctness bug.
|
||||
|
||||
Round B - pure UI/CLI wiring of complete backends:
|
||||
- G10 (timezone), G11 (change password, non-WM), G12 (factory reset, non-WM).
|
||||
Rationale: backends already implemented; only UI ConfigAction + CLI verbs + dialogs needed.
|
||||
|
||||
Round C - structured tuning (the flagship parity family):
|
||||
- G2 (power/hashrate target + tuner-mode + stock mining-mode), G3 (preset/profile select),
|
||||
G7 (per-board override).
|
||||
Rationale: single generic tuning action + per-make backends; the biggest config-parity closer.
|
||||
|
||||
Round D - cooling and auto-scaling:
|
||||
- G4 (cooling config), G5 (fan control), G6 (DPS/ATM/PerpetualTune).
|
||||
Rationale: depends on Round A constraints reads; largest remaining missed family.
|
||||
|
||||
Round E - WhatsMiner config depth:
|
||||
- G18 (power-mode/power-pct/poweroff), G11+G12 WhatsMiner backends (change_password,
|
||||
restore_factory), G16 WhatsMiner network (update_network/restore_dhcp).
|
||||
|
||||
Round F - network + advanced + long tail:
|
||||
- G16 (network read everywhere + gated write), G15 (PSU info), G17 (Lux/ePIC extra reads),
|
||||
G19 (BOS advanced), G20 (LuxOS maintenance), G21 (ePIC misc), G22 (diagnostics/update/contract).
|
||||
|
||||
---
|
||||
|
||||
## Verification
|
||||
|
||||
Confirmed on real hardware, read-only, this run:
|
||||
- Braiins OS: 10.4.1.83 and 10.4.1.27 (Antminer S19J Pro NoPic, BOS 26.09-plus, API 1.8.0). Verified
|
||||
live: version/details/network/miner_stats/hashboards/cooling-state/pools/tuner-state/constraints,
|
||||
best_share 130601978, tuner_constraints (power 944-6435 W, hashrate 70.75-252.57 TH/s), cooling +
|
||||
dps + hashboards constraints, PSU info, fan duty 0.63, configured-tuning-target None in default
|
||||
power mode (both units), advanced 22-key read via braiins-toolbox.
|
||||
- LuxOS: 10.4.1.60 (Profile default) and 10.4.1.67 (Profile 495MHz/Step -2), Antminer S19j Pro,
|
||||
LUXminer 2026.9.21, API 3.7, IsPowerTargetSupported=false. Verified live: version/summary/stats/
|
||||
devs/devdetails/temps/fans/pools/events, 21 profiles, full `limits` bounds table, atm, tempctrl,
|
||||
fanctrl (FANCTRL), healthchipget per-chip, frequencyget (126 freqs), voltageget, config network +
|
||||
Update* + CurtailMode/IsTuning/SystemStatus, best-share 638881749; check-command matrix (Exists/
|
||||
Access) for led/profileset/atmset/fanset/tempctrlset/voltageset/frequencyset/curtail/rebootdevice/
|
||||
resetminer/kill/netset and the N/N set hostnameset/passwd/timezone/timezoneset/factoryreset.
|
||||
- ePIC / PowerPlay UMC: 10.4.1.6 and 10.4.1.10 (AntMiner S19j Pro, BM1362), UMC API v1.36.0, 63
|
||||
OpenAPI paths captured. Verified live read-only: /summary, /capabilities (Tune Presets +
|
||||
PerpetualTune algorithms VoltageOptimizer/BoardTune/ChipTune/PowerTune with min/max + Psu Info),
|
||||
/perpetualtune status, /network, /ethernet, /temps, /timezone, /scheduler, /otelsettings,
|
||||
/hashratesplit config+status.
|
||||
- WhatsMiner: fleet scanned read-only across 10.7.1.0/24 and 10.8.1.0/24 via `miner_probe scan`
|
||||
(M30S-class, H6OS/H616 control boards, mix of watts and supports_power_limit flags). btminer :4028
|
||||
anonymous reads (summary/get_token/get_error_code) confirmed as the read surface.
|
||||
|
||||
Taken from docs / --help / source / reverse-engineering only (not executed live this run):
|
||||
- Every config-WRITE path on every make (hard rule: no live mutation). Write endpoints and grammars
|
||||
are described from braiins-toolbox --help, luxminer RPC docs, the ePIC OpenAPI POST definitions,
|
||||
and the WhatsMiner btminer RE wiki (8889 command table + 4028 token flow).
|
||||
- BOS firmware-update-check (hits the vendor release server), custom-contract, and the advanced-set
|
||||
transport (needs a web capture to pin the exact GraphQL/REST call).
|
||||
- WhatsMiner :8889 privileged writes (update_pools/set_power_pct/restart confirmed in prior RE
|
||||
sessions; LED/per-board tuning live in the ~40% uncharted :8889 command space and are unverified).
|
||||
- Stock Antminer / MicroBT miner set-mode was confirmed in the asic-rs source (mapping present) but
|
||||
not probed against a live stock unit this run.
|
||||
+1
-2
@@ -99,8 +99,7 @@ AZURE_SIGNING_TOKEN=$(az account get-access-token --resource https://codesigning
|
||||
## Native Windows runner
|
||||
|
||||
`windows-native.yml` runs on the self-hosted runner `win11-test-vm`
|
||||
(label `alkane-windows`, host mode) inside the Windows 11 test VM
|
||||
(`~/vms/win11-fresh.qcow2` on the workstation). It downloads the
|
||||
(label `alkane-windows`, host mode) inside a Windows 11 test VM. It downloads the
|
||||
`alkane-toolkit-windows-tests` artifact of the triggering main run, runs every
|
||||
test executable and the UI self-test natively, and never blocks a release:
|
||||
while the VM is off, the job waits for the runner.
|
||||
|
||||
Reference in New Issue
Block a user