Understanding Solana Transactions
Use one simple SOL transfer to understand what a Solana transaction contains, why signers and recent blockhashes matter, and how a transaction moves through the network.
Most beginners think a transaction is just “the thing that sends SOL.”
That description is too shallow.
A Solana transaction is a signed message that tells the network which instruction to run, which accounts are involved, and who has approved the action.
That is the mental model you need for everything that comes later.
If you understand transactions, program calls stop feeling magical.
This lesson builds directly on the previous one. The solana transfer command you already ran is the concrete example we will keep returning to.
What You Are Learning
By the end of this lesson, you will be able to:
- explain what a Solana transaction actually is
- identify the main pieces inside a transaction
- understand why some accounts sign and others do not
- explain what a recent blockhash does
- describe how a transaction goes from your machine to the network
Start with One Real Transaction
Use the transfer from the last lesson as the anchor example:
solana transfer wallet2.json 0.01 --from wallet1.json --allow-unfunded-recipientFrom the terminal, that looks like one line.
Inside the network, it is more structured.
This command causes the CLI to build a transaction that roughly means:
Run a system transfer instruction.
Move 0.01 SOL from wallet1 to wallet2.
Use wallet1 as the signer and fee payer.
Attach a recent blockhash so the network treats the message as fresh.That is already enough to see the important shift in thinking:
A transaction is not the same thing as a command.
The command is what you type. The transaction is the signed message the CLI sends to Solana.
The Four Pieces Inside a Transaction
For Week 1, you can think of a transaction as having four important pieces:
- Instruction
- Accounts
- Signatures
- Recent blockhash
Here is what each one means.
1. Instruction
The instruction is the actual action you want the network to execute.
In the example above, the instruction is a system transfer.
Later in the course, instructions might also mean:
- create an account
- mint a token
- call an Anchor program
- update some on-chain state
A transaction can contain one instruction or several.
2. Accounts
Instructions do not run in a vacuum. They need accounts.
For a simple SOL transfer, the important accounts are:
- the sender account
- the recipient account
- the System Program
The transaction has to name those accounts explicitly so the runtime knows what can be read, written, or executed.
3. Signatures
A signature proves that the right private key approved the transaction.
In the SOL transfer example, wallet1 must sign because it is authorizing funds to leave that account.
This is where beginners often get tripped up:
- an account can be involved in a transaction without signing
- an account can be writable without being a signer
For example, wallet2 receives funds, but it does not need to sign just to receive them.
That distinction matters later when you start passing multiple accounts into programs.
4. Recent Blockhash
A transaction also carries a recent blockhash.
Do not think of it as a timestamp in the normal wall-clock sense. Think of it as a freshness marker.
It tells the network, “this transaction was built recently enough to still be valid.”
That helps prevent old signed transactions from being replayed later.
Most of the time, the CLI or SDK fetches and inserts the blockhash for you. You still need to know why it is there.
What the Transaction Is Really Saying
If we rewrite the earlier transfer in plain English, the transaction is roughly saying:
System Program,
please move value from wallet1 to wallet2.
wallet1 approves this action.
Here is a recent blockhash to prove this request is still fresh.That is a much better mental model than “I ran a transfer command.”
The network is not reading your terminal command. It is validating and executing a structured, signed message.
How a Transaction Moves Through the Network
Now that you know what is inside the message, here is the lifecycle.
Step 1: The Client Builds the Transaction
Your client can be the CLI, a frontend, or a backend script.
It chooses:
- which instruction to run
- which accounts to include
- which signer or fee payer is required
- which recent blockhash to attach
At this point, the transaction exists as data, but it is not authorized yet.
Step 2: Required Signers Approve It
The transaction is signed with the private keys that must authorize it.
For the transfer example, wallet1.json signs because it is the source of funds.
If the required signature is missing or wrong, the network rejects the transaction.
Step 3: The Transaction Is Sent to Solana
The signed transaction is submitted to an RPC node, which forwards it into the network.
At this point, the network can inspect:
- whether the signatures are valid
- whether the blockhash is still fresh
- whether the accounts and instruction are well formed
Step 4: A Leader Validator Executes It
A leader validator includes the transaction in a block and executes the instruction.
If execution succeeds, the account state changes.
In the transfer example, that means:
- the sender balance goes down
- the recipient balance goes up
- the fee payer also pays a transaction fee
If execution fails, the state change does not partially apply.
Step 5: The Network Confirms the Result
Other validators observe and vote on the block.
From the developer point of view, this is when the transaction moves from “submitted” to “confirmed,” and later toward stronger finality.
For now, the important beginner takeaway is simple:
sending a transaction is not the same thing as knowing it succeeded. Confirmation is a separate part of the lifecycle.
Why Signers Matter So Much
Signers are the permission layer of Solana transactions.
If the wrong account signs, or a required signer is missing, the instruction should fail.
That is how Solana prevents random clients from spending someone else’s funds or mutating protected state.
A useful Week 1 rule is:
- if an account is paying, authorizing, or proving ownership, expect a signature to matter
- if an account is only being referenced or receiving value, it may not need to sign
This rule is not the full runtime model, but it will keep your intuition pointed in the right direction.
Why the Recent Blockhash Matters
Without a freshness check, an old signed transaction could be reused later.
That would be dangerous.
The recent blockhash reduces that risk by making transactions expire after they are no longer recent enough.
This has a practical consequence for developers:
if you build a transaction and wait too long before sending it, the transaction can expire and fail even if the signatures are correct.
That is why transaction-building libraries fetch blockhashes close to send time.
One More Useful Detail: Instructions Are Atomic
A transaction can contain multiple instructions.
When that happens, they run as one atomic unit.
That means:
- either the whole transaction succeeds
- or the whole transaction fails
You do not get half a successful transaction.
That property becomes more important once you start creating accounts and then using them in the same transaction.
Common Mistakes
Confusing the command with the transaction
The CLI command is just how you ask for a transaction to be built. The network only sees the serialized transaction message and its signatures.
Assuming every account in a transaction must sign
That is not true. The sender in a transfer must sign. The recipient usually does not.
Treating the recent blockhash like an implementation detail you can ignore
You may not fetch it manually very often, but transaction freshness depends on it. If a transaction sits around too long, it can expire.
Thinking “sent” means “succeeded”
Submitting a transaction and confirming a transaction are two different stages. Always care about the final result, not just the submission step.
Summary
A Solana transaction is a signed message, not just a wallet action.
It carries:
- an instruction that says what should happen
- the accounts involved in that action
- signatures that authorize it
- a recent blockhash that proves the message is still fresh
That is why the transfer from the previous lesson worked the way it did.
The CLI built the message, wallet1 signed it, the network checked it, and validators applied the state change.
With that model in place, the next lessons on architecture and programs will make much more sense because you now know what is actually moving through the network when you interact with Solana.