From c1464834d2c83073160da8aa57a83895393a7a72 Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Fri, 14 Nov 2025 21:11:28 +0100 Subject: [PATCH] docs: Add technical note about Alchemy RPC for future investigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Research findings: - Alchemy Growth DOES support WebSocket subscriptions (up to 2,000 connections) - All standard Solana RPC methods supported - No documented Drift-Alchemy incompatibilities - Rate limits enforced via CUPS (Compute Units Per Second) Hypothesis for our failures: - accountSubscribe 'errors' might be 429 rate limits, not 'method not found' - Drift SDK may not handle Alchemy's rate limit pattern during init - First trade works (subscriptions established) → subsequent fail (bad state) Pragmatic decision: - Helius works reliably NOW for production trading - Theoretical investigation can wait until needed - Future optimization possible with WebSocket-specific retry logic This note preserves the research for future reference without changing the current production recommendation (Helius only). --- .github/copilot-instructions.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e20a962..38c23e2 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1022,6 +1022,19 @@ ORDER BY MIN(adx) DESC; * 20:05 - Reverted to Helius (works reliably) - **Critical:** NEVER use RPC provider without WebSocket subscription support for Drift Protocol trading - **This is definitive:** Helius only, no alternatives work reliably + + - **TECHNICAL NOTE (for future investigation):** + * Alchemy Growth plan (10,000 CU/s) DOES support WebSocket subscriptions according to official docs + * Supports up to 2,000 concurrent WebSocket connections + * All standard Solana RPC methods supported (getProgramAccounts, getMultipleAccounts, sendTransaction, etc.) + * No known Drift-Alchemy incompatibilities documented by Drift Labs + * Research source: Alchemy Solana docs + Drift Protocol documentation + * **Hypothesis:** accountSubscribe errors might be rate limit 429s (CUPS enforcement), not "method not found" + * **Potential issue:** Drift SDK may not handle Alchemy's rate limit pattern during initialization + * **Why it matters:** First trade works (subscriptions established) → subsequent trades fail (SDK in bad state from rate limit errors) + * **Pragmatic decision:** Helius works reliably NOW, theoretical investigation can wait + * **Future optimization:** Could implement WebSocket-specific retry logic, subscription batching, init delays + * **For now:** Helius free tier + 5s exponential backoff = production-ready solution 2. **Prisma not generated in Docker:** Must run `npx prisma generate` in Dockerfile BEFORE `npm run build`