solana-simd
Solana Improvement Documents (SIMD) Reference
Solana Improvement Documents (SIMDs) are the formal mechanism for proposing changes to the Solana protocol. They cover everything from fee market restructuring to new syscalls, staking changes, and token standards. This skill covers the SIMDs that matter most for developers, along with the core Solana primitives (accounts, PDAs, CPIs, rent) that every program depends on.
What You Probably Got Wrong
AI models trained on Ethereum or outdated Solana docs produce broken code. Fix these assumptions first.
-
Solana programs are stateless — state lives in accounts, not contracts — There is no contract storage. Programs are executable code only. All mutable state is stored in separate data accounts that programs read and write via instruction inputs. If you write Solana code like Solidity (expecting
self.balances[user]), it will not compile. -
PDA bumps MUST be canonical —
Pubkey::find_program_addressreturns the canonical bump (highest valid bump 255..0). Always store and reuse this bump. Never callcreate_program_addresswith an arbitrary bump — it may produce a valid pubkey on the ed25519 curve, meaning it has a private key and is not a PDA. Anchor'sseedsconstraint handles this automatically. -
invoke_signedis NOT the same asinvoke—invokepasses through existing signers from the transaction.invoke_signedlets a PDA sign by providing the seeds + bump. Useinvokewhen a human wallet signs. Useinvoke_signedwhen your program's PDA needs to authorize a CPI call. -
Rent exemption is not optional in practice — Accounts below the rent-exempt minimum are garbage collected. Since SIMD-0084 (epoch-based rent collection removal), all new accounts must be rent-exempt at creation. The minimum is ~0.00089088 SOL per byte. Always calculate:
Rent::get()?.minimum_balance(data_len). -
Token-2022 is NOT a drop-in replacement for SPL Token — Programs that hardcode the SPL Token program ID (
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) will reject Token-2022 tokens (TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb). You must check both program IDs or use thespl_token_2022::check_spl_token_program_accounthelper. -
Priority fees are per compute unit, not per transaction —
ComputeBudgetProgram.setComputeUnitPrice({ microLamports })sets the price PER compute unit. Total priority fee =microLamports * compute_units_consumed / 1_000_000. Overpaying happens when you set highmicroLamportswithout reducing the compute unit limit.