acton simulator
Reference manual for the acton simulator command
Synopsis
acton simulator [options] command
Description
Acton simulator is a fast, deterministic TON development environment for local execution, forked-state development, and faucet-based funding. It produces TON-compatible blocks and provides LiteAPI, TON Center v2/v3, Streaming API, and Emulate API surfaces used by many contract and dApp workflows.
It is Acton's custom simplified implementation, not a real TON network or validator cluster. It does not model validators, consensus, shard elections, or the full production node and indexer stack.
Subcommands
acton simulator start
Start Acton's simplified TON development environment.
Synopsis
acton simulator start [options]
Options
Simulator HTTP port.
Remote network to use for forked account resolution.
The fork also uses the network configuration from the resolved masterchain block. With an explicit historical block, it uses that block's Unix time; otherwise, the virtual clock starts from the current system Unix time.
Historical block sequence number to fork from.
The selected block provides the local network configuration and virtual-clock origin.
Project wallets to initialize and fund with 100 GRAM. Defaults to [localnet].accounts.
May be passed multiple times.
Path to a SQLite database for persistent node state. Defaults to
[localnet].db-path when configured.
Maximum /api requests per second to simulate provider rate limits.
Delay TON Center v2/v3 and Emulate API responses.
Target interval between automatic blocks, in milliseconds. Ignored when automatic mining is disabled.
Disable automatic block production. Mine blocks manually with
acton simulator mine or POST /acton_mine.
Produce blocks even when no messages are pending, including during manual mining. Disabled by default;
the project default is [localnet].mine-empty-blocks.
Directory for persistent JSON snapshots. Defaults to a .snapshots directory
next to the SQLite database, or .acton/simulator/<port>/snapshots
inside the project when no database is configured.
Start the LiteAPI server on the TCP port immediately after the simulator HTTP port. LiteAPI is disabled by default.
Set the LiteAPI TCP port explicitly. Requires --liteapi; otherwise LiteAPI
uses the simulator HTTP port plus one.
Require a token for all simulator HTTP API, control, emulate, and streaming endpoints. The server prints the token on startup.
acton simulator airdrop
Send GRAM from the local faucet to an address.
Synopsis
acton simulator airdrop [options] address
Options
Recipient address.
Amount of GRAM to request.
100
Simulator HTTP port.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator mine
Mine simulator blocks manually. Empty blocks are skipped unless
--mine-empty-blocks was enabled at startup or the mining mode was changed
through POST /acton_setMiningMode.
Synopsis
acton simulator mine [options] [n]
Options
Number of blocks to mine. Defaults to 1.
1
Simulator HTTP port.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator increase-time
Increase the simulator virtual clock.
Synopsis
acton simulator increase-time [options] seconds
Options
Seconds to add to the virtual simulator clock.
Simulator HTTP port.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator set-time
Set the simulator virtual clock.
Synopsis
acton simulator set-time [options] timestamp
Options
Unix timestamp in seconds. The timestamp cannot be lower than the latest mined block time.
Simulator HTTP port.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator set-next-block-timestamp
Set a one-shot timestamp for the next simulator block.
Synopsis
acton simulator set-next-block-timestamp [options] timestamp
Options
Unix timestamp in seconds for the next mined block. The timestamp is consumed by the next automatic or manually mined block and cannot be lower than the latest mined block time.
Simulator HTTP port.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator status
Inspect the current simulator status.
Synopsis
acton simulator status [options]
Options
Simulator HTTP port.
Print machine-readable JSON.
Simulator API token for a server started with --require-auth. If omitted,
Acton reads ACTON_LOCALNET_AUTH_TOKEN.
acton simulator snapshot
Save and restore persistent JSON snapshots of a simulator.
Synopsis
acton simulator snapshot [options] command
Subcommands
create [name]saves the current network statelistprints saved snapshots with IDs, names, block seqnos, and file sizesrestore <id>restores the saved network statedelete <id>deletes one saved snapshotexport <id> --out <path>downloads a saved snapshot;--forcereplaces an existing fileimport <path> [--name <name>]validates and saves a JSON snapshot under a new ID without restoring it
Snapshots survive node restarts. Creation and restoration run in the node's mutation queue without stopping its process. A snapshot includes accounts, block and transaction history, registered metadata, pending messages, and virtual time. Restoration also updates SQLite when persistence is enabled.
Relative file paths resolve from the Acton project root. These commands call the
running simulator control API. Pass --port or --auth-token when needed, and
--json for structured output. Use the returned ID for restore, delete, and export.
Configuration
You can store defaults in Acton.toml:
[localnet]
port = 5411
db-path = ".acton/localnet.sqlite"
fork-net = "testnet"
fork-block-number = 55000000
accounts = ["deployer", "user"]
rate-limit = 1
response-delay-ms = 300
block-time-ms = 500
no-mining = false
mine-empty-blocks = falseCLI flags override config values for the current invocation. In particular,
--db-path overrides [localnet].db-path. A relative path in Acton.toml
resolves from the project root, while a relative --db-path resolves from the
current working directory.
TON Center API Keys
When simulator forks from the built-in mainnet/testnet backends,
authenticated requests read TONCENTER_MAINNET_API_KEY or
TONCENTER_TESTNET_API_KEY.
When simulator forks from custom:<name>, Acton reads
<NORMALIZED_NAME>_API_KEY. Custom network names are uppercased and
non-alphanumeric characters are replaced with _, so custom:mock-remote
becomes MOCK_REMOTE_API_KEY.
Acton loads .env automatically, so the simplest setup during project work is
usually to keep these keys there and use shell environment variables only for
one-off overrides or CI.
Simulator API auth
acton simulator start --require-auth protects every simulator HTTP route under
/api/*, /acton_*, /api/emulate/*, and /api/streaming/*. Static UI files
remain public, but the bundled UI does not receive the token from the server.
When a protected API request returns 401, the bundled UI shows a token overlay;
paste the printed token there before using protected API views. The key button
in the sidebar footer reopens the same overlay.
When auth is enabled, the server prints a simulator API token. Pass it as either:
Authorization: Bearer <TOKEN>
X-API-Key: <TOKEN>Authorization: Bearer is the preferred form. X-API-Key is accepted for
TON Center-compatible clients. Browser WebSocket clients can pass token=<TOKEN>
only on /api/streaming/v2/ws.
For CLI subcommands that call simulator control routes, pass --auth-token or
set ACTON_LOCALNET_AUTH_TOKEN. If ACTON_LOCALNET_AUTH_TOKEN is set when
starting with --require-auth, simulator uses that value; otherwise it generates
and prints a fresh token.
Runtime Model
- fork mode allows local development against remote chain state
acton simulator startruns in the foreground until the process is stopped- Acton starts an HTTP server on
127.0.0.1:<port>for simulator API, control endpoints, and the bundled simulator UI - the server keeps running until the process is stopped, for example with
Ctrl+C - the simulator UI is available on the root path, for example
http://127.0.0.1:<port>/ - the node checks for pending messages every
--block-time-msmilliseconds, defaulting to 500 ms;--mine-empty-blocksalso creates blocks when no messages are queued --no-miningor[localnet].no-mining = truedisables automatic block production; useacton simulator mine [N]orPOST /acton_mineto create blocks manually- Simulator has a virtual clock for block and transaction time; use
acton simulator increase-time,acton simulator set-time, oracton simulator set-next-block-timestampto move it without waiting for real time - messages accepted through
send_boc,acton_sendInternalMessage, or the faucet are queued and included on a later automatic or manually mined block - a block can include multiple transactions; locally generated internal messages are processed in the same block when possible
- the bundled UI is a single-page explorer app, so routes like
/explorer,/tokens,/nfts, and per-address or per-transaction pages are served from the same frontend shell - the UI reads chain data from
/api/v2and/api/v3, and usesacton_*control endpoints for local address aliases, registered compiler ABIs, status and saved snapshots --require-authprotects read and write API routes, including read-only streaming endpoints- when
--portand[localnet].portare both absent, the current runtime fallback is5411 --rate-limitapplies to/api/*endpoints, not admin endpoints--response-delay-msapplies only to/api/v2,/api/v3, and/api/emulate/v1endpoints; streaming, control, and UI routes are not delayedPOST /acton_setNetworkConditionscan change the response delay while the server is running, andGET /acton_nodeInforeports the current value
Control Endpoints
The simulator server exposes acton_* control routes for local development
tooling:
GET /acton_nodeInforeturns uptime, latest block seqno, and the active state sourcePOST /acton_createSnapshotwith{"name":"before-upgrade"}saves a JSON snapshotGET /acton_listSnapshotslists saved snapshotsPOST /acton_restoreSnapshotwith{"id":"<SNAPSHOT_ID>"}restores the saved network statePOST /acton_deleteSnapshotwith{"id":"<SNAPSHOT_ID>"}deletes one saved fileGET /acton_exportSnapshot?id=<SNAPSHOT_ID>downloads the saved JSON filePOST /acton_importSnapshot?name=bugvalidates JSON bytes and saves them under a new ID without changing the running statePOST /acton_setConfigwith{"config":"<BASE64_BOC>"}validates and replaces the full blockchain config dictionary, then commits it in a config-only blockPOST /acton_setConfigParamwith{"index":2,"boc":"<BASE64_BOC>","expectedHash":"<CURRENT_CELL_HASH>"}replaces one config parameter and commits a config-only block, even when automatic mining is disabled.expectedHashis the current parameter's lowercase hexadecimal representation hash; usenullto add a missing parameter. A stale hash returns HTTP 409. Parameter 0 cannot be changedPOST /acton_setShardAccountwith{"address":"<ADDR>","shard_account":"<BASE64_BOC>"}replaces the selected account state with a base64-encodedShardAccountBOCPOST /acton_sendInternalMessagewith{"boc":"<BASE64_BOC>"}sends a base64-encoded internal message BOC through the local internal queuePOST /acton_minewith optional{"blocks":N}mines queued and/or empty blocks manually;Ndefaults to1, and empty blocks follow the mining modePOST /acton_setMiningModewith{"skip_empty_blocks":false}enables empty blocks for automatic and manual mining; usetrueto skip themPOST /acton_increaseTimewith{"seconds":3600}adds seconds to the virtual simulator clockPOST /acton_setTimewith{"timestamp":1710000000}sets the current virtual Unix timePOST /acton_setNextBlockTimestampwith{"timestamp":1710000600}sets a one-shot timestamp for the next mined blockPOST /acton_setNetworkConditionswith{"response_delay_ms":300}updates simulated network latency; use0to disable response delay
Acton Studio exposes the same parameter editor under Config in the Network section for simulator environments. Changes preserve all other parameters and historical configs.
TON Center-compatible message endpoints such as /api/v2/sendBoc and
/api/v3/message accept external-in messages only. Use
/acton_sendInternalMessage when local tooling needs to inject a raw internal
message.
Control endpoints are unauthenticated by default for local development. Use
--require-auth when another local process, browser page, or test harness should
not be able to read or mutate the running simulator without the token. Do not
expose the simulator server publicly.
Persistence
--db-pathor[localnet].db-pathenables persistent SQLite-backed node state across runssnapshot createsaves a persistent restore point as JSON--snapshots-dirsets the directory used for saved snapshots- blockchain configs changed through
/acton_setConfigor/acton_setConfigParamare stored in block history and survive restarts when--db-pathis configured - without a database, live state is ephemeral; saved snapshots remain available in the snapshot directory
Exit Status
0: The selected simulator subcommand completed successfully. Foracton simulator status, this also includes the selected port not running; use--jsonand inspectrunningfor automation.1: Startup failed because port binding, database setup, remote fork initialization, faucet handling, or a status/control query failed.
Display Options
Control when to use colored output.
auto, always, never
auto
Project Options
Path to the Acton.toml file to use for this invocation.
Use this when running the command outside the project directory or when the manifest lives at a non-default location.
--project-root
Path to the project root to use for configuration discovery and relative defaults.
--manifest-path
Examples
-
Start with defaults:
acton simulator start -
Fork from testnet at a historical block:
acton simulator start --fork-net testnet --fork-block-number 55000000 -
Use a dedicated snapshot directory:
acton simulator start --snapshots-dir snapshots -
Airdrop local funds:
acton simulator airdrop UQA_ftKIJsHEAE_UgtFOUK15hPzycZooFuUr8duyY9T3kwwM --amount 25 -
Start a local integration node with pre-funded accounts:
acton simulator start --accounts deployer,user --db-path build/localnet.db -
Inspect a running simulator:
acton simulator status --json -
Save and share a snapshot:
acton simulator snapshot create before-upgrade acton simulator snapshot list --json acton simulator snapshot restore <SNAPSHOT_ID> acton simulator snapshot export <SNAPSHOT_ID> --out snapshots/before-upgrade.json acton simulator snapshot import snapshots/before-upgrade.json
See Also
acton help wallet- Simulator guide
Last updated on