Persistence and Snapshots
Persist local node state with SQLite or export/import state as JSON snapshots
The local node supports two state workflows:
- Persistent SQLite database (
--db-path) - Portable JSON snapshots (
--load-state,--dump-state)
JSON snapshots are versioned exports of local node state. The current on-disk
format is snapshot version 1.
Persistent SQLite State
Use a database file when you want state continuity across runs:
acton localnet start --db-path .acton/localnet.dbThis is useful for long-running local environments.
JSON Snapshots
Load state before startup:
acton localnet start --load-state snapshots/localnet.jsonDump state on graceful shutdown:
acton localnet start --dump-state snapshots/localnet.jsonYou can combine both to evolve a portable local chain state file between sessions:
acton localnet start \
--load-state snapshots/localnet.json \
--dump-state snapshots/localnet.json--load-state and --db-path cannot be used together in one run for now.
What a JSON Snapshot Contains
A JSON snapshot stores enough local node state to resume the same local chain
view later. Version 1 includes:
- global chain state such as head seqno, logical time, queue policy, and config hash
- latest account state cache
- block history and account deltas by seqno
- transaction and message history indexes
- address aliases from
/admin/address-name - cached token and NFT metadata
- registered compiler ABIs from
/admin/compiler-abis - CAS entries for serialized cells and message/code payloads
- pending internal/external message pools
This is broader than just account balances or contract storage. A restored snapshot can also bring back explorer-oriented metadata and local admin state.
Compatibility Notes
- snapshots are currently written as versioned JSON files; the current format is
version = 1 - loading a snapshot with an unsupported version fails immediately
- snapshots may stop being compatible if the snapshot schema changes in a future release
- JSON snapshots and SQLite persistence are separate workflows;
--db-pathand--load-statecannot be combined in one run - when you use
--dump-state, the snapshot is written on graceful shutdown
Choosing a Strategy
| Use case | Recommended mode |
|---|---|
| Stable long-lived local environment | --db-path |
| Portable, shareable, git-friendly local state | --load-state + --dump-state |
| Fast ad-hoc experimentation | in-memory (no flags) |
Last updated on