Skip to content

Commit

Permalink
build, devtools: Generate example blackmore.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Feb 5, 2024
1 parent 31d670f commit ae8096f
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 67 deletions.
8 changes: 4 additions & 4 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ options, as all its configuration is set at the top of the file. It runs many ti
pypy3 contrib/devtools/headerssync-params.py
```

gen-bitcoin-conf.sh
gen-blackmore-conf.sh
===================

Generates a bitcoin.conf file in `share/examples/` by parsing the output from `bitcoind --help`. This script is run during the
release process to include a bitcoin.conf with the release binaries and can also be run by users to generate a file locally.
Generates a bitcoin.conf file in `share/examples/` by parsing the output from `blackmored --help`. This script is run during the
release process to include a blackmore.conf with the release binaries and can also be run by users to generate a file locally.
When generating a file as part of the release process, make sure to commit the changes after running the script.

With in-tree builds this tool can be run from any directory within the
repository. To use this tool with out-of-tree builds set `BUILDDIR`. For
example:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-bitcoin-conf.sh
BUILDDIR=$PWD/build contrib/devtools/gen-blackmore-conf.sh
```

security-check.py and test-security-check.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
BUILDDIR=${BUILDDIR:-$TOPDIR}
BINDIR=${BINDIR:-$BUILDDIR/src}
BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
BITCOIND=${BITCOIND:-$BINDIR/blackmored}
SHARE_EXAMPLES_DIR=${SHARE_EXAMPLES_DIR:-$TOPDIR/share/examples}
EXAMPLE_CONF_FILE=${EXAMPLE_CONF_FILE:-$SHARE_EXAMPLES_DIR/bitcoin.conf}
EXAMPLE_CONF_FILE=${EXAMPLE_CONF_FILE:-$SHARE_EXAMPLES_DIR/blackmore.conf}

[ ! -x "$BITCOIND" ] && echo "$BITCOIND not found or not executable." && exit 1

Expand All @@ -22,18 +22,18 @@ fi
if [ -n "$DIRTY" ]
then
echo -e "WARNING: $BITCOIND was built from a dirty tree.\n"
echo -e "To safely generate a bitcoin.conf file, please commit your changes to $BITCOIND, rebuild, then run this script again.\n"
echo -e "To safely generate a blackmore.conf file, please commit your changes to $BITCOIND, rebuild, then run this script again.\n"
fi

echo 'Generating example bitcoin.conf file in share/examples/'
echo 'Generating example blackmore.conf file in share/examples/'

# create the directory, if it doesn't exist
mkdir -p "${SHARE_EXAMPLES_DIR}"

# create the header text
cat > "${EXAMPLE_CONF_FILE}" << 'EOF'
##
## bitcoin.conf configuration file.
## blackmore.conf configuration file.
## Generated by contrib/devtools/gen-bitcoin-conf.sh.
##
## Lines beginning with # are comments.
Expand All @@ -46,7 +46,7 @@ cat > "${EXAMPLE_CONF_FILE}" << 'EOF'
### Options
EOF

# parse the output from bitcoind --help
# parse the output from blackmored --help
# adding newlines is a bit funky to ensure portability for BSD
# see here for more details: https://stackoverflow.com/a/24575385
${BITCOIND} --help \
Expand Down
117 changes: 62 additions & 55 deletions share/examples/bitcoin.conf → share/examples/blackmore.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## bitcoin.conf configuration file.
## blackmore.conf configuration file.
## Generated by contrib/devtools/gen-bitcoin-conf.sh.
##
## Lines beginning with # are comments.
Expand All @@ -16,18 +16,18 @@
# message)
#alertnotify=<cmd>

# For backwards compatibility, treat an unused bitcoin.conf file in the
# For backwards compatibility, treat an unused blackmore.conf file in the
# datadir as a warning, not an error.
#allowignoredconf=1

# 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:
# 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815,
# ae0c2a9bd13746e2887ca57bf1046b3c787a5ed1068fd1633a3575f08ee291fc,
# testnet:
# 0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f,
# 5d5c42500cc6057533e249ba9eeb9b5e998aff30468c904bc267ec9bccbc8b39,
# signet:
# 0000013d778ba3f914530f11f6b69869c9fab54acff85acd7b8201d111f19b7f)
# 0000000000000000000000000000000000000000000000000000000000000000)
#assumevalid=<hex>

# Maintain an index of compact filters by block (default: 0, values:
Expand Down Expand Up @@ -58,7 +58,7 @@

# Specify path to read-only configuration file. Relative paths will be
# prefixed by datadir location (only useable from command line, not
# configuration file) (default: bitcoin.conf)
# configuration file) (default: blackmore.conf)
#conf=<file>

# Run in the background as a daemon and accept commands (default: 0)
Expand All @@ -81,6 +81,25 @@
# -nodebuglogfile to disable writing the log to a file.
#debuglogfile=<file>

# Use header spam filter (default: 1)
#headerspamfilter=<n>

