Solana
Notes on how Solana works and how to write programs for it: accounts, PDAs, Anchor, compute units, fees and security.
Start with the Solana learning log for the order I'd read these in.
- A security checklist for Solana programsTwelve 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.
- How Solana transaction fees workBase 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.
- Measuring and reducing compute units in Solana programsHow 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.
- Anchor account constraints: what each one checksAnchor'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.
- Program derived addresses on SolanaWhat 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.
- Solana's account model, for systems programmersPrograms 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.