Qanum Configuration Reference

qanum.conf keys, qanumd flags, networks and verifier selection.

This page reproduces docs/CONFIGURATION.md from qanum-core v0.9.0 (release tag). Links to files that are not published on this site are shown as plain text until the source repository is public.

Contents

Every configuration key (qanum.conf), every qanumd flag, networks, ports, and validation options.

For practical usage see USER-GUIDE.md; for RPC methods see RPC.md.


1. Where configuration lives

Both binaries load qanum.conf automatically. A commented template ships in the repo root (qanum.conf):

cp qanum.conf ~/.qanum/qanum.conf

Which file is read (qanumd and qanum-cli follow the same rules, like Bitcoin Core):

  1. -conf=<file> (also --conf=<file> / --conf <file>): that file. A relative path is taken from the command-line --datadir, or from ~/.qanum without it. If it cannot be opened, the binary stops with an error instead of running on defaults.
  2. Without -conf, with --datadir=<dir> on the command line: <dir>/qanum.conf. If that file does not exist, the legacy ~/.qanum/qanum.conf is read, so existing installs keep working; the node logs config file: <dir>/qanum.conf not found; reading the legacy ….
  3. Neither: ~/.qanum/qanum.conf.

The startup log names the file read (config file: <path>) and echoes its keys (rpcpassword masked). A datadir= key inside the conf still selects the datadir when --datadir is not given.

Precedence (highest wins): command-line flags > qanum.conf > defaults.

Both -key=value (single-dash, the ecosystem default) and --key=value / --key value forms are accepted for most options.

Compatibility: config keys and flag spellings follow the de-facto conventions of the Bitcoin node ecosystem, so familiar configuration files and operator habits transfer directly. Qanum-specific keys are documented inline.

2. Networks and ports

Network -chain= RPC default (loopback) P2P
Mainnet main / mainnet 127.0.0.1:8338 8445
Testnet test / testnet 127.0.0.1:18338 18445
Regtest regtest 127.0.0.1:28338 28445

Every P2P connection, on every network, is encrypted and authenticated: Noise hybridXX (X25519 + ML-KEM-1024) with an ML-DSA-87 node identity, pinned trust-on-first-use (TOFU, §6). There is one P2P port; the plain-text port of earlier versions is gone, and -plaintextport (or plaintextport= in qanum.conf) stops the node with an explanation. Every network requires the OQS verifier (§5).

Selecting the network — unified across both binaries

qanumd and qanum-cli accept the same network flags (single- and double-dash spellings), with a single shared parser (common::parse::parse_network):

Allowed values (all equivalent pairs): main/mainnet, test/testnet, regtest.

3. qanum.conf keys

Network

Key Values Default Description
chain main/mainnet, test/testnet, regtest main Network
network same — Alias of chain (same accepted values)

Both keys use the same canonical parser as the binaries, so chain=test and network=test behave identically.

P2P (net_v2)

Key Values Default Description
netv2 0/1 1 Master switch for the whole net_v2 P2P stack (connman, DNS seeds, header sync, IBD, QUSN snapshot bootstrap). netv2=0 opts out (RPC-only node); any net-v2-style setting (port, addnode, …) re-enables it
listen 0/1 1 Accept inbound P2P connections
port u16 per network P2P port (encrypted; the only P2P port)
plaintextport — — Removed. The node refuses to start while it is set; delete it
bind ip:port or ip 0.0.0.0 P2P bind address (repeatable)
onlynet ipv4/ipv6 ipv4 Restrict P2P to a network family (address-manager intake, outbound candidates and relay; repeatable)
maxconnections int 64 Cap on P2P connections. Inbound cannot occupy the last min(8, n/2) slots (reserved for outbound)
addnode host[:port] — Extra peers (repeatable). IP or hostname; the port defaults to the network P2P port. A hostname is re-resolved every 60 s, so a dynamic-DNS name follows a changing IP; an entry that cannot be used is logged with a WARNING
connect ip:port — Connect-only mode (repeatable): connect to these peers only — DNS seeds, the address manager and addnode are not used. IP:port only (a hostname is ignored with a WARNING). A snapshotibd bootstrap is the one exception: qanumd still asks the DNS seeds for snapshot candidates and corroborators
seednode host\|ip[:port] — Static bootstrap seed (repeatable). Accepts hostnames or IPs; the P2P port of the network is used if omitted
dnsseed host per network DNS seed (repeatable; dnsseed=0 disables all)
dnsseedrefresh int (seconds) 30 Period of the DNS seed resolution loop. 0 = resolve once then stop (one-shot)

