diff --git a/contrib/devtools/gen-dogecoin-conf.sh b/contrib/devtools/gen-dogecoin-conf.sh new file mode 100755 index 00000000000..3fa32bac833 --- /dev/null +++ b/contrib/devtools/gen-dogecoin-conf.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C +TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} +BUILDDIR=${BUILDDIR:-$TOPDIR} +BINDIR=${BINDIR:-$BUILDDIR/src} +DOGECOIND=${DOGECOIND:-$BINDIR/dogecoind} +SHARE_DIR=${SHARE_DIR:-$TOPDIR/share} +EXAMPLE_CONF_FILE=${EXAMPLE_CONF_FILE:-$SHARE_DIR/dogecoin.conf} + +[ ! -x "$DOGECOIND" ] && echo "$DOGECOIND not found or not executable." && exit 1 + +DIRTY="" +VERSION_OUTPUT=$($DOGECOIND --version) +if [[ $VERSION_OUTPUT == *"dirty"* ]]; then + DIRTY="${DIRTY}${DOGECOIND}\n" +fi + +if [ -n "$DIRTY" ] +then + echo -e "WARNING: $DOGECOIND was built from a dirty tree.\n" + echo -e "To safely generate a dogecoin.conf file, please commit your changes to $DOGECOIND, rebuild, then run this script again.\n" +fi + +echo 'Generating example dogecoin.conf file in share/' + +# create the directory, if it doesn't exist +mkdir -p "${SHARE_DIR}" + +# create the header text +cat > "${EXAMPLE_CONF_FILE}" << 'EOF' +## +## dogecoin.conf configuration file. +## Generated by contrib/devtools/gen-dogecoin-conf.sh. +## +## Lines beginning with # are comments. +## All possible configuration options are provided. To use, copy this file +## to your data directory (default or specified by -datadir), uncomment +## options you would like to change, and save the file. +## + + +### Options +EOF + +# parse the output from dogecoind --help +# adding newlines is a bit funky to ensure portability for BSD +# see here for more details: https://stackoverflow.com/a/24575385 +${DOGECOIND} --help \ + | sed '1,/Print this help message and exit/d' \ + | sed -E 's/^[[:space:]]{2}\-/#/' \ + | sed -E 's/^[[:space:]]{7}/# /' \ + | sed -E '/[=[:space:]]/!s/#.*$/&=1/' \ + | awk '/^#[a-z]/{x=$0;next}{if (NF==0) print x"\n",x="";else print}' \ + | sed 's,\(^[[:upper:]].*\)\:$,\ +### \1,' \ + | sed 's/[[:space:]]*$//' >> "${EXAMPLE_CONF_FILE}" + +# create the footer text +cat >> "${EXAMPLE_CONF_FILE}" << 'EOF' + +# [Sections] +# Most options will apply to all networks. To confine an option to a specific +# network, add it under the relevant section below. +# +# Note: If not specified under a network section, the options addnode, connect, +# port, bind, rpcport, rpcbind, and wallet will only apply to mainnet. + +# Options for mainnet +[main] + +# Options for testnet +[test] + +# Options for regtest +[regtest] +EOF diff --git a/share/dogecoin.conf b/share/dogecoin.conf new file mode 100644 index 00000000000..1f442e702e7 --- /dev/null +++ b/share/dogecoin.conf @@ -0,0 +1,460 @@ +## +## dogecoin.conf configuration file. +## Generated by contrib/devtools/gen-dogecoin-conf.sh. +## +## Lines beginning with # are comments. +## All possible configuration options are provided. To use, copy this file +## to your data directory (default or specified by -datadir), uncomment +## options you would like to change, and save the file. +## + + +### Options + + +# Print version and exit +#version=1 + +# Execute command when we see a really long fork (%s in cmd is replaced by +# message) +#alertnotify= + +# Execute command when the best block changes (%s in cmd is replaced by +# block hash, %i is replaced by block number) +#blocknotify= + +# If this block is in the chain assume that it and its ancestors are valid +# and potentially skip their script verification (0 to verify all, +# default: +# e7d4577405223918491477db725a393bcfc349d8ee63b0a4fde23cbfbfd81dea, +# testnet: +# 199bea6a442310589cbb50a193a30b097c228bd5a0f21af21e4e53dd57c382d3) +#assumevalid= + +# Specify directory where to write backups and data dumps (default +# datadir/backups) +#backupdir= + +# Specify configuration file (default: dogecoin.conf) +#conf= + +# Run in the background as a daemon and accept commands +#daemon=1 + +# Specify data directory +#datadir= + +# Set database cache size in megabytes (4 to 16384, default: 450) +#dbcache= + +# Imports blocks from external blk000??.dat file on startup +#loadblock= + +# Keep at most unconnectable transactions in memory (default: 100) +#maxorphantx= + +# Keep the transaction memory pool below megabytes (default: 300) +#maxmempool= + +# Do not keep transactions in the mempool longer than hours (default: +# 24) +#mempoolexpiry= + +# Extra transactions to keep in memory for compact block reconstructions +# (default: 100) +#blockreconstructionextratxn= + +# Set the number of script verification threads (-10 to 16, 0 = auto, <0 = +# leave that many cores free, default: 0) +#par= + +# Specify pid file (default: dogecoind.pid) +#pid= + +# Reduce storage requirements by enabling pruning (deleting) of old +# blocks. This allows the pruneblockchain RPC to be called to +# delete specific blocks, and enables automatic pruning of old +# blocks if a target size in MiB is provided. This mode is +# incompatible with -txindex and -rescan. Warning: Reverting this +# setting requires re-downloading the entire blockchain. (default: +# 0 = disable pruning blocks, 1 = allow manual pruning via RPC, +# >2200 = automatically prune block files to stay under the +# specified target size in MiB) +#prune= + +# Rebuild chain state from the currently indexed blocks +#reindex-chainstate=1 + +# Rebuild chain state and block index from the blk*.dat files on disk +#reindex=1 + +# Create new files with system default permissions, instead of umask 077 +# (only effective with disabled wallet functionality) +#sysperms=1 + +# Maintain a full transaction index, used by the getrawtransaction rpc +# call (default: 0) +#txindex=1 + + +### Connection options + + +# Add a node to connect to and attempt to keep the connection open +#addnode= + +# Threshold for disconnecting misbehaving peers (default: 100) +#banscore= + +# Number of seconds to keep misbehaving peers from reconnecting (default: +# 86400) +#bantime= + +# Bind to given address and always listen on it. Use [host]:port notation +# for IPv6 +#bind= + +# Connect only to the specified node(s); -noconnect or -connect=0 alone to +# disable automatic connections +#connect= + +# Discover own IP addresses (default: 1 when listening and no -externalip +# or -proxy) +#discover=1 + +# Allow DNS lookups for -addnode, -seednode and -connect (default: 1) +#dns=1 + +# Query for peer addresses via DNS lookup, if low on addresses (default: 1 +# unless -connect/-noconnect) +#dnsseed=1 + +# Enable BIP-70 PaymentServer (default: 0) +#enable-bip70=1 + +# Specify your own public address +#externalip= + +# Always query for peer addresses via DNS lookup (default: 0) +#forcednsseed=1 + +# Accept connections from outside (default: 1 if no -proxy or +# -connect/-noconnect) +#listen=1 + +# Automatically create Tor hidden service (default: 1) +#listenonion=1 + +# Maintain at most connections to peers (default: 125) +#maxconnections= + +# Maximum per-connection receive buffer, *1000 bytes (default: 5000) +#maxreceivebuffer= + +# Maximum per-connection send buffer, *1000 bytes (default: 1000) +#maxsendbuffer= + +# Maximum allowed median peer time offset adjustment. Local perspective of +# time may be influenced by peers forward or backward by this +# amount. (default: 4200 seconds) +#maxtimeadjustment=1 + +# Use separate SOCKS5 proxy to reach peers via Tor hidden services +# (default: -proxy) +#onion= + +# Only connect to nodes in network (ipv4, ipv6 or onion) +#onlynet= + +# Relay non-P2SH multisig (default: 1) +#permitbaremultisig=1 + +# Support filtering of blocks and transaction with bloom filters (default: +# 1) +#peerbloomfilters=1 + +# Listen for connections on (default: 22556 or testnet: 44556) +#port= + +# Connect through SOCKS5 proxy +#proxy= + +# Randomize credentials for every proxy connection. This enables Tor +# stream isolation (default: 1) +#proxyrandomize=1 + +# Sets the serialization of raw transaction or block hex returned in +# non-verbose mode, non-segwit(0) or segwit(1) (default: 1) +#rpcserialversion=1 + +# Connect to a node to retrieve peer addresses, and disconnect +#seednode= + +# Specify connection timeout in milliseconds (minimum: 1, default: 5000) +#timeout= + +# Tor control port to use if onion listening enabled (default: +# 127.0.0.1:9051) +#torcontrol=: + +# Tor control port password (default: empty) +#torpassword= + +# Use UPnP to map the listening port (default: 0) +#upnp=1 + +# Bind to given address and whitelist peers connecting to it. Use +# [host]:port notation for IPv6 +#whitebind= + +# Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or +# CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple +# times. Whitelisted peers cannot be DoS banned and their +# transactions are always relayed, even if they are already in the +# mempool, useful e.g. for a gateway +#whitelist= + +# Accept relayed transactions received from whitelisted peers even when +# not relaying transactions (default: 1) +#whitelistrelay=1 + +# Force relay of transactions from whitelisted peers even if they violate +# local relay policy (default: 1) +#whitelistforcerelay=1 + +# Tries to keep outbound traffic under the given target (in MiB per 24h), +# 0 = no limit (default: 0) +#maxuploadtarget= + + +### Wallet options + + +# Do not load the wallet and disable wallet RPC calls +#disablewallet=1 + +# Set key pool size to (default: 100) +#keypool= + +# The minimum transaction output size (in DOGE) used to validate wallet +# transactions and discard change (to fee) (default: 0.01) +#discardthreshold= + +# A fee rate (in DOGE/kB) that will be used when fee estimation has +# insufficient data (default: 0.01) +#fallbackfee= + +# Fees (in DOGE/kB) smaller than this are considered zero fee for +# transaction creation (default: 0.01) +#mintxfee= + +# Fee (in DOGE/kB) to add to transactions you send (default: 0.01) +#paytxfee= + +# Rescan the block chain for missing wallet transactions on startup +#rescan=1 + +# Attempt to recover private keys from a corrupt wallet on startup +#salvagewallet=1 + +# Spend unconfirmed change when sending transactions (default: 1) +#spendzeroconfchange=1 + +# If paytxfee is not set, include enough fee so transactions begin +# confirmation on average within n blocks (default: 6) +#txconfirmtarget= + +# Use hierarchical deterministic key generation (HD) after BIP32. Only has +# effect during wallet creation/first start (default: 1) +#usehd=1 + +# Send transactions with full-RBF opt-in enabled (default: 0) +#walletrbf=1 + +# Upgrade wallet to latest format on startup +#upgradewallet=1 + +# Specify wallet file (within data directory) (default: wallet.dat) +#wallet= + +# Make the wallet broadcast transactions (default: 1) +#walletbroadcast=1 + +# Execute command when a wallet transaction changes (%s in cmd is replaced +# by TxID, %i with block height, with a value of 0 if tx is no +# longer in chaintip) +#walletnotify= + +# Delete all wallet transactions and only recover those parts of the +# blockchain through -rescan on startup (1 = keep tx meta data e.g. +# account owner and payment request information, 2 = drop tx meta +# data) +#zapwallettxes= + + +### ZeroMQ notification options + + +# Enable publish hash block in
+#zmqpubhashblock=
+ +# Enable publish hash transaction in
+#zmqpubhashtx=
+ +# Enable publish raw block in
+#zmqpubrawblock=
+ +# Enable publish raw transaction in
+#zmqpubrawtx=
+ + +### Debugging/Testing options + + +# Append comment to the user agent string +#uacomment= + +# Output debugging information (default: 0, supplying is +# optional). If is not supplied or if = 1, +# output all debugging information. can be: addrman, +# alert, bench, cmpctblock, coindb, db, http, libevent, lock, +# mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, +# selectcoins, tor, zmq. +#debug= + +# Show all debugging options (usage: --help -help-debug) +#help-debug=1 + +# Include IP addresses in debug output (default: 0) +#logips=1 + +# Prepend debug output with timestamp (default: 1) +#logtimestamps=1 + +# Fees (in DOGE/kB) smaller than this are considered zero fee for +# relaying, mining and transaction creation (default: 0.001) +#minrelaytxfee= + +# Maximum total fees (in DOGE) to use in a single wallet transaction or +# raw transaction; setting this too low may abort large +# transactions (default: 100.00) +#maxtxfee= + +# Send trace/debug info to console instead of debug.log file +#printtoconsole=1 + +# Shrink debug.log file on client startup (default: 1 when no -debug) +#shrinkdebugfile=1 + + +### Chain selection options + + +# Use the test chain +#testnet=1 + + +### Node relay options + + +# Amount under which a transaction output is considered dust, in DOGE +# (default: 0.01) +#dustlimit= + +# Amount under which a transaction output is considered non-standard and +# will not be accepted or relayed, in DOGE (default: 0.001) +#harddustlimit= + +# Equivalent bytes per sigop in transactions for relay and mining +# (default: 20) +#bytespersigop=1 + +# Relay and mine data carrier transactions (default: 1) +#datacarrier=1 + +# Maximum size of data in data carrier transactions we relay and mine +# (default: 83) +#datacarriersize=1 + +# Enable transaction replacement in the memory pool (default: 1) +#mempoolreplacement=1 + + +### Block creation options + + +# Set maximum BIP141 block weight (default: 3000000) +#blockmaxweight= + +# Set maximum block size in bytes (default: 750000) +#blockmaxsize= + +# Set maximum size of high-priority/low-fee transactions in bytes +# (default: 27000) +#blockprioritysize= + +# Set lowest fee rate (in DOGE/kB) for transactions to be included in +# block creation. (default: 0.01) +#blockmintxfee= + + +### RPC server options + + +# Accept command line and JSON-RPC commands +#server=1 + +# Accept public REST requests (default: 0) +#rest=1 + +# Bind to given address to listen for JSON-RPC connections. Use +# [host]:port notation for IPv6. This option can be specified +# multiple times (default: bind to all interfaces) +#rpcbind= + +# Location of the auth cookie (default: data dir) +#rpccookiefile= + +# Username for JSON-RPC connections +#rpcuser= + +# Password for JSON-RPC connections +#rpcpassword= + +# Username and hashed password for JSON-RPC connections. The field +# comes in the format: :$. A +# canonical python script is included in share/rpcuser. The client +# then connects normally using the +# rpcuser=/rpcpassword= pair of arguments. This +# option can be specified multiple times +#rpcauth= + +# Listen for JSON-RPC connections on (default: 22555 or testnet: +# 44555) +#rpcport= + +# Allow JSON-RPC connections from specified source. Valid for are a +# single IP (e.g. 1.2.3.4), a network/netmask (e.g. +# 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This +# option can be specified multiple times +#rpcallowip= + +# Set the number of threads to service RPC calls (default: 4) +#rpcthreads= + + +# [Sections] +# Most options will apply to all networks. To confine an option to a specific +# network, add it under the relevant section below. +# +# Note: If not specified under a network section, the options addnode, connect, +# port, bind, rpcport, rpcbind, and wallet will only apply to mainnet. + +# Options for mainnet +[main] + +# Options for testnet +[test] + +# Options for regtest +[regtest]