Skip to main content
Knowledge mapSolana transactions: several instructions, one resultExternal projects

You are here. See how this question connects to other ideas.

Select a node to open its page · Expand to read within the map

Knowledge mapFollow a connection. Understand a question.
← Blockchain and shared state

One question

Solana transactions: several instructions, one result

Learn atomic execution without assuming free failure.

A Solana transaction can contain several instructions, together with the signatures authorizing them and freshness information such as a recent blockhash. An instruction names the program and the accounts involved.

A two-step operation

Imagine one transaction that prepares an account and then performs a transfer. If an instruction fails, the transaction's application state changes revert together. This atomicity prevents the application from treating half of that transaction as a completed operation. Fees can still be charged on failure.

Atomicity has a boundary: it covers the transaction, not a website's database update or an email sent afterward. An application should confirm the chain result before recording delivery and make its off-chain processing safe to retry.

When examining a payment, inspect the instructions and required signers, not just the presence of an account address. An account's presence in the transaction does not by itself prove that the person controlling it approved every action.

Submission, execution and confirmation

sendTransaction returns a transaction signature when the node accepts the request; it does not guarantee execution. A recent blockhash identifies recent chain history and gives the transaction a limited submission lifetime. It can expire before the transaction lands.

Query the signature’s status and check both the execution error and confirmation level. processed is a node’s newest view and can be rolled back; confirmed means a supermajority of stake has voted on the block; finalized is the network’s strongest confirmation state. A finalized failed transaction is still a failed operation.

For a transfer, keep the network and signature, verify success, then wait for the application’s chosen confirmation level. If the result is unknown, reconcile it before signing a replacement: otherwise a retry may become a second payment. Submission reference and status reference describe the separate checks.

Sources and further reading