Note: nodnsseed is a command-line flag only (qanumd -nodnsseed); in the config file use dnsseed=0.

Note: net_v2 is on by default (Bitcoin Core semantics: starting the node implies the network starts). Opt out with netv2=0 (this file) or -nonetv2 (command line); any explicit net-v2-style setting (port, addnode, connect, seednode, …) re-enables the stack. A node that is RPC-only logs WARNING net_v2=disabled ... at startup. Check live connectivity with the getconnectioncount RPC.

DNS-seed results are untrusted input for TOFU initial anchoring: the first outbound handshake to a seeded address pins whoever answers at that ip:port. For identity-critical peers, pin them through explicit connect/addnode entries (or use several independent seeds) rather than a single DNS seed.

DNS seeds are re-resolved periodically (with exponential backoff up to 1h when all seeds fail to resolve), so a transient DNS outage or a seed that is not yet registered does not leave a fresh node without bootstrap.

Default DNS seeds: seed.qanum.org, seed2.qanum.org, seed3.qanum.org (mainnet); tseed.qanum.org, tseed2.qanum.org, tseed3.qanum.org (testnet). Regtest has no seeds.

RPC

Key Values Default Description
rpc 0/1 1 Enable the RPC server
rpc_bind ip:port per network RPC listen address. Also accepted as rpcbind (the single-word spelling used across the ecosystem), so a config file copied from another node does not fail over an underscore.
rpcuser string — HTTP Basic user
rpcpassword string — HTTP Basic password. Prefer this file (chmod 600) or the QANUM_RPCPASSWORD environment variable over -rpcpassword on the command line — argv is visible in ps, /proc/<pid>/cmdline and shell history. qanum-cli also accepts the secrets via stdin: -stdinrpcpass, -stdinwalletpassphrase, -stdin (see USER-GUIDE).
rpccookiefile path datadir/.cookie Cookie file path
rpcauth_required 0/1 1 Require authentication (unless 0)
rpcthreads number 16 Number of worker threads serving RPC calls
rpcworkqueue number 64 Depth of the RPC work queue; when full, excess requests are rejected with HTTP 503 “Work queue depth exceeded”

If no user/password is set, the daemon generates a cookie file in the datadir (datadir/.cookie) that qanum-cli reads automatically.

Consensus & synchronization

