fix: add timeout to bare getAccountInfo calls in crank service (M1+M2)#92
fix: add timeout to bare getAccountInfo calls in crank service (M1+M2)#920x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
M1: HYPERP pool getAccountInfo (line 503) had no timeout. A hung RPC blocked the entire crank batch. Now wrapped with withTimeout() and a local try/catch — pool lookup is optional, so timeout degrades gracefully (crank proceeds without remaining accounts). M2: MARKETS_FILTER getAccountInfo (line 183) had no timeout. A hung RPC blocked startup indefinitely. Now wrapped with withTimeout(). The existing try/catch catches the timeout and continues to the next slab address. Both use the existing RPC_TIMEOUT_MS (15s) and withTimeout() helper already used by registerMarket(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 53 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Two bare
getAccountInfocalls incrank.tshad no timeout wrapper, allowing hung RPC nodes to block the keeper indefinitely.M1 — HYPERP pool lookup (line 503):
withTimeout()+ local try/catch — pool data is optional, so timeout degrades gracefully (crank proceeds without vault remaining accounts)M2 — MARKETS_FILTER discovery (line 183):
getAccountInfofor each filtered slab address at startupwithTimeout()— existing try/catch catches timeout and continues to next addressTest plan
withTimeout()andRPC_TIMEOUT_MS(15s)🤖 Generated with Claude Code