Skip to content

CryptoIceMLH/Nano3S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Canaan Avalon Nano3S -A3197S ASIC

Reverse Engineering Report

The first public reverse-engineering of Canaan's A3197S Bitcoin mining ASIC

Date: June 5, 2026

Conducted by: Nikos

ASIC: Canaan A3197S (Avalon-Nano class) — 10 SHA-256 engines per chip

Host platform: Canaan Avalon Nano 3s (12× A3197S, Kendryte K230D dual-core RISC-V)

Stock Firmware: Avalon Nano 3s release 2025061101 (June 2025)

Test Firmware: TNA-OS (custom mining stack built on the cracked protocol)

Board Revision: MM-NANO3S-V0.2

Disclosure

This is an independent reverse-engineering study of hardware the author owns, performed on a single unit on the author's own bench and network, for research and to develop alternative firmware. No vendor systems were accessed, probed, or attacked at any point. All findings come from a device owned by the author.

This report is written for a public and engineering audience. It documents what was reverse-engineered, the ASIC and device architecture, the findings, and the custom firmware that proves the work.


Executive Summary

To the author's knowledge, this is the first time anyone has publicly reverse-engineered Canaan's A3197S Bitcoin mining ASIC — the chip at the heart of the Avalon Nano 3s and related Avalon-Nano-class hardware.

The A3197S is closed silicon. Its host-to-chip mining protocol is undocumented; the second RISC-V core that drives it ships encrypted on flash; and there is no published information describing how the chip is brought up, configured, fed work, or how it reports results. Every existing deployment of this ASIC runs the vendor's closed stack and nothing else.

This study cracked that wall: the complete A3197S serial mining protocol was recovered — chain enumeration, per-chip configuration and calibration, the high-speed bus bring-up, work dispatch, version-rolling (AsicBoost) setup, and the nonce-report format the chip returns. With the protocol understood, a branch of firmware (TNA-OS) was written to drive the chips directly, independently of any vendor software.

Avalon Nano 3s control board — Kendryte K230 SoC, temperature-sensor header, and the board-to-board hashboard connector. Silkscreen: MM-NANO3S-V0.2 (2024/11/04). This is the board carrying the twelve A3197S ASICs.


1. The A3197S ASIC

1.1 What it is

Parameter Detail
Vendor Canaan (Avalon)
Class Avalon-Nano-class SHA-256 mining ASIC
Engines 10 SHA-256 hash engines per chip
Bus Chained on a single high-speed serial bus (per-chip + broadcast addressing)
Documentation None public; protocol undocumented prior to this work
Stock access Driven only by Canaan's closed, encrypted real-time firmware

The A3197S is a serial-chained mining ASIC: chips share one high-speed bus and are addressed individually or by broadcast. Each chip carries ten SHA-256 engines, rolls work fields internally as it searches, and reports results that clear an on-chip difficulty threshold. None of this — the framing, the addressing, the bring-up, the work format, or the report format — was documented anywhere prior to this study.

1.2 The chip bus (characterised)

The A3197S chain is a single half-duplex serial bus shared by all twelve chips, driven exclusively by the SoC's real-time core. The electrical and framing characteristics, recovered by logic-analyzer capture:

Parameter Value
Physical layer UART, half-duplex, 3.3 V; one TX line (host → chain), one RX line (chain → host)
Init bus speed 115,200 baud (enumeration / pre-mining)
Mining bus speed 4.8 Mbaud (host side); chip TX side ~5.0 Mbaud
Reference clock 24 MHz SoC crystal; the chain divisor is derived from it
Frame delimiter 5-byte fixed preamble
Frame header Fixed-length: chip address , register, read/write mode, payload word count
Payload Array of 32-bit words, each with its own byte-wise integrity check
Integrity CRC-8 (polynomial ), per header and per payload word
Addressing Per-chip (0–11) or broadcast (all chips)
Reads Chip replies on the RX line; writes are fire-and-forget

