By default, the Acton local node runs entirely in memory. Every account balance, deployed contract, transaction, and piece of explorer metadata lives only in the process heap — when the node stops, all of that state vanishes. This is ideal for short-lived experiments where you want a clean slate on every run. For everything else — stable team environments, CI pipelines that need identical starting state, or long-lived local chains that survive restarts — Acton provides two complementary persistence strategies: SQLite persistence and JSON snapshots.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ton-blockchain/acton/llms.txt
Use this file to discover all available pages before exploring further.
Default: in-memory mode
When you runacton localnet start with no storage flags, the node operates in pure in-memory mode. No files are written to disk during the run. This is the fastest option and produces no disk I/O overhead.
SQLite persistence (--db-path)
Pass --db-path with a file path to store the entire chain state in a SQLite database. The database is created if it does not exist and is updated incrementally as the node processes transactions:
--db-path, the node resumes from the exact state where it left off — account balances, contract storage, block history, and transaction indexes are all preserved:
JSON snapshots
JSON snapshots are portable, human-readable exports of the complete local node state. The current on-disk format is snapshot version 1. Snapshots are written as a single JSON file and can be committed to version control, shared with teammates, or used as a repeatable starting point in CI.Loading a snapshot on startup
Use--load-state to import a snapshot file before the node begins serving requests:
Saving a snapshot on shutdown
Use--dump-state to write a snapshot when the node shuts down gracefully (via Ctrl+C):
Round-trip: load then dump
Combine both flags to resume from a snapshot at startup and save an updated snapshot on exit. This evolves a single portable file across sessions:Triggering a live snapshot via the control API
You can export or import a snapshot while the node is still running using the control endpoints. This is useful in CI pipelines or scripted workflows where you do not want to stop the server:What a JSON snapshot contains
A snapshot captures the full local node state needed to resume an identical chain view. Snapshot version 1 includes:Snapshot contents (version 1)
Snapshot contents (version 1)
- Global chain state — head seqno, logical time, queue policy, and config hash.
- Account state cache — the latest code, data, balance, and status for every account the node has seen.
- Block history and account deltas — block records and per-account state changes indexed by seqno.
- Transaction and message history — full transaction records and message indexes.
- Address aliases — local names registered via
/acton_setAddressNameand displayed in the explorer. - Cached token and NFT metadata — jetton master and NFT collection metadata fetched during the session.
- Compiler ABI metadata — code-hash-to-ABI mappings registered via
/acton_registerCompilerAbis. - CAS entries — serialized cells, message payloads, and code BOCs referenced by hash.
- Pending message pools — in-flight internal and external messages that had not yet been processed.
Compatibility notes
Snapshots are versioned. Loading a file whose
version field does not match the supported version fails immediately with a clear error — the node will not start with an incompatible snapshot. Snapshot format compatibility may change across future Acton releases; regenerate shared snapshots after upgrading.Configuring persistence in Acton.toml
Set the default port in Acton.toml to avoid passing --port on every invocation. Note that --db-path, --load-state, and --dump-state are CLI-only flags and cannot be set in Acton.toml:
Choosing a strategy
| Use case | Recommended mode |
|---|---|
| Stable, long-lived local environment | --db-path |
| Portable, git-friendly, shareable state | --load-state + --dump-state |
| Reproducible CI baseline | Committed snapshot + --load-state |
| Fast ad-hoc experimentation | In-memory (no flags) |
| Historical fork baseline for regression tests | Fork + --dump-state, then --load-state in CI |
Snapshot workflow example for CI
Create a baseline snapshot locally
Start the node, deploy your contracts and seed data, then dump a snapshot:
Next steps
Forking from Testnet / Mainnet
Combine fork mode with snapshot export to create a portable baseline from real chain state.
Getting Started
Review node startup, faucet usage, and startup account configuration.