feat: add script for miner stats snapshot#71
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7cd58a0. Configure here.
| totalRewards: total_rewards | ||
| } | ||
| } | ||
| """.strip() |
There was a problem hiding this comment.
GraphQL query omits row limit
Medium Severity
The account_stats query in MINER_STATS_QUERY has no limit or pagination, so the Hasura-style endpoint may return only its default maximum rows. The script treats that partial page as a full snapshot, which can undercount miners and skew reward analysis without any warning.
Reviewed by Cursor Bugbot for commit 7cd58a0. Configure here.


Summary
Simple script for getting miner stats and convert to csv.
Note
Low Risk
Offline tooling and snapshot data only; no production runtime, auth, or on-chain logic changes.
Overview
Adds a small testnet miner stats workflow under
testnet_data_snapshots/: fetch live data from Quantus GraphQL, keep JSON snapshots, and export spreadsheets for reward analysis.fetch_current_miners.pyPOSTs theminerStatsquery (account_statswithtotal_mined_blocks > 0, sorted by blocks) tohttps://sub2.quantus.com/v1/graphqland writesplanck_miners.jsonby default. Supports--endpoint,--output, and--export-csvto chain into the exporter.export_miners_to_csv.pyscans*_miners.jsonin the same folder and writes matching.csvfiles withid,totalMinedBlocks, andtotalRewards.TESTNET_DATA_README.mddocuments past testnets (resonance_network,schrodinger,dirac) and the currentplanck_miners.jsonsnapshot, plus the two commands above.The PR also checks in a fresh
planck_miners.jsonsnapshot and CSV exports fordirac,planck,resonance_network, andschrodingerminers (large static data additions).Reviewed by Cursor Bugbot for commit 7cd58a0. Configure here.