Learning Solana

I'm learning Solana program development and writing it up as I go. My background is performance work on Android and Linux, and Solana rewards the same habits: knowing what every instruction costs and checking every input. This page collects my notes and the projects I'm building next.

Notes, in reading order

All Solana posts

  1. Solana's account model, for systems programmers

    Programs hold no state, every account has one owner, and every transaction declares what it touches up front. What that means for how you write a program.

    3 min read
  2. Program derived addresses on Solana

    What a PDA is, how find_program_address and the bump work, how a program signs for an address with no private key, and the seed mistakes to avoid.

    3 min read
  3. Anchor account constraints: what each one checks

    Anchor's account types and #[account(...)] constraints read as the if statements they generate: what each one checks, the attack it stops, and what it leaves to you.

    3 min read
  4. Measuring and reducing compute units in Solana programs

    How the compute budget works, four ways to measure what an instruction costs, and the changes that cut it most: stored bumps, less logging, zero-copy accounts and fewer CPIs.

    3 min read
  5. How Solana transaction fees work

    Base fee plus priority fee: how to calculate the priority fee from the compute unit price and limit, why only contested accounts get expensive, and why rent isn't a fee.

    2 min read
  6. A security checklist for Solana programs

    Twelve bug classes that keep showing up in Solana audits, from missing signer and owner checks to arbitrary CPIs, account revival and overflow, each with the Anchor code that stops it.

    3 min read

What I'm building next

Each one ships with:

They'll appear under Work with their source on GitHub as soon as they're working.

What I'm learning from