In short
Programs are code deployed to the network that owns and updates accounts. Most apps call existing programs, such as the Token program, rather than writing their own.You’ve used this in: Tokenized asset Step 1 Tokenized asset Step 2 Trade settlement Step 2
A Solana program is an
account that holds
sBPF bytecode, with its executable flag set to true. Programs are
stateless: their data lives in separate accounts that
instructions pass in.
Program Execution
Compiling and writing programs (Anchor, Pinocchio, or native Rust), the
sBPF VM, compute units, and the program cache.
Program Deployment
Deploying, upgrading, and verifying programs, and the loader programs.
Core Programs
System Program (with instruction reference), Vote, Stake, Config, Compute
Budget, Address Lookup Table, and ZK ElGamal Proof.
Precompiles
Ed25519, Secp256k1, and Secp256r1 signature verification programs.
Syscall Reference
All ~30 sBPF syscalls with their compute unit costs.
Key facts
- Compiled to sBPF: Programs are compiled to Solana Bytecode Format (sBPF) via LLVM and stored in executable accounts.
- Upgradeable: Programs deployed with loader-v3 (BPF Loader Upgradeable) can be upgraded when an upgrade authority is set; revoking that authority makes the program immutable.
Limits
| Limit | Value | Source |
|---|---|---|
| Default heap size | 32 KiB | HEAP_LENGTH |
| Max heap size (adjustable) | 256 KiB | MAX_HEAP_FRAME_BYTES |
| Stack frame size | 4,096 bytes | STACK_FRAME_SIZE |
| Max sBPF call depth | 64 | MAX_CALL_DEPTH |
| Max instruction stack depth (top-level + CPIs) | 5 (9 with SIMD-0268) | MAX_INSTRUCTION_STACK_DEPTH, MAX_INSTRUCTION_STACK_DEPTH_SIMD_0268 |
| Heap cost | 8 CUs per 32 KiB page | DEFAULT_HEAP_COST |
| Max cached programs | 512 | MAX_LOADED_ENTRY_COUNT |
| Deployment visibility delay | 1 slot | DELAY_VISIBILITY_SLOT_OFFSET |