Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Solana Backend Overview

The Solana backend runs Anchor programs against a LiteSVM-backed engine. Every call runs in the VM, so the auditor sees real compute units, real logs, and real account state. Static control-flow analysis is not available yet; anything that requires it (slice, trace, sequence narrative) is deferred to Phase 2 (see Roadmap).

Two CLI entry points cover Solana: ilold explore <project> (REPL + API) and ilold serve <project> (API only). Both auto-detect the Solana backend when the path resolves to an Anchor workspace.

Project layout the loader expects

<root>/
  Anchor.toml
  idls/
    <program>.json          # Anchor IDL (required)
  target/deploy/<program>.so  # compiled program (or bin/<program>.so)

crates/ilold-solana-core/src/ingest resolves these paths. Without the .so, IDL navigation (f, i, pda, vars, who) still works; everything that drives the VM (call, state, inspect, timeline) fails until the program is compiled.

The committed fixtures live under tests/fixtures/solana/staking (single program) and tests/fixtures/solana/cpi (two programs that talk to each other through CPI). Both ship pre-built bin/<program>.so binaries so the suite runs without the Anchor toolchain.

Solidity vs Solana mental model

ConceptSoliditySolana
Entry pointfunction on a contractinstruction on a program
Persistent statecontract state variablesaccounts owned by the program
Caller identitymsg.sender (implicit)signers passed by the client
who <X>reads/writes of a state variable (CFG-based)instructions that touch an account type (IDL heuristic)
timeline <X>mutation history of a state variablemutation history of an account pubkey, decoded
step <i>re-renders the persisted flow treere-prints CU, logs, account diffs
slice / tracefull CFG-based analysisnot implemented (Phase 2)
sequencenarrative with cross-step dependenciesaliased to session (no narrative engine yet)
Executionsymbolic (CFG + paths)concrete (in-process LiteSVM execution)
backdrops the step from the timelinedrops the step AND rewinds the VM to the pre-call snapshot
save / loadstep list + persisted pathsstep list + replay-driven VM reconstruction

REPL command groups

The REPL command surface mirrors the Solidity one with backend-specific extensions. Each group has its own page:

  • Session: c/call, b/back, cl/clear, s/session, state, st/step.
  • Programs and IDL: ct/programs, use, f/funcs, fa/funcs-all, i/info, v/vars, va/vars-all.
  • Solana runtime: users, airdrop, tw/time-warp, pda, inspect.
  • Analysis: who, tl/timeline, cp/coupling, cov/coverage.
  • Findings: fi/finding, n/note, status, fl/findings, ex/export.
  • Scenarios: sc/scenario (new, list, switch, fork, delete).
  • Workspace: save, load, browser.
  • Help and control: ?/help, <cmd>?, q/quit/exit, seq (aliased to session).

Workflows