Skip to content

fix(solana): preflight sendTx at confirmed commitment - #1284

Merged
kaladinlight merged 1 commit into
developfrom
fix/solana-sendtx-preflight-commitment
Jul 28, 2026
Merged

fix(solana): preflight sendTx at confirmed commitment#1284
kaladinlight merged 1 commit into
developfrom
fix/solana-sendtx-preflight-commitment

Conversation

@kaladinlight

@kaladinlight kaladinlight commented Jul 28, 2026

Copy link
Copy Markdown
Member

Description

sendRawTransaction inherited 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 with Blockhash not found for 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 isBlockhashValid true at processed/confirmed and false at finalized; an Across SVM swap broadcast through this endpoint failed when signed immediately and succeeded when signed after a ~30s wait.

Preflighting at confirmed is strictly widening: finalized blockhashes (everything web's chain-adapter builds via getLatestBlockhash()) remain valid at confirmed, so existing sends are unaffected.

Testing

  • Broadcast an Across SVM swap (solana USDC → EVM USDC) signed immediately after quoting — previously Blockhash not found, now lands.
  • Regular native/SPL sends unaffected (finalized blockhash ⊂ confirmed validity).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved Solana transaction submission reliability by applying confirmed preflight checks before broadcasting transactions.
    • Transaction signatures and error handling remain unchanged.

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>
@kaladinlight
kaladinlight requested a review from a team as a code owner July 28, 2026 22:41
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fbb83867-ea12-43d7-a57e-09e6a9ac5476

📥 Commits

Reviewing files that changed from the base of the PR and between 2cf011d and 1a87bdd.

📒 Files selected for processing (1)
  • node/coinstacks/solana/api/src/controller.ts

📝 Walkthrough

Walkthrough

Solana raw transaction submission now explicitly uses confirmed preflight commitment while retaining existing base64 decoding, broadcast, signature return, and error handling.

Changes

Solana transaction broadcast

Layer / File(s) Summary
Configure confirmed transaction preflight
node/coinstacks/solana/api/src/controller.ts
sendTx passes preflightCommitment: 'confirmed' when broadcasting the decoded raw transaction.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: 0xapotheosis

Poem

A rabbit watched the bytes take flight,
With confirmed checks to make them right.
The signature hopped back through,
Errors stayed in their old burrow too—
A tidy Solana leap tonight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the Solana sendTx preflight change to confirmed commitment and matches the PR's main fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/solana-sendtx-preflight-commitment

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kaladinlight
kaladinlight merged commit 095276f into develop Jul 28, 2026
3 checks passed
@kaladinlight
kaladinlight deleted the fix/solana-sendtx-preflight-commitment branch July 28, 2026 23:05
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.

1 participant