Qanum Configuration Reference
Qanum configuration reference: where configuration lives, networks and ports, every qanum.conf key and qanumd flag, the verifier and datadirs.
This page reproduces docs/CONFIGURATION.md from qanum-core v0.11.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):
-conf=<file>(also--conf=<file>/--conf <file>): that file. A relative path is taken from the command-line--datadir, or from~/.qanumwithout it. If it cannot be opened, the binary stops with an error instead of running on defaults.- Without
-conf, with--datadir=<dir>on the command line:<dir>/qanum.conf. If that file does not exist, the legacy~/.qanum/qanum.confis read, so existing installs keep working; the node logsconfig file: <dir>/qanum.conf not found; reading the legacy .... - 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 dual 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):
-chain=<net>/--chain=<net>/--network=<net>(with=or as a separate argument)- Boolean shorthands:
-testnet,-regtest,-mainnet(and--testnet…)
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.
Legacy sync parameters: max_peers (default 16) and max_msgs (default
64), also accepted as --max-peers and --max-msgs, are informational
compatibility settings. They are logged when net_v2 is disabled and do not
limit the current net_v2 stack. Use maxconnections for the connection cap;
max_msgs is not a message-rate or frame-size limit.
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 |
Legacy net-v1 key; no effect with net-v2 enabled |
snapshotibd |
0/1 |
0 |
P2P snapshot bootstrap; see details below. |
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. 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: -backfillbodies=<0\|1> (also -backfill-bodies). Requires net_v2. Reported by the getsnapshotinfo RPC (body_backfill). See USER-GUIDE -> “Snapshot sync (QUSN v2)”. |
strict_pow |
0/1 |
0 |
Accepted for compatibility; no effect. The node always validates proof of work |
strict_full |
0/1 |
0 |
Accepted for compatibility; no effect. The node always validates proof of work and signatures (signatures are skipped only for blocks covered by assumevalid) |
verifier |
dual |
dual |
Signature verifier (oqs, its former name, is still accepted); 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) | testnet: genesis work; others: 0 |
See below |
assumevalid |
hex hash, or 0 |
none | See below |
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> |
Snapshot bootstrap (snapshotibd). On a fresh datadir, the opt-in P2P
path tries a QUSN v2 artifact before normal IBD, then forward-syncs after its
height. Explicit connect and addnode candidates come first; discovery can
also use peer address tables, the address manager and DNS seeds. It downloads
Merkle-checked 2 MiB chunks, in parallel from up to four matching servers.
Progress persists in .qusn-download/ for resumption.
The artifact’s embedded headers and UTXO root are checked locally. A P2P
install additionally requires the network minimum chain work and independent
peer confirmations (snapshotcorroborators); an unavailable or unconfirmed
attempt falls back to normal IBD. Known invalid blocks or a conflicting known
header chain with more work are refused. An unconfirmed verified artifact can
be kept and retried while the local chain is below it; after corroboration it
can replace a strict prefix, discarding the older bodies below the snapshot.
Preserve the datadir before a retry if its history must be retained. Otherwise
a datadir beyond genesis does not start a new download and stale partial data
is removed. Disabling snapshotibd also removes a leftover partial download.
Provenance is recorded in snapshot_bootstrap.json; outcomes are recorded in
snapshot_bootstrap_attempt.json and reported by getsnapshotinfo.
CLI: -snapshotibd=<0|1> or -snapshot-ibd.
Manual offline installation does not perform the P2P minimum-work and peer corroboration checks. Neither installation path revalidates every historical transaction against the historical UTXO set. Backfill checks body commitments, not historical UTXO validity. See AIP-0001.
Minimum chain work is the accumulated work a header chain must reach
before its headers are stored (CVE-2019-25220). The testnet static floor is
the work of its genesis; mainnet and regtest have a floor of 0. The
anti-DoS threshold remains active by default and is the greater of that floor
and the best header tip’s work minus 1 152 blocks of work at tip difficulty.
At 75 seconds per block, 1 152 blocks represent one day. As history grows,
the dynamic threshold rises automatically. A configured value replaces the
compiled floor; 0 removes only the floor.
A full 2 000-header batch below the threshold starts a per-peer pre-sync:
headers are followed in bounded memory and stored only after they cross the
threshold and a second download matches the first. A shorter batch is ignored
and its peer is quarantined from header requests for 60 seconds, not punished
or disconnected. A new node can still bootstrap from genesis. A node whose
active tip is below the floor stays in IBD and answers getheaders with an
empty message. Raise the floor only to work the honest chain has already
passed. Also accepted as minimumchainwork; CLI: -minimumchainwork=<hex>.
assumevalid is unset on all networks. When a hash is configured, only
ancestors of that block may skip post-quantum signature checks during import,
and only if the block is in the header tree and on the best header chain,
that chain has at least the minimum work, and the block being connected is
buried under more than two weeks of equivalent work at the best header’s
difficulty. During block import, PoW, structure, contextual rules and the
UTXO set are checked. An absent or off-chain hash skips no signatures under
assumevalid; a compatible cache may reuse accepted authorization. 0
disables the assumevalid skip. The decision is made for each connected
block, including during a reorg. CLI: -assumevalid=<hex|0>.
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 |
Snapshot checkpoint interval; see below. |
chainstate_flush requests a chainstate.bin checkpoint after N simple
extensions; 0 or 1 means every block. Reorg, prune, stop and shutdown
also trigger checkpoints. The journal supports replay between checkpoints;
stored blocks not covered can be reconnected with validation. On a pruned
node N must be strictly less than prune_depth. A crash or power failure is
not guaranteed to preserve every write on every filesystem. Failed journal
writes can block appends; preserve the datadir and inspect recovery state.
See STORAGE.md.
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: blocks and undo data below the window are deleted; the genesis block stays) |
prune_depth |
int | - | How many recent blocks to keep (default 2000, minimum 288) |
Pruning is incompatible with txindex/addressindex (the node refuses to
start).
Pruning notes:
-prune/-prune-depthare also accepted as command-line flags (CLI >qanum.conf> defaults).- Minimum 288 blocks (Bitcoin Core
MIN_BLOCKS_TO_KEEP, the window a BIP159 limited peer serves; ~6 h at 75 s per block): with-prune=1a-prune-depthbelow 288, and any non-zero-auth-prune-depthbelow 288, stopqanumdat startup with a clear error, before the datadir is touched.chainstate_flushmust stay belowprune_depth(also checked at startup). reindexis refused on a pruned datadir: the pruned blocks are deleted, so the chain cannot be validated again from disk (Core: prune mode is incompatible with-reindex-chainstate). To rebuild a pruned node, sync a new datadir.- A pruned node reports
pruned: trueandprune_depthingetblockchaininfo. Calls about a deleted block (getblock,getblockstats,gettxoutproofwith its hash) fail with code -1Block not available (pruned data), as in Bitcoin Core; its header (getblockheader,getblockhash) is still answered fromblocks/headers.dat. - Wallet history (
listtransactions,listsinceblock) on a pruned node only covers the blocks still on disk; the balance comes from the UTXO set and stays complete. A spend inside the window of an output created in a deleted block is still listed. - Selective auth-data pruning (
-auth-prune-depth=<N>): converts full blocks older than N confirmations to base-only.qnlpfiles (discarding historical signatures only) while keeping undo data and the indexes (-txindex,-addressindex,-blockfilterindexstay compatible). Deep reorgs and explorer queries keep working. The coinbase keeps its full auth in.qnlp(its txid coversserialize_full(), so pruning it would break the merkle root and txindex lookups); only non-coinbase auth is discarded.getblockof an auth-pruned block setspruned: truein the verbose result and returns the base-only serialization (no auth) asraw_hex. A node in this mode reportspruned: true,auth_pruned: trueandauth_prune_depthingetblockchaininfoand advertisesNODE_NETWORKonly (it cannot serve full history to peers). Retention modes: archive (default),-auth-prune-depth=N(base + undo + indexes),-prune(only the last N blocks; notxindex/addressindex). Growth projections and per-role disk budgets: Storage & Node Profiles. - The BIP157/158 filter index (
-blockfilterindex) works with-prune, like Bitcoin Core: pruning never deletes a block the index has not processed yet, and keeps 10 blocks below the index for short reorgs. At start the index resumes from its own best block. If the blocks it needs were already deleted (for example, the index was enabled after pruning), the node refuses to start (best block of the index goes beyond pruned data): disable the index or sync a new datadir with the index enabled from the start.
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 |
Legacy net-v1 option; no effect with net-v2 enabled. To isolate a regtest node, use -listen=0 and leave -connect unset. |
--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 export, verify and install QUSN v2 artifacts. Verification checks the embedded headers and UTXO commitment; it does not revalidate the historical transactions. Offline installation does not add the P2P minimum-work and corroboration checks. See AIP-0001.
reindexchecks stored block-file integrity and reconnects the best stored chain from genesis with consensus validation. Its offline manager uses the compiledassumevalidvalue, currently unset on all networks. It refuses a pruned datadir or an incompletely backfilled snapshot and can discard invalid stored blocks. Preserve the original datadir and approve a recovery plan before running it. See USER-GUIDE.md.
5. Verifier and mandatory verification
verifier=dual: verify post-quantum signatures (ML-DSA-44, SLH-DSA-128s, ML-DSA-87, SLH-DSA-256s) with AWS-LC / OpenSSL andqanum-pqverify(both must accept on mainnet and regtest; shadow mode on testnet; the mode is fixed by the network). The default and the only value;oqs, its name from when liboqs was the first verifier, is still accepted.
Mandatory verification: pq-crypto 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.