Skip to main content

Node Configuration

This document lists all configurable startup parameters for the OpcatLayer node.

Table of Contents


General Options

1. Basic Options

OptionDescriptionTypeDefault
-?Print help message and exitBoolean-
-versionPrint version and exitBoolean-
-alertnotify=<cmd>Execute command when a relevant alert is received or a long fork is detected (%s is replaced by message), e.g., -alertnotify="echo %s"StringNone
-blocknotify=<cmd>Execute command when best block changes (%s is replaced by block hash), e.g., -blocknotify="curl http://api/block/%s"StringNone
-conf=<file>Specify configuration file, e.g., -conf=/path/to/my.confFile pathbitcoin.conf
-daemonRun in background as a daemon, e.g., -daemon=1Boolean0
-datadir=<dir>Specify data directory, e.g., -datadir=/data/opcatlayerDirectory pathPlatform default
-dbcache=<n>Database cache size in megabytes, e.g., -dbcache=1024Integer450 (Range: 4-16384)
-loadblock=<file>Import blocks from external blk000??.dat file on startup, e.g., -loadblock=/path/to/blk00000.datFile pathNone
-maxorphantx=<n>Maximum number of orphan transactions to keep in memory, e.g., -maxorphantx=200Integer100
-maxmempool=<n>Maximum mempool size in megabytes, e.g., -maxmempool=2000Integer1000
-mempoolexpiry=<n>Maximum hours to keep transactions in mempool, e.g., -mempoolexpiry=72Integer336
-persistmempoolSave mempool on shutdown and load on restart, e.g., -persistmempool=0Boolean1
-blockreconstructionextratxn=<n>Extra transactions to keep for compact block reconstruction, e.g., -blockreconstructionextratxn=200Integer100
-par=<n>Number of script verification threads (0=auto, <0=leave that many cores free), e.g., -par=4Integer0
-pid=<file>Specify PID file, e.g., -pid=/var/run/bitcoind.pidFile pathbitcoind.pid
-prune=<n>Pruning mode (0=disable, 1=manual RPC, >550=auto target size in MB), e.g., -prune=10000Integer0
-reindexRebuild chain state and block index from blk*.dat filesBoolean0
-reindex-chainstateRebuild chain state from currently indexed blocksBoolean0
-txindexMaintain full transaction index (used by getrawtransaction), e.g., -txindex=1Boolean0
-assumevalid=<hex>Assume this block and its ancestors are valid, skip script verification (0=verify all), e.g., -assumevalid=0HexChain parameter default

2. Chain Selection Options

OptionDescriptionTypeDefault
-testnetUse test network, e.g., -testnet=1Boolean0
-regtestEnter regression test mode (blocks can be solved instantly), e.g., -regtest=1Boolean0

3. Connection Options

