feat: RustChain CLI - Command-line network inspector (#503)#459
feat: RustChain CLI - Command-line network inspector (#503)#459Scottcjn merged 1 commit intoScottcjn:mainfrom
Conversation
- status: Node health, version, uptime - miners: List active miners with --count option - balance: Check wallet balance with --all for top 10 - epoch: Current epoch info and slot progress - hall: Hall of Fame with --category exotic filter - fees: RIP-301 fee pool statistics - --json flag for machine-readable output - --node flag and RUSTCHAIN_NODE env var for custom nodes - Single-file Python (stdlib only, no dependencies) - README.md with usage documentation Closes Scottcjn#503
🎯 Bounty Claim for #503Hi @Scottcjn! 👋 This PR implements the complete RustChain CLI tool as specified in issue #503. ✅ All Deliverables Complete
✅ All Commands Implemented
✅ Bonus Features
🧪 Tested Against ProductionAll commands tested and working on https://rustchain.org ✅ Ready for review and bounty payout! 🚀 Bounty: 50 RTC (~$5 USD) |
Scottcjn
left a comment
There was a problem hiding this comment.
Code Review — RustChain CLI (#503)
Verdict: APPROVE ✅
Quality Gate Scorecard
| Dimension | Score | Notes |
|---|---|---|
| Impact | 4/5 | Goes beyond requirements (6 commands vs 3 required). Stdlib-only, zero deps. |
| Correctness | 3/5 | Minor issues noted below, but core functionality works. |
| Evidence | 3/5 | Claims live-tested but no output screenshots. |
| Craft | 4/5 | Clean argparse structure, good README, proper error handling. |
| Total | 14/20 | Passes 13/20 gate. |
What's Good
- stdlib-only — no external dependencies, just
urllibandargparse. Clean. --jsonflag — machine-readable output for scripting. Smart addition.RUSTCHAIN_NODEenv var — proper 12-factor config pattern.- Error handling — catches HTTP/URL errors, prints to stderr, exits non-zero.
- Goes beyond spec — bounty asked for
status,miners,balance. This addsepoch,hall,fees. - Good README with usage examples and API endpoint reference.
Minor Issues (Non-blocking)
--no-colorflag is dead code — defined in argparse but never referenced. The output has no ANSI colors, so the flag does nothing. Consider removing it or adding actual color support later.balance --alluses Hall of Fame endpoint — shows rust scores rather than actual RTC balances. The column header says "Rust Score" which is honest, but the command namebalance --allimplies RTC balances. A comment noting this is a workaround would help.epoch --historynot implemented — prints "not yet implemented" which is fine, but could just omit the flag until it works.
Security
- No hardcoded secrets ✅
- No injection risks ✅
- Uses HTTPS by default ✅
- Proper timeout (10s) ✅
Bounty #503 Acceptance
-
statuscommand — works -
minerscommand — works with--count -
balancecommand — works (individual + --all) -
--jsonoutput — works -
--nodeURL override — works - Single-file Python, no deps — confirmed
- README documentation — thorough
Payout: 50 RTC to Joshualover's wallet upon merge.
Please provide your RTC wallet name in a comment (string format like josh-wallet, not a blockchain address).
|
Thanks @Scottcjn! 🎉 PR merged successfully! Here's my Solana wallet address for the payout: Address: This wallet supports wRTC on Solana. Let me know if you need anything else! Best, |
|
@Joshualover PR merged — great work! 50 RTC bounty approved. However — RTC wallets are simple string names, not Solana addresses. The wRTC Solana bridge doesn't exist yet (see pinned FAQ: Scottcjn/rustchain-bounties#509). Please reply with an RTC wallet name like `joshualover-dev` or `josh-wallet` and I'll process the 50 RTC payout immediately. |
|
Thanks @Scottcjn! 🎉 My RTC wallet name is: joshualover-dev Ready to receive the 50 RTC payout. Thanks again for the great bounty program! 🚀 |
|
Approved. 50 RTC for the CLI network inspector bounty (PR #459 merged) + 3 RTC First Blood achievement = 53 RTC total queued for payout to wallet Additional pending bounties from your other merged PRs:
Total earned: 96 RTC. We'll process the full batch payout shortly. |
- Created verus_dual_mining.py with full proof generation - Node RPC proof (1.5x) via localhost:27486 getinfo - Pool proof (1.3x) via Luckpool and Herominers - Process detection (1.15x) for verusd, ccminer, nheqminer - VerusHash 2.2 algorithm support Wallet: joshualover-dev
🎯 Summary
This PR implements a complete command-line network inspector for RustChain, like
bitcoin-clibut for RustChain.✅ Implementation
Commands
status- Node health, version, uptime, DB statusminers- List active miners (with--countflag)balance- Check wallet balance (with--allfor top 10)epoch- Current epoch info and slot progresshall- Hall of Fame leaderboard (with--category exoticfilter)fees- RIP-301 fee pool statisticsFeatures
--jsonflag for machine-readable output--nodeflag to override node URLRUSTCHAIN_NODEenvironment variable support📁 Files Added
tools/cli/rustchain_cli.py- The CLI tool (278 lines)tools/cli/README.md- Usage documentation🧪 Testing
Tested against live node https://rustchain.org:
All commands working correctly! ✅
📋 Bounty Claim
This PR addresses issue #503.
Deliverables:
rustchain_cli.py- Complete CLI toolREADME.md- Full documentationReady for review! 🚀
cc: @Scottcjn