Transaction Lifecycle

Follow a Solana transaction from message construction to confirmation, with Carbium handoffs for quotes, signing, RPC submission, blockhash recovery, and post-send debugging.

Transaction Lifecycle

A Solana transaction is not just "sent." It is built, signed, submitted, scheduled, executed, and confirmed under a short freshness window. If one stage is unclear, teams often debug the wrong layer: a quote issue becomes an RPC issue, a stale blockhash becomes a wallet issue, or an accepted send response gets mistaken for final confirmation.

Use this page as the lifecycle map. It explains where each stage belongs and points to the deeper Carbium pages that own the implementation details.

Part of the Carbium Solana infrastructure stack.


The path from intent to confirmation

The normal path has seven stages:

  1. App intent: a user, bot, or backend chooses the action.
  2. Build message: the app or API prepares instructions, accounts, fee payer, and blockhash.
  3. Sign: the wallet or backend signer authorizes the exact message.
  4. Submit: RPC relays the signed transaction.
  5. Schedule and execute: the leader validates locks, fees, and instructions.
  6. Confirm: the client checks signature status.
  7. Recover or settle: the app retries, rebuilds, waits, or marks final state.

The important production habit is to log each stage separately. A failure before signing needs a different response than a failure after sendTransaction returns a signature.


Stage map

StageWhat is decidedCommon failureCarbium handoff
IntentWhat action the app is trying to performUser asks for an impossible pair, size, or routeSupported DEXs and Routing Sources
BuildInstructions, accounts, recent blockhash, fee payer, and optional transaction payloadMissing route, missing txn, wrong parameter familyQ1 and Swap API Errors Reference
SignWallet or backend signer authorizes the exact messageUser delay, rejected signature, wrong signing boundaryCarbium for Wallet Developers
SubmitSigned payload is sent through RPCHTTP error, JSON-RPC error, preflight failureSending Transactions through Carbium RPC and RPC Errors Reference
ConfirmApp checks whether the signature processed, confirmed, or finalizedAccepted send response treated as final stateSolana Commitment Levels
RecoverApp decides whether to wait, check status, rebuild, or stopBlind resend, stale blockhash, duplicate intentBlockhash Expiry Recovery Playbook

What Solana requires from every transaction

Every normal Solana transaction carries:

  • one or more instructions
  • account metadata for the accounts those instructions read or write
  • required signatures
  • a recent blockhash
  • a fee payer

Solana executes all instructions in a transaction atomically. If one instruction fails, the state changes from the full transaction are reverted. Fees can still be charged, so production code should treat simulation and preflight failures as real operational signals rather than harmless noise.

The recent blockhash is the freshness boundary. Solana's current transaction docs describe recent blockhash validity as 150 slots. Once that window is gone, resending the same signed payload will not make it fresh. Rebuild the transaction, get a new signature when needed, and check existing signature status before creating duplicate intent.

📘

A successful RPC send response means the node accepted the signed transaction for relay. It does not prove the transaction processed, confirmed, or finalized. Always follow with signature-status checks that match your product's commitment requirement.


Carbium swap flow

For a Carbium-backed swap, the lifecycle usually looks like this:

  1. Backend requests a Q1 quote from https://api.carbium.io/api/v2/quote.
  2. If the response has no txn, fix the quote shape or route issue before signing.
  3. If the response includes txn, the signer approves the transaction.
  4. Backend submits the signed payload through Carbium RPC.
  5. Backend checks signature status at the commitment level the product requires.
  6. The app settles user state, waits, or enters the recovery policy.

This split keeps product responsibilities clean:

LayerOwns
Carbium Swap APIQuote, route plan, and executable transaction construction when user_account is included
Your signerAuthorization of the exact transaction message
Carbium RPCSubmission and confirmation checks for the signed payload
Your appUser state, retry policy, logging, and final UX decision

For the full code path, use Executing Swaps. For a narrower backend relay pattern, use Sending Transactions through Carbium RPC.


Freshness, commitment, and retries

Transaction bugs often come from mixing three separate decisions.

DecisionBad shortcutBetter policy
FreshnessReuse an old signed payload after the user pausedRebuild and re-sign after the blockhash window is no longer safe
CommitmentTreat every product state as finalized or every state as processedPick processed, confirmed, or finalized by user risk and UX need
RetryResend because the UI is still spinningCheck signature status first, then decide whether to wait, rebuild, or stop

sendTransaction can run preflight checks before submission unless your client disables them. If preflight fails, preserve the error body and simulation details. If submission succeeds but confirmation is unclear, move to signature-status checks instead of rebuilding immediately.


Failure routing

Use this quick routing table when a transaction path breaks.

SymptomLikely layerStart here
txn is empty in a Q1 responseQuote-build request shapeSwap API Errors Reference
Wallet rejects the signatureSigning boundary or user approvalCarbium for Wallet Developers
RPC returns HTTP or JSON-RPC errorSubmission or preflightRPC Errors Reference
BlockhashNotFound or block-height expiry appearsFreshness and resend policyBlockhash Expiry Recovery Playbook
Signature is returned but UX never settlesConfirmation policySolana Commitment Levels
Route worked in quote but transaction failed laterSigning, freshness, fees, accounts, or on-chain executionExecuting Swaps

Minimal production checklist

Before a transaction flow goes live, make sure your app can answer these questions from logs:

  • Which app intent created the transaction?
  • Which quote, route, or instruction set was used?
  • Which recent blockhash or validity window was attached?
  • Who signed, and when?
  • Which RPC endpoint submitted the transaction?
  • Did sendTransaction return a signature?
  • Which commitment level does the product require before the UI advances?
  • If recovery ran, did it check the original signature before rebuilding?

That is the difference between a debuggable Solana pipeline and a pile of unrelated error messages.

🔶

Build the lifecycle one layer at a time: start with Core Concepts, choose confirmation policy with Solana Commitment Levels, and use carbium.io when you are ready to wire the stack into production infrastructure.