Key Values Default Description
sync 0/1 1 Enable the P2P sync loop
snapshotibd 0/1 0 AIP-0001. On a fresh datadir, try to bootstrap the chainstate by downloading a trustless QUSN v2 snapshot before starting normal IBD, then forward-sync only the blocks after the snapshot height. Explicit -connect/-addnode candidates are tried first; peers without the snapshot bit are asked for their address table (GetAddr) and bit-holding entries join the list; when the list empties it refills from the addrman (peers recorded with NODE_UTXO_SNAPSHOTS) and the network’s DNS seeds (-dnsseed overrides). The artifact is verified locally through the exact same trustless path as a local file (embedded header chain re-linked + recomputed utxo_root); any failure falls back to normal genesis IBD. Before install the snapshot tip must carry at least the network’s minimum chain work (minimum_chain_work) and be confirmed by snapshotcorroborators independent peers; once installed, the node cannot reorganize below the snapshot height (if the network follows a chain that forks below it, a WARN line says so and asks to wipe the datadir and resync). The download is resumable and each 2 MiB chunk is checked against a Merkle root on arrival; multi-chunk artifacts are fetched in parallel from up to 4 servers offering the same artifact. Progress persists in .qusn-download/, so an interrupted bootstrap continues from the last verified chunks (gaps included). On a datadir that already has a chain beyond genesis nothing is downloaded, and a leftover partial download is deleted. The one exception is a kept snapshot: a verified snapshot that could not be confirmed is kept and retried at each start while the local chain is below it. Once confirmed, it replaces the local chain if that chain is a strict prefix of the snapshot chain; the blocks below the snapshot are then removed. A snapshot whose chain has a block marked invalid on this node, or that forks from a known header chain with more work, is refused. With snapshotibd=0 any .qusn-download/ is deleted at start. A successful bootstrap records its provenance in datadir/snapshot_bootstrap.json, reported by the getsnapshotinfo RPC. Every attempt’s outcome (installed, no peers, unconfirmed — a verified snapshot without enough independent confirmations, also logged as a WARN — or failed with the reason) is kept in datadir/snapshot_bootstrap_attempt.json and reported as getsnapshotinfo.last_bootstrap_attempt. CLI: -snapshot-ibd=<0\|1>. See USER-GUIDE → “Snapshot sync (QUSN v2)”.
snapshotcorroborators int ≥ 1 1 Independent peers that must confirm the snapshot tip before a snapshotibd bootstrap installs it: each answers GetHeaders from the tip’s parent with the tip itself, is not a server of the snapshot, and sits in a network group (IPv4 /16, IPv6 /32) distinct from the servers and from the other corroborators. A candidate that is behind or cannot be reached is asked again (passes 10, 20, 40, then 60 s apart) within the 15-minute bootstrap budget; too few confirmations by then → normal IBD; a contradicting peer → the artifact is discarded. The snapshot tip must also reach the minimum chain work (-minimumchainwork). 0 is rejected. CLI: -snapshotcorroborators=<n>.
backfillbodies 0/1 0 AIP-0001 (iteration 11). Background IBD: on a snapshot-bootstrapped datadir, download the block bodies below the snapshot height in the background. Bodies are fetched from connected peers over the normal protocol (GetData), each one is verified against its PoW-committed header before being stored, and progress is resumable via datadir/.body-backfill/resume.json. The chainstate is never touched; the worker retries every minute until the range 1..=H is complete. Bodies below H cannot be re-validated against the historical UTXO set (which this node does not hold): the guarantee is that the stored bodies are exactly those committed by the header chain verified at snapshot install. CLI: -backfill-bodies=<0\|1>. Requires net_v2. Reported by the getsnapshotinfo RPC (body_backfill). See USER-GUIDE → “Snapshot sync (QUSN v2)”.
strict_pow 0/1 0 Require proof-of-work validation during sync
strict_full 0/1 0 Require full validation (PoW + signatures)
verifier oqs oqs Signature verifier; verification is mandatory (accept-all/reject-all only in the regtest simulation build)
max_sync_rounds int 16 Max sync rounds per cycle
sync_interval_ms int 5000 Sync interval (ms)
min_fee_rate int (jomas/byte) 1 Minimum relay fee rate. Persisted in mempool.bin (QNMP v3) and applied when the mempool is rebuilt after a reorg. 0 is honoured (including getmempoolinfo)
maxtxfee amount 0.10 QAN Core -maxtxfee. Maximum total fee for a transaction built by the wallet/RPC/CLI (sendtoaddress, sendfrom, sendmany, build-payment*, build-p2pqk); 0 = no limit. Amounts use the CLI convention (0.10 = QAN, 10j = jomas; bare integers are ambiguous except 0). A fee above the cap is rejected with a clear error before the transaction is built. Client policy only — sendrawtransaction/submit_tx are unaffected.
addresstype mldsa44 | mldsa87 by height Bitcoin Core -addresstype. Key type of getnewaddress without a type and of keypoolrefill: ML-DSA-44 (NIST level 2) or ML-DSA-87 (level 5). Unset: ML-DSA-87 once the next block may use the level-5 suites and ML-DSA-44 before (plain regtest: ML-DSA-87 from genesis). Before the level-5 activation (suites5), getnewaddress refuses mldsa87 with -4 and keypoolrefill creates ML-DSA-44. From the level-1/2 retirement (retire12), getnewaddress refuses mldsa44 with -4 (also without a type when it comes from this key) and keypoolrefill creates ML-DSA-87. The SLH-DSA types (slhdsa, slhdsa256s) have no payment address and, like an unknown type, are refused at startup
changetype mldsa44 | mldsa87 unset Bitcoin Core -changetype. Key type of fresh change. Unset: the type of a level-5 recipient (Core’s rule), else addresstype. Before the level-5 activation change goes to ML-DSA-44 and the log says so once (change is internal: an error would leave the wallet unable to send). From the level-1/2 retirement a retired type, or change that would follow a retired source key, goes to a fresh ML-DSA-87 key, also logged once. Same validation as addresstype
maxuploadtarget float (MB, decimals ok) 0 (unlimited) Core -maxuploadtarget. Per-24h-window upload limit (e.g. 0.1 = 100 KB); when reached the node stops serving block data (the GetData-serving path) until the window rotates; transaction relay is unaffected. Served bytes count against the window but not against getpeerinfo.bytes_sent.
maxmempool int (MB) persisted (default 32) Core -maxmempool. Override of the live mempool serialized-byte cap; persisted to the mempool snapshot so getmempoolinfo reflects it. Profiles in STORAGE.md.
maxmempoolentries int persisted (default 40 000) Override of the live mempool entry cap; scaled with the byte cap so tiny transactions cannot exhaust the pool first. Persisted to the mempool snapshot like maxmempool.
mempoolexpiry int (secs) 1209600 (14 d) Core -mempoolexpiry. Override of the mempool entry expiry.
maxorphantx int 100 Core -maxorphantx. Override of the orphan relay cache size.
alertnotify string (shell command) unset Core -alertnotify. Command run when a node warning is raised: the same warnings as the RPC warnings list (RPC.md), an invalid chain with more than six blocks of work over the tip (Core LARGE_WORK_INVALID_CHAIN) or a reorg of more than 100 blocks. Every %s is replaced by the message, sanitized (letters, digits and .,;-_/:?@() only, as Core) and in single quotes. It runs once per warning, in the background, through sh -c (cmd /C on Windows); a non-zero exit is logged. Empty = off. Not available in qanum-embed. CLI: -alertnotify=<cmd>.
dustrelayfee — 44 jomas Core -dustrelayfee. Mempool relay floor for a single output (DUST_RELAY_VALUE = 1 joma/byte × the 44-byte serialized P2PQK output). A transaction with an output below this is rejected on mempool entry. Relay policy, not consensus — blocks containing such outputs stay valid.
minimum_chain_work hex (BigUint) compiled per network (0 on every network until the chain has history; a release then sets a real testnet value, CHECKPOINT-POLICY.md §5) CVE-2019-25220 (chain-width expansion). Minimum accumulated chain work a header chain must reach before its headers are stored; a chain below it is never stored directly (see the header pre-synchronization below). The guard is active by default through a dynamic anti-DoS threshold: effective minimum = max(best_header_tip_work − 1152 blocks of work at tip difficulty, minimum_chain_work) — 1152 blocks = 1 day at the 75 s target spacing. As history accumulates the threshold rises automatically and low-work side chains can no longer enter the header DAG without any configuration. The value is the static floor of that max (a BigUint hex string, e.g. 10 = 16). A configured value replaces the compiled one; 0 removes the floor. Header pre-synchronization: a low-work chain is not dropped. A full headers batch (2000) whose claimed work is below the threshold starts a per-peer pre-sync that follows the chain in bounded memory and stores it only after its work crosses the threshold and a second download matches the first; a shorter batch is ignored and its peer is quarantined from header requests for 60 s, never disconnected or punished. This is what makes a non-zero per-network value safe: a fresh node still bootstraps from genesis. Every network compiles 0 today. A node whose active tip is below the value stays in IBD and answers getheaders with an empty message. Raise it only to a value the honest chain has already passed: a value above the network’s real work makes the node wait in IBD. CLI: -minimumchainwork=<hex>.
assumevalid hex block hash, or 0 compiled per network (none on every network today) Signature-validity assumption. Blocks that are ancestors of this block skip post-quantum signature verification during import, and only if ALL of these conditions hold: the block is in the header tree and on the best header chain, the best header’s chain work is ≥ minimum_chain_work, and the block being connected is buried under more than two weeks of equivalent work at the best header’s difficulty. PoW, structure, contextual rules and the full UTXO set are always verified. The hash never selects the chain: if it is absent or off the best chain, every signature is verified (fail-safe). 0 disables the skip entirely. Decided per block at connect time, so each block of a multi-block reorg is judged separately. CLI: -assumevalid=<hex\|0>.
testactivationheight suites5@<h>, retire12@<h> (repeatable) unset: regtest 0 Bitcoin Core -testactivationheight. Regtest only: height from which the NIST level-5 suites (ML-DSA-87 0x0104, SLH-DSA-SHAKE-256s 0x0203) may be used in new outputs; below it such a block is invalid and the mempool refuses such a transaction (SuiteNotActive). retire12@<h> is the height from which the level-1/2 suites (ML-DSA-44 0x0101, SLH-DSA-SHAKE-128s 0x0201) may no longer be used in new outputs (SuiteRetired; spending old outputs is always allowed); regtest default never, and it may not be below suites5. On testnet both heights are compiled at 0 (level 5 from the genesis) and cannot be changed. Refused at startup, before the datadir is touched, on any other chain, for an unknown deployment, a missing @ or a height that is not a non-negative integer
regtestpow 0 / 1 0 Regtest only: keep the real proof of work (the header hash-vs-target check and the miner’s nonce search), as testnet does. By default regtest skips both so generatetoaddress is instant. With 1, the regtest genesis (2023, minimum difficulty) keeps the difficulty at the limit, about 10^6 hashes per block, so block times are random and never depend on the calendar; used by the multi-miner E2E test. It only makes regtest stricter. Refused at startup, before the datadir is touched, on any other chain. CLI: -regtestpow=<0\|1>

