Knowledge Base updated: 2026-11-22
Surfpool knowledge base
Surfpool is a Solana-compatible local development and testing environment. Its Rust workspace combines a runtime and RPC service, persistent and in-memory state backends, scenario execution, operator interfaces, and SDK-facing integration layers.
Critical runtime state is held through account-storage abstractions and database backends, while Surfnet supplies virtualized execution environments. Shared cross-crate contracts live in the types crate; scenarios, interfaces, and SDKs consume those contracts to run and control environments.
flowchart TD
CLI[CLI and HTTP server] --> Runtime[Runtime and RPC service]
TUI[Interactive terminal UI] --> Runtime
Studio[Studio UI] --> Runtime
Runbooks[Runbook automation] --> CLI
Runtime --> RPC[RPC surface and subscriptions]
Runtime --> Loops[Runtime execution loops]
Runtime --> Surfnet[Surfnet virtual network]
Surfnet --> Storage[Account storage backends]
Storage --> DB[Database backends]
Scenarios[Scenario execution] --> Runtime
Registry[Scenario registry and protocols] --> Scenarios
Examples[Scenario examples] --> Scenarios
Rust[Rust SDK and cheatcodes] --> Runtime
Node[Node.js SDK] --> Runtime
MCP[MCP server integration] --> Runtime
Contracts[Shared contracts and generated types] --> Runtime
Contracts --> Scenarios
Contracts --> Rust
Contracts --> Node
Glossary
- Surfnet — Surfpool's virtualized Solana execution environment, with local and remote modes.
- Cheatcodes — SDK/RPC-supported state setup and mutation operations used when testing environments.
- Scenario — A reproducible protocol workflow executed against a Surfpool environment.
- Simnet — The local simulated network operated through Surfpool's runtime and user interfaces.
- Jito — The bundle- and transaction-related model and RPC integration area represented in shared contracts and RPC support.
Invariants
- Shared scenario models remain centrally defined in crates/…/scenarios.rs; scenario consumers should use those contracts rather than duplicate workflow types.
- Runtime-facing state must be accessed through account-storage and database abstractions, as routed by
crates/storage/**andcrates/database/**. - RPC behavior is separated into API modules and runtime lifecycle coordination, reflected by the
crates/rpc/**and runtime runloop routing scopes. - Generated TypeScript bindings derive from the shared types integration rather than becoming an independent source of contract truth; see
crates/types/**andcrates/node-sdk/**.
Routing table
crates/runtime/**-> docs/runtime-and-rpc.mdcrates/rpc/**-> docs/rpc-surface.mdcrates/runtime/**/runloop/**-> docs/execution-runloops.mdcrates/surfnet/**-> docs/state-and-surfnet.mdcrates/storage/**-> docs/account-storage.mdcrates/surfnet/**/network/**-> docs/surfnet-virtual-network.mdcrates/database/**-> docs/database-backends.mdcrates/scenarios/**-> docs/scenario-execution.mdcrates/scenarios/**/protocols/**-> docs/scenario-registry-and-protocols.mdcrates/scenarios/**/examples/**-> docs/scenario-examples.mdcrates/cli/**-> docs/user-interfaces.mdcrates/cli/**,crates/server/**-> docs/cli-and-server.mdcrates/tui/**-> docs/interactive-terminal.mdcrates/cli/**/runbook/**-> docs/runbook-automation.mdcrates/studio/**-> docs/studio-ui.mdcrates/sdk/**,crates/node-sdk/**,crates/mcp/**-> docs/developer-integrations.mdcrates/sdk/**-> docs/rust-sdk.mdcrates/node-sdk/**-> docs/node-sdk.mdcrates/mcp/**-> docs/mcp-server.mdcrates/types/**-> docs/shared-contracts.md