Runtime Lab

Learn Solana program flows

Pick a program, choose a flow, then walk through the runtime checks, state changes, and failures that shape how Solana programs behave.

Programs

Vault Bootcamp stays first. The rest build out the library around it.

4 programs

Program

Vault Bootcamp

Flow

Vault Bootcamp

Duration

12 min

Stage 01

Initialize the vault PDA

Create a program-owned state account that will store vault data.

1/5

Flow memory hook

Prediction first. Runtime second. State diff always.

Predict first

Which account must be both mutable and funded to create the vault PDA successfully?

Pick an answer before revealing the explanation.

Coach note

A new Solana dev usually thinks 'my instruction ran.' The runtime actually asks: who signed, who pays, who owns this account, and is it rent-safe?

Evidence

Runtime proof, account diffs, and failure analysis for this step.

Runtime checks

Signer check

pass

Payer signed the transaction, so the runtime allows lamports to be debited.

PDA derivation

pass

Seeds `[b"vault", user.key()]` plus bump derive a program-owned address with no private key.

Rent exemption

pass

Enough lamports are moved into the new PDA to keep the account alive on-chain.

Runtime timeline

Program log

Creating vault PDA with 8-byte discriminator + 40 bytes of state.

System Program

Transferred lamports from payer to vault PDA and allocated data space.

Anchor

Account marked initialized and owned by your program.

Continue after this lab

Once the runtime model clicks, move to Visual Builder to map the same accounts and instructions visually.

Open Visual Builder
    Runtime Lab | LearnSol | learn.sol