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
-maxorphantxsize=<n>Maximum total size in bytes of orphan transactions (transactions whose parent has not arrived yet) to keep in memory, e.g., -maxorphantxsize=500000000Integer (bytes)1000000000
-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 blocks. Also applies a changed -txindex setting: the index is built (or dropped) while the blocks are reconnectedBoolean0
-txindexMaintain full transaction index (used by getrawtransaction), e.g., -txindex=1. The index is written as blocks are connected, so changing this setting on an existing data directory is refused at startup ("You need to rebuild the database using -reindex-chainstate to change -txindex") until the node is started once with -reindex-chainstateBoolean0
-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
-blockdownloadtimeoutbasepercent=<n>Time a peer gets to deliver a requested block before it is disconnected, as a percentage of the 60-second block interval, e.g., -blockdownloadtimeoutbasepercent=400 (240 s)Integer200 (120 s, must be > 0)
-blockdownloadtimeoutbaseibdpercent=<n>The same time while the node is in its initial block download, as a percentage of the block interval, e.g., -blockdownloadtimeoutbaseibdpercent=2000 (20 min)Integer1000 (600 s, must be > 0)
-blockdownloadtimeoutperpeerpercent=<n>Additional time per other peer that is also delivering validated blocks, as a percentage of the block interval, e.g., -blockdownloadtimeoutperpeerpercent=200 (+120 s per peer)Integer100 (+60 s, must be > 0)
-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 BIP37 bloom filters for filtering blocks and transactions (off by default; enable with -peerbloomfilters=1)Boolean0
-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 startup. Startup fails with "Failed to rescan the wallet during initialization" if the rescan could not read every block, instead of recording the wallet as synchronisedBoolean0
-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=mynode. Only the BIP 14 safe characters are kept; others are removed from the comment that is sentStringNone
-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>Required. Maximum block size in bytes the node accepts; the node refuses to start without it. 0 means unlimited. Plain decimal bytes only, no unit suffix. Current network value: -excessiveblocksize=128000000Integernone (required)
-bytespersigopEquivalent bytes per sigop in transactions for relay and mining, e.g., -bytespersigop=50Integer20
-mempoolrebroadcastRe-announce transactions that stay in the mempool for -mempoolrebroadcastblocks blocks to every peer that is keeping up with the chain, whether or not the peer was announced them before, so a peer that missed them (restart, expired orphan) can request them again. -mempoolrebroadcast=0 turns it offBoolean1
-mempoolrebroadcastblocks=<n>Number of blocks a transaction stays unconfirmed before it is re-announced, and between re-announcements, e.g., -mempoolrebroadcastblocks=5Integer10 (must be > 0)
-mempoolrebroadcastlimit=<n>Maximum number of transactions re-announced per block; the rest wait for a later block. 0 means no limit, e.g., -mempoolrebroadcastlimit=1000Integer0 (no limit)

If the node's excessiveblocksize is lower than the blocks the network is producing, it rejects those blocks and stops following the chain. Raise the value and restart; the node downloads the rejected blocks again and catches up. If a block still shows as invalid in getchaintips afterwards, run bitcoin-cli reconsiderblock <hash> on it.


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
-restbroadcasttimebudget=<n>Milliseconds of transaction validation one /rest/broadcast request may use; transactions not reached are returned as server busy; a value too large to add to the clock means no deadline, e.g., -restbroadcasttimebudget=10000Integer (ms)5000
-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
-regtestrequireauxpowRegtest only: require every block to be merge-mined, as on mainnet and testnet (used by tests; ignored on other networks), e.g., -regtestrequireauxpow=1Boolean0
-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