Operators and tooling
Developers12.5.9+

Operators and tooling

For people who run nodes for their apps and write tools around them: the SQLite block store and how to read or back it up, the services 12.5.9 turns on, upgrade notices, memory figures and Docker.

You run a node so that your wallet, explorer or bot has one it can trust. This page covers what changed in 12.5.9 for that node and for the scripts around it. Installation and settings are in Docker, Docker Compose, Configuration and Security.

The block store #

From 12.5.9 raw blocks and undo data are rows of one SQLite database, blocks/blocks.sqlite, instead of blk*.dat and rev*.dat files; block filters move into the block filter index database. The first start of 12.5.9 converts a data directory in place: a few minutes on mainnet, about 6.3 GB of free disk needed (the node refuses to start, and says how much is missing, when there is less). Progress shows on the startup page and in the blockstore field of the API (Node state and upgrades).

You want toDo
Go back to 12.5.8Start 12.5.9 once with -blockstore=flat: it writes the flat files back and removes blocks.sqlite. Then start 12.5.8, without the options it does not know
Keep the flat files-blockstore=flat from the start
Get a raw blockgetblock <hash> 0 over JSON-RPC, GET /api/v1/rpc/getblock?0=<hash>&1=0, or the Chronik GET /chronik/raw-tx/<txid> for a transaction
Back the blocks up while the node runsbackupblockstore (below)
Warning

Do not read or copy the node's files while it runs. The newest blocks are in blocks.sqlite-wal, and the file is being written: a cp, rsync or snapshot of it can miss blocks or be unreadable. The table layout of blocks.sqlite is not an interface and can change. Ask the node (JSON-RPC, REST, P2P), or read a backup copy.

backupblockstore #

Shell
lotus-cli backupblockstore /mnt/backup/blocks-2026-12-01.sqlite
JSON
{"destination":"/mnt/backup/blocks-2026-12-01.sqlite","bytes":98304,"pages":24,"seconds":0.005,"verified":true}
ArgumentMeaning
destinationNew file (absolute, or relative to the node's working directory). It must not exist; its directory must
verifyDefault true: run PRAGMA quick_check on the copy before it gets its final name

The copy is one consistent snapshot taken when the call starts, made with the SQLite online backup API while the node keeps accepting blocks. It is written to <destination>.part and renamed when complete; it needs as much free space as blocks.sqlite; one backup runs at a time; only with -blockstore=sqlite. Other ways: sqlite3 "file:<datadir>/blocks/blocks.sqlite?mode=ro" "VACUUM INTO '/mnt/backup/blocks.sqlite'" while the node runs, or a plain copy after a clean stop. A copy of blocks.sqlite goes with a block index of the same moment or older: to restore a whole node, back up the data directory with the node stopped, or restore blocks.sqlite and start with -reindex.

Services that 12.5.9 turns on, and their switches #

ServiceDefaultOff withPage
Chronik API at /chronik/ and /chronik/wson-chronik=0Chronik
Old explorer API /api/get..., /ext/...on-explorercompat=0Chronik
Address query for light clients (getaddrtxs)on-addrquery=0; -addrqueryrate=<n> scripts a second per peer (20)P2P integration
VOIX relaying and mailboxesoffit is off; -voix=1 turns it onVOIX
SQLite block storeon-blockstore=flatabove

These options are new: 12.5.8 and older refuse to start with them. Remove them from the configuration before going back.

The /api/v1 routes and fields that Lotus's own apps call are frozen by a test in this release: they keep their names and meaning.

Upgrade notices #

Each node announces a release to its peers (upgnotice, see P2P integration). By default it is its own version. An operator who wants its peers to learn of a newer release, with a deadline, sets:

Config
upgradenotice=12.5.9,1797886200

The version must be the node's own or newer, and the deadline a median time past (here Napoleon's); anything else stops the node at start. A node shows a notice only when at least 3 network groups of its outbound peers, and at least 51% of them, announce the same newer release (by peer after 5 minutes, when there are too few groups). The notice never downloads anything. When the option's deadline is exactly the activation time of the next upgrade, it also raises required_release in GET /api/v1/upgrades on that node (Node state and upgrades). After the deadline passes on the chain, its "required before" part disappears by itself.

Tools that watch a fleet: poll GET /api/v1/upgrades/notice (not cached) and required_release_met of GET /api/v1/upgrades.

Memory figures #

getmemoryinfo reports, besides the locked pool, the allocator (12.5.9):

JSON
{"locked":{"used":64368,"free":197776,"total":262144,"locked":262144,"chunks_used":2005,"chunks_free":3},
 "allocator":{"supported":false,"free":0,"system":0,"resident":125378560,"releases":0,"released":0}}
FieldMeaning
supportedglibc's malloc is the allocator in use. With another allocator (jemalloc), free and system are 0
free, systemBytes held free in the arenas, and bytes of the arenas
residentResident memory of the process
releases, releasedHow often free memory was given back to the system, and how much (-memreleasefree=<MiB>)

Docker #

The image is ghcr.io/lotusdevorg/lotusd:<version>. Docker covers docker run, ports, health checks and logs; Docker Compose a complete setup with every setting explained, including what 12.5.9 converts at its first start. For an app, publish only the REST port behind a reverse proxy, and keep JSON-RPC private (Security).

Source share/www/docs/operators-tooling.md in the lotusd repository
Checked against doc/blockstore-sqlite.md src/rpc/blockstore.cpp src/blockstore_backup.cpp src/blockstore_ui.cpp src/rpc/misc.cpp src/init.cpp src/upgradenotice.cpp doc/upgrade-notice.md doc/release-notes/release-notes-12.5.9.md