Skip to content

add asic-rs telemetry data in tProxy and JDC monitoring#553

Open
GitGab19 wants to merge 6 commits into
stratum-mining:mainfrom
GitGab19:asic-rs-data-in-tproxy
Open

add asic-rs telemetry data in tProxy and JDC monitoring#553
GitGab19 wants to merge 6 commits into
stratum-mining:mainfrom
GitGab19:asic-rs-data-in-tproxy

Conversation

@GitGab19

@GitGab19 GitGab19 commented Jun 11, 2026

Copy link
Copy Markdown
Member

This PR adds asic-rs as a dependency and uses its APIs to enrich tProxy and JDC monitoring data with telemetry data of every miner supported by asic-rs.

I had to bump MSRV from 1.85 to 1.88, as we already discussed in #443.

Here the results with my Bitaxe Gamma connected to tProxy:

Screenshot From 2026-06-11 11-50-33

cc @b-rowan @pavlenex

Closes #445
Closes #567

@GitGab19 GitGab19 force-pushed the asic-rs-data-in-tproxy branch 3 times, most recently from 75323b3 to 389235d Compare June 11, 2026 11:40
@plebhash plebhash self-requested a review June 11, 2026 13:27
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
@GitGab19 GitGab19 force-pushed the asic-rs-data-in-tproxy branch from 389235d to dcd9ad7 Compare June 12, 2026 10:03
@Shourya742 Shourya742 self-requested a review June 15, 2026 03:44

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I am not able to add suggestions. weird. Did a first pass of code review.

Comment thread miner-apps/translator/src/lib/sv1/downstream.rs
Comment thread miner-apps/translator/src/lib/sv1/downstream.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/downstream.rs
Comment thread miner-apps/translator/src/lib/sv1/downstream.rs Outdated
Comment thread stratum-apps/src/monitoring/sv1.rs Outdated
Comment thread miner-apps/translator/src/lib/mod.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1_monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1_monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs
Comment thread miner-apps/translator/src/lib/mod.rs Outdated
@GitGab19 GitGab19 force-pushed the asic-rs-data-in-tproxy branch 4 times, most recently from d1a17fd to 24cdfdf Compare June 16, 2026 14:47
@plebhash

Copy link
Copy Markdown
Member

