fix(solana): preflight sendTx at confirmed commitment - #1284
Conversation
sendRawTransaction inherited the helius connection default (finalized), so provider-built txs with blockhashes pinned at confirmed commitment (e.g. across svm swaps) failed preflight with 'Blockhash not found' for the ~30s until the blockhash finalized - broadcasting promptly after quoting was exactly what triggered it. Finalized blockhashes remain valid at confirmed, so this only widens acceptance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSolana raw transaction submission now explicitly uses confirmed preflight commitment while retaining existing base64 decoding, broadcast, signature return, and error handling. ChangesSolana transaction broadcast
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
Description
sendRawTransactioninherited the Helius connection's default commitment (finalized) for preflight simulation. Provider-built transactions with blockhashes pinned at confirmed commitment — e.g. Across SVM swaps, which arrive pre-signed with a fresh blockhash — failed preflight withBlockhash not foundfor the ~30 seconds until that blockhash finalized. Broadcasting promptly after quoting was exactly what triggered it: the failure window was the first ~30s, then a brief working window until the blockhash expired at ~90s.Verified empirically: a fresh Across-issued blockhash checks
isBlockhashValidtrue atprocessed/confirmedand false atfinalized; an Across SVM swap broadcast through this endpoint failed when signed immediately and succeeded when signed after a ~30s wait.Preflighting at
confirmedis strictly widening: finalized blockhashes (everything web's chain-adapter builds viagetLatestBlockhash()) remain valid at confirmed, so existing sends are unaffected.Testing
Blockhash not found, now lands.🤖 Generated with Claude Code
Summary by CodeRabbit