The live mempool is also capped at 40 000 entries, overridable with maxmempoolentries. Its serialized-byte cap defaults to 32 000 000 and can be overridden with maxmempool; mempoolexpiry overrides the 14-day entry expiry and maxorphantx the orphan relay cache size. getmempoolinfo.maxmempool reports the live byte cap. After eviction, a new transaction that still does not fit is rejected (MempoolFull).

Mining (CPU, demo/testing)

Key Values Default Description
gen 0/1 0 Mine with CPU in background
reward_key_id hex — ML-DSA-44 key id that receives the block reward (a key id alone does not say its suite). Refused at startup where ML-DSA-44 is retired from the genesis (testnet; regtest with testactivationheight=retire12@0): use reward_address with an ML-DSA-87 address
reward_address address — Address that receives the block reward (use one of the two)
mining_interval_ms int 1000 Template refresh interval: an unfound template is refreshed once it has elapsed and the clock moved to a new second. The refresh moves its timestamp forward (bits stay: they come from the parent); the transactions are re-selected (a full rebuild) only if the tip changed or the mempool changed at least 5 s after the template was built (Bitcoin Core’s getblocktemplate policy). Also the pause after a mined block and while idle; there is no pause after an unfound template
mining_workers int ≥ 1 1 Nonce-scan threads of the built-in miner (--mining-workers). Capped at the CPU threads (available_parallelism); the effective value is logged and reported by getmininginfo.workers. 0 or a non-integer is a startup error
max_txs int 1000 Max txs per mined block
max_nonce int no cap (18446744073709551615) Upper bound of the nonces scanned per template. By default the scan only ends on a hit, a tip change, a template refresh or a stop; with an explicit cap an exhausted template is refreshed at once, under the same policy as mining_interval_ms (an identical one waits for the next second)

