Quantus arena: network hashrate, authorship leaderboard, telemetry census #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A public-ish dashboard for everyone mining Quantus: what the network hashrate is, who is actually winning blocks, and what the node population looks like. Supersedes the observability blocker in #1 — the chain-scraper half of this is the missing measurement.
All the plumbing was verified against the live Planck network on 2026-08-31; details below so none of it needs rediscovering.
Source 1 — the chain (authoritative)
Everything needed is on our own node's RPC. No third party, no trust.
Block author. Every header carries the miner's reward preimage in a PreRuntime digest. Decoded from a live header:
address = Poseidon2(inner_hash)— same derivation asqp_wormhole::derive_wormhole_address, andextract_author_from_digestinprimitives/wormholealready does exactly this. So a complete per-address authorship leaderboard is derivable from headers alone, for every miner on the network, with no cooperation from anyone.Difficulty. No RPC method exposes it directly (
rpc_methodshas nothing matching), but two routes exist:QPoWApi::get_difficulty()/get_max_difficulty()(primitives/consensus/qpow), alsoverify_and_get_achieved_difficulty(block_hash, nonce)for per-block achieved difficultyQPoW::CurrentDifficultyviastate_getStorage, keytwox128("QPoW") ++ twox128("CurrentDifficulty")Then
network hashrate ≈ difficulty / 6s, and our share isminer_hash_rate ÷ that.This is the piece worth building first, independent of the dashboard: it is what tests the competition thesis on launch day, and it closes #1.
Source 2 — telemetry (population and colour)
wss://feed-telemetry.quantus.cat/feed— found in/tmp/env-config.json telemetry.quantus.com, not the/feedpath on the main host, which 404s. Standard substrate-telemetry protocol: connect, sendsubscribe:<genesis_hash>, receive JSON arrays of[action_code, payload, …]pairs.Planck genesis:
0x4901bf5c57fd3f9e726af399c763de6670dbdb115a91c0237e173f16eef65e72Verified working. Action 11 reported 30 nodes on Planck. Action 3 (AddedNode) carries a richer payload than expected:
So a genuine hardware census is available: CPU model, RAM, core count, distro, kernel, and whether it is a VM. Node name, client version and peer id too.
The correlation is the hard part — and it is not directly possible
Telemetry identifies nodes by name and peer id. The chain identifies miners by reward address. Nothing links the two. A node's peer id does not appear in the blocks it authors, and the reward preimage says nothing about which node submitted it.
Three options, in descending order of honesty:
baba-gorchitsa/QmUQ4o9kc…↔qzp2AxZw…). One confirmed data point, and useful for validating any heuristic.Do not present 3 as fact. Misattributing hashrate to named operators would be both wrong and rude.
Suggested shape
chain_subscribeNewHeads, decodes author from the digest, reads difficulty, exposes Prometheus metrics —quantus_difficulty,quantus_network_hashrate,quantus_blocks_authored_total{address=…}.Priority against 2026-09-09
The difficulty and authorship exporter is pre-launch work — without it we cannot measure our share on day one, which is the whole question. The telemetry census and the arena presentation are post-launch polish. Do not let the fun half delay the useful half.
Prior art:
Quantus-Network/qsafe.afAn earlier version of exactly this already exists — a Substrate explorer written against the pre-Planck Quantus protocols. Archived, last pushed 2025-10-13, 101 files, Vite + React + TypeScript (which matches
generic.md§4 anyway). Live at https://qsafe.af.Already built, and directly relevant:
src/components/MiningStats.tsx— miner leaderboard with per-miner block counts and percentage sharesrc/components/Nodes.tsx— telemetry websocket client, samesubscribe:<genesis>protocol confirmed abovesrc/chains.ts— per-chain config: genesis, RPC endpoints, indexer, treasury, telemetry URLSo the frontend, the telemetry handling and the leaderboard UI do not need inventing. Three things need changing.
1. It is a pure SPA with no backend, and leans on a GraphQL indexer
MiningStatsderives miners from balance events (event.balanceEvent?.account?.id) — the reward deposit credits the miner — which needs either an indexer or a lot of browser-side block fetching. The code carries a zero-address guard and a first-valid-miner-per-block dedup pass, which reads like it was fighting event ambiguity.The PreRuntime digest approach in the issue above is strictly better for this: headers only (no full blocks, no metadata, no event decoding), unambiguous by construction, and it is what the runtime itself does. It also removes the indexer dependency entirely — which matters, because we would otherwise be depending on
quantu.sestaying up.Suggested split: compute the leaderboard in an exporter on our own node from headers, serve it as metrics/JSON, and let the SPA read that. Then the arena has no third-party runtime dependency at all.
2. Every chain in it predates Planck
schrodinger(Quantus Testnet),resonance,heisenberg. Planck needs adding, then mainnet after 2026-09-09:endpointsis the open question — a browser SPA needs a public wss RPC. Ours is bound to127.0.0.1:9944and should stay that way. Either find a public Quantus RPC, or have the exporter serve what the arena needs so the SPA never talks to a node directly. The second is preferable and follows from §1.3. It is archived
Needs unarchiving upstream, or forking to
lair/. Given the chain-side changes and the shift away from the indexer, a fork we control is probably the honest option — with a note in the fork pointing back, pergeneric.md§11 Source hosting.Revised priority
Unchanged in substance, but cheaper than estimated: the exporter is still the pre-launch work, and the prior art means the presentation layer is mostly a config-and-refit job rather than a build. The leaderboard maths, the telemetry client and the UI already exist and were written by the same person who now wants them back.