Context
When using a high-level library like @solana/kit, sending SOL looks like this :

But what happens under the hood? Bear with me—I'm just a newbie trying to understand this—but here is how a raw transaction is actually structured.
🧠 Core Content: Understanding a Solana Transaction
At the highest level, a Solana transaction consists of just two things: Signatures and the Message.
1. Signatures
A compact-encoded array of 64-byte Ed25519 signatures.
💡 In human terms: Every account that needs to approve the transaction must sign the serialized message with its private key. It’s the network's way of verifying that the transaction was explicitly authorized by the required accounts.
2. The Message
The message contains the actual logic, broken down into four sub-levels:
Sub-level 1. Header: Metadata specifying the total required signers, read-only signers, and read-only non-signers. It acts as a checklist for the runtime to validate the transaction.
Sub-level 2. Account Keys: An array of all account addresses required by the instructions.
Sub-level 3. Recent Blockhash: A timestamp-like value. If it is older than the 150 most recent blocks, the validators will reject the transaction.
Sub-level 4. Instructions: The actual commands for programs to execute (e.g., Move X amount of SOL from Account 1 to Account 2).
🔍 The Raw JSON Structure:
🤔 What is {"version": 0}?
Solana transactions have a strict size limit of 1232 bytes. Because public keys are 32 bytes each, listing too many accounts will break this limit.
To fix this, Solana introduced two versions:
Legacy: Standard transactions limited by how many raw addresses you can fit.
v0: A version that introduces Address Lookup Tables (ALTs).
An ALT is an account on the blockchain that stores a list of addresses. Instead of passing full 32-byte addresses, you include the ALT address in your Account keys ("staticAccounts" in the JSON above) and reference the other addresses using a tiny 1-byte index. Note: Addresses inside an ALT cannot act as signers.
🎯 Takeaway
It is great to see what consistency can do. I went from knowing nothing on Day 1 to being able to somewhat explain transactions on a blockchain—one of the most complicated pieces of software to wrap your mind around—by Day 20. Let's go! 🚀

Top comments (0)