Franklin icon indicating copy to clipboard operation
Franklin copied to clipboard

Solana getBalance() returns 0 on RPC error, so the reservation layer's fail-open fallback never engages

Open VickyXAI opened this issue 3 months ago • 0 comments

Found during the adversarial pass on #138.

WalletReservation.fetchBalance() is designed to fail open: if the balance read throws, it returns Infinity so an RPC outage does not block every paid tool. That works on Base. On Solana the SDK's getBalance() (@blockrun/llm, dist/index.js around L8725) catches every error and returns 0, so an RPC blip reads as "balance 0" and:

  • every ModalCreate is refused with an insufficient-funds message during the outage
  • as of #138, ambiguous-settlement entries are pruned against a fake 0 read

Options: (a) SDK change so Solana getBalance() throws (or returns null) on transport errors; (b) Franklin-side: treat a Solana 0 that follows a network error as unknown. (a) is the right fix; (b) is a stopgap if the SDK bump lags.

VickyXAI avatar Aug 29 '26 18:08 VickyXAI