DEV Community

Cover image for Understanding Solana's transaction anatomy
Vinay
Vinay

Posted on

Understanding Solana's transaction anatomy

๐Ÿ“– Overview

For the past week, Iโ€™ve been reading data from the Solana blockchain. This project marks the shift from reading state to writing state. The goal was simple but fundamental: understand what actually happens when a transaction is sent on Solana.


๐ŸŽฏ Objective

  • Send a real transaction on Solana Devnet
  • Inspect it using CLI and Explorer
  • Understand its internal structure
  • Build a mental model for how state changes occur

โš™๏ธ What I Did

1. Created a Temporary Wallet

Generated a fresh keypair to act as the recipient.

solana-keygen new --no-bip39-passphrase -o /tmp/temp-wallet.json
Enter fullscreen mode Exit fullscreen mode

This generated a transaction signature, which acts as:

  • A receipt
  • The transaction ID
  • The first cryptographic signature

Example:

Step 1 - Creating temp wallet


2. Sent a Transaction

solana transfer --allow-unfunded-recipient $(solana address -k /tmp/temp-wallet.json) 0.001 --url devnet
Enter fullscreen mode Exit fullscreen mode

Transferred a small amount of SOL on Devnet.
This produced a transaction signature (ID).

Example:

Step 2 - Sending Transaction


3. Inspected the Transaction via CLI

solana confirm -v <TRANSACTION_SIGNATURE>
Enter fullscreen mode Exit fullscreen mode

This revealed:

  • Transaction status and slot
  • Accounts involved
  • Instruction execution details

Example:
Step 3 - Inspecting transaction


4. Analyzed in Explorer
Visualized It in Solana Explorer

Using the transaction signature, I examined:

  • Signatures โ†’ Authorization proof
  • Recent Blockhash โ†’ Freshness + anti-replay Transaction details
  • Account Keys โ†’ All accounts involved Account Keys
  • Instruction โ†’ System Program transfer

Program Instruction


๐Ÿง Mental Model Upgrade

What you sent is not:

โ€œSend 0.001 SOL to Xโ€

It is:

โ€œExecute instruction #2 of the System Program, using these accounts, with this encoded data, authorized by this signature.โ€

Top comments (0)