# Enable header spam filter during IBD (default: 0)
#headerspamfilterduringibd=<n>

# Ignore the port in the ip address when looking for header spam,
# determine whether or not multiple nodes can be on the same IP
# (default: 1)
#headerspamfilterignoreport=<n>

# Maximum average size of an index occurrence in the header spam filter
# (default: 10)
#headerspamfiltermaxavg=<n>

# Maximum size of the list of indexes in the header spam filter (default:
# 500)
#headerspamfiltermaxsize=<n>

# Specify additional configuration file, relative to the -datadir path
# (only useable from configuration file, not command line)
#includeconf=<file>
Expand All @@ -106,20 +125,9 @@
#persistmempool=1

# Specify pid file. Relative paths will be prefixed by a net-specific
# datadir location. (default: bitcoind.pid)
# datadir location. (default: blackmored.pid)
#pid=<file>

# 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. Warning: Reverting this setting
# requires re-downloading the entire blockchain. (default: 0 =
# disable pruning blocks, 1 = allow manual pruning via RPC, >=550 =
# automatically prune block files to stay under the specified
# target size in MiB)
#prune=<n>

# If enabled, wipe chain state and block index, and rebuild them from
# blk*.dat files on disk. Also wipe and rebuild other optional
# indexes that are active. If an assumeutxo snapshot was loaded,
Expand All @@ -134,7 +142,7 @@

# Specify path to dynamic settings data file. Can be disabled with
# -nosettings. File is written at runtime and not meant to be
# edited by users (use bitcoin.conf instead for custom settings).
# edited by users (use blackmore.conf instead for custom settings).
# Relative paths will be prefixed by datadir location. (default:
# settings.json)
#settings=<file>
Expand All @@ -149,7 +157,7 @@
#startupnotify=<cmd>

# Maintain a full transaction index, used by the getrawtransaction rpc
# call (default: 0)
# call (default: 1)
#txindex=1

# Print version and exit
Expand All @@ -162,7 +170,7 @@
# Add a node to connect to and attempt to keep the connection open (see
# the addnode RPC help for more info). This option can be specified
# multiple times to add multiple nodes; connections are limited to
# 8 at a time and are counted separately from the -maxconnections
# 16 at a time and are counted separately from the -maxconnections
# limit.
#addnode=<ip>

Expand All @@ -178,8 +186,8 @@
# Bind to given address and always listen on it (default: 0.0.0.0). Use
# [host]:port notation for IPv6. Append =onion to tag any incoming
# connections to that address and port as incoming Tor connections
# (default: 127.0.0.1:8334=onion, testnet: 127.0.0.1:18334=onion,
# signet: 127.0.0.1:38334=onion, regtest: 127.0.0.1:18445=onion)
# (default: 127.0.0.1:15717=onion, testnet: 127.0.0.1:25717=onion,
# signet: 127.0.0.1:45717=onion, regtest: 127.0.0.1:35717=onion)
#bind=<addr>[:<port>][=onion]

# If set, then this host is configured for CJDNS (connecting to fc00::/8
Expand Down Expand Up @@ -232,7 +240,7 @@

# Maintain at most <n> connections to peers (default: 125). This limit
# does not apply to connections manually added via -addnode or the
# addnode RPC, which have a separate limit of 8.
# addnode RPC, which have a separate limit of 16.
#maxconnections=<n>

# Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)
Expand Down Expand Up @@ -279,7 +287,7 @@
#peerbloomfilters=1

# Listen for connections on <port>. Nodes not using the default ports
# (default: 8333, testnet: 18333, signet: 38333, regtest: 18444)
# (default: 15714, testnet: 25714, signet: 38333, regtest: 35714)
# are unlikely to get incoming connections. Not relevant for I2P
# (see doc/i2p.md).
#port=<port>
Expand Down Expand Up @@ -343,7 +351,7 @@


# What type of addresses to use ("legacy", "p2sh-segwit", "bech32", or
# "bech32m", default: "bech32")
# "bech32m", default: "legacy")
#addresstype=1

# Group outputs by address, selecting many (possibly all) or none, instead
Expand Down Expand Up @@ -376,10 +384,9 @@
# limited by the fee estimate for the longest target
#discardfee=<amt>

# A fee rate (in BTC/kvB) that will be used when fee estimation has
# insufficient data. 0 to entirely disable the fallbackfee feature.
# (default: 0.00)
#fallbackfee=<amt>
# Donate the specified percentage of staking rewards to the dev fund (0 to
# 95, default: 20)
#donatetodevfund=<n>

# Set key pool size to <n> (default: 1000). Warning: Smaller sizes may
# increase the risk of losing funds when restoring from an old
Expand All @@ -391,22 +398,30 @@
# allows the use of partial spend avoidance (default: 0.00)
#maxapsfee=<n>

# Fee rates (in BTC/kvB) smaller than this are considered zero fee for
# transaction creation (default: 0.00001)
#mintxfee=<amt>

# Fee rate (in BTC/kvB) to add to transactions you send (default: 0.00)
#paytxfee=<amt>