reward_address must be a P2PQK address of the same network: ML-DSA-87 (getnewaddress), or ML-DSA-44 only where the chain still allows it (never on testnet). Both keys also set the reward of the offline qanumd mine-block / mine-blocks, like the --reward-address / --reward-key-id options. The reward is subject to coinbase maturity (1152 blocks).

Indexes (explorer RPC)

Key Values Default Description
txindex 0/1 0 Index confirmed txs by txid (getrawtransaction for mined txs). Incompatible with pruning.
addressindex 0/1 0 Index addresses (getaddressbalance/getaddresstxids/getaddressutxos). Implies txindex. Incompatible with pruning.
blockfilterindex 0/1 0 Build and maintain the persistent BIP157/158 index. Enables O(1) getblockfilter and, when the index is up to date, advertises NODE_COMPACT_FILTERS and serves getcfilters, getcfheaders, and getcfcheckpt over net_v2.
blockstore_cache 0/1 1 In-memory block-store index. Default on: O(1)/O(log n) lookups. 0 falls back to a directory scan for list_stored_blocks / find_* / RPC. Independent of blockstore_index.
blockstore_index 0/1 1 Persistent block_index.bin + journal. Default on: a clean restart does 0 blocks/ listings. 0 keeps the RAM-only cache (one listing per start). The file is a derived cache; blocks/ is the source of truth.
checkblockindex 0/1 0 Force one blocks/ listing at startup and compare hash sets with the persistent index (standard startup integrity check).
chainstate_flush int 32 D-0. Write chainstate.bin every N simple extensions. 0/1 = every block (legacy). Reorg, prune, stop and shutdown always flush. A crash leaves the snapshot at most N tips behind; the next start rolls them forward from the UTXO journal (not genesis replay), and any stored block the journal does not cover is reconnected with full validation (ActivateBestChain). On a pruned node N must be strictly less than prune_depth. Tests and one-shot CLI never install the live map.