we should bump MAJOR for stratum-apps + translator_sv2 (and take note on #539)

@plebhash

Copy link
Copy Markdown
Member

tACK

a few observations about asic-rs cc @b-rowan :

  • Braiins BMM100 shows with "make": "Antminer"
  • FutureBit Apollo II doesn't get recognized
curl -s "http://127.0.0.1:9092/api/v1/sv1/clients" | jq

{
  "offset": 0,
  "limit": 100,
  "total": 3,
  "items": [
    {
      "client_id": 8,
      "channel_id": 2,
      "connection_ip": "192.168.15.31",
      "authorized_worker_name": "bmm100",
      "user_identity": "bmm100",
      "target_hex": "00000000001c25c26a38a078f9fb2209d291fa59962595bdb8f43c38a611f2d6",
      "hashrate": 1000000000000.0,
      "stable_hashrate": true,
      "extranonce1_hex": "0100fbaf000000000000000000000001",
      "extranonce2_len": 4,
      "version_rolling_mask": "1fffe000",
      "version_rolling_min_bit": "00000010",
      "miner_telemetry": {
        "ip": "192.168.15.31",
        "make": "Antminer",
        "model": "BRAIINS MINI MINER BMM 100",
        "firmware_version": "2026-04-14-0-912d084c-26.04-plus",
        "reported_hashrate_hs": 1012813471661.3801,
        "power_consumption_w": 41.0,
        "efficiency_j_per_th": 40.48129408542047,
        "average_temperature_c": null,
        "uptime_secs": 944,
        "is_mining": true
      }
    },
    {
      "client_id": 1,
      "channel_id": 1,
      "connection_ip": "192.168.15.27",
      "authorized_worker_name": "x",
      "user_identity": "x",
      "target_hex": "0000000000285b574ecf1422f0a9b9585ec2e509ae1a49b2a9bb43e12822b9f7",
      "hashrate": 697466000000.0,
      "stable_hashrate": true,
      "extranonce1_hex": "0100fbaf000000000000000000000000",
      "extranonce2_len": 4,
      "version_rolling_mask": "1fffe000",
      "version_rolling_min_bit": "00000000",
      "miner_telemetry": {
        "ip": "192.168.15.27",
        "make": "Bitaxe",
        "model": "Gamma",
        "firmware_version": "v2.14.0b3",
        "reported_hashrate_hs": 877891296400.0,
        "power_consumption_w": 14.4696045,
        "efficiency_j_per_th": 16.482227992618245,
        "average_temperature_c": 61.0,
        "uptime_secs": 1173,
        "is_mining": true
      }
    },
    {
      "client_id": 17,
      "channel_id": 3,
      "connection_ip": "192.168.15.7",
      "authorized_worker_name": "apollo",
      "user_identity": "apollo",
      "target_hex": "00000000001c25c26a38a078f9fb2209d291fa59962595bdb8f43c38a611f2d6",
      "hashrate": 1000000000000.0,
      "stable_hashrate": true,
      "extranonce1_hex": "0100fbaf000000000000000000000003",
      "extranonce2_len": 4,
      "version_rolling_mask": "1fffe000",
      "version_rolling_min_bit": "00000010",
      "miner_telemetry": null
    }
  ]
}

@b-rowan

b-rowan commented Jun 16, 2026

Copy link
Copy Markdown

Braiins BMM100 shows with "make": "Antminer"

That's not supposed to happen...

FutureBit Apollo II doesn't get recognized

Not on the supported miner list, happy to add it though...

Could you open issues for both of these on asic-rs and we can go into more detail there?

Comment thread stratum-apps/src/monitoring/sv1.rs Outdated
Comment thread stratum-apps/src/monitoring/sv1.rs
Comment thread miner-apps/translator/Cargo.toml Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/monitoring.rs Outdated
Comment thread stratum-apps/Cargo.toml Outdated
@Shourya742

Shourya742 commented Jun 17, 2026

Copy link
Copy Markdown
Member

@GitGab19 whats the reason why we don't have this for JDC, as sv2 native miners can connect to it directly as well, and we might want this for those connections?

@GitGab19

Copy link
Copy Markdown
Member Author

@GitGab19 whats the reason why we don't have this for JDC, as sv2 native miners can connect to it directly as well, and we might want this for those connections?

The scope of this PR is adding asic-rs telemetry data to tProxy, as described in #445

I see the value in leveraging asic-rs also on JDC and Pool, but I'd do it in a separate PR.

In that PR we might move some shared logic in stratum-apps, as you were suggesting on this PR.

@GitGab19 GitGab19 force-pushed the asic-rs-data-in-tproxy branch 2 times, most recently from 4ef28aa to 203d426 Compare June 17, 2026 09:25
@plebhash plebhash marked this pull request as draft June 17, 2026 15:22
@GitGab19 GitGab19 force-pushed the asic-rs-data-in-tproxy branch from 203d426 to 104d719 Compare June 17, 2026 17:56
@GitGab19 GitGab19 changed the title add asic-rs telemetry data in tProxy monitoring add asic-rs telemetry data in tProxy and JDC monitoring Jun 17, 2026
@GitGab19

Copy link
Copy Markdown
Member Author

I added asic-rs telemetry data also on JDC, as discussed during today's PR Review Club call.

Most of the common logic between tProxy and JDC have been moved to stratum-apps.

This PR is now ready for review again.

@GitGab19 GitGab19 marked this pull request as ready for review June 17, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add asic-rs telemetry data to JDC (and Pool?) Add miners' data to /api/v1/sv1/clients endpoint of tProxy

4 participants