OptionDescriptionTypeDefault
-addnode=<ip>Add a node to connect to and attempt to keep the connection open, e.g., -addnode=192.168.1.100IP addressNone
-banscore=<n>Threshold for disconnecting misbehaving peers, e.g., -banscore=50Integer100
-bantime=<n>Number of seconds to keep misbehaving peers from reconnecting, e.g., -bantime=3600Integer86400 (24 hours)
-bind=<addr>Bind to given address and always listen on it (use [host]:port for IPv6), e.g., -bind=0.0.0.0:18444AddressAll interfaces
-broadcastdelay=<n>Inventory broadcast delay in milliseconds, e.g., -broadcastdelay=100Integer150 (Range: 0-50000)
-connect=<ip>Connect only to specified node(s) (-connect=0 disables automatic connections), e.g., -connect=192.168.1.100IP addressNone
-discoverDiscover own IP addresses, e.g., -discover=0Boolean1 (when listening and no proxy)
-dnsAllow DNS lookups for -addnode/-seednode/-connect, e.g., -dns=0Boolean1
-dnsseedQuery for peer addresses via DNS lookup, e.g., -dnsseed=0Boolean1 (unless using -connect)
-externalip=<ip>Specify your own public address, e.g., -externalip=1.2.3.4IP addressNone
-forcednsseedAlways query for peer addresses via DNS lookup, e.g., -forcednsseed=0Boolean1
-listenAccept connections from outside, e.g., -listen=0Boolean1 (if no proxy or -connect)
-maxconnections=<n>Maximum number of peer connections, e.g., -maxconnections=50Integer125
-maxreceivebuffer=<n>Maximum per-connection receive buffer (n×1000 bytes), e.g., -maxreceivebuffer=32000Integer16000 (16MB)
-maxsendbuffer=<n>Maximum per-connection send buffer (n×1000 bytes), e.g., -maxsendbuffer=64000Integer32000 (32MB)
-maxprotocolrecvpayloadlength=<n>Maximum protocol receive payload length in bytes, e.g., -maxprotocolrecvpayloadlength=8388608Integer4194304 (4MB, Range: 1MB-1GB)
-recvinvqueuefactor=<n>Per-node inventory message queue factor, e.g., -recvinvqueuefactor=5Integer3 (Range: 1-100)
-maxtimeadjustmentMaximum allowed median peer time offset adjustment in seconds, e.g., -maxtimeadjustment=3600Integer4200 (70 minutes)
-onlynet=<net>Only connect to nodes in network (ipv4 or ipv6), e.g., -onlynet=ipv4StringNone
-peerbloomfiltersSupport bloom filters for filtering blocks and transactions, e.g., -peerbloomfilters=0Boolean1
-rejectmempoolrequestReject mempool requests from non-whitelisted peers, e.g., -rejectmempoolrequest=1Boolean0
-port=<port>Listen for connections on port, e.g., -port=18445IntegerMainnet 18444 / Testnet 28444
-proxy=<ip:port>Connect through SOCKS5 proxy, e.g., -proxy=127.0.0.1:9050AddressNone
-proxyrandomizeRandomize credentials for every proxy connection, e.g., -proxyrandomize=0Boolean1
-seednode=<ip>Connect to a node to retrieve peer addresses, then disconnect, e.g., -seednode=seed.example.comIP addressNone
-timeout=<n>Connection timeout in milliseconds, e.g., -timeout=10000Integer5000
-upnpUse UPnP to map the listening port, e.g., -upnp=0Boolean1 (when listening and no proxy)
-whitebind=<addr>Bind to given address and whitelist peers connecting to it, e.g., -whitebind=0.0.0.0:18444AddressNone
-whitelist=<IP>Whitelist IP/network (won't be DoS banned, transactions always relayed), e.g., -whitelist=192.168.1.0/24IP/CIDRNone
-whitelistrelayAccept relayed transactions from whitelisted peers even when not relaying, e.g., -whitelistrelay=0Boolean1
-whitelistforcerelayForce relay of transactions from whitelisted peers even if they violate local policy, e.g., -whitelistforcerelay=0Boolean1
-maxuploadtarget=<n>Try to keep outbound traffic under the given target (MiB/24h, 0=no limit), e.g., -maxuploadtarget=1000Integer0

4. Wallet Options

OptionDescriptionTypeDefault
-disablewalletDisable wallet functionality, e.g., -disablewallet=1Boolean0
-keypool=<n>Key pool size, e.g., -keypool=2000Integer1000
-paytxfee=<amt>Fee to add when sending transactions (COIN/kB), e.g., -paytxfee=0.0001Amount0.00
-rescanRescan the blockchain for missing wallet transactions on startupBoolean0
-salvagewalletAttempt to recover private keys from a corrupt wallet on startupBoolean0
-spendzeroconfchangeSpend unconfirmed change when sending transactions, e.g., -spendzeroconfchange=0Boolean1
-txconfirmtarget=<n>If paytxfee is not set, target confirmation within n blocks, e.g., -txconfirmtarget=2Integer6
-usehdUse hierarchical deterministic key generation (BIP32), e.g., -usehd=0Boolean1
-upgradewalletUpgrade wallet to latest format on startupBoolean0
-wallet=<file>Specify wallet file, e.g., -wallet=mywallet.datFilenamewallet.dat
-walletbroadcastWallet broadcasts transactions, e.g., -walletbroadcast=0Boolean1
-walletnotify=<cmd>Execute command when wallet transaction changes (%s replaced by TxID), e.g., -walletnotify="echo %s"StringNone
-zapwallettxes=<mode>Delete all wallet transactions and recover via -rescan (1=keep metadata, 2=drop), e.g., -zapwallettxes=1IntegerNone

5. ZeroMQ Notification Options

OptionDescriptionTypeDefault
-zmqpubhashblock=<address>Publish block hash, e.g., -zmqpubhashblock=tcp://127.0.0.1:28332AddressNone
-zmqpubhashtx=<address>Publish transaction hash, e.g., -zmqpubhashtx=tcp://127.0.0.1:28332AddressNone
-zmqpubrawblock=<address>Publish raw block, e.g., -zmqpubrawblock=tcp://127.0.0.1:28332AddressNone
-zmqpubrawtx=<address>Publish raw transaction, e.g., -zmqpubrawtx=tcp://127.0.0.1:28332AddressNone

6. Debugging/Testing Options

OptionDescriptionTypeDefault
-uacomment=<cmt>Append comment to user agent string, e.g., -uacomment=mynodeStringNone
-debug=<category>Output debugging information (see -debug Log Categories), e.g., -debug=netString0
-nodebugTurn off debugging, same as -debug=0Boolean-
-debugexclude=<category>Exclude debugging information for a category (use with -debug=1), e.g., -debugexclude=libeventStringNone
-help-debugShow all debugging optionsBoolean0
-logipsInclude IP addresses in debug output, e.g., -logips=1Boolean0
-logtimestampsPrepend debug output with timestamp, e.g., -logtimestamps=0Boolean1
-excessutxocharge=<amt>Extra fee charged per UTXO created (COIN/kB), e.g., -excessutxocharge=0.001Amount0
-minrelaytxfee=<amt>Fees smaller than this are considered zero fee for relaying and mining, e.g., -minrelaytxfee=0.00001Amount0.00000001
-maxtxfee=<amt>Maximum total fees for a single wallet or raw transaction, e.g., -maxtxfee=1.0Amount0.10
-printtoconsoleSend debug output to console instead of debug.log, e.g., -printtoconsole=1Boolean0
-shrinkdebugfileShrink debug.log file on client startup, e.g., -shrinkdebugfile=0Boolean1 (when no -debug)

7. Node Relay Options

OptionDescriptionTypeDefault
-excessiveblocksize=<n>Do not accept blocks larger than this limit in bytes, e.g., -excessiveblocksize=64000000Integer128MB
-bytespersigopEquivalent bytes per sigop in transactions for relay and mining, e.g., -bytespersigop=50Integer20

8. Block Creation Options

OptionDescriptionTypeDefaultConsensus Limit
-blockmaxsize=<n>Maximum generated block size in bytes, e.g., -blockmaxsize=16000000Integer32000000 (32MB)-
-blockmintxfee=<amt>Minimum fee rate for transactions included in block (COIN/kB), e.g., -blockmintxfee=0.00001Amount0.00000001-
-maxtxsizepolicy=<n>Maximum transaction size for policy validation in bytes, e.g., -maxtxsizepolicy=20000000Integer10000000 (10MB)1000000000 (1GB)
-maxtxsigopscountpolicy=<n>Maximum transaction sigops count for policy validation, e.g., -maxtxsigopscountpolicy=100000IntegerUINT32_MAXUINT32_MAX
-maxscriptnumlengthpolicy=<n>Maximum script number length for policy validation in bytes, e.g., -maxscriptnumlengthpolicy=20000Integer10000 (10KB)750000 (750KB)
-maxscriptsizepolicy=<n>Maximum script size for policy validation in bytes, e.g., -maxscriptsizepolicy=1000000Integer500000 (500KB)UINT32_MAX
-maxopsperscriptpolicy=<n>Maximum operations per script for policy validation, e.g., -maxopsperscriptpolicy=1000000IntegerUINT32_MAXUINT32_MAX
-maxpubkeyspermultisigpolicy=<n>Maximum public keys per multisig for policy validation, e.g., -maxpubkeyspermultisigpolicy=100IntegerUINT32_MAXUINT32_MAX
-maxstackmemoryusagepolicy=<n>Maximum stack memory usage for policy validation in bytes, e.g., -maxstackmemoryusagepolicy=200000000Integer100000000 (100MB)INT64_MAX

9. RPC Server Options

OptionDescriptionTypeDefault
-serverAccept command line and JSON-RPC commands, e.g., -server=1Boolean1
-restAccept public REST requests, e.g., -rest=1Boolean0
-rpcbind=<addr>Bind to given address to listen for JSON-RPC connections (use [host]:port for IPv6), e.g., -rpcbind=127.0.0.1AddressAll interfaces
-rpccookiefile=<loc>Location of the auth cookie, e.g., -rpccookiefile=/path/to/.cookieFile pathData directory
-rpcuser=<user>Username for JSON-RPC connections, e.g., -rpcuser=adminStringNone
-rpcpassword=<pw>Password for JSON-RPC connections, e.g., -rpcpassword=secretStringNone
-rpcauth=<userpw>Username and hashed password for JSON-RPC (format: USER:SALT$HASH), e.g., -rpcauth=user:salt$hashStringNone
-rpcport=<port>Listen for JSON-RPC connections on port, e.g., -rpcport=18443IntegerMainnet 18443 / Testnet 28443
-rpcallowip=<ip>Allow JSON-RPC connections from specified source IP/network, e.g., -rpcallowip=192.168.1.0/24IP/CIDRNone
-rpcthreads=<n>Number of threads for RPC calls, e.g., -rpcthreads=8Integer4
-rpccorsdomain=<value>Domain to accept cross-origin requests from, e.g., -rpccorsdomain=*StringNone

Advanced Options (requires -help-debug)

The following options are mainly for debugging, testing, and performance tuning. They are not shown in bitcoind -help and require bitcoind -help -help-debug to display.

10. Advanced Debugging/Testing Options

OptionDescriptionTypeDefault
-blocksonlyRun in blocks only mode (do not relay transactions), e.g., -blocksonly=1Boolean0
-checkblocks=<n>How many blocks to check at startup (0=all), e.g., -checkblocks=100Integer6
-checklevel=<n>How thorough the block verification is (0-4), e.g., -checklevel=4Integer3
-checkblockindexDo a full consistency check for mapBlockIndex and related structures, e.g., -checkblockindex=1BooleanChain parameter default
-checkmempool=<n>Run checks every n transactions, e.g., -checkmempool=1IntegerChain parameter default
-checkpointsOnly accept block chain matching built-in checkpoints, e.g., -checkpoints=0Boolean1
-disablesafemodeDisable safemode, override a real safe mode event, e.g., -disablesafemode=1Boolean0
-testsafemodeForce safe mode, e.g., -testsafemode=1Boolean0
-dropmessagestest=<n>Randomly drop 1 of every n network messages, e.g., -dropmessagestest=10IntegerNone
-fuzzmessagestest=<n>Randomly fuzz 1 of every n network messages, e.g., -fuzzmessagestest=10IntegerNone
-stopafterblockimportStop running after importing blocks from disk, e.g., -stopafterblockimport=1Boolean0
-stopatheight=<n>Stop running after reaching the given height, e.g., -stopatheight=100000Integer0
-logtimemicrosAdd microsecond precision to debug timestamps, e.g., -logtimemicros=1Boolean0
-mocktime=<n>Replace actual time with specified epoch seconds, e.g., -mocktime=1234567890Integer0
-maxsigcachesize=<n>Limit size of signature cache in MiB, e.g., -maxsigcachesize=64Integer32
-maxscriptcachesize=<n>Limit size of script cache in MiB, e.g., -maxscriptcachesize=128Integer64
-maxtipage=<n>Maximum tip age in seconds to consider node in initial block download, e.g., -maxtipage=3600Integer86400 (24 hours)
-dbbatchsize=<n>Maximum database write batch size in bytes, e.g., -dbbatchsize=33554432Integer16777216 (16MB)
-feefilterTell other nodes to filter invs by our mempool min fee, e.g., -feefilter=0Boolean1
-minimumchainwork=<hex>Minimum work assumed to exist on a valid chain (hex), e.g., -minimumchainwork=0x00HexChain parameter default
-blockversion=<n>Override block version to test forking scenarios, e.g., -blockversion=4IntegerNone
-maxtxvalidationduration=<n>Maximum transaction validation duration in milliseconds, e.g., -maxtxvalidationduration=1000Integer500

11. Advanced Wallet Options

OptionDescriptionTypeDefault
-dblogsize=<n>Flush wallet database activity from memory to disk log every n MB, e.g., -dblogsize=200Integer100
-flushwalletRun a thread to flush wallet periodically, e.g., -flushwallet=0Boolean1
-privdbSet DB_PRIVATE flag in wallet database environment, e.g., -privdb=0Boolean1
-walletrejectlongchainsWallet will not create transactions that violate mempool chain limits, e.g., -walletrejectlongchains=1Boolean0

12. Advanced RPC Options

OptionDescriptionTypeDefault
-rpcworkqueue=<n>Set the depth of the work queue for RPC calls, e.g., -rpcworkqueue=32Integer16
-rpcservertimeout=<n>Timeout during HTTP requests in seconds, e.g., -rpcservertimeout=60Integer30

13. Advanced Database/Network Options

OptionDescriptionTypeDefault
-forcecompactdbForce database compaction on startup, e.g., -forcecompactdb=1Boolean0
-dbcrashratio=<n>Simulate database crash (debug only, 1/n probability), e.g., -dbcrashratio=100Integer0
-txnpropagationfreq=<n>Transaction propagation frequency in milliseconds, e.g., -txnpropagationfreq=500Integer250
-syspermsCreate new files with system default permissions (only with wallet disabled), e.g., -sysperms=1Boolean0

Option Value Reference

-debug Log Categories

The -debug=<category> option accepts the following categories:

CategoryDescription
netNetwork related logs
mempoolMempool operation logs
httpHTTP service logs
benchBenchmark/performance logs
zmqZeroMQ notification logs
dbDatabase operation logs
rpcRPC call logs
addrmanAddress manager logs
selectcoinsCoin selection algorithm logs
reindexReindex logs
cmpctblockCompact block logs
randRandom number generation logs
pruneBlock pruning logs
proxyProxy connection logs
mempoolrejMempool rejection reason logs
libeventlibevent library logs
coindbUTXO database logs
leveldbLevelDB logs
layerLayer related logs
1 / allEnable all logs

Multiple categories can be specified: -debug=net -debug=rpc

Use -debugexclude to exclude specific categories: -debug=1 -debugexclude=libevent


-onlynet Network Types

The -onlynet=<net> option accepts the following network types:

TypeDescription
ipv4Use IPv4 network only
ipv6Use IPv6 network only

Multiple networks can be specified: -onlynet=ipv4 -onlynet=ipv6