The index is rebuilt automatically from the block store on first activation.

Pruning

Key Values Default Description
prune 0/1 0 Enable pruning of old blocks (whole-block prune: full blocks are replaced by base-only .qnlp files)
prune_depth int — How many recent blocks to keep (default 2000, minimum 288)

Pruning is incompatible with txindex/addressindex.

Pruning notes:

Logging

Key Values Default Description
debug category, 1/all, 0/none none Debug logging for a category (repeatable; every occurrence adds). 1/all enables every category; 0/none anywhere disables all of them. An unknown category stops startup with fatal: and the list of valid ones. CLI: -debug=<category>
debugexclude category — Removes a category from what debug enabled (repeatable; takes priority over debug). CLI: -debugexclude=<category>

Categories: addrman, addressindex, authprune, block_store, blockindex, chain, chain.actor, chain.bench, chain.fork, chain.journal (reserved; no messages), filterindex, init, mempool, mining, net, net.chain, net.connman, net.discovery, net.dnsseed, net.dos, net.feeler, net.keepalive, net.mempool, net.outbound, net.peer, net.relay, net.sync, net.tofu, prune, rpc, rpc.auth, txindex (src/qlog.rs, DEBUG_CATEGORIES). Non-debug lines (information, warnings, errors) are written whatever debug says. Every line, debug or not, is rate-limited per category: at most 100 lines per second; the extra lines are dropped and counted in a [qlog.ratelimit] suppressed N messages in category X line that appears when that category logs again. A log tail is therefore not a reliable progress meter: use RPC (getblockcount, getblockchaininfo).

4. qanumd command-line flags

All keys above are also flags. Additional run-only flags:

Flag Meaning
--no-rpc Disable the internal RPC server
--no-sync Disable the sync loop
--mine Alias of -gen=1
--datadir <path> Override datadir (default ~/.qanum/<network>)
-conf=<file> Config file (default <datadir>/qanum.conf if present, else ~/.qanum/qanum.conf; see §1)
--network <net> / -chain=<net> Select network
-minimumchainwork=<hex> Minimum accumulated chain work a header chain must reach before it is stored (see §3 Consensus & synchronization; default compiled per network)
-testactivationheight=suites5@<h> Regtest only: move the activation height of the level-5 signature suites (default 0; see §3 Consensus & synchronization)
-testactivationheight=retire12@<h> Regtest only: height from which the level-1/2 suites may no longer be used in new outputs (default never, not below suites5; see §3 testactivationheight)
-regtestpow=<0\|1> Regtest only: keep the real proof of work as on testnet (default 0; see §3 regtestpow)
-addresstype=<type> / -changetype=<type> Wallet key types, mldsa44 or mldsa87 (default by height; see §3 addresstype, changetype)

One-shot commands (run and exit): init, chainstate-info, mempool-state, list-mempool, list-blocks, show-block <h>, reset, reindex, mine-block, mine-blocks <n>, utxo-snapshot-export <path>, utxo-snapshot-verify <path>, utxo-snapshot-install <path> [--force]. start (or no command) runs the daemon.

The one-shot commands read and write the datadir directly, so they take the datadir lock (<datadir>/.lock, the same one the daemon holds): with qanumd running on that datadir they refuse to run. Stop the daemon first, or query the running node over RPC with qanum-cli. To submit a transaction or a block, use the RPCs sendrawtransaction and submitblock.

The utxo-snapshot-* commands implement QUSN (trustless UTXO snapshots): export writes a self-contained v2 artifact (manifest + the complete header chain 0..=H + the UTXO set), verify re-links the embedded header chain and recomputes the utxo_root commitment, and install installs a verified v2 artifact as the sync base of a fresh datadir. Network distribution of the same artifact is AIP-0001 (-snapshot-ibd). See USER-GUIDE → “Snapshot sync (QUSN v2)”.

reindex rebuilds the chainstate from the stored blocks (integrity check

  • replay) but does not re-run consensus validation, and its cost grows quadratically with chain length. Full historical re-validation = fresh sync from genesis. See USER-GUIDE → “Offline / maintenance”.

5. Verifier and the OQS requirement

Mandatory verification: crypto-oqs is a default feature and the node does not build without it. At startup, before touching the datadir, the node (and qanumd reindex, and the embedded node) runs a known-answer self-test of every signature suite and of the ML-KEM-1024 key exchange of the P2P transport, and refuses to start if the backend fails it. verifier=accept-all / reject-all are refused with “not available” on the command line, in qanum.conf and in the RPC verifier parameter. They exist only in the regtest simulation build (--features sim-verifiers, version tagged -sim), which accepts them on regtest only.

6. Datadirs

Default datadirs: ~/.qanum/mainnet, ~/.qanum/testnet, ~/.qanum/regtest (or a single --datadir you choose). Contents:

File Purpose
chainstate.bin Serialized chainstate (UTXO set, headers, tip)
mempool.bin Persisted mempool
blocks/*.qnlk Stored blocks (one file per block)
network.txt Network this datadir belongs to
addrman.json Address manager (peers discovered)
p2p_identity.json P2P node identity (ML-DSA-87 key pair; after rotatep2pidentity also the signed succession); owner-only. An invalid file stops the node and is never rewritten
peer_ids.json TOFU pins (ip:port → peer_id, last_seen); owner-only (0600). A corrupt file stops the node (a copy is saved as peer_ids.json.corrupt-<ts>)
peer_certs.json, p2p_tls_key.pem, p2p_tls_cert.pem Left by the TLS transport of earlier versions: no longer read and never deleted (the node notes them at startup). Safe to remove
txindex.dat Tx index (when -txindex)
addressindex.dat Address index (when -addressindex)
filterindex/*.qfh + filterindex_state.json Compact block filter index (when -blockfilterindex)
compactfilters_enabled Runtime marker: advertise BIP157 only while the configured index is current
.cookie RPC auth cookie

qanum-cli datadir-info reports the paths and which of these files exist.