How Solana Transactions Work
The parts of a transaction
On Solana, a transaction contains a list of instructions, the accounts those instructions touch, one or more signatures, a fee payer, and a recent blockhash. Each instruction names a program to run, the accounts it needs, and some data describing what to do. See Solana Accounts and Programs Explained for those building blocks.
Step by step
- Build: An app or wallet assembles the instructions. A swap, for example, may include several instructions, such as creating a token account and then moving tokens.
- Simulate: Many wallets test the transaction first, to estimate the result and catch obvious errors.
- Sign: The required keys sign the message. Signing is covered in How Wallet Signing Works and Why Keys Stay Private.
- Send: The signed transaction goes to an RPC node and is forwarded toward the validator expected to produce the next blocks.
- Execute: Validators run the instructions and apply changes to accounts.
- Confirm: As more of the network votes on the block, the transaction becomes more final.
The recent blockhash
Each transaction includes a recent blockhash, which acts as a freshness stamp. A transaction is only valid for a limited window after that blockhash was produced. If it is not included in time, it expires and can be safely rebuilt. This also helps prevent the same transaction from being replayed later.
Atomic by design
A transaction is atomic. If any instruction fails, the entire transaction fails and its changes are not kept, though a fee can still be charged for the attempt. This is why a failed swap does not leave you with half a trade. Learn more about costs in Solana Fees and Rent Explained.
Confirmation levels
Tools often describe a transaction as processed, confirmed or finalized. In general, these are increasing degrees of certainty that the result will not be reversed. For ordinary use, a confirmed or finalized status is the practical signal that it went through. Exact timing varies with network conditions.
Why transactions fail
- The blockhash expired before inclusion.
- An account did not have enough balance for the amount or fee.
- A swap moved past your slippage limit, see Slippage and Priority Fees on Solana Explained.
- A program rejected the instruction for its own rules.
You can inspect any transaction yourself with How to Read a Solana Transaction on an Explorer and How to Use Solscan to Check a Solana Token.
One more detail is worth knowing: the order of instructions inside a transaction matters, because each runs in sequence and can depend on the one before. Wallets that preview a transaction are showing you the combined outcome of that sequence, which is why a short preview can still represent several steps. If a preview looks very different from what you expected, cancel and check the source of the request.
When something goes wrong, the explorer view of the transaction is the best evidence. It shows the exact instructions, the accounts involved and any error returned by a program, which is more reliable than a screenshot or a message from someone else.
Frequently asked questions
What is an instruction on Solana?
An instruction is one command inside a transaction. It names a program, the accounts it uses and the data telling the program what to do.
Can part of a Solana transaction succeed?
No. Transactions are atomic, so if one instruction fails the whole transaction fails and its account changes are not applied.
What is a recent blockhash for?
It proves the transaction is fresh. It expires after a limited window, which stops very old transactions from being processed and helps prevent replay.
Why can I still be charged for a failed transaction?
Validators spend resources processing it, so a fee can apply even when the result is a failure. Details depend on the type of failure.
Who signs a transaction?
The owners of the accounts that must authorize it, including the fee payer. Signing happens in your wallet, and your private key never has to be shared.
How do I know a transaction went through?
Look at its status on a block explorer. A confirmed or finalized result without an error means it was executed.
Keep reading
- Solana Accounts and Programs Explained
Solana stores everything in accounts and runs logic in programs. Learn how owners, data, executable accounts and program derived addresses fit together. - How to Read a Solana Transaction on an Explorer
A generic walkthrough of a Solana transaction page: signature, status, fee payer, instructions, balance changes and logs, and what each field tells you. - Solana Fees and Rent Explained
The main costs of using Solana: the base transaction fee, optional priority fees and the rent-exempt deposit that keeps accounts open. No fixed prices given. - How Wallet Signing Works and Why Keys Stay Private
How a crypto wallet signs transactions with a private key, what you approve when you confirm, and why you must never share a seed phrase with anyone.
All How to buy and stay safe guides | Back to top | Search the site
Main pages: What is QNT? | Token information | How to buy | FAQ