# Reserved balance not used for staking (default: 0)
#reservebalance=<amt>

# External signing tool, see doc/external-signer.md
#signer=<cmd>

# 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=<n>
# Enables or disables the staking cache; significantly improves staking
# performance, but can use a lot of memory (default: 0)
#stakecache=<true/false>

# Proof of stake timeout. (default: 500)
#staketimio=<n>

# Enables or disables staking (default: 1)
#staking=<true/false>

# Set transaction version to <n> (default: 1)
#txversion=<n>

# Specify wallet path to load at startup. Can be used multiple times to
# load multiple wallets. Path is to a directory containing wallet
Expand Down Expand Up @@ -434,9 +449,6 @@
# to invoke the command.
#walletnotify=<cmd>

# Send transactions with full-RBF opt-in enabled (RPC only, default: 1)
#walletrbf=1


### ZeroMQ notification options

Expand Down Expand Up @@ -480,9 +492,9 @@
# Output debug and trace logging (default: -nodebug, supplying <category>
# is optional). If <category> is not supplied or if <category> = 1,
# output all debug and trace logging. <category> can be: addrman,
# bench, blockstorage, cmpctblock, coindb, estimatefee, http, i2p,
# ipc, leveldb, libevent, mempool, mempoolrej, net, proxy, prune,
# qt, rand, reindex, rpc, scan, selectcoins, tor, txpackages,
# bench, blockstorage, cmpctblock, coindb, coinstake, http, i2p,
# ipc, leveldb, libevent, mempool, mempoolrej, net, proxy, qt,
# rand, reindex, rpc, scan, selectcoins, tor, txpackages,
# txreconciliation, util, validation, walletdb, zmq. This option
# can be specified multiple times to output multiple categories.
#debug=<category>
Expand Down Expand Up @@ -511,7 +523,7 @@
#logtimestamps=1

# Maximum total fees (in BTC) to use in a single wallet transaction;
# setting this too low may abort large transactions (default: 0.10)
# setting this too low may abort large transactions (default: 1.00)
#maxtxfee=<amt>

# Send trace/debug info to console (default: 1 when no -daemon. To disable
Expand Down Expand Up @@ -562,15 +574,11 @@
#datacarrier=1

# Relay and mine transactions whose data-carrying raw scriptPubKey is of
# this size or less (default: 83)
# this size or less (default: 223)
#datacarriersize=1

# Accept transaction replace-by-fee without requiring replaceability
# signaling (default: 0)
#mempoolfullrbf=1

# Fees (in BTC/kvB) smaller than this are considered zero fee for
# relaying, mining and transaction creation (default: 0.00001)
# relaying, mining and transaction creation (default: 0.0001)
#minrelaytxfee=<amt>

# Relay non-P2SH multisig (default: 1)
Expand All @@ -594,7 +602,7 @@
#blockmaxweight=<n>

# Set lowest fee rate (in BTC/kvB) for transactions to be included in
# block creation. (default: 0.00001)
# block creation. (default: 0.0001)
#blockmintxfee=<amt>


Expand Down Expand Up @@ -634,13 +642,12 @@
# Password for JSON-RPC connections
#rpcpassword=<pw>

# Listen for JSON-RPC connections on <port> (default: 8332, testnet:
# 18332, signet: 38332, regtest: 18443)
# Listen for JSON-RPC connections on <port> (default: 15715, testnet:
# 25715, signet: 45715, regtest: 35715)
#rpcport=<port>

# Sets the serialization of raw transaction or block hex returned in
# non-verbose mode, non-segwit(0) (DEPRECATED) or segwit(1)
# (default: 1)
# non-verbose mode, non-segwit(0) or segwit(1) (default: 0)
#rpcserialversion=1

# Set the number of threads to service RPC calls (default: 4)
Expand Down
4 changes: 2 additions & 2 deletions share/setup.nsi.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Section -Main SEC0000
File @abs_top_builddir@/release/@BITCOIN_GUI_NAME@@EXEEXT@
File /oname=COPYING.txt @abs_top_srcdir@/COPYING
File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt
File @abs_top_srcdir@/share/examples/bitcoin.conf
File @abs_top_srcdir@/share/examples/blackmore.conf
SetOutPath $INSTDIR\share\rpcauth
File @abs_top_srcdir@/share/rpcauth/*.*
SetOutPath $INSTDIR\daemon
Expand Down Expand Up @@ -130,7 +130,7 @@ Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
Delete /REBOOTOK $INSTDIR\COPYING.txt
Delete /REBOOTOK $INSTDIR\readme.txt
Delete /REBOOTOK $INSTDIR\bitcoin.conf
Delete /REBOOTOK $INSTDIR\blackmore.conf
RMDir /r /REBOOTOK $INSTDIR\share
RMDir /r /REBOOTOK $INSTDIR\daemon
DeleteRegValue HKCU "${REGKEY}\Components" Main
Expand Down

0 comments on commit ae8096f

Please sign in to comment.