The chain performs a negotiated speed change during bring-up: the host broadcasts a baud-change command at the current (slow) speed, the chips reconfigure their UARTs, and the whole chain then runs at mining speed. The two sides intentionally run at slightly different rates (24 MHz/5 vs the chip's internal 25 MHz/5); the resulting ~4 % per-byte drift is inside standard UART receiver tolerance — a deliberate, working design quirk that confused early analysis until the chip's own clock was pinned down.

1.3 What was cracked

The full host-to-chip protocol was reverse-engineered from live bus capture and firmware analysis. At a high level, the following were recovered and proven by a working independent driver:

  • Chain enumeration — how the chips on the shared bus are discovered, addressed, and validated.
  • High-speed bus bring-up — the negotiated transition from the slow initialisation bus speed to the fast mining bus speed, performed across the whole chain.
  • Per-chip configuration & factory calibration — how each chip is clocked and configured, and how the per-chip calibration baked into the silicon is read out and applied .
  • Version-rolling (AsicBoost) setup — how the per-engine version-rolling is configured so the chip searches the version space.
  • Work dispatch — the format of the mining job delivered to each chip.
  • Nonce-report format — how the chip returns results, including how it indicates which rolled work a given result belongs to.
  • On-chip report threshold — the per-chip difficulty gate that governs which results the chip surfaces, and how it must be driven to track a pool's live difficulty.

1.4 Register model

The A3197S exposes a register space accessed over the bus. Functional register classes identified during the work

Class Function
Enumeration / chain Chain-wake magic, per-chip identity/validity, per-chip enable/commit
PLL / clocking Four independent clock domains, plus staging/commit and lock-status registers
Engine config Per-engine configuration block (governs the version-rolling search space)
Core / nonce config Indirect address+data register pair used to program internal core parameters, including the per-engine nonce-partition width
Report target A two-register pair holding the most-significant words of the 256-bit difficulty target the chip compares each hash against
Calibration (efuse) Factory per-chip calibration, read via a control/data handshake and applied to a block of clocking/cal registers
Telemetry Per-chip PVT die temperature and core voltage, error/ECC counters, and a per-chip work counter
Housekeeping Spread-spectrum/timer config, machine-core enable, log/diagnostic clears

The chain-validity check on enumeration is a good example of the design's self-describing structure: each chip reports a status word that encodes its own position in the chain, a "last chip" flag, and the current bus-speed divisor — enough for the host to confirm the full chain came up correctly before any work is dispatched.

1.5 Work-frame anatomy (structure, not recipe)

Each mining job is delivered to a chip as a single fixed-size frame. The frame is not a raw Bitcoin block header — it is a chip-specific re-layout of the header fields plus chip-routing metadata:

Region Carries
Header fields The block version's roll base, the per-chip Merkle root, the timestamp and difficulty-bits fields, and the previous-block hash — each in a chip-specific byte/word order
Per-chip routing The chip's extranonce2 value, a job tag echoed back with every result, and the chip's own identity (which the chip uses to partition the nonce search space across its engines)
Partition constant A fixed mask word that selects "real work" mode

Two byte-order subtleties were decisive to get right (and are exactly the kind of detail withheld from this report): the header words are not in standard wire order — the chip's front-end byte-swaps each word back to the canonical SHA-256 input internally — and the chip-identity word's byte order determines how the chip slices its engines across the nonce space. An incorrect identity byte order silently strands most engines, collapsing the chip to a few percent of its rate at every frequency — the single most expensive bug class encountered.

Critically, the per-chip Merkle root is computed per chip, because each chip mines a different extranonce2: the host (or its real-time agent) double-SHAs the coinbase with that chip's extranonce2 and folds it through the Merkle branches before building the chip's frame.


2. Host Platform — Avalon Nano 3s

The A3197S in this study lives on the Canaan Avalon Nano 3s. Cracking the ASIC required understanding the board around it.

2.1 System Overview

Component Specification
SoC Kendryte K230D — dual-core 64-bit RISC-V (one Linux core rv64imafdcvxthead, one RT-Smart real-time core)
DRAM 112 MiB package; ~97 MiB visible to Linux, remainder reserved for shared-memory rings + the real-time core
ASIC 12× A3197S, 10 SHA-256 engines per chip (~985 cores/chip)
Flash 256 MiB SPI-NAND (Winbond W25N02KW: 2048 B page, 128 B OOB, 128 KiB erase, 1.8 V, 50 MHz)
Power input USB-C PD/PPS, ~28 V contract negotiated at boot
Chip power 3-phase buck → firmware-controlled digital DC/DC
Power monitor INA226 on the intermediate rail
Display ST7789V SPI LCD, 240×240 RGB565
Connectivity RTL8723DU USB Wi-Fi / Bluetooth
Board identity On-board EEPROM (board ID + serial)
Linux kernel 5.10.4 (XuanTie T-Head); SBI v0.2 (HSM/IPI/TIME/RFENCE)

The Linux side comes up with SMP: Brought up 1 node, 1 CPU — the second RISC-V core never appears to Linux at all; it is brought up and held by the boot firmware as a dedicated real-time controller.

Kendryte K230D (TFACEDH001) dual-core RISC-V SoC, with the Winbond W25N02KW 256 MiB SPI-NAND below it and the 24.000 MHz reference crystal alongside.

2.2 I²C device map

Three I²C buses carry power, monitoring, and identity. Devices confirmed live:

Bus Address Device Function
i2c-2 0x40 INA226 Power monitor on the intermediate (~11 V) rail.
Bus-voltage LSB 1.25 mV.
i2c-2 0x42 HUSB238A USB-C PD/PPS sink controller. Negotiates the input power contract; PD-contract status readable.
i2c-3 0x48 Digital DC/DC ASIC core-voltage controller (see §2.4).
i2c-3 0x50 EEPROM Board ID and hashboard serial.

Note the INA226 monitors the intermediate rail, not the ASIC core rail directly — chip-rail power is inferred, not measured at the core.

HUSB238A (U9) USB-C PD/PPS sink controller — negotiates the ~28 V input contract at boot.

2.3 Control ↔ hashboard connector

The control board and the hashboard are joined by an 18-pin board-to-board connector. All eighteen pins were identified by logic-analyzer capture.

The 18-pin board-to-board connector that carries the chip bus, I²C, power and the control GPIOs between the control board and the hashboard (heatsink fins visible below).

2.4 The Dual-Core Architecture

The defining characteristic of the platform is its asymmetric dual-core design. The K230D has two RISC-V cores, but only one runs Linux. The second is a dedicated real-time controller — invisible to the Linux side — that exclusively owns the high-speed serial bus to the A3197S chain.

        ┌────────────────────────────────────────────┐
        │  HOST CORE  (Linux)                          │
        │   • mining daemon: pool, work scheduling,    │
        │     nonce verification, power, sensors,      │
        │     fans, web UI / APIs                       │
        │   • talks to the real-time core only         │
        └───────────────────┬──────────────────────────┘
                            │  shared-memory rings + message channel
        ┌───────────────────┴──────────────────────────┐
        │  REAL-TIME CORE  (RTOS)                        │
        │   • owns the A3197S serial bus                 │
        │   • chain bring-up, per-chip config,           │
        │     work dispatch, nonce collection,           │
        │     telemetry                                  │
        └───────────────────┬──────────────────────────┘
                            │  high-speed serial bus
                    ┌───────┴────────┐
                    │  12 × A3197S    │
                    └─────────────────┘

The host core never touches the chips directly — it must speak to the real-time core, which speaks to the silicon. Mapping this split, and the channels that join the two cores, was the foundation for reaching the chips at all.

Control-board corner showing the debug/JTAG header (R2/T2/T1/R1/TCK/GND/3V3) and surrounding power components.

2.5 Inter-Core Communication

The two cores are joined by a message channel (control/command plane) and a set of shared-memory rings (bulk data). Roles were mapped from live observation of the running stock system:

Channel Transport Topology Direction Role
Control / command message channel, port 201 bidirectional bring-up commands, status, batched result return
Work ring shared-memory ring 24 slots × 1024 B host → real-time core mining job dispatched to the chips
Telemetry ring shared-memory ring 10 slots × 4096 B real-time core → host per-chip temps, voltages, work counters
Chain-status ring shared-memory ring 12 slots × 2048 B real-time core → host aggregate chain health (a fixed-slot status board, not a queue)

Each ring slot carries a byte type/sequence/length prefix ahead of its payload. Two findings worth calling out:

  • Per-chip die temperatures and voltages are not chip-register polls — they are published by the real-time core into the telemetry ring as typed frames (one frame type per metric: die temperature, core voltage, work counters, error counters, aggregates) that the host drains on a poll loop.
  • Results do not flow through the status ring. The status ring is a fixed four-slot board that the real-time core rewrites in place; discovered nonces are returned batched over the control message channel, not streamed one-per-slot. Getting this model right (board vs queue) was essential to matching the stock data path.

2.6 Power Chain

USB-C PD/PPS  →  ~28 V contract negotiated at boot (HUSB238A)
              →  3-phase buck (intermediate ~11 V rail)
              →  firmware-controlled digital DC/DC  →  A3197S core voltage
              →  INA226 monitor on the intermediate rail

I/O edge: USB-A data port, RESET and BOOT0 buttons, ARGB-LED and 4-pin fan (12V/GND/PWM/TACH) headers, and the DC POWER connector with harness — the board accepts ~24–30 V DC here.

Parameter Detail
Input USB-C PD/PPS; board tolerates ~24–30 V DC (bulk caps rated 35 V)
Boot negotiation ~28 V PPS contract established by the bootloader via the PD sink
Intermediate rail (INA226 measurement point)
Core-voltage control Digital DC/DC, single signed-offset register; base 3600 mV, 26 mV/step
Core-voltage range ~3.3 V floor (oscillation limit) to ~3.8 V
Monitoring INA226 on the intermediate rail (chip-rail power inferred)
Stock behaviour Closed loop trims voltage against a fixed power target — part of what holds the device in "heater" mode
TNA-OS behaviour Frequency and core voltage exposed directly to the operator

The core-voltage register is effective write-only (it reads back only the last value written; the rest of the controller's register space reads all-ones), which is why the encoding (signed offset from a 3600 mV base in 26 mV steps) had to be recovered from firmware rather than probed.

Hashboard power stage: the 2R2 power inductor, the TPH1R204PL1 buck MOSFETs (Q5/Q6/Q7), and the 330 µF / 35 V bulk capacitors (C108/C109), with the board-to-board connector header along the bottom edge.

2.7 Flash Layout

256 MiB SPI-NAND, partitioned into the functional regions below. TNA-OS replaces only the application area and the host mining binary; the bootloaders, Linux kernel, and the real-time-core image are preserved byte-for-byte (the real-time-core image is integrity-checked at build time).

Region Purpose Owner
Bootloader SPL + main (A/B) First/second-stage boot, redundant Stock (preserved)
Boot environment (A/B) Boot config Stock
Real-time-core image The second core's OS (drives the ASIC bus) Stock (preserved, hash-fenced)
Linux kernel Host-core kernel Stock
Root filesystem Host-core root (ubifs) Stock + minimal access patches
Application area Mining app + web UI TNA-OS
Data area Writable config + logs persistent
(whole-flash view) Concatenated view, not a real partition

2.8 Boot Timeline

Cold-boot landmarks, captured at the connector:

T+0      power applied (rail comes up)
~T+12 s  chip-detect handshake from the hashboard
~T+16 s  chip-power enable asserted; brief active-low chain reset pulse (~34 ms)
~T+18 s  first chain traffic at init speed (enumeration begins)
~T+20 s  chain-active asserted; continuous mining traffic begins
~T+37 s  steady-state mining (chips reliably produce results ~30 s after final clock lock)

The ~2 s gap between power-enable and enumeration is a deliberate power-settle delay; the chain does not reliably produce results until roughly 30 s after the clocks reach their final locked frequency.


3. Performance Characteristics

All performance data captured on the live unit running TNA-OS — driving the A3197S chains through the cracked protocol — confirmed independently by the mining pool.

3.1 Mining Performance

Metric Value
Operating frequency (user-adjustable)
Active chips 12 / 12
Rejected shares 0
Pool difficulty Dynamic (vardiff), tracked automatically
Pool protocol Stratum V1 and V2
Nonce distribution Spread across all chips and engines

3.2 Stock vs TNA-OS

Parameter Stock firmware TNA-OS
Operating frequency Vendor-locked envelope User-adjustable (to 300 MHz+)
Core voltage Vendor-managed only User-adjustable
Pool protocol Vendor-constrained Stratum V1 / V2 (any pool)
Vardiff tracking Vendor-managed Dynamic, follows the pool
Third-party telemetry Present None

3.3 Mining Data Path

End-to-end, a job flows like a conventional pool miner but split across the two cores:

pool ──Stratum V1/V2──► host core ──per-chip work frames──► real-time core
                                                                 │ chip bus
                                                          12 × A3197S
real-time core ◄──batched results── chips     host core ◄──result batch── real-time core
host core ──reconstruct + verify (version + time sweep) ──► pool (submit)

The host core owns the pool socket, builds per-chip work (each chip gets a distinct extranonce2 and therefore a distinct Merkle root), and verifies and submits results. The real-time core owns the chip bus: it dispatches work to all twelve chips, polls and batches their results, and publishes telemetry. The chip-bus work cadence and the result-poll cadence were matched to the stock firmware's measured timing to keep the engines continuously fed without flooding the bus.


4. Assessment

4.1 The A3197S

  • Capable silicon, locked behind a closed protocol. The chip's full potential is yet to be fully explored, but it is plainly capable of far more than its stock output. What kept it throttled was never the silicon — it was the undocumented protocol and the vendor's locked firmware, which continually tunes the chips toward a ~90 °C target because the product was designed with heat generation as a first-class purpose. Once the protocol was cracked, the chip delivered.

  • Rich on-chip telemetry. The chip reports per-chip die temperature, voltage, and work counters, enabling genuine per-chip health visualisation once the telemetry path is understood.

  • Conventional miner behaviour underneath. Beneath the closed wrapper, the A3197S behaves like a standard SHA-256 miner — it rolls version and time fields and gates reports on an on-chip difficulty threshold. The difficulty of this work was discovery, not exotic chip behaviour.

4.2 The Platform

  • Clean dual-core separation. Dedicating one RISC-V core to real-time ASIC control and the other to Linux host duties is a sound design that allowed a stable host-side firmware replacement without disturbing the real-time platform.

  • Capable but constrained by firmware. The hardware (power delivery, USB-C PD input, rich sensor set) is well built; the limits a stock owner experiences are imposed in firmware, not silicon.

4.3 Security & Privacy Findings (stock firmware)

Stated as conclusions only, without reproduction method, consistent with responsible disclosure. These reflect the stock firmware as analysed and are relevant to anyone running the device unmodified. No customer data or third-party systems were involved in establishing any of them.

| Area | Finding |

| Outbound telemetry | The stock firmware transmits operational data off-device to third-party endpoints (app). Combined with on-chain wallet visibility, this class of reporting can correlate a device, its operator, and its mining activity. |

What this class of telemetry can enable. For mining devices generally, the combination of network address + pool identity + wallet/worker identity is a meaningful privacy risk:

Data point What it reveals Persistence
Network / IP address Approximate location, ISP Changes with DHCP/VPN
Wallet / worker name Mining identity; links to on-chain history Permanent on-chain
Pool URL Mining preference and activity Changes with config
Hardware identifiers Persistent device fingerprint Permanent
Operational metrics Hashrate, power, uptime, temperatures Real-time

A party holding such data can correlate a physical location with a mining identity and on-chain financial history. The custom firmware described next removes this exposure entirely.


5. TNA-OS — The Custom Firmware

Having reverse-engineered the chip and assessed the stock platform, the work culminated in purpose-built branch of the firmware: TNA-OS — the working proof that the A3197S protocol was genuinely cracked. It replaces the entire stock mining stack — on both RISC-V cores — while preserving the vendor's lower-level platform. The result is a miner the operator actually controls: any pool, full frequency and voltage range, modern protocols, real per-chip telemetry, fleet management, and zero phone-home.

5.1 Design Philosophy — replace what we own, keep what works

The build deliberately keeps the parts of the device that are correct

Layer Owner Notes
Bootloaders (SPL + main, A/B) Stock preserved byte-for-byte
Real-time-core OS image Stock preserved; integrity-checked (SHA-256 fenced) at build time
Linux kernel Stock preserved
Real-time-core mining application TNA-OS drives the A3197S bus directly
Host-core mining daemon TNA-OS single statically-linked Rust binary
Web UI + APIs TNA-OS Angular dashboard + REST/CGMiner/SSH

5.2 Software Architecture

TNA-OS is two cooperating programs, one per core:

  • Host-core daemon (Rust, statically linked). Owns everything the operator touches: the pool client (Stratum V1 and V2), the work scheduler, per-chip result verification, the power/sensor/fan control loops, the web UI, and the APIs. It is the only side that talks to the pool and the only side that talks to the real-time core.
  • Real-time-core application. Owns the chip bus exclusively: chain enumeration, per-chip configuration and factory-calibration application, the clock bring-up, work dispatch to all twelve chips, result collection, and telemetry publication. It receives jobs and control from the host over the shared-memory rings and message channel, and never needs the network.

The two communicate over the inter-core channels described in §2.5 — work down the work ring, telemetry and status up the telemetry/status rings, control and batched results over the message channel. A single Rust daemon collapses what the stock firmware splits across three separate processes.

5.3 Mining

Feature Detail
Pool protocols Stratum V1 and Stratum V2 (SV2 over an encrypted Noise transport: ChaCha20-Poly1305 AEAD with secp256k1/ElligatorSwift handshake)
Version-rolling Full AsicBoost — host generates the correct rolled-version set and the chips search it across their engines
Result reconstruction Rebuilds each result against the chip's rolled timestamp and rolled version before verifying (the key correctness fix, §3)
Difficulty tracking Dynamic vardiff — the on-chip report threshold is recomputed from the pool's live difficulty on every change and pushed to all chips
Multi-pool Up to 8 pools with automatic failover and quota rotation
Per-chip work Each chip mines a distinct extranonce2 with its own computed Merkle root

5.4 Control & Tuning

Feature Detail
Frequency User-adjustable; soft frequency ramp to target on bring-up
Core voltage User-adjustable via the digital DC/DC (fine-grained steps)
Per-chip clocking Independent clock-domain configuration
Profiles Operating profiles (idle / low / medium / high)
Persistence Settings persist across reboots in the writable data partition

5.5 Fleet Mode ("Army")

TNA-OS includes a built-in fleet layer for running many miners as one coordinated unit:

  • A coordinator node directs many worker nodes over the local network; workers register with the coordinator (hostname, version, address) and report status.
  • Per-worker failover policy — if the coordinator becomes unreachable, a worker can fall back to mining a configured pool directly, or stop, per its setting.
  • Designed for home and small-farm operators running multiple Nano 3s units without per-device pool configuration.

5.6 Monitoring & Telemetry

Metric Detail
Hashrate Difficulty-weighted, computed the same way the pool computes it (accepted target-difficulty × 2³² over time); reported as total, per-board, and per-chip; windows of 1 m / 10 m / 1 h / 24 h
Per-chip health Die temperature and core voltage per chip (drained from the chip-published telemetry ring, not register polls)
Shares Accepted / rejected / submitted counts; best-difficulty tracking (all-time and session)
Power Input power and efficiency (hashrate per watt) from the on-board monitor
Thermals & fan Board/chip temperatures, fan RPM and PWM, configurable thermal trip thresholds

The per-chip metrics feed an interactive hashboard schematic in the web UI: every chip is rendered in board position and can be coloured live by health, hashrate, temperature, or chip ID.

5.7 Interfaces

Interface Purpose
Web dashboard Angular UI — live hashrate, the interactive hashboard schematic, settings, pool config, tuning
REST API Programmatic control and stats
CGMiner-compatible API Drop-in for existing miner-monitoring tooling (summary / devs / stats)
SSH Full shell access on the host core

5.8 Safety, Integrity & Privacy

  • Build-time integrity fence. The preserved real-time-core image is SHA-256-checked during image assembly; a mismatch aborts the build, so a TNA-OS image can never silently ship a wrong or tampered real-time core.
  • Thermal protection. Configurable warn/hot/danger thresholds with automatic protective action; sensor stuck-detection.
  • Watchdog. Host-core heartbeat watchdog.
  • No third-party telemetry. TNA-OS connects only to the operator's configured pool(s) and the operator's own network. None of the stock outbound reporting is present (§4.3).

6. Methodology

Phase 1 — Bus Capture & System Discovery

  • Logic-analyzer capture of the hashboard bus across the full stock bring-up and mining sequence — ground-truth for the A3197S protocol, timing, and the work/nonce cadence that no documentation describes
  • Live inspection of the running stock system to map the inter-core channels, shared-memory layout, and power/sensor interfaces
  • PCB and component identification; power-chain and connectivity mapping

Phase 2 — Firmware & Protocol Analysis

  • Static analysis of the firmware images to recover bring-up logic, chip configuration and calibration procedures, and the behaviours the silicon expects
  • Characterisation of the A3197S serial protocol: framing, addressing, the high-speed bus transition, work dispatch, and the nonce-report format
  • Identification of the stock outbound-telemetry behaviour

Phase 3 — Independent Driver (TNA-OS) Development

  • Real-time-core mining application driving the A3197S directly — bring-up, per-chip config and calibration, work dispatch, nonce collection, telemetry
  • Host-core Rust daemon — pool client, work scheduler, nonce verification, power/sensor/fan control, web UI/APIs
  • Correct rolled-time result reconstruction
  • Dynamic vardiff report-threshold matching
  • Difficulty-weighted hashrate accounting matching the pool

Phase 4 — Verification

  • Clean boot, 12/12 chains enumerated, PLL lock at target frequency
  • All 12 chips hashing with spread across engines
  • Pool connection, share submission, and acceptance confirmed
  • Full ~3.55 TH/s at the pool with zero rejected shares
  • Live difficulty tracking confirmed as the pool adjusted vardiff

The final correctness authority throughout was the pool's own accepted-share accounting — a fix only counted as proven when the pool independently confirmed valid, accepted work.


7. Conclusion

The Canaan A3197S was, prior to this work, a closed and undocumented Bitcoin mining ASIC, reachable only through the vendor's encrypted firmware and locked to a low-output envelope. This study is, to the author's knowledge, the first public reverse-engineering of that chip.

The complete host-to-chip protocol was recovered — enumeration, configuration, calibration, work dispatch, version-rolling, and the nonce-report format — and proven by an independent driver (TNA-OS) that runs the twelve A3197S chips on an Avalon Nano 3s, on any pool, with modern protocol support and no third-party telemetry. Pool-side verification confirms clean, accepted work at the target rate, with zero rejects.

The firmware is a useful artifact. The achievement is the ASIC: a previously-sealed piece of Canaan silicon is now understood and driven independently for the first time.


This report is provided for community awareness, engineering reference, and research purposes. All analysis was performed on a device owned by the investigator. No manufacturer servers were accessed, probed, or attacked. The report intentionally withholds the reproducible low-level reverse-engineering specifics — findings are presented to inform; the implementing detail is not published.


Support This Work

This report was produced by Nikos

The mission is to liberate Bitcoin infrastructure from corporate dependencies through energy independence, sovereign communications, and experimental technology.

If you found this report useful and would like to support continued research, development, please consider supporting:

https://www.molonlabe.holdings/#funding

Every sat helps

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors