Skip to content

fix(rustchain+beacon): dead /balance endpoint + remove nonexistent gas tools#244

Merged
Scottcjn merged 1 commit into
mainfrom
fix/rustchain-balance-and-dead-gas
Jun 26, 2026
Merged

fix(rustchain+beacon): dead /balance endpoint + remove nonexistent gas tools#244
Scottcjn merged 1 commit into
mainfrom
fix/rustchain-balance-and-dead-gas

Conversation

@Scottcjn

Copy link
Copy Markdown
Owner

Completes the flagship endpoint audit started in #243 (BoTTube).

RustChain — /balance was 404

GET /balance?miner_id={id}404; the live node serves GET /balance/{id} (path param) → 200 {amount_i64, balance_rtc, miner_pk}. Fixed all 3 call sites (wallet_balance, rustchain_balance, evangelist balance lookup).

Beacon — 2 tools targeted a nonexistent feature

beacon_gas_balance / beacon_gas_deposit call /relay/gas/*, which returns 404. The relay (beacon_chat.py) has no gas routes at all (verified against its full route table) — gas was never deployed there. Removed both tools (and their doc/README references) rather than ship tools that can only 404. The other 8 Beacon tools are live-verified working (/api/agents, /api/chat, /api/contracts, /relay/register|heartbeat|message|status|stats).

Verification

  • /balance/{id} → 200 live; gas routes confirmed absent in the relay source
  • Path-lock tests added for /balance; test asserts the gas tools are gone
  • 145 tests pass

🤖 Generated with Claude Code

…tent gas tools

Completing the flagship endpoint audit (after the BoTTube fix in #243):

RustChain — /balance was 404:
  GET /balance?miner_id={id}  ->  GET /balance/{id}   (path param; live-verified 200)
  fixed all 3 call sites (wallet_balance, rustchain_balance, evangelist lookup)

Beacon — beacon_gas_balance / beacon_gas_deposit targeted /relay/gas/* which
  returns 404: the relay (beacon_chat.py) has NO gas routes at all (verified
  against its route table). Gas was never deployed there, so these two tools
  could only ever 404. Removed them (+ doc/README references) rather than ship
  tools that cannot work. The other 8 Beacon tools are live-verified working.

Adds path-lock tests for /balance and asserts the gas tools are gone. 145 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Scottcjn Scottcjn merged commit 09823e6 into main Jun 26, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

RTC Reward

This merged PR earned 5 RTC — sent to Scottcjn.

RustChain Bounty Program

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.

2 participants