From 2a5b96eb542800cc0d9dcb0d62c05976491e8b24 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 6 Mar 2026 11:20:36 -0800 Subject: [PATCH 001/122] build: bump to 31.0rc1 --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fe17cf62097..5ed673e23909 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,10 +28,10 @@ get_directory_property(precious_variables CACHE_VARIABLES) #============================= set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) -set(CLIENT_VERSION_MINOR 99) +set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 0) -set(CLIENT_VERSION_IS_RELEASE "false") +set(CLIENT_VERSION_RC 1) +set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") # During the enabling of the CXX and CXXOBJ languages, we modify From 62716a8c935160de41c40452f04496815bd86c01 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 6 Mar 2026 11:29:21 -0800 Subject: [PATCH 002/122] doc: Generate manpages for 31.0rc1 --- doc/man/bitcoin-cli.1 | 202 ++++++++- doc/man/bitcoin-qt.1 | 858 ++++++++++++++++++++++++++++++++++++++- doc/man/bitcoin-tx.1 | 160 +++++++- doc/man/bitcoin-util.1 | 79 +++- doc/man/bitcoin-wallet.1 | 114 +++++- doc/man/bitcoin.1 | 60 ++- doc/man/bitcoind.1 | 836 +++++++++++++++++++++++++++++++++++++- 7 files changed, 2288 insertions(+), 21 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 6bcad7006b08..e11689ac8ecf 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,5 +1,201 @@ -.TH BITCOIN-CLI "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-CLI "1" "March 2026" "bitcoin-cli v31.0.0rc1" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli +bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin-cli +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,-named \/\fR[\fI\,name=value\/\fR]... +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,help\/\fR +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,help \/\fR +.SH DESCRIPTION +Bitcoin Core RPC client version v31.0.0rc1 +.PP +The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. +.PP +It can be used to query network information, manage wallets, create or broadcast transactions, and control the Bitcoin Core server. +.PP +Use the "help" command to list all commands. Use "help " to show help for that command. +The \fB\-named\fR option allows you to specify parameters using the key=value format, eliminating the need to pass unused positional parameters. +.SH OPTIONS +.HP +\fB\-color=\fR +.IP +Color setting for CLI output (default: auto). Valid values: always, auto +(add color codes when standard output is connected to a terminal +and OS is not WIN32), never. Only applies to the output of +\fB\-getinfo\fR. +.HP +\fB\-conf=\fR +.IP +Specify configuration file. Relative paths will be prefixed by datadir +location. (default: bitcoin.conf) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-named\fR +.IP +Pass named instead of positional arguments (default: false) +.HP +\fB\-rpcclienttimeout=\fR +.IP +Timeout in seconds during HTTP requests, or 0 for no timeout. (default: +900) +.HP +\fB\-rpcconnect=\fR +.IP +Send commands to node running on (default: 127.0.0.1) +.HP +\fB\-rpccookiefile=\fR +.IP +Location of the auth cookie. Relative paths will be prefixed by a +net\-specific datadir location. (default: data dir) +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcport=\fR +.IP +Connect to JSON\-RPC on (default: 8332, testnet: 18332, testnet4: +48332, signet: 38332, regtest: 18443) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcwait\fR +.IP +Wait for RPC server to start +.HP +\fB\-rpcwaittimeout=\fR +.IP +Timeout in seconds to wait for the RPC server to start, or 0 for no +timeout. (default: 0) +.HP +\fB\-rpcwallet=\fR +.IP +Send RPC for non\-default wallet on RPC server (needs to exactly match +corresponding \fB\-wallet\fR option passed to bitcoind). This changes +the RPC endpoint used, e.g. +http://127.0.0.1:8332/wallet/ +.HP +\fB\-stdin\fR +.IP +Read extra arguments from standard input, one per line until EOF/Ctrl\-D +(recommended for sensitive information such as passphrases). When +combined with \fB\-stdinrpcpass\fR, the first line from standard input +is used for the RPC password. +.HP +\fB\-stdinrpcpass\fR +.IP +Read RPC password from standard input as a single line. When combined +with \fB\-stdin\fR, the first line from standard input is used for the +RPC password. When combined with \fB\-stdinwalletpassphrase\fR, +\fB\-stdinrpcpass\fR consumes the first line, and \fB\-stdinwalletpassphrase\fR +consumes the second. +.HP +\fB\-stdinwalletpassphrase\fR +.IP +Read wallet passphrase from standard input as a single line. When +combined with \fB\-stdin\fR, the first line from standard input is used +for the wallet passphrase. +.HP +\fB\-version\fR +.IP +Print version and exit +.PP +Debugging/Testing options: +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +CLI Commands: +.HP +\fB\-addrinfo\fR +.IP +Get the number of addresses known to the node, per network and total, +after filtering for quality and recency. The total number of +addresses known to the node may be higher. +.HP +\fB\-generate\fR +.IP +Generate blocks, equivalent to RPC getnewaddress followed by RPC +generatetoaddress. Optional positional integer arguments are +number of blocks to generate (default: 1) and maximum iterations +to try (default: 1000000), equivalent to RPC generatetoaddress +nblocks and maxtries arguments. Example: bitcoin\-cli \fB\-generate\fR 4 +1000 +.HP +\fB\-getinfo\fR +.IP +Get general information from the remote server. Note that unlike +server\-side RPC calls, the output of \fB\-getinfo\fR is the result of +multiple non\-atomic requests. Some entries in the output may +represent results from different states (e.g. wallet balance may +be as of a different block from the chain state reported) +.HP +\fB\-netinfo\fR +.IP +Get network peer connection information from the remote server. An +optional argument from 0 to 4 can be passed for different peers +listings (default: 0). If a non\-zero value is passed, an +additional "outonly" (or "o") argument can be passed to see +outbound peers only. Pass "help" (or "h") for detailed help +documentation. +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index ff4d1d2c7ac2..24b7bd86c50d 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,5 +1,857 @@ -.TH BITCOIN-QT "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-QT "1" "March 2026" "bitcoin-qt v31.0.0rc1" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt +bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin-qt +[\fI\,options\/\fR] [\fI\,URI\/\fR] +.SH DESCRIPTION +Bitcoin Core version v31.0.0rc1 +.PP +The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. +.PP +It combines the core functionalities of bitcoind with a user\-friendly interface for wallet management, transaction history, and network statistics. +.PP +It is suitable for users who prefer a graphical over a command\-line interface. +.PP +You can optionally specify a payment [URI], in e.g. the BIP21 URI format. +.SH OPTIONS +.HP +\fB\-alertnotify=\fR +.IP +Execute command when an alert is raised (%s in cmd is replaced by +message) +.HP +\fB\-allowignoredconf\fR +.IP +For backwards compatibility, treat an unused bitcoin.conf file in the +datadir as a warning, not an error. +.HP +\fB\-assumevalid=\fR +.IP +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: +00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +testnet3: +0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +testnet4: +000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +signet: +000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +.HP +\fB\-blockfilterindex=\fR +.IP +Maintain an index of compact filters by block (default: 0, values: +basic). If is not supplied or if = 1, indexes for +all known types are enabled. +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-blockreconstructionextratxn=\fR +.IP +Extra transactions to keep in memory for compact block reconstructions +(default: 100) +.HP +\fB\-blocksdir=\fR +.IP +Specify directory to hold blocks subdirectory for *.dat files (default: +) +.HP +\fB\-blocksonly\fR +.IP +Whether to reject transactions from network peers. Disables automatic +broadcast and rebroadcast of transactions, unless the source peer +has the 'forcerelay' permission. RPC transactions are not +affected. (default: 0) +.HP +\fB\-blocksxor\fR +.IP +Whether an XOR\-key applies to blocksdir *.dat files. The created XOR\-key +will be zeros for an existing blocksdir or when `\-blocksxor=0` is +set, and random for a freshly initialized blocksdir. (default: 1) +.HP +\fB\-coinstatsindex\fR +.IP +Maintain coinstats index used by the gettxoutsetinfo RPC (default: 0) +.HP +\fB\-conf=\fR +.IP +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) +.HP +\fB\-daemon\fR +.IP +Run in the background as a daemon and accept commands (default: 0) +.HP +\fB\-daemonwait\fR +.IP +Wait for initialization to be finished before exiting. This implies +\fB\-daemon\fR (default: 0) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-dbcache=\fR +.IP +Maximum database cache size MiB (minimum 4, default: 450). Make sure +you have enough RAM. In addition, unused memory allocated to the +mempool is shared with this cache (see \fB\-maxmempool\fR). +.HP +\fB\-debuglogfile=\fR +.IP +Specify location of debug log file (default: debug.log). Relative paths +will be prefixed by a net\-specific datadir location. Pass +\fB\-nodebuglogfile\fR to disable writing the log to a file. +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-includeconf=\fR +.IP +Specify additional configuration file, relative to the \fB\-datadir\fR path +(only useable from configuration file, not command line) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external file on startup +.HP +\fB\-maxmempool=\fR +.IP +Keep the transaction memory pool below megabytes (default: 300) +.HP +\fB\-mempoolexpiry=\fR +.IP +Do not keep transactions in the mempool longer than hours (default: +336) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (0 = auto, up to 15, <0 = +leave that many cores free, default: 0) +.HP +\fB\-persistmempool\fR +.IP +Whether to save the mempool on shutdown and load on restart (default: 1) +.HP +\fB\-persistmempoolv1\fR +.IP +Whether a mempool.dat file created by \fB\-persistmempool\fR or the savemempool +RPC will be written in the legacy format (version 1) or the +current format (version 2). This temporary option will be removed +in the future. (default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file. Relative paths will be prefixed by a net\-specific +datadir location. (default: bitcoind.pid) +.HP +\fB\-prune=\fR +.IP +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 \fB\-txindex\fR. 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) +.HP +\fB\-reindex\fR +.IP +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, +its chainstate will be wiped as well. The snapshot can then be +reloaded via RPC. +.HP +\fB\-reindex\-chainstate\fR +.IP +If enabled, wipe chain state, and rebuild it from blk*.dat files on +disk. If an assumeutxo snapshot was loaded, its chainstate will +be wiped as well. The snapshot can then be reloaded via RPC. +.HP +\fB\-settings=\fR +.IP +Specify path to dynamic settings data file. Can be disabled with +\fB\-nosettings\fR. File is written at runtime and not meant to be +edited by users (use bitcoin.conf instead for custom settings). +Relative paths will be prefixed by datadir location. (default: +settings.json) +.HP +\fB\-shutdownnotify=\fR +.IP +Execute command immediately before beginning shutdown. The need for +shutdown may be urgent, so be careful not to delay it long (if +the command doesn't require interaction with the server, consider +having it fork into the background). +.HP +\fB\-startupnotify=\fR +.IP +Execute command on startup. +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.HP +\fB\-txospenderindex\fR +.IP +Maintain a transaction output spender index, used by the +gettxspendingprevout rpc call (default: 0) +.HP +\fB\-version\fR +.IP +Print version and exit +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +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 \fB\-maxconnections\fR +limit. +.HP +\fB\-asmap=\fR +.IP +Specify asn mapping used for bucketing of the peers. Relative paths will +be prefixed by the net\-specific datadir location. If a bool arg +is given (\fB\-asmap\fR or \fB\-asmap\fR=\fI\,1\/\fR), the embedded mapping data in the +binary will be used. +.HP +\fB\-bantime=\fR +.IP +Default duration (in seconds) of manually configured bans (default: +86400) +.HP +\fB\-bind=\fR[:][=onion] +.IP +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, testnet3: 127.0.0.1:18334=onion, +testnet4: 127.0.0.1:48334=onion, signet: 127.0.0.1:38334=onion, +regtest: 127.0.0.1:18445=onion) +.HP +\fB\-cjdnsreachable\fR +.IP +If set, then this host is configured for CJDNS (connecting to fc00::/8 +addresses would lead us to the CJDNS network, see doc/cjdns.md) +(default: 0) +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node; \fB\-noconnect\fR disables automatic +connections (the rules for this peer are the same as for +\fB\-addnode\fR). This option can be specified multiple times to connect +to multiple nodes. +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR used or \fB\-maxconnections\fR=\fI\,0\/\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-fixedseeds\fR +.IP +Allow fixed seeds if DNS seeds don't provide peers (default: 1) +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-i2pacceptincoming\fR +.IP +Whether to accept inbound I2P connections (default: 1). Ignored if +\fB\-i2psam\fR is not set. Listening for inbound I2P connections is done +through the SAM proxy, not by binding to a local address and +port. +.HP +\fB\-i2psam=\fR +.IP +I2P SAM proxy to reach I2P peers and accept I2P connections +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR, \fB\-connect\fR or +\fB\-maxconnections\fR=\fI\,0\/\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor onion service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most automatic connections to peers (default: 125). This +limit does not apply to connections manually added via \fB\-addnode\fR +or the addnode RPC, which have a separate limit of 8. It does not +apply to short\-lived private broadcast connections either, which +have a separate limit of 64. +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection memory usage for the send buffer, *1000 bytes +(default: 1000) +.HP +\fB\-maxuploadtarget=\fR +.IP +Tries to keep outbound traffic under the given target per 24h. Limit +does not apply to peers with 'download' permission or blocks +created within past week. 0 = no limit (default: 0M). Optional +suffix units [k|K|m|M|g|G|t|T] (default: M). Lowercase is 1000 +base while uppercase is 1024 base +.HP +\fB\-natpmp\fR +.IP +Use PCP or NAT\-PMP to map the listening port (default: 1) +.HP +\fB\-networkactive\fR +.IP +Enable all P2P network activity (default: 1). Can be changed by the +setnetworkactive RPC command +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor onion services, set +\fB\-noonion\fR to disable (default: \fB\-proxy\fR). May be a local file path +prefixed with 'unix:'. +.HP +\fB\-onlynet=\fR +.IP +Make automatic outbound connections only to network (ipv4, ipv6, +onion, i2p, cjdns). Inbound and manual connections are not +affected by this option. It can be specified multiple times to +allow multiple networks. +.HP +\fB\-peerblockfilters\fR +.IP +Serve compact block filters to peers per BIP 157 (default: 0) +.HP +\fB\-peerbloomfilters\fR +.IP +Support filtering of blocks and transaction with bloom filters (default: +0) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8333, testnet3: 18333, +testnet4: 48333, signet: 38333, regtest: 18444). Not relevant for +I2P (see doc/i2p.md). If set to a value x, the default onion +listening port will be set to x+1. +.HP +\fB\-proxy=\fR[:]|unix:[=] +.IP +Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable. May be a local +file path prefixed with 'unix:' if the proxy supports it. Could +end in =network to set the proxy only for that network. The +network can be any of ipv4, ipv6, tor or cjdns. (default: +disabled) +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect. This +option can be specified multiple times to connect to multiple +nodes. During startup, seednodes will be tried before dnsseeds. +.HP +\fB\-timeout=\fR +.IP +Specify socket connection timeout in milliseconds. If an initial attempt +to connect is unsuccessful after this amount of time, drop it +(minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control host and port to use if onion listening enabled (default: +127.0.0.1:9051). If no port is specified, the default port of +9051 will be used. +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-v2transport\fR +.IP +Support v2 transport (default: 1) +.HP +\fB\-whitebind=\fR<[permissions@]addr> +.IP +Bind to the given address and add permission flags to the peers +connecting to it. Use [host]:port notation for IPv6. Allowed +permissions: bloomfilter (allow requesting BIP37 filtered blocks +and transactions), noban (do not ban for misbehavior; implies +download), forcerelay (relay transactions that are already in the +mempool; implies relay), relay (relay even in \fB\-blocksonly\fR mode, +and unlimited transaction announcements), mempool (allow +requesting BIP35 mempool contents), download (allow getheaders +during IBD, no disconnect after maxuploadtarget limit), addr +(responses to GETADDR avoid hitting the cache and contain random +records with the most up\-to\-date info). Specify multiple +permissions separated by commas (default: +download,noban,mempool,relay). Can be specified multiple times. +.HP +\fB\-whitelist=\fR<[permissions@]IP address or network> +.IP +Add permission flags to the peers using the given IP address (e.g. +1.2.3.4) or CIDR\-notated network (e.g. 1.2.3.0/24). Uses the same +permissions as \fB\-whitebind\fR. Additional flags "in" and "out" +control whether permissions apply to incoming connections and/or +manual (default: incoming only). Can be specified multiple times. +.PP +Wallet options: +.HP +\fB\-addresstype\fR +.IP +What type of addresses to use ("legacy", "p2sh\-segwit", "bech32", +"bech32m", default: "bech32") +.HP +\fB\-avoidpartialspends\fR +.IP +Group outputs by address, selecting many (possibly all) or none, instead +of selecting on a per\-output basis. Privacy is improved as +addresses are mostly swept with fewer transactions and outputs +are aggregated in clean change addresses. It may result in higher +fees due to less optimal coin selection caused by this added +limitation and possibly a larger\-than\-necessary number of inputs +being used. Always enabled for wallets with "avoid_reuse" +enabled, otherwise default: 0. +.HP +\fB\-changetype\fR +.IP +What type of change to use ("legacy", "p2sh\-segwit", "bech32", +"bech32m"). Default is "legacy" when \fB\-addresstype\fR=\fI\,legacy\/\fR, else it +is an implementation detail. +.HP +\fB\-consolidatefeerate=\fR +.IP +The maximum feerate (in BTC/kvB) at which transaction building may use +more inputs than strictly necessary so that the wallet's UTXO +pool can be reduced (default: 0.0001). +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-discardfee=\fR +.IP +The fee rate (in BTC/kvB) that indicates your tolerance for discarding +change by adding it to the fee (default: 0.0001). Note: An output +is discarded if it is dust at this rate, but we will always +discard up to the dust relay fee and a discard fee above that is +limited by the fee estimate for the longest target +.HP +\fB\-fallbackfee=\fR +.IP +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) +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 1000). Warning: Smaller sizes may +increase the risk of losing funds when restoring from an old +backup, if none of the addresses in the original keypool have +been used. +.HP +\fB\-maxapsfee=\fR +.IP +Spend up to this amount in additional (absolute) fees (in BTC) if it +allows the use of partial spend avoidance (default: 0.00) +.HP +\fB\-mintxfee=\fR +.IP +Fee rates (in BTC/kvB) smaller than this are considered zero fee for +transaction creation (default: 0.00001) +.HP +\fB\-signer=\fR +.IP +External signing tool, see doc/external\-signer.md +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +Include enough fee so transactions begin confirmation on average within +n blocks (default: 6) +.HP +\fB\-wallet=\fR +.IP +Specify wallet path to load at startup. Can be used multiple times to +load multiple wallets. Path is to a directory containing wallet +data and log files. If the path is not absolute, it is +interpreted relative to . This only loads existing +wallets and does not create new ones. For backwards compatibility +this also accepts names of existing top\-level data files in +. +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletdir=\fR +.IP +Specify directory to hold wallets (default: /wallets if it +exists, otherwise ) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes. %s in cmd is replaced +by TxID, %w is replaced by wallet name, %b is replaced by the +hash of the block including the transaction (set to 'unconfirmed' +if the transaction is not included) and %h is replaced by the +block height (\fB\-1\fR if not included). %w is not currently +implemented on windows. On systems where %w is supported, it +should NOT be quoted because this would break shell escaping used +to invoke the command. +.HP +\fB\-walletrbf\fR +.IP +Send transactions with full\-RBF opt\-in enabled (RPC only, default: 1) +.PP +ZeroMQ notification options: +.HP +\fB\-zmqpubhashblock=\fR
+.IP +Enable publish hash block in
+.HP +\fB\-zmqpubhashblockhwm=\fR +.IP +Set publish hash block outbound message high water mark (default: 1000) +.HP +\fB\-zmqpubhashtx=\fR
+.IP +Enable publish hash transaction in
+.HP +\fB\-zmqpubhashtxhwm=\fR +.IP +Set publish hash transaction outbound message high water mark (default: +1000) +.HP +\fB\-zmqpubrawblock=\fR
+.IP +Enable publish raw block in
+.HP +\fB\-zmqpubrawblockhwm=\fR +.IP +Set publish raw block outbound message high water mark (default: 1000) +.HP +\fB\-zmqpubrawtx=\fR
+.IP +Enable publish raw transaction in
+.HP +\fB\-zmqpubrawtxhwm=\fR +.IP +Set publish raw transaction outbound message high water mark (default: +1000) +.HP +\fB\-zmqpubsequence=\fR
+.IP +Enable publish hash block and tx sequence in
+.HP +\fB\-zmqpubsequencehwm=\fR +.IP +Set publish hash sequence message high water mark (default: 1000) +.PP +Debugging/Testing options: +.HP +\fB\-debug=\fR +.IP +Output debug and trace logging (default: \fB\-nodebug\fR, supplying +is optional). If is not supplied or if is 1 +or "all", output all debug logging. If is 0 or "none", +any other categories are ignored. Other valid values for + are: addrman, bench, blockstorage, cmpctblock, coindb, +estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, +mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, +rand, reindex, rpc, scan, selectcoins, tor, txpackages, +txreconciliation, validation, walletdb, zmq. This option can be +specified multiple times to output multiple categories. +.HP +\fB\-debugexclude=\fR +.IP +Exclude debug and trace logging for a category. Can be used in +conjunction with \fB\-debug\fR=\fI\,1\/\fR to output debug and trace logging for +all categories except the specified category. This option can be +specified multiple times to exclude multiple categories. This +takes priority over "\-debug" +.HP +\fB\-help\-debug\fR +.IP +Print help message with debugging options and exit +.HP +\fB\-logips\fR +.IP +Include IP addresses in log output (default: 0) +.HP +\fB\-loglevelalways\fR +.IP +Always prepend a category and level (default: 0) +.HP +\fB\-logsourcelocations\fR +.IP +Prepend debug output with name of the originating source location +(source file, line number and function name) (default: 0) +.HP +\fB\-logthreadnames\fR +.IP +Prepend debug output with name of the originating thread (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees (in BTC) to use in a single wallet transaction; +setting this too low may abort large transactions (default: 0.10) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console (default: 1 when no \fB\-daemon\fR. To disable +logging to file, set \fB\-nodebuglogfile\fR) +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.HP +\fB\-uacomment=\fR +.IP +Append comment to the user agent string +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +Node relay options: +.HP +\fB\-bytespersigop\fR +.IP +Equivalent bytes per sigop in transactions for relay and mining +(default: 20) +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Relay and mine transactions whose data\-carrying raw scriptPubKeys in +aggregate are of this size or less, allowing multiple outputs +(default: 100000) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kvB) smaller than this are considered zero fee for +relaying, mining and transaction creation (default: 0.000001) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay transactions creating non\-P2SH multisig outputs (default: 1) +.HP +\fB\-privatebroadcast\fR +.IP +Broadcast transactions submitted via sendrawtransaction RPC using +short\-lived connections through the Tor or I2P networks, without +putting them in the mempool first. Transactions submitted through +the wallet are not affected by this option (default: 0) +.HP +\fB\-whitelistforcerelay\fR +.IP +Add 'forcerelay' permission to whitelisted peers with default +permissions. This will relay transactions even if the +transactions were already in the mempool. (default: 0) +.HP +\fB\-whitelistrelay\fR +.IP +Add 'relay' permission to whitelisted peers with default permissions. +This will accept relayed transactions even when not relaying +transactions (default: 1) +.PP +Block creation options: +.HP +\fB\-blockmintxfee=\fR +.IP +Set lowest fee rate (in BTC/kvB) for transactions to be included in +block creation. (default: 0.00000001) +.HP +\fB\-blockreservedweight=\fR +.IP +Reserve space for the fixed\-size block header plus the largest coinbase +transaction the mining software may add to the block. Only +affects mining RPC clients, not IPC clients. (default: 8000). +.PP +RPC server options: +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid values for +are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. +1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all +ipv4 (0.0.0.0/0), or all ipv6 (::/0). RFC4193 is allowed only if +\fB\-cjdnsreachable\fR=\fI\,0\/\fR. This option can be specified multiple times +.HP +\fB\-rpcauth=\fR +.IP +Username and HMAC\-SHA\-256 hashed password for JSON\-RPC connections. The +field comes in the format: :$. A +canonical python script is included in share/rpcauth. The client +then connects normally using the +rpcuser=/rpcpassword= pair of arguments. This +option can be specified multiple times +.HP +\fB\-rpcbind=\fR[:port] +.IP +Bind to given address to listen for JSON\-RPC connections. Do not expose +the RPC server to untrusted networks such as the public internet! +This option is ignored unless \fB\-rpcallowip\fR is also passed. Port is +optional and overrides \fB\-rpcport\fR. Use [host]:port notation for +IPv6. This option can be specified multiple times (default: +127.0.0.1 and ::1 i.e., localhost) +.HP +\fB\-rpccookiefile=\fR +.IP +Location of the auth cookie. Relative paths will be prefixed by a +net\-specific datadir location. (default: data dir) +.HP +\fB\-rpccookieperms=\fR +.IP +Set permissions on the RPC auth cookie file so that it is readable by +[owner|group|all] (default: owner [via umask 0077]) +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8332, testnet3: +18332, testnet4: 48332, signet: 38332, regtest: 18443) +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 16) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcwhitelist=\fR +.IP +Set a whitelist to filter incoming RPC calls for a specific user. The +field comes in the format: :,,...,. If multiple whitelists are set for a given user, +they are set\-intersected. See \fB\-rpcwhitelistdefault\fR documentation +for information on default whitelist behavior. +.HP +\fB\-rpcwhitelistdefault\fR +.IP +Sets default behavior for rpc whitelisting. Unless rpcwhitelistdefault +is set to 0, if any \fB\-rpcwhitelist\fR is set, the rpc server acts as +if all rpc users are subject to empty\-unless\-otherwise\-specified +whitelists. If rpcwhitelistdefault is set to 1 and no +\fB\-rpcwhitelist\fR is set, rpc server acts as if all rpc users are +subject to empty whitelists. +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.PP +UI Options: +.HP +\fB\-choosedatadir\fR +.IP +Choose data directory on startup (default: 0) +.HP +\fB\-lang=\fR +.IP +Set language, for example "de_DE" (default: system locale) +.HP +\fB\-min\fR +.IP +Start minimized +.HP +\fB\-resetguisettings\fR +.IP +Reset all settings changed in the GUI +.HP +\fB\-splash\fR +.IP +Show splash screen on startup (default: 1) +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 776bb462342a..f66cdbd2ef57 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,5 +1,159 @@ -.TH BITCOIN-TX "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-TX "1" "March 2026" "bitcoin-tx v31.0.0rc1" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx +bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin-tx +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] +.br +.B bitcoin-tx +[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] +.SH DESCRIPTION +Bitcoin Core bitcoin\-tx utility version v31.0.0rc1 +.PP +The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. +.PP +bitcoin\-tx can be used with " [commands]" to update a hex\-encoded bitcoin transaction, or with "\-create [commands]" to create a hex\-encoded bitcoin transaction. +.SH OPTIONS +.HP +\fB\-create\fR +.IP +Create new, empty TX. +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-json\fR +.IP +Select JSON output +.HP +\fB\-txid\fR +.IP +Output only the hex\-encoded transaction id of the resultant transaction. +.HP +\fB\-version\fR +.IP +Print version and exit +.PP +Debugging/Testing options: +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +Commands: +.IP +delin=N +.IP +Delete input N from TX +.IP +delout=N +.IP +Delete output N from TX +.IP +in=TXID:VOUT(:SEQUENCE_NUMBER) +.IP +Add input to TX +.IP +locktime=N +.IP +Set TX lock time to N +.IP +nversion=N +.IP +Set TX version to N +.IP +outaddr=VALUE:ADDRESS +.IP +Add address\-based output to TX +.IP +outdata=[VALUE:]DATA +.IP +Add data\-based output to TX +.IP +outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS] +.IP +Add Pay To n\-of\-m Multi\-sig output to TX. n = REQUIRED, m = PUBKEYS. +Optionally add the "W" flag to produce a +pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to +wrap the output in a pay\-to\-script\-hash. +.IP +outpubkey=VALUE:PUBKEY[:FLAGS] +.IP +Add pay\-to\-pubkey output to TX. Optionally add the "W" flag to produce a +pay\-to\-witness\-pubkey\-hash output. Optionally add the "S" flag to +wrap the output in a pay\-to\-script\-hash. +.IP +outscript=VALUE:SCRIPT[:FLAGS] +.IP +Add raw script output to TX. Optionally add the "W" flag to produce a +pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to +wrap the output in a pay\-to\-script\-hash. +.IP +replaceable(=N) +.IP +Sets Replace\-By\-Fee (RBF) opt\-in sequence number for input N. If N is +not provided, the command attempts to opt\-in all available inputs +for RBF. If the transaction has no inputs, this option is +ignored. +.IP +sign=SIGHASH\-FLAGS +.IP +Add zero or more signatures to transaction. This command requires JSON +registers:prevtxs=JSON object, privatekeys=JSON object. See +signrawtransactionwithkey docs for format of sighash flags, JSON +objects. +.PP +Register Commands: +.IP +load=NAME:FILENAME +.IP +Load JSON file FILENAME into register NAME +.IP +set=NAME:JSON\-STRING +.IP +Set register NAME to given JSON\-STRING +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 5c733c6e21dc..936544e3da80 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,5 +1,78 @@ -.TH BITCOIN-UTIL "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-UTIL "1" "March 2026" "bitcoin-util v31.0.0rc1" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util +bitcoin-util \- manual page for bitcoin-util v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin-util +[\fI\,options\/\fR] [\fI\,command\/\fR] +.br +.B bitcoin-util +[\fI\,options\/\fR] \fI\,grind \/\fR +.SH DESCRIPTION +Bitcoin Core bitcoin\-util utility version v31.0.0rc1 +.PP +The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. +.SH OPTIONS +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-version\fR +.IP +Print version and exit +.PP +Debugging/Testing options: +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +Commands: +.IP +grind +.IP +Perform proof of work on hex header string +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 2da43dec6639..e9725c918c0c 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,5 +1,113 @@ -.TH BITCOIN-WALLET "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-WALLET "1" "March 2026" "bitcoin-wallet v31.0.0rc1" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin-wallet +[\fI\,options\/\fR] \fI\,\/\fR +.SH DESCRIPTION +Bitcoin Core bitcoin\-wallet utility version v31.0.0rc1 +.PP +bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. +.PP +By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir. +.PP +To change the target wallet, use the \fB\-datadir\fR, \fB\-wallet\fR and (test)chain selection arguments. +.SH OPTIONS +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-dumpfile=\fR +.IP +When used with 'dump', writes out the records to this file. When used +with 'createfromdump', loads the records into a new wallet. +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-version\fR +.IP +Print version and exit +.HP +\fB\-wallet=\fR +.IP +Specify wallet name +.PP +Debugging/Testing options: +.HP +\fB\-debug=\fR +.IP +Output debugging information (default: 0). +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console (default: 1 when no \fB\-debug\fR is true, 0 +otherwise). +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +Commands: +.IP +create +.IP +Create a new descriptor wallet file +.IP +createfromdump +.IP +Create new wallet file from dumped records +.IP +dump +.IP +Print out all of the wallet key\-value records +.IP +info +.IP +Get wallet info +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 80deae70f5d8..2120941efdcd 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,5 +1,59 @@ -.TH BITCOIN "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN "1" "March 2026" "bitcoin v31.0.0rc1" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin +bitcoin \- manual page for bitcoin v31.0.0rc1 +.SH SYNOPSIS +.B bitcoin +[\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... +.SH OPTIONS +.TP +\fB\-m\fR, \fB\-\-multiprocess\fR +Run multiprocess binaries bitcoin\-node, bitcoin\-gui. +.TP +\fB\-M\fR, \fB\-\-monolithic\fR +Run monolithic binaries bitcoind, bitcoin\-qt. (Default behavior) +.TP +\fB\-v\fR, \fB\-\-version\fR +Show version information +.TP +\fB\-h\fR, \fB\-\-help\fR +Show full help message +.SS "Commands:" +.TP +gui [ARGS] +Start GUI, equivalent to running 'bitcoin\-qt [ARGS]' or 'bitcoin\-gui [ARGS]'. +.TP +node [ARGS] +Start node, equivalent to running 'bitcoind [ARGS]' or 'bitcoin\-node [ARGS]'. +.TP +rpc [ARGS] +Call RPC method, equivalent to running 'bitcoin\-cli \fB\-named\fR [ARGS]'. +.TP +wallet [ARGS] +Call wallet command, equivalent to running 'bitcoin\-wallet [ARGS]'. +.TP +tx [ARGS] +Manipulate hex\-encoded transactions, equivalent to running 'bitcoin\-tx [ARGS]'. +.TP +help +Show full help message. +.SS "Additional less commonly used commands:" +.TP +bench [ARGS] +Run bench command, equivalent to running 'bench_bitcoin [ARGS]'. +.IP +chainstate [ARGS] Run bitcoin kernel chainstate util, equivalent to running 'bitcoin\-chainstate [ARGS]'. +test [ARGS] Run unit tests, equivalent to running 'test_bitcoin [ARGS]'. +test\-gui [ARGS] Run GUI unit tests, equivalent to running 'test_bitcoin\-qt [ARGS]'. +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index 2c88f745205b..0b44a13bb76e 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,5 +1,835 @@ -.TH BITCOIND "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIND "1" "March 2026" "bitcoind v31.0.0rc1" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind +bitcoind \- manual page for bitcoind v31.0.0rc1 +.SH SYNOPSIS +.B bitcoind +[\fI\,options\/\fR] +.SH DESCRIPTION +Bitcoin Core daemon version v31.0.0rc1 bitcoind +.PP +The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. +.PP +It provides the backbone of the Bitcoin network and its RPC, REST and ZMQ services can provide various transaction, block and address\-related services. +.PP +There is an optional wallet component which provides transaction services. +.PP +It can be used in a headless environment or as part of a server setup. +.SH OPTIONS +.HP +\fB\-alertnotify=\fR +.IP +Execute command when an alert is raised (%s in cmd is replaced by +message) +.HP +\fB\-allowignoredconf\fR +.IP +For backwards compatibility, treat an unused bitcoin.conf file in the +datadir as a warning, not an error. +.HP +\fB\-assumevalid=\fR +.IP +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: +00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +testnet3: +0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +testnet4: +000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +signet: +000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +.HP +\fB\-blockfilterindex=\fR +.IP +Maintain an index of compact filters by block (default: 0, values: +basic). If is not supplied or if = 1, indexes for +all known types are enabled. +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-blockreconstructionextratxn=\fR +.IP +Extra transactions to keep in memory for compact block reconstructions +(default: 100) +.HP +\fB\-blocksdir=\fR +.IP +Specify directory to hold blocks subdirectory for *.dat files (default: +) +.HP +\fB\-blocksonly\fR +.IP +Whether to reject transactions from network peers. Disables automatic +broadcast and rebroadcast of transactions, unless the source peer +has the 'forcerelay' permission. RPC transactions are not +affected. (default: 0) +.HP +\fB\-blocksxor\fR +.IP +Whether an XOR\-key applies to blocksdir *.dat files. The created XOR\-key +will be zeros for an existing blocksdir or when `\-blocksxor=0` is +set, and random for a freshly initialized blocksdir. (default: 1) +.HP +\fB\-coinstatsindex\fR +.IP +Maintain coinstats index used by the gettxoutsetinfo RPC (default: 0) +.HP +\fB\-conf=\fR +.IP +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) +.HP +\fB\-daemon\fR +.IP +Run in the background as a daemon and accept commands (default: 0) +.HP +\fB\-daemonwait\fR +.IP +Wait for initialization to be finished before exiting. This implies +\fB\-daemon\fR (default: 0) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-dbcache=\fR +.IP +Maximum database cache size MiB (minimum 4, default: 450). Make sure +you have enough RAM. In addition, unused memory allocated to the +mempool is shared with this cache (see \fB\-maxmempool\fR). +.HP +\fB\-debuglogfile=\fR +.IP +Specify location of debug log file (default: debug.log). Relative paths +will be prefixed by a net\-specific datadir location. Pass +\fB\-nodebuglogfile\fR to disable writing the log to a file. +.HP +\fB\-help\fR +.IP +Print this help message and exit (also \fB\-h\fR or \-?) +.HP +\fB\-includeconf=\fR +.IP +Specify additional configuration file, relative to the \fB\-datadir\fR path +(only useable from configuration file, not command line) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external file on startup +.HP +\fB\-maxmempool=\fR +.IP +Keep the transaction memory pool below megabytes (default: 300) +.HP +\fB\-mempoolexpiry=\fR +.IP +Do not keep transactions in the mempool longer than hours (default: +336) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (0 = auto, up to 15, <0 = +leave that many cores free, default: 0) +.HP +\fB\-persistmempool\fR +.IP +Whether to save the mempool on shutdown and load on restart (default: 1) +.HP +\fB\-persistmempoolv1\fR +.IP +Whether a mempool.dat file created by \fB\-persistmempool\fR or the savemempool +RPC will be written in the legacy format (version 1) or the +current format (version 2). This temporary option will be removed +in the future. (default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file. Relative paths will be prefixed by a net\-specific +datadir location. (default: bitcoind.pid) +.HP +\fB\-prune=\fR +.IP +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 \fB\-txindex\fR. 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) +.HP +\fB\-reindex\fR +.IP +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, +its chainstate will be wiped as well. The snapshot can then be +reloaded via RPC. +.HP +\fB\-reindex\-chainstate\fR +.IP +If enabled, wipe chain state, and rebuild it from blk*.dat files on +disk. If an assumeutxo snapshot was loaded, its chainstate will +be wiped as well. The snapshot can then be reloaded via RPC. +.HP +\fB\-settings=\fR +.IP +Specify path to dynamic settings data file. Can be disabled with +\fB\-nosettings\fR. File is written at runtime and not meant to be +edited by users (use bitcoin.conf instead for custom settings). +Relative paths will be prefixed by datadir location. (default: +settings.json) +.HP +\fB\-shutdownnotify=\fR +.IP +Execute command immediately before beginning shutdown. The need for +shutdown may be urgent, so be careful not to delay it long (if +the command doesn't require interaction with the server, consider +having it fork into the background). +.HP +\fB\-startupnotify=\fR +.IP +Execute command on startup. +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.HP +\fB\-txospenderindex\fR +.IP +Maintain a transaction output spender index, used by the +gettxspendingprevout rpc call (default: 0) +.HP +\fB\-version\fR +.IP +Print version and exit +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +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 \fB\-maxconnections\fR +limit. +.HP +\fB\-asmap=\fR +.IP +Specify asn mapping used for bucketing of the peers. Relative paths will +be prefixed by the net\-specific datadir location. If a bool arg +is given (\fB\-asmap\fR or \fB\-asmap\fR=\fI\,1\/\fR), the embedded mapping data in the +binary will be used. +.HP +\fB\-bantime=\fR +.IP +Default duration (in seconds) of manually configured bans (default: +86400) +.HP +\fB\-bind=\fR[:][=onion] +.IP +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, testnet3: 127.0.0.1:18334=onion, +testnet4: 127.0.0.1:48334=onion, signet: 127.0.0.1:38334=onion, +regtest: 127.0.0.1:18445=onion) +.HP +\fB\-cjdnsreachable\fR +.IP +If set, then this host is configured for CJDNS (connecting to fc00::/8 +addresses would lead us to the CJDNS network, see doc/cjdns.md) +(default: 0) +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node; \fB\-noconnect\fR disables automatic +connections (the rules for this peer are the same as for +\fB\-addnode\fR). This option can be specified multiple times to connect +to multiple nodes. +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR used or \fB\-maxconnections\fR=\fI\,0\/\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-fixedseeds\fR +.IP +Allow fixed seeds if DNS seeds don't provide peers (default: 1) +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-i2pacceptincoming\fR +.IP +Whether to accept inbound I2P connections (default: 1). Ignored if +\fB\-i2psam\fR is not set. Listening for inbound I2P connections is done +through the SAM proxy, not by binding to a local address and +port. +.HP +\fB\-i2psam=\fR +.IP +I2P SAM proxy to reach I2P peers and accept I2P connections +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR, \fB\-connect\fR or +\fB\-maxconnections\fR=\fI\,0\/\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor onion service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most automatic connections to peers (default: 125). This +limit does not apply to connections manually added via \fB\-addnode\fR +or the addnode RPC, which have a separate limit of 8. It does not +apply to short\-lived private broadcast connections either, which +have a separate limit of 64. +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection memory usage for the send buffer, *1000 bytes +(default: 1000) +.HP +\fB\-maxuploadtarget=\fR +.IP +Tries to keep outbound traffic under the given target per 24h. Limit +does not apply to peers with 'download' permission or blocks +created within past week. 0 = no limit (default: 0M). Optional +suffix units [k|K|m|M|g|G|t|T] (default: M). Lowercase is 1000 +base while uppercase is 1024 base +.HP +\fB\-natpmp\fR +.IP +Use PCP or NAT\-PMP to map the listening port (default: 1) +.HP +\fB\-networkactive\fR +.IP +Enable all P2P network activity (default: 1). Can be changed by the +setnetworkactive RPC command +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor onion services, set +\fB\-noonion\fR to disable (default: \fB\-proxy\fR). May be a local file path +prefixed with 'unix:'. +.HP +\fB\-onlynet=\fR +.IP +Make automatic outbound connections only to network (ipv4, ipv6, +onion, i2p, cjdns). Inbound and manual connections are not +affected by this option. It can be specified multiple times to +allow multiple networks. +.HP +\fB\-peerblockfilters\fR +.IP +Serve compact block filters to peers per BIP 157 (default: 0) +.HP +\fB\-peerbloomfilters\fR +.IP +Support filtering of blocks and transaction with bloom filters (default: +0) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8333, testnet3: 18333, +testnet4: 48333, signet: 38333, regtest: 18444). Not relevant for +I2P (see doc/i2p.md). If set to a value x, the default onion +listening port will be set to x+1. +.HP +\fB\-proxy=\fR[:]|unix:[=] +.IP +Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable. May be a local +file path prefixed with 'unix:' if the proxy supports it. Could +end in =network to set the proxy only for that network. The +network can be any of ipv4, ipv6, tor or cjdns. (default: +disabled) +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect. This +option can be specified multiple times to connect to multiple +nodes. During startup, seednodes will be tried before dnsseeds. +.HP +\fB\-timeout=\fR +.IP +Specify socket connection timeout in milliseconds. If an initial attempt +to connect is unsuccessful after this amount of time, drop it +(minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control host and port to use if onion listening enabled (default: +127.0.0.1:9051). If no port is specified, the default port of +9051 will be used. +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-v2transport\fR +.IP +Support v2 transport (default: 1) +.HP +\fB\-whitebind=\fR<[permissions@]addr> +.IP +Bind to the given address and add permission flags to the peers +connecting to it. Use [host]:port notation for IPv6. Allowed +permissions: bloomfilter (allow requesting BIP37 filtered blocks +and transactions), noban (do not ban for misbehavior; implies +download), forcerelay (relay transactions that are already in the +mempool; implies relay), relay (relay even in \fB\-blocksonly\fR mode, +and unlimited transaction announcements), mempool (allow +requesting BIP35 mempool contents), download (allow getheaders +during IBD, no disconnect after maxuploadtarget limit), addr +(responses to GETADDR avoid hitting the cache and contain random +records with the most up\-to\-date info). Specify multiple +permissions separated by commas (default: +download,noban,mempool,relay). Can be specified multiple times. +.HP +\fB\-whitelist=\fR<[permissions@]IP address or network> +.IP +Add permission flags to the peers using the given IP address (e.g. +1.2.3.4) or CIDR\-notated network (e.g. 1.2.3.0/24). Uses the same +permissions as \fB\-whitebind\fR. Additional flags "in" and "out" +control whether permissions apply to incoming connections and/or +manual (default: incoming only). Can be specified multiple times. +.PP +Wallet options: +.HP +\fB\-addresstype\fR +.IP +What type of addresses to use ("legacy", "p2sh\-segwit", "bech32", +"bech32m", default: "bech32") +.HP +\fB\-avoidpartialspends\fR +.IP +Group outputs by address, selecting many (possibly all) or none, instead +of selecting on a per\-output basis. Privacy is improved as +addresses are mostly swept with fewer transactions and outputs +are aggregated in clean change addresses. It may result in higher +fees due to less optimal coin selection caused by this added +limitation and possibly a larger\-than\-necessary number of inputs +being used. Always enabled for wallets with "avoid_reuse" +enabled, otherwise default: 0. +.HP +\fB\-changetype\fR +.IP +What type of change to use ("legacy", "p2sh\-segwit", "bech32", +"bech32m"). Default is "legacy" when \fB\-addresstype\fR=\fI\,legacy\/\fR, else it +is an implementation detail. +.HP +\fB\-consolidatefeerate=\fR +.IP +The maximum feerate (in BTC/kvB) at which transaction building may use +more inputs than strictly necessary so that the wallet's UTXO +pool can be reduced (default: 0.0001). +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-discardfee=\fR +.IP +The fee rate (in BTC/kvB) that indicates your tolerance for discarding +change by adding it to the fee (default: 0.0001). Note: An output +is discarded if it is dust at this rate, but we will always +discard up to the dust relay fee and a discard fee above that is +limited by the fee estimate for the longest target +.HP +\fB\-fallbackfee=\fR +.IP +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) +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 1000). Warning: Smaller sizes may +increase the risk of losing funds when restoring from an old +backup, if none of the addresses in the original keypool have +been used. +.HP +\fB\-maxapsfee=\fR +.IP +Spend up to this amount in additional (absolute) fees (in BTC) if it +allows the use of partial spend avoidance (default: 0.00) +.HP +\fB\-mintxfee=\fR +.IP +Fee rates (in BTC/kvB) smaller than this are considered zero fee for +transaction creation (default: 0.00001) +.HP +\fB\-signer=\fR +.IP +External signing tool, see doc/external\-signer.md +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +Include enough fee so transactions begin confirmation on average within +n blocks (default: 6) +.HP +\fB\-wallet=\fR +.IP +Specify wallet path to load at startup. Can be used multiple times to +load multiple wallets. Path is to a directory containing wallet +data and log files. If the path is not absolute, it is +interpreted relative to . This only loads existing +wallets and does not create new ones. For backwards compatibility +this also accepts names of existing top\-level data files in +. +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletdir=\fR +.IP +Specify directory to hold wallets (default: /wallets if it +exists, otherwise ) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes. %s in cmd is replaced +by TxID, %w is replaced by wallet name, %b is replaced by the +hash of the block including the transaction (set to 'unconfirmed' +if the transaction is not included) and %h is replaced by the +block height (\fB\-1\fR if not included). %w is not currently +implemented on windows. On systems where %w is supported, it +should NOT be quoted because this would break shell escaping used +to invoke the command. +.HP +\fB\-walletrbf\fR +.IP +Send transactions with full\-RBF opt\-in enabled (RPC only, default: 1) +.PP +ZeroMQ notification options: +.HP +\fB\-zmqpubhashblock=\fR
+.IP +Enable publish hash block in
+.HP +\fB\-zmqpubhashblockhwm=\fR +.IP +Set publish hash block outbound message high water mark (default: 1000) +.HP +\fB\-zmqpubhashtx=\fR
+.IP +Enable publish hash transaction in
+.HP +\fB\-zmqpubhashtxhwm=\fR +.IP +Set publish hash transaction outbound message high water mark (default: +1000) +.HP +\fB\-zmqpubrawblock=\fR
+.IP +Enable publish raw block in
+.HP +\fB\-zmqpubrawblockhwm=\fR +.IP +Set publish raw block outbound message high water mark (default: 1000) +.HP +\fB\-zmqpubrawtx=\fR
+.IP +Enable publish raw transaction in
+.HP +\fB\-zmqpubrawtxhwm=\fR +.IP +Set publish raw transaction outbound message high water mark (default: +1000) +.HP +\fB\-zmqpubsequence=\fR
+.IP +Enable publish hash block and tx sequence in
+.HP +\fB\-zmqpubsequencehwm=\fR +.IP +Set publish hash sequence message high water mark (default: 1000) +.PP +Debugging/Testing options: +.HP +\fB\-debug=\fR +.IP +Output debug and trace logging (default: \fB\-nodebug\fR, supplying +is optional). If is not supplied or if is 1 +or "all", output all debug logging. If is 0 or "none", +any other categories are ignored. Other valid values for + are: addrman, bench, blockstorage, cmpctblock, coindb, +estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, +mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, +rand, reindex, rpc, scan, selectcoins, tor, txpackages, +txreconciliation, validation, walletdb, zmq. This option can be +specified multiple times to output multiple categories. +.HP +\fB\-debugexclude=\fR +.IP +Exclude debug and trace logging for a category. Can be used in +conjunction with \fB\-debug\fR=\fI\,1\/\fR to output debug and trace logging for +all categories except the specified category. This option can be +specified multiple times to exclude multiple categories. This +takes priority over "\-debug" +.HP +\fB\-help\-debug\fR +.IP +Print help message with debugging options and exit +.HP +\fB\-logips\fR +.IP +Include IP addresses in log output (default: 0) +.HP +\fB\-loglevelalways\fR +.IP +Always prepend a category and level (default: 0) +.HP +\fB\-logsourcelocations\fR +.IP +Prepend debug output with name of the originating source location +(source file, line number and function name) (default: 0) +.HP +\fB\-logthreadnames\fR +.IP +Prepend debug output with name of the originating thread (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees (in BTC) to use in a single wallet transaction; +setting this too low may abort large transactions (default: 0.10) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console (default: 1 when no \fB\-daemon\fR. To disable +logging to file, set \fB\-nodebuglogfile\fR) +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.HP +\fB\-uacomment=\fR +.IP +Append comment to the user agent string +.PP +Chain selection options: +.HP +\fB\-chain=\fR +.IP +Use the chain (default: main). Allowed values: main, test, +testnet4, signet, regtest +.HP +\fB\-signet\fR +.IP +Use the signet chain. Equivalent to \fB\-chain\fR=\fI\,signet\/\fR. Note that the network +is defined by the \fB\-signetchallenge\fR parameter +.HP +\fB\-signetchallenge\fR +.IP +Blocks must satisfy the given script to be considered valid (only for +signet networks; defaults to the global default signet test +network challenge) +.HP +\fB\-signetseednode\fR +.IP +Specify a seed node for the signet network, in the hostname[:port] +format, e.g. sig.net:1234 (may be used multiple times to specify +multiple seed nodes; defaults to the global default signet test +network seed node(s)) +.HP +\fB\-testnet\fR +.IP +Use the testnet3 chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR. Support for testnet3 +is deprecated and will be removed in an upcoming release. +Consider moving to testnet4 now by using \fB\-testnet4\fR. +.HP +\fB\-testnet4\fR +.IP +Use the testnet4 chain. Equivalent to \fB\-chain\fR=\fI\,testnet4\/\fR. +.PP +Node relay options: +.HP +\fB\-bytespersigop\fR +.IP +Equivalent bytes per sigop in transactions for relay and mining +(default: 20) +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Relay and mine transactions whose data\-carrying raw scriptPubKeys in +aggregate are of this size or less, allowing multiple outputs +(default: 100000) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kvB) smaller than this are considered zero fee for +relaying, mining and transaction creation (default: 0.000001) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay transactions creating non\-P2SH multisig outputs (default: 1) +.HP +\fB\-privatebroadcast\fR +.IP +Broadcast transactions submitted via sendrawtransaction RPC using +short\-lived connections through the Tor or I2P networks, without +putting them in the mempool first. Transactions submitted through +the wallet are not affected by this option (default: 0) +.HP +\fB\-whitelistforcerelay\fR +.IP +Add 'forcerelay' permission to whitelisted peers with default +permissions. This will relay transactions even if the +transactions were already in the mempool. (default: 0) +.HP +\fB\-whitelistrelay\fR +.IP +Add 'relay' permission to whitelisted peers with default permissions. +This will accept relayed transactions even when not relaying +transactions (default: 1) +.PP +Block creation options: +.HP +\fB\-blockmintxfee=\fR +.IP +Set lowest fee rate (in BTC/kvB) for transactions to be included in +block creation. (default: 0.00000001) +.HP +\fB\-blockreservedweight=\fR +.IP +Reserve space for the fixed\-size block header plus the largest coinbase +transaction the mining software may add to the block. Only +affects mining RPC clients, not IPC clients. (default: 8000). +.PP +RPC server options: +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid values for +are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. +1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all +ipv4 (0.0.0.0/0), or all ipv6 (::/0). RFC4193 is allowed only if +\fB\-cjdnsreachable\fR=\fI\,0\/\fR. This option can be specified multiple times +.HP +\fB\-rpcauth=\fR +.IP +Username and HMAC\-SHA\-256 hashed password for JSON\-RPC connections. The +field comes in the format: :$. A +canonical python script is included in share/rpcauth. The client +then connects normally using the +rpcuser=/rpcpassword= pair of arguments. This +option can be specified multiple times +.HP +\fB\-rpcbind=\fR[:port] +.IP +Bind to given address to listen for JSON\-RPC connections. Do not expose +the RPC server to untrusted networks such as the public internet! +This option is ignored unless \fB\-rpcallowip\fR is also passed. Port is +optional and overrides \fB\-rpcport\fR. Use [host]:port notation for +IPv6. This option can be specified multiple times (default: +127.0.0.1 and ::1 i.e., localhost) +.HP +\fB\-rpccookiefile=\fR +.IP +Location of the auth cookie. Relative paths will be prefixed by a +net\-specific datadir location. (default: data dir) +.HP +\fB\-rpccookieperms=\fR +.IP +Set permissions on the RPC auth cookie file so that it is readable by +[owner|group|all] (default: owner [via umask 0077]) +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8332, testnet3: +18332, testnet4: 48332, signet: 38332, regtest: 18443) +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 16) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcwhitelist=\fR +.IP +Set a whitelist to filter incoming RPC calls for a specific user. The +field comes in the format: :,,...,. If multiple whitelists are set for a given user, +they are set\-intersected. See \fB\-rpcwhitelistdefault\fR documentation +for information on default whitelist behavior. +.HP +\fB\-rpcwhitelistdefault\fR +.IP +Sets default behavior for rpc whitelisting. Unless rpcwhitelistdefault +is set to 0, if any \fB\-rpcwhitelist\fR is set, the rpc server acts as +if all rpc users are subject to empty\-unless\-otherwise\-specified +whitelists. If rpcwhitelistdefault is set to 1 and no +\fB\-rpcwhitelist\fR is set, rpc server acts as if all rpc users are +subject to empty whitelists. +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.SH COPYRIGHT +Copyright (C) 2009-2026 The Bitcoin Core developers -This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or +.SH "SEE ALSO" +bitcoin(1), bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) From 88e21e57e59ccf94bd78c02c1ce86a5ee87684aa Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 6 Mar 2026 11:29:39 -0800 Subject: [PATCH 003/122] examples: Generate example bitcoin.conf for 31.0rc1 --- share/examples/bitcoin.conf | 713 +++++++++++++++++++++++++++++++++++- 1 file changed, 712 insertions(+), 1 deletion(-) diff --git a/share/examples/bitcoin.conf b/share/examples/bitcoin.conf index 5bee4bf92e73..22af1184faa1 100644 --- a/share/examples/bitcoin.conf +++ b/share/examples/bitcoin.conf @@ -1 +1,712 @@ -# This is a placeholder file. Please follow the instructions in `contrib/devtools/README.md` to generate a bitcoin.conf file. +## +## bitcoin.conf configuration file. +## Generated by contrib/devtools/gen-bitcoin-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 + + +# Execute command when an alert is raised (%s in cmd is replaced by +# message) +#alertnotify= + +# For backwards compatibility, treat an unused bitcoin.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: +# 00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +# testnet3: +# 0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +# testnet4: +# 000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +# signet: +# 000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +#assumevalid= + +# Maintain an index of compact filters by block (default: 0, values: +# basic). If is not supplied or if = 1, indexes for +# all known types are enabled. +#blockfilterindex= + +# Execute command when the best block changes (%s in cmd is replaced by +# block hash) +#blocknotify= + +# Extra transactions to keep in memory for compact block reconstructions +# (default: 100) +#blockreconstructionextratxn= + +# Specify directory to hold blocks subdirectory for *.dat files (default: +# ) +#blocksdir= + +# Whether to reject transactions from network peers. Disables automatic +# broadcast and rebroadcast of transactions, unless the source peer +# has the 'forcerelay' permission. RPC transactions are not +# affected. (default: 0) +#blocksonly=1 + +# Whether an XOR-key applies to blocksdir *.dat files. The created XOR-key +# will be zeros for an existing blocksdir or when `-blocksxor=0` is +# set, and random for a freshly initialized blocksdir. (default: 1) +#blocksxor=1 + +# Maintain coinstats index used by the gettxoutsetinfo RPC (default: 0) +#coinstatsindex=1 + +# 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) +#conf= + +# Run in the background as a daemon and accept commands (default: 0) +#daemon=1 + +# Wait for initialization to be finished before exiting. This implies +# -daemon (default: 0) +#daemonwait=1 + +# Specify data directory +#datadir= + +# Maximum database cache size MiB (minimum 4, default: 450). Make sure +# you have enough RAM. In addition, unused memory allocated to the +# mempool is shared with this cache (see -maxmempool). +#dbcache= + +# Specify location of debug log file (default: debug.log). Relative paths +# will be prefixed by a net-specific datadir location. Pass +# -nodebuglogfile to disable writing the log to a file. +#debuglogfile= + +# Specify additional configuration file, relative to the -datadir path +# (only useable from configuration file, not command line) +#includeconf= + +# Imports blocks from external file on startup +#loadblock= + +# Keep the transaction memory pool below megabytes (default: 300) +#maxmempool= + +# Do not keep transactions in the mempool longer than hours (default: +# 336) +#mempoolexpiry= + +# Set the number of script verification threads (0 = auto, up to 15, <0 = +# leave that many cores free, default: 0) +#par= + +# Whether to save the mempool on shutdown and load on restart (default: 1) +#persistmempool=1 + +# Whether a mempool.dat file created by -persistmempool or the savemempool +# RPC will be written in the legacy format (version 1) or the +# current format (version 2). This temporary option will be removed +# in the future. (default: 0) +#persistmempoolv1=1 + +# Specify pid file. Relative paths will be prefixed by a net-specific +# datadir location. (default: bitcoind.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. 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= + +# 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, +# its chainstate will be wiped as well. The snapshot can then be +# reloaded via RPC. +#reindex=1 + +# If enabled, wipe chain state, and rebuild it from blk*.dat files on +# disk. If an assumeutxo snapshot was loaded, its chainstate will +# be wiped as well. The snapshot can then be reloaded via RPC. +#reindex-chainstate=1 + +# 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). +# Relative paths will be prefixed by datadir location. (default: +# settings.json) +#settings= + +# Execute command immediately before beginning shutdown. The need for +# shutdown may be urgent, so be careful not to delay it long (if +# the command doesn't require interaction with the server, consider +# having it fork into the background). +#shutdownnotify= + +# Execute command on startup. +#startupnotify= + +# Maintain a full transaction index, used by the getrawtransaction rpc +# call (default: 0) +#txindex=1 + +# Maintain a transaction output spender index, used by the +# gettxspendingprevout rpc call (default: 0) +#txospenderindex=1 + +# Print version and exit +#version=1 + + +### Connection options + + +# 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 +# limit. +#addnode= + +# Specify asn mapping used for bucketing of the peers. Relative paths will +# be prefixed by the net-specific datadir location. If a bool arg +# is given (-asmap or -asmap=1), the embedded mapping data in the +# binary will be used. +#asmap= + +# Default duration (in seconds) of manually configured bans (default: +# 86400) +#bantime= + +# 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, testnet3: 127.0.0.1:18334=onion, +# testnet4: 127.0.0.1:48334=onion, signet: 127.0.0.1:38334=onion, +# regtest: 127.0.0.1:18445=onion) +#bind=[:][=onion] + +# If set, then this host is configured for CJDNS (connecting to fc00::/8 +# addresses would lead us to the CJDNS network, see doc/cjdns.md) +# (default: 0) +#cjdnsreachable=1 + +# Connect only to the specified node; -noconnect disables automatic +# connections (the rules for this peer are the same as for +# -addnode). This option can be specified multiple times to connect +# to multiple nodes. +#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 used or -maxconnections=0) +#dnsseed=1 + +# Specify your own public address +#externalip= + +# Allow fixed seeds if DNS seeds don't provide peers (default: 1) +#fixedseeds=1 + +# Always query for peer addresses via DNS lookup (default: 0) +#forcednsseed=1 + +# Whether to accept inbound I2P connections (default: 1). Ignored if +# -i2psam is not set. Listening for inbound I2P connections is done +# through the SAM proxy, not by binding to a local address and +# port. +#i2pacceptincoming=1 + +# I2P SAM proxy to reach I2P peers and accept I2P connections +#i2psam= + +# Accept connections from outside (default: 1 if no -proxy, -connect or +# -maxconnections=0) +#listen=1 + +# Automatically create Tor onion service (default: 1) +#listenonion=1 + +# Maintain at most automatic 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. It does not +# apply to short-lived private broadcast connections either, which +# have a separate limit of 64. +#maxconnections= + +# Maximum per-connection receive buffer, *1000 bytes (default: 5000) +#maxreceivebuffer= + +# Maximum per-connection memory usage for the send buffer, *1000 bytes +# (default: 1000) +#maxsendbuffer= + +# Tries to keep outbound traffic under the given target per 24h. Limit +# does not apply to peers with 'download' permission or blocks +# created within past week. 0 = no limit (default: 0M). Optional +# suffix units [k|K|m|M|g|G|t|T] (default: M). Lowercase is 1000 +# base while uppercase is 1024 base +#maxuploadtarget= + +# Use PCP or NAT-PMP to map the listening port (default: 1) +#natpmp=1 + +# Enable all P2P network activity (default: 1). Can be changed by the +# setnetworkactive RPC command +#networkactive=1 + +# Use separate SOCKS5 proxy to reach peers via Tor onion services, set +# -noonion to disable (default: -proxy). May be a local file path +# prefixed with 'unix:'. +#onion= + +# Make automatic outbound connections only to network (ipv4, ipv6, +# onion, i2p, cjdns). Inbound and manual connections are not +# affected by this option. It can be specified multiple times to +# allow multiple networks. +#onlynet= + +# Serve compact block filters to peers per BIP 157 (default: 0) +#peerblockfilters=1 + +# Support filtering of blocks and transaction with bloom filters (default: +# 0) +#peerbloomfilters=1 + +# Listen for connections on (default: 8333, testnet3: 18333, +# testnet4: 48333, signet: 38333, regtest: 18444). Not relevant for +# I2P (see doc/i2p.md). If set to a value x, the default onion +# listening port will be set to x+1. +#port= + +# Connect through SOCKS5 proxy, set -noproxy to disable. May be a local +# file path prefixed with 'unix:' if the proxy supports it. Could +# end in =network to set the proxy only for that network. The +# network can be any of ipv4, ipv6, tor or cjdns. (default: +# disabled) +#proxy=[:]|unix:[=] + +# Randomize credentials for every proxy connection. This enables Tor +# stream isolation (default: 1) +#proxyrandomize=1 + +# Connect to a node to retrieve peer addresses, and disconnect. This +# option can be specified multiple times to connect to multiple +# nodes. During startup, seednodes will be tried before dnsseeds. +#seednode= + +# Specify socket connection timeout in milliseconds. If an initial attempt +# to connect is unsuccessful after this amount of time, drop it +# (minimum: 1, default: 5000) +#timeout= + +# Tor control host and port to use if onion listening enabled (default: +# 127.0.0.1:9051). If no port is specified, the default port of +# 9051 will be used. +#torcontrol=: + +# Tor control port password (default: empty) +#torpassword= + +# Support v2 transport (default: 1) +#v2transport=1 + +# Bind to the given address and add permission flags to the peers +# connecting to it. Use [host]:port notation for IPv6. Allowed +# permissions: bloomfilter (allow requesting BIP37 filtered blocks +# and transactions), noban (do not ban for misbehavior; implies +# download), forcerelay (relay transactions that are already in the +# mempool; implies relay), relay (relay even in -blocksonly mode, +# and unlimited transaction announcements), mempool (allow +# requesting BIP35 mempool contents), download (allow getheaders +# during IBD, no disconnect after maxuploadtarget limit), addr +# (responses to GETADDR avoid hitting the cache and contain random +# records with the most up-to-date info). Specify multiple +# permissions separated by commas (default: +# download,noban,mempool,relay). Can be specified multiple times. +#whitebind=<[permissions@]addr> + +# Add permission flags to the peers using the given IP address (e.g. +# 1.2.3.4) or CIDR-notated network (e.g. 1.2.3.0/24). Uses the same +# permissions as -whitebind. Additional flags "in" and "out" +# control whether permissions apply to incoming connections and/or +# manual (default: incoming only). Can be specified multiple times. +#whitelist=<[permissions@]IP address or network> + + +### Wallet options + + +# What type of addresses to use ("legacy", "p2sh-segwit", "bech32", +# "bech32m", default: "bech32") +#addresstype=1 + +# Group outputs by address, selecting many (possibly all) or none, instead +# of selecting on a per-output basis. Privacy is improved as +# addresses are mostly swept with fewer transactions and outputs +# are aggregated in clean change addresses. It may result in higher +# fees due to less optimal coin selection caused by this added +# limitation and possibly a larger-than-necessary number of inputs +# being used. Always enabled for wallets with "avoid_reuse" +# enabled, otherwise default: 0. +#avoidpartialspends=1 + +# What type of change to use ("legacy", "p2sh-segwit", "bech32", +# "bech32m"). Default is "legacy" when -addresstype=legacy, else it +# is an implementation detail. +#changetype=1 + +# The maximum feerate (in BTC/kvB) at which transaction building may use +# more inputs than strictly necessary so that the wallet's UTXO +# pool can be reduced (default: 0.0001). +#consolidatefeerate= + +# Do not load the wallet and disable wallet RPC calls +#disablewallet=1 + +# The fee rate (in BTC/kvB) that indicates your tolerance for discarding +# change by adding it to the fee (default: 0.0001). Note: An output +# is discarded if it is dust at this rate, but we will always +# discard up to the dust relay fee and a discard fee above that is +# limited by the fee estimate for the longest target +#discardfee= + +# 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= + +# Set key pool size to (default: 1000). Warning: Smaller sizes may +# increase the risk of losing funds when restoring from an old +# backup, if none of the addresses in the original keypool have +# been used. +#keypool= + +# Spend up to this amount in additional (absolute) fees (in BTC) if it +# allows the use of partial spend avoidance (default: 0.00) +#maxapsfee= + +# Fee rates (in BTC/kvB) smaller than this are considered zero fee for +# transaction creation (default: 0.00001) +#mintxfee= + +# External signing tool, see doc/external-signer.md +#signer= + +# Spend unconfirmed change when sending transactions (default: 1) +#spendzeroconfchange=1 + +# Include enough fee so transactions begin confirmation on average within +# n blocks (default: 6) +#txconfirmtarget= + +# Specify wallet path to load at startup. Can be used multiple times to +# load multiple wallets. Path is to a directory containing wallet +# data and log files. If the path is not absolute, it is +# interpreted relative to . This only loads existing +# wallets and does not create new ones. For backwards compatibility +# this also accepts names of existing top-level data files in +# . +#wallet= + +# Make the wallet broadcast transactions (default: 1) +#walletbroadcast=1 + +# Specify directory to hold wallets (default: /wallets if it +# exists, otherwise ) +#walletdir= + +# Execute command when a wallet transaction changes. %s in cmd is replaced +# by TxID, %w is replaced by wallet name, %b is replaced by the +# hash of the block including the transaction (set to 'unconfirmed' +# if the transaction is not included) and %h is replaced by the +# block height (-1 if not included). %w is not currently +# implemented on windows. On systems where %w is supported, it +# should NOT be quoted because this would break shell escaping used +# to invoke the command. +#walletnotify= + +# Send transactions with full-RBF opt-in enabled (RPC only, default: 1) +#walletrbf=1 + + +### ZeroMQ notification options + + +# Enable publish hash block in
+#zmqpubhashblock=
+ +# Set publish hash block outbound message high water mark (default: 1000) +#zmqpubhashblockhwm= + +# Enable publish hash transaction in
+#zmqpubhashtx=
+ +# Set publish hash transaction outbound message high water mark (default: +# 1000) +#zmqpubhashtxhwm= + +# Enable publish raw block in
+#zmqpubrawblock=
+ +# Set publish raw block outbound message high water mark (default: 1000) +#zmqpubrawblockhwm= + +# Enable publish raw transaction in
+#zmqpubrawtx=
+ +# Set publish raw transaction outbound message high water mark (default: +# 1000) +#zmqpubrawtxhwm= + +# Enable publish hash block and tx sequence in
+#zmqpubsequence=
+ +# Set publish hash sequence message high water mark (default: 1000) +#zmqpubsequencehwm= + + +### Debugging/Testing options + + +# Output debug and trace logging (default: -nodebug, supplying +# is optional). If is not supplied or if is 1 +# or "all", output all debug logging. If is 0 or "none", +# any other categories are ignored. Other valid values for +# are: addrman, bench, blockstorage, cmpctblock, coindb, +# estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, +# mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, +# rand, reindex, rpc, scan, selectcoins, tor, txpackages, +# txreconciliation, validation, walletdb, zmq. This option can be +# specified multiple times to output multiple categories. +#debug= + +# Exclude debug and trace logging for a category. Can be used in +# conjunction with -debug=1 to output debug and trace logging for +# all categories except the specified category. This option can be +# specified multiple times to exclude multiple categories. This +# takes priority over "-debug" +#debugexclude= + +# Include IP addresses in log output (default: 0) +#logips=1 + +# Always prepend a category and level (default: 0) +#loglevelalways=1 + +# Prepend debug output with name of the originating source location +# (source file, line number and function name) (default: 0) +#logsourcelocations=1 + +# Prepend debug output with name of the originating thread (default: 0) +#logthreadnames=1 + +# Prepend debug output with timestamp (default: 1) +#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) +#maxtxfee= + +# Send trace/debug info to console (default: 1 when no -daemon. To disable +# logging to file, set -nodebuglogfile) +#printtoconsole=1 + +# Shrink debug.log file on client startup (default: 1 when no -debug) +#shrinkdebugfile=1 + +# Append comment to the user agent string +#uacomment= + + +### Chain selection options + + +# Use the chain (default: main). Allowed values: main, test, +# testnet4, signet, regtest +#chain= + +# Use the signet chain. Equivalent to -chain=signet. Note that the network +# is defined by the -signetchallenge parameter +#signet=1 + +# Blocks must satisfy the given script to be considered valid (only for +# signet networks; defaults to the global default signet test +# network challenge) +#signetchallenge=1 + +# Specify a seed node for the signet network, in the hostname[:port] +# format, e.g. sig.net:1234 (may be used multiple times to specify +# multiple seed nodes; defaults to the global default signet test +# network seed node(s)) +#signetseednode=1 + +# Use the testnet3 chain. Equivalent to -chain=test. Support for testnet3 +# is deprecated and will be removed in an upcoming release. +# Consider moving to testnet4 now by using -testnet4. +#testnet=1 + +# Use the testnet4 chain. Equivalent to -chain=testnet4. +#testnet4=1 + + +### Node relay options + + +# Equivalent bytes per sigop in transactions for relay and mining +# (default: 20) +#bytespersigop=1 + +# Relay and mine data carrier transactions (default: 1) +#datacarrier=1 + +# Relay and mine transactions whose data-carrying raw scriptPubKeys in +# aggregate are of this size or less, allowing multiple outputs +# (default: 100000) +#datacarriersize=1 + +# Fees (in BTC/kvB) smaller than this are considered zero fee for +# relaying, mining and transaction creation (default: 0.000001) +#minrelaytxfee= + +# Relay transactions creating non-P2SH multisig outputs (default: 1) +#permitbaremultisig=1 + +# Broadcast transactions submitted via sendrawtransaction RPC using +# short-lived connections through the Tor or I2P networks, without +# putting them in the mempool first. Transactions submitted through +# the wallet are not affected by this option (default: 0) +#privatebroadcast=1 + +# Add 'forcerelay' permission to whitelisted peers with default +# permissions. This will relay transactions even if the +# transactions were already in the mempool. (default: 0) +#whitelistforcerelay=1 + +# Add 'relay' permission to whitelisted peers with default permissions. +# This will accept relayed transactions even when not relaying +# transactions (default: 1) +#whitelistrelay=1 + + +### Block creation options + + +# Set lowest fee rate (in BTC/kvB) for transactions to be included in +# block creation. (default: 0.00000001) +#blockmintxfee= + +# Reserve space for the fixed-size block header plus the largest coinbase +# transaction the mining software may add to the block. Only +# affects mining RPC clients, not IPC clients. (default: 8000). +#blockreservedweight= + + +### RPC server options + + +# Accept public REST requests (default: 0) +#rest=1 + +# Allow JSON-RPC connections from specified source. Valid values for +# are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. +# 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all +# ipv4 (0.0.0.0/0), or all ipv6 (::/0). RFC4193 is allowed only if +# -cjdnsreachable=0. This option can be specified multiple times +#rpcallowip= + +# Username and HMAC-SHA-256 hashed password for JSON-RPC connections. The +# field comes in the format: :$. A +# canonical python script is included in share/rpcauth. The client +# then connects normally using the +# rpcuser=/rpcpassword= pair of arguments. This +# option can be specified multiple times +#rpcauth= + +# Bind to given address to listen for JSON-RPC connections. Do not expose +# the RPC server to untrusted networks such as the public internet! +# This option is ignored unless -rpcallowip is also passed. Port is +# optional and overrides -rpcport. Use [host]:port notation for +# IPv6. This option can be specified multiple times (default: +# 127.0.0.1 and ::1 i.e., localhost) +#rpcbind=[:port] + +# Location of the auth cookie. Relative paths will be prefixed by a +# net-specific datadir location. (default: data dir) +#rpccookiefile= + +# Set permissions on the RPC auth cookie file so that it is readable by +# [owner|group|all] (default: owner [via umask 0077]) +#rpccookieperms= + +# Password for JSON-RPC connections +#rpcpassword= + +# Listen for JSON-RPC connections on (default: 8332, testnet3: +# 18332, testnet4: 48332, signet: 38332, regtest: 18443) +#rpcport= + +# Set the number of threads to service RPC calls (default: 16) +#rpcthreads= + +# Username for JSON-RPC connections +#rpcuser= + +# Set a whitelist to filter incoming RPC calls for a specific user. The +# field comes in the format: :,,...,. If multiple whitelists are set for a given user, +# they are set-intersected. See -rpcwhitelistdefault documentation +# for information on default whitelist behavior. +#rpcwhitelist= + +# Sets default behavior for rpc whitelisting. Unless rpcwhitelistdefault +# is set to 0, if any -rpcwhitelist is set, the rpc server acts as +# if all rpc users are subject to empty-unless-otherwise-specified +# whitelists. If rpcwhitelistdefault is set to 1 and no +# -rpcwhitelist is set, rpc server acts as if all rpc users are +# subject to empty whitelists. +#rpcwhitelistdefault=1 + +# Accept command line and JSON-RPC commands +#server=1 + + +# [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 testnet3 +[test] + +# Options for testnet4 +[testnet4] + +# Options for signet +[signet] + +# Options for regtest +[regtest] From c5ae5f0adf11c9e101a0002ff1d89c26eb75519e Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 6 Mar 2026 11:31:14 -0800 Subject: [PATCH 004/122] doc: Point release notes to 31.0 wiki draft --- doc/release-notes-empty-template.md | 99 ----------------------------- doc/release-notes.md | 1 + 2 files changed, 1 insertion(+), 99 deletions(-) delete mode 100644 doc/release-notes-empty-template.md create mode 100644 doc/release-notes.md diff --git a/doc/release-notes-empty-template.md b/doc/release-notes-empty-template.md deleted file mode 100644 index 86dafb36ef96..000000000000 --- a/doc/release-notes-empty-template.md +++ /dev/null @@ -1,99 +0,0 @@ -*The release notes draft is a temporary file that can be added to by anyone. See -[/doc/developer-notes.md#release-notes](/doc/developer-notes.md#release-notes) -for the process.* - -*version* Release Notes Draft -=============================== - -Bitcoin Core version *version* is now available from: - - - -This release includes new features, various bug fixes and performance -improvements, as well as updated translations. - -Please report bugs using the issue tracker at GitHub: - - - -To receive security and update notifications, please subscribe to: - - - -How to Upgrade -============== - -If you are running an older version, shut it down. Wait until it has completely -shut down (which might take a few minutes in some cases), then run the -installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS) -or `bitcoind`/`bitcoin-qt` (on Linux). - -Upgrading directly from a version of Bitcoin Core that has reached its EOL is -possible, but it might take some time if the data directory needs to be migrated. Old -wallet versions of Bitcoin Core are generally supported. - -Compatibility -============== - -Bitcoin Core is supported and tested on the following operating systems or newer: -Linux Kernel 3.17, macOS 14, and Windows 10 (version 1903). Bitcoin -Core should also work on most other Unix-like systems but is not as -frequently tested on them. It is not recommended to use Bitcoin Core on -unsupported systems. - -Notable changes -=============== - -P2P and network changes ------------------------ - -Updated RPCs ------------- - - -Changes to wallet related RPCs can be found in the Wallet section below. - -New RPCs --------- - -Build System ------------- - -Updated settings ----------------- - - -Changes to GUI or wallet related settings can be found in the GUI or Wallet section below. - -New settings ------------- - -Tools and Utilities -------------------- - -Wallet ------- - -GUI changes ------------ - -Low-level changes -================= - -RPC ---- - -Tests ------ - -*version* change log -==================== - -Credits -======= - -Thanks to everyone who directly contributed to this release: - - -As well as to everyone that helped with translations on -[Transifex](https://explore.transifex.com/bitcoin/bitcoin/). diff --git a/doc/release-notes.md b/doc/release-notes.md new file mode 100644 index 000000000000..69e7a1e2a29c --- /dev/null +++ b/doc/release-notes.md @@ -0,0 +1 @@ +See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/31.0-Release-Notes-Draft From 9852bbd2185e1aa005a98c9908338acfcacaa6b3 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 6 Mar 2026 14:05:03 +0000 Subject: [PATCH 005/122] depends: disable Qt sbom generation Github-Pull: #34755 Rebased-From: 168997e9b5720e3c58e2fc1a073d0be3cd39d971 --- depends/packages/qt.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 5571992e4da7..48f7e038bd9e 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -169,6 +169,7 @@ $(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)" $(package)_cmake_opts := -DCMAKE_PREFIX_PATH=$(host_prefix) $(package)_cmake_opts += -DQT_FEATURE_cxx20=ON +$(package)_cmake_opts += -DQT_GENERATE_SBOM=OFF ifneq ($(V),) $(package)_cmake_opts += --log-level=STATUS endif From a3ffff0201df4c3aec714afa485d652ebd60545f Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 6 Mar 2026 14:20:28 +0000 Subject: [PATCH 006/122] depends: delete Boost extra files Github-Pull: #34755 Rebased-From: 0ebc6891e2168c3ff1c9ad2250e765446610e75e --- depends/packages/boost.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 02f59abe4d25..59e17f3685a1 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -24,3 +24,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf share +endef From f7f7e682b5e4be54aee579bf9183e1ba927ea157 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 11 Mar 2026 14:54:37 +0100 Subject: [PATCH 007/122] ci: Bump GHA actions versions Github-Pull: #34802 Rebased-From: fadaa7db335d1b1bd2674c51d89d6c0820ddb887 --- .github/actions/configure-docker/action.yml | 4 ++-- .github/workflows/ci.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/configure-docker/action.yml b/.github/actions/configure-docker/action.yml index 5c9531d35925..b4abf7c274ab 100644 --- a/.github/actions/configure-docker/action.yml +++ b/.github/actions/configure-docker/action.yml @@ -15,7 +15,7 @@ runs: print("::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}") - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 with: # Use host network to allow access to cirrus gha cache running on the host driver-opts: | @@ -23,7 +23,7 @@ runs: # This is required to allow buildkit to access the actions cache - name: Expose actions cache variables - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: | Object.keys(process.env).forEach(function (key) { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70305f261869..914b29cad3d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -186,7 +186,7 @@ jobs: - name: Restore Ccache cache id: ccache-cache - uses: actions/cache/restore@v4 + uses: actions/cache/restore@v5 with: path: ${{ env.CCACHE_DIR }} key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} @@ -206,7 +206,7 @@ jobs: FILE_ENV: ${{ matrix.file-env }} - name: Save Ccache cache - uses: actions/cache/save@v4 + uses: actions/cache/save@v5 if: github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch && steps.ccache-cache.outputs.cache-hit != 'true' with: path: ${{ env.CCACHE_DIR }} @@ -272,7 +272,7 @@ jobs: restore-keys: ${{ github.job }}-vcpkg-tools- - name: Restore vcpkg binary cache - uses: actions/cache/restore@v4 + uses: actions/cache/restore@v5 id: vcpkg-binary-cache with: path: ~/AppData/Local/vcpkg/archives @@ -283,7 +283,7 @@ jobs: py -3 .github/ci-windows.py ${{ matrix.job-type }} generate - name: Save vcpkg binary cache - uses: actions/cache/save@v4 + uses: actions/cache/save@v5 if: github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard' with: path: ~/AppData/Local/vcpkg/archives @@ -378,7 +378,7 @@ jobs: uses: ./.github/actions/save-caches - name: Upload built executables - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }}-${{ github.run_id }} path: | @@ -416,7 +416,7 @@ jobs: ref: ${{ needs.record-frozen-commit.outputs.commit }} - name: Download built executables - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: ${{ matrix.artifact-name }}-${{ github.run_id }} From a74dfe3ae2427ae1eb72e8f09227d146c9e64c60 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 12 Mar 2026 08:16:17 +0100 Subject: [PATCH 008/122] lint: Temporarily revert to vulture==2.14 To work around https://github.com/bitcoin/bitcoin/issues/34810 Github-Pull: #34814 Rebased-From: faae981d354e13de96442159d604a831b6c3a71e --- ci/lint/01_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh index c442906085d5..4cf695b817b0 100755 --- a/ci/lint/01_install.sh +++ b/ci/lint/01_install.sh @@ -45,7 +45,7 @@ ${CI_RETRY_EXE} pip3 install \ mypy==1.19.1 \ pyzmq==27.1.0 \ ruff==0.15.5 \ - vulture==2.15 + vulture==2.14 SHELLCHECK_VERSION=v0.11.0 curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \ From 207087b1c4f007e067dab137a3e828187b6e70b3 Mon Sep 17 00:00:00 2001 From: will Date: Thu, 12 Mar 2026 09:37:52 +0000 Subject: [PATCH 009/122] ci: bump cirruslabs actions versions Github-Pull: #34815 Rebased-From: 9a968ad35efe04bfd86299c5dfbc48ada41bc46e --- .github/actions/restore-caches/action.yml | 8 ++++---- .github/actions/save-caches/action.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/restore-caches/action.yml b/.github/actions/restore-caches/action.yml index 8dc35d4902ed..21f2807f4c72 100644 --- a/.github/actions/restore-caches/action.yml +++ b/.github/actions/restore-caches/action.yml @@ -5,7 +5,7 @@ runs: steps: - name: Restore Ccache cache id: ccache-cache - uses: cirruslabs/cache/restore@v4 + uses: cirruslabs/cache/restore@v5 with: path: ${{ env.CCACHE_DIR }} key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }} @@ -14,7 +14,7 @@ runs: - name: Restore depends sources cache id: depends-sources - uses: cirruslabs/cache/restore@v4 + uses: cirruslabs/cache/restore@v5 with: path: ${{ env.SOURCES_PATH }} key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} @@ -23,7 +23,7 @@ runs: - name: Restore built depends cache id: depends-built - uses: cirruslabs/cache/restore@v4 + uses: cirruslabs/cache/restore@v5 with: path: ${{ env.BASE_CACHE }} key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} @@ -32,7 +32,7 @@ runs: - name: Restore previous releases cache id: previous-releases - uses: cirruslabs/cache/restore@v4 + uses: cirruslabs/cache/restore@v5 with: path: ${{ env.PREVIOUS_RELEASES_DIR }} key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }} diff --git a/.github/actions/save-caches/action.yml b/.github/actions/save-caches/action.yml index 0e3b31246c61..3072ab3f224a 100644 --- a/.github/actions/save-caches/action.yml +++ b/.github/actions/save-caches/action.yml @@ -11,28 +11,28 @@ runs: echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}" - name: Save Ccache cache - uses: cirruslabs/cache/save@v4 + uses: cirruslabs/cache/save@v5 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }} with: path: ${{ env.CCACHE_DIR }} key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }} - name: Save depends sources cache - uses: cirruslabs/cache/save@v4 + uses: cirruslabs/cache/save@v5 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }} with: path: ${{ env.SOURCES_PATH }} key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} - name: Save built depends cache - uses: cirruslabs/cache/save@v4 + uses: cirruslabs/cache/save@v5 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}} with: path: ${{ env.BASE_CACHE }} key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} - name: Save previous releases cache - uses: cirruslabs/cache/save@v4 + uses: cirruslabs/cache/save@v5 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}} with: path: ${{ env.PREVIOUS_RELEASES_DIR }} From a3c1eda8f2f530f027110aaf31dfecd75874a977 Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Thu, 5 Mar 2026 17:29:39 +0530 Subject: [PATCH 010/122] test: fix addr relay test silent pass and wrong peerinfo index the test silently passes on master because SetupAddressRelay isn't called by default for inbound connections. Github-Pull: #34750 Rebased-From: ecb5ce6e76ef9391d636e7e4f6be7e3f7ed05550 --- test/functional/p2p_addr_relay.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index f89ac7013abb..33052fa25a83 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -178,6 +178,9 @@ def relay_tests(self): self.log.info('Check relay of addresses received from outbound peers') inbound_peer = self.nodes[0].add_p2p_connection(AddrReceiver(test_addr_contents=True, send_getaddr=False)) + # Send an empty ADDR message to initialize address relay on this connection. + inbound_peer.send_and_ping(msg_addr()) + full_outbound_peer = self.nodes[0].add_outbound_p2p_connection(AddrReceiver(), p2p_idx=0, connection_type="outbound-full-relay") msg = self.setup_addr_msg(2) self.send_addr_msg(full_outbound_peer, msg, [inbound_peer]) @@ -188,9 +191,6 @@ def relay_tests(self): # of the outbound peer which is often sent before the GETADDR response. assert_equal(inbound_peer.num_ipv4_received, 0) - # Send an empty ADDR message to initialize address relay on this connection. - inbound_peer.send_and_ping(msg_addr()) - self.log.info('Check that subsequent addr messages sent from an outbound peer are relayed') msg2 = self.setup_addr_msg(2) self.send_addr_msg(full_outbound_peer, msg2, [inbound_peer]) @@ -248,8 +248,9 @@ def inbound_blackhole_tests(self): blackhole_peer.send_and_ping(msg_addr()) # Confirm node has now received addr-related messages from blackhole peer - assert_greater_than(self.sum_addr_messages(peerinfo[1]['bytesrecv_per_msg']), 0) - assert_equal(self.nodes[0].getpeerinfo()[2]['addr_relay_enabled'], True) + peerinfo = self.nodes[0].getpeerinfo() + assert_greater_than(self.sum_addr_messages(peerinfo[2]['bytesrecv_per_msg']), 0) + assert_equal(peerinfo[2]['addr_relay_enabled'], True) msg = self.setup_addr_msg(2) self.send_addr_msg(addr_source, msg, [receiver_peer, blackhole_peer]) @@ -280,6 +281,7 @@ def getaddr_tests(self): inbound_peer = self.nodes[0].add_p2p_connection(AddrReceiver(send_getaddr=False)) inbound_peer.sync_with_ping() assert_equal(inbound_peer.getaddr_received(), False) + assert_equal(inbound_peer.addr_received(), False) self.log.info('Check that we answer getaddr messages only from inbound peers') # Add some addresses to addrman From 5642a2b0fed316be1e6bda77ed6446d4cadf123c Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Fri, 6 Mar 2026 10:25:20 +0530 Subject: [PATCH 011/122] test: protect outbound connection from eviction in getaddr_test since we're bumping mocktime more than CHAIN_SYNC_TIMEOUT = 20 * 60, it's possible for disconnections like this to happen in the test: $ test/functional/p2p_addr_relay.py --randomseed=7758649581790797022 ... TestFramework (INFO): Check that we answer getaddr messages only once per connection TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:58829 due to [Errno 54] Connection reset by peer ... Github-Pull: #34750 Rebased-From: 7ee8c0abc629f0658b6c36f36b5da11c51cbb39d --- test/functional/p2p_addr_relay.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index 33052fa25a83..eea8ee5351c0 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -11,9 +11,12 @@ from test_framework.messages import ( CAddress, + CBlockHeader, msg_addr, msg_getaddr, + msg_headers, msg_verack, + from_hex, ) from test_framework.p2p import ( P2PInterface, @@ -273,10 +276,15 @@ def getaddr_tests(self): full_outbound_peer.sync_with_ping() assert full_outbound_peer.getaddr_received() + # to avoid the node evicting the outbound peer, protect it by announcing the most recent header to it + tip_header = from_hex(CBlockHeader(), self.nodes[0].getblockheader(self.nodes[0].getbestblockhash(), False)) + full_outbound_peer.send_and_ping(msg_headers([tip_header])) + self.log.info('Check that we do not send a getaddr message to a block-relay-only or inbound peer') block_relay_peer = self.nodes[0].add_outbound_p2p_connection(AddrReceiver(), p2p_idx=1, connection_type="block-relay-only") block_relay_peer.sync_with_ping() assert_equal(block_relay_peer.getaddr_received(), False) + block_relay_peer.send_and_ping(msg_headers([tip_header])) inbound_peer = self.nodes[0].add_p2p_connection(AddrReceiver(send_getaddr=False)) inbound_peer.sync_with_ping() From a28d78c44a18e230e1a95b5eaf240e12471b1b1b Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Fri, 6 Mar 2026 10:43:49 +0530 Subject: [PATCH 012/122] test: use static methods and clarify comment in addr_relay we don't need to send GETADDR for initial self announcement anymore + can construct addr_receivers using AddrReceiver(send_getaddr=False). however we would need to send an empty ADDR message to each of the addr_receivers to initialise addr relay for inbound connections. so current code is simpler and we can just clarify the comment. Github-Pull: #34750 Rebased-From: 57bfa864fe69ea5610399f9db60cf2299930703a --- test/functional/p2p_addr_relay.py | 3 +-- test/functional/p2p_addr_selfannouncement.py | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index eea8ee5351c0..65b21c0d5059 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -402,8 +402,7 @@ def rate_limit_tests(self): def get_nodes_that_received_addr(self, peer, receiver_peer, addr_receivers, time_interval_1, time_interval_2): - # Clean addr response related to the initial getaddr. There is no way to avoid initial - # getaddr because the peer won't self-announce then. + # Clean addr response related to the initial getaddr. for addr_receiver in addr_receivers: addr_receiver.num_ipv4_received = 0 diff --git a/test/functional/p2p_addr_selfannouncement.py b/test/functional/p2p_addr_selfannouncement.py index 8ab75aaa0684..631ecb4c00e2 100755 --- a/test/functional/p2p_addr_selfannouncement.py +++ b/test/functional/p2p_addr_selfannouncement.py @@ -78,14 +78,16 @@ def run_test(self): self.self_announcement_test(outbound=True, addrv2=False) self.self_announcement_test(outbound=True, addrv2=True) - def inbound_connection_open_assertions(self, addr_receiver): + @staticmethod + def inbound_connection_open_assertions(addr_receiver): # In response to a GETADDR, we expect a message with the self-announcement # and an addr message containing the GETADDR response. assert_equal(addr_receiver.self_announcements_received, 1) assert_equal(addr_receiver.addr_messages_received, 2) assert_greater_than(addr_receiver.addresses_received, 1) - def outbound_connection_open_assertions(self, addr_receiver): + @staticmethod + def outbound_connection_open_assertions(addr_receiver): # We expect only the self-announcement. assert_equal(addr_receiver.self_announcements_received, 1) assert_equal(addr_receiver.addr_messages_received, 1) From 2724c392080985b02e73e5be3d40813a5e3e2c12 Mon Sep 17 00:00:00 2001 From: Hodlinator <172445034+hodlinator@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:04:30 +0100 Subject: [PATCH 013/122] guix: Make guix-clean less destructive * Show preview and ask for confirmation before git clean unless used with "--force" * Error out when trying to pass args such as "guix-clean --help" Github-Pull: #34776 Rebased-From: be6d24ec22cc2ef8086098d6322b024e07c5758c --- contrib/guix/guix-clean | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/contrib/guix/guix-clean b/contrib/guix/guix-clean index 9af0a793cff7..32258cd7477e 100755 --- a/contrib/guix/guix-clean +++ b/contrib/guix/guix-clean @@ -9,6 +9,14 @@ set -e -o pipefail # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" +# Parse supported args +FORCE=0 +if [[ $* == "--force" ]]; then + FORCE=1 +elif [ $# != 0 ]; then + echo "Script only takes optional --force arg." + exit 1 +fi ################### ## Sanity Checks ## @@ -80,4 +88,14 @@ for precious_dirs_file in "${found_precious_dirs_files[@]}"; do done < "$precious_dirs_file" done +if [[ $FORCE == 0 ]]; then + git clean -nxdff "${exclude_flags[@]}" + + read -p "Proceed? (y/n) " -r + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Aborted." + exit 1 + fi +fi + git clean -xdff "${exclude_flags[@]}" From d20ba02caa46f13f2a7df64fa9bcb4b7b274fbcf Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 6 Aug 2025 16:16:07 +0200 Subject: [PATCH 014/122] build: Set AUTHOR_WARNING on warnings Github-Pull: #33144 Rebased-From: fa6497ba71e9573d341c1c051af09b3ec2fc8d74 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed673e23909..03a48164cb13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -690,6 +690,7 @@ if(configure_warnings) message(WARNING "${warning}") endforeach() message(" ******\n") + message(AUTHOR_WARNING "Warnings have been encountered!") endif() # We want all build properties to be encapsulated properly. From bb9fcffd4c5c486628e2a284741525fd9fcca491 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 10 Mar 2026 16:42:59 +0000 Subject: [PATCH 015/122] macdeploy: subprocess out to zip rather than shutil.make_archive Calling shutil.make_archive(), does not preserve symlinks when using the zip format, see https://github.com/python/cpython/issues/139679. Call `zip` using subprocess instead. This code is only run when using a macos machine, and I think it's safe to assume that zip is available, same as codesign, and all other tools we call in this script. Github-Pull: #34787 Rebased-From: ab137cbfe2763f2306e52c7c5f1860d87defc636 --- contrib/macdeploy/macdeployqtplus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 476ac133ebf4..dc03d7108898 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -499,7 +499,7 @@ if config.zip is not None: print("+ Removing existing .zip +") os.unlink(name + ".zip") - shutil.make_archive('{}'.format(name), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app') + subprocess.check_call(["zip", "-ry", os.path.abspath(name + ".zip"), 'Bitcoin-Qt.app'], cwd='dist') # ------------------------------------------------ From ab37d3d7cd3e1559e8a975fab18e4cb8a299452d Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 11 Mar 2026 10:33:01 +0000 Subject: [PATCH 016/122] macdeploy: use plugins dir to find plugins Rather than looking for /translations, which might not exist (it doesn't in a recent brew installed qt on macOS). i.e: ```bash ls /opt/homebrew/opt/qtbase/share/qt doc libexec metatypes mkspecs modules plugins sbom ``` Github-Pull: #34787 Rebased-From: 66d80d57b48982d8301e21321a9d82780586908d --- contrib/macdeploy/macdeployqtplus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index dc03d7108898..bb693e730585 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -160,7 +160,7 @@ class DeploymentInfo(object): def detectQtPath(self, frameworkDirectory: str): parentDir = os.path.dirname(frameworkDirectory) - if os.path.exists(os.path.join(parentDir, "share", "qt", "translations")): + if os.path.exists(os.path.join(parentDir, "share", "qt", "plugins")): self.qtPath = parentDir else: self.qtPath = os.getenv("QTDIR", None) From e3383ac93278e56e8cf0b5328156d04a005751c4 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 10 Mar 2026 12:08:05 +0000 Subject: [PATCH 017/122] ci: check macos bundle structure and codesigning Github-Pull: #34787 Rebased-From: d03e3be246f64065002268e74ee9a834089de37a --- ci/test/03_test_script.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index eb03c2dd4936..8af2ceecf389 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -137,6 +137,14 @@ if [ "$RUN_CHECK_DEPS" = "true" ]; then "${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" "${BASE_BUILD_DIR}" fi +if [[ "$CI_OS_NAME" == "macos" && "${GOAL}" = "install deploy" ]]; then + unzip "${BASE_BUILD_DIR}/bitcoin-macos-app.zip" -d "${BASE_BUILD_DIR}/deploy" + if ! ( codesign --verify "${BASE_BUILD_DIR}/deploy/Bitcoin-Qt.app" ); then + echo "Codesigning failed." + false + fi +fi + if [ "$RUN_UNIT_TESTS" = "true" ]; then DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" \ LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \ From a69f8c329e17d8928b554cbb65fc4b4f770cf954 Mon Sep 17 00:00:00 2001 From: will Date: Mon, 16 Mar 2026 10:19:32 +0000 Subject: [PATCH 018/122] ci: Use arch-appropriate binaries in lint install Replace the hardcoded x86_64 binary name with $(uname --machine) so the correct binary is downloaded when building the lint container, where at all possible. Github-Pull: #34832 Rebased-From: 551875360cdb3b9997dded22b929039eac635fd0 --- ci/lint/01_install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh index 4cf695b817b0..6541fc448fdb 100755 --- a/ci/lint/01_install.sh +++ b/ci/lint/01_install.sh @@ -48,13 +48,12 @@ ${CI_RETRY_EXE} pip3 install \ vulture==2.14 SHELLCHECK_VERSION=v0.11.0 -curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \ +curl --fail -L "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.$(uname --machine).tar.xz" | \ tar --xz -xf - --directory /tmp/ mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ MLC_VERSION=v1.2.0 -MLC_BIN=mlc-x86_64-linux -curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc" +curl --fail -L "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/mlc-$(uname --machine)-linux" -o "/usr/bin/mlc" chmod +x /usr/bin/mlc popd || exit From c7127f21df8ce75c14a57568297aa057c69864ce Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 13 Mar 2026 10:44:47 +0100 Subject: [PATCH 019/122] test: Use asyncio.SelectorEventLoop() over deprecated asyncio.WindowsSelectorEventLoopPolicy() Github-Pull: #34820 Rebased-From: fa9168ffcd6354db6daf759ace123a88fb60cbb2 --- test/functional/test_framework/p2p.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index 7a7cce6176c6..bd8a1da75f3a 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -740,9 +740,7 @@ def __init__(self): NetworkThread.listeners = {} NetworkThread.protos = {} - if platform.system() == 'Windows': - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - NetworkThread.network_event_loop = asyncio.new_event_loop() + NetworkThread.network_event_loop = asyncio.SelectorEventLoop() if platform.system() == "Windows" else asyncio.new_event_loop() def run(self): """Start the network thread.""" From 72d6c88165ddabd167d7f024c1942dab659e4605 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 13 Mar 2026 10:07:58 +0100 Subject: [PATCH 020/122] test: Move event loop creation to network thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should fix https://github.com/bitcoin/bitcoin/issues/34367 I am not familiar with Windows sockets thread-safety, but creating the event loop on the main thread, and running it in the network thread could lead to a fast abort in Python on Windows (without any stderr): ``` 77/276 - wallet_txn_clone.py failed, Duration: 1 s stdout: 2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117 stderr: Combine the logs and print the last 99999999 lines ... ============ Combined log for D:\a\_temp/test_runner_₿_🏃_20251210_075632/wallet_txn_clone_196: ============ test 2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117 test 2025-12-10T08:04:27.500433Z TestFramework (DEBUG): Setting up network thread ``` Also, I couldn't find any docs that require the loop must be created on the thread that runs them: * https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.new_event_loop * https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_forever However, the patch seems trivial to review, harmless, and easy to revert, so it may be a good try to fix the intermittent Windows Python crash. Github-Pull: #34820 Rebased-From: fa050da9805d5388ec74e2e0f92e59e861f11918 --- test/functional/test_framework/p2p.py | 2 +- test/functional/test_framework/test_framework.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index bd8a1da75f3a..fae4eb94c21a 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -740,10 +740,10 @@ def __init__(self): NetworkThread.listeners = {} NetworkThread.protos = {} - NetworkThread.network_event_loop = asyncio.SelectorEventLoop() if platform.system() == "Windows" else asyncio.new_event_loop() def run(self): """Start the network thread.""" + NetworkThread.network_event_loop = asyncio.SelectorEventLoop() if platform.system() == "Windows" else asyncio.new_event_loop() self.network_event_loop.run_forever() def close(self, *, timeout): diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index fb0fc0af6b8e..95bfc964d60b 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -260,7 +260,7 @@ def setup(self): self.log.debug('Setting up network thread') self.network_thread = NetworkThread() self.network_thread.start() - self.wait_until(lambda: self.network_thread.network_event_loop.is_running()) + self.wait_until(lambda: self.network_thread.network_event_loop is not None and self.network_thread.network_event_loop.is_running()) if self.options.usecli: if not self.supports_cli: From 8379f005da18c8e822ec24e28d4517210fee4f8e Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 18 Mar 2026 16:14:16 +0100 Subject: [PATCH 021/122] test: Fix intermittent issue in feature_assumeutxo.py Github-Pull: #34852 Rebased-From: 99996f6c06dff19cd99131d0469b84c01c216cbb --- test/functional/feature_assumeutxo.py | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index 7420dfe02a01..90f597de176d 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -38,6 +38,7 @@ assert_equal, assert_not_equal, assert_raises_rpc_error, + dumb_sync_blocks, ensure_for, sha256sum_file, try_rpc, @@ -631,30 +632,17 @@ def check_tx_counts(final: bool) -> None: PAUSE_HEIGHT = FINAL_HEIGHT - 40 - self.log.info("Restarting node to stop at height %d", PAUSE_HEIGHT) - self.restart_node(1, extra_args=[ - f"-stopatheight={PAUSE_HEIGHT}", *self.extra_args[1]]) - - # Upon restart during snapshot tip sync, the node must remain in 'limited' mode. + self.log.info(f"Sync node up to height {PAUSE_HEIGHT}") + # During snapshot tip sync, the node must remain in 'limited' mode. self.assert_only_network_limited_service(n1) - - # Finally connect the nodes and let them sync. - # - # Set `wait_for_connect=False` to avoid a race between performing connection - # assertions and the -stopatheight tripping. - self.connect_nodes(0, 1, wait_for_connect=False) - - n1.wait_until_stopped(timeout=5) + dumb_sync_blocks(src=n0, dst=n1, height=PAUSE_HEIGHT) self.log.info("Checking that blocks are segmented on disk") assert self.has_blockfile(n1, "00000"), "normal blockfile missing" assert self.has_blockfile(n1, "00001"), "assumed blockfile missing" assert not self.has_blockfile(n1, "00002"), "too many blockfiles" - self.log.info("Restarted node before snapshot validation completed, reloading...") - self.restart_node(1, extra_args=self.extra_args[1]) - - # Upon restart, the node must remain in 'limited' mode + # The node must remain in 'limited' mode self.assert_only_network_limited_service(n1) # Send snapshot block to n1 out of order. This makes the test less From 068951211cf3c757bfb0366c7b34c04a661555fc Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 18 Mar 2026 16:19:10 +0100 Subject: [PATCH 022/122] test: [refactor] Use verbosity=0 named arg This is less confusing than the verbose=0 alias. Github-Pull: #34852 Rebased-From: faf71d6cb49b8a668c417d80bc56277f30cbf2e1 --- test/functional/test_framework/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 3a6346a3d919..d2d5d56fbf70 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -726,7 +726,7 @@ def dumb_sync_blocks(*, src, dst, height=None): height = height or src.getblockcount() for i in range(dst.getblockcount() + 1, height + 1): block_hash = src.getblockhash(i) - block = src.getblock(blockhash=block_hash, verbose=0) + block = src.getblock(blockhash=block_hash, verbosity=0) dst.submitblock(block) assert_equal(dst.getblockcount(), height) From ca781e49e599512704f17fabd09532f36a15cb53 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Wed, 18 Mar 2026 10:43:28 +0100 Subject: [PATCH 023/122] cmake: Migrate away from deprecated SQLite3 target CMake version 4.3 deprecated the imported target `Sqlite::Sqlite3`. Use the preferred name `Sqlite3::Sqlite3` instead and provide an alias for older versions of CMake. Also define the same alias when using vcpkg. Github-Pull: #34848 Rebased-From: 498b6eb6b5e8aceb372d3097df2715d9c7fc416b --- CMakeLists.txt | 4 ++++ src/wallet/CMakeLists.txt | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03a48164cb13..242870da4a99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,8 +117,12 @@ if(ENABLE_WALLET) if(VCPKG_TARGET_TRIPLET) # Use of the `unofficial::` namespace is a vcpkg package manager convention. find_package(unofficial-sqlite3 CONFIG REQUIRED) + add_library(SQLite3::SQLite3 ALIAS unofficial::sqlite3::sqlite3) else() find_package(SQLite3 3.7.17 REQUIRED) + if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3 + add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3) + endif() endif() endif() cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF) diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 8ec381df5a8c..36fd3ef95aec 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -38,8 +38,7 @@ target_link_libraries(bitcoin_wallet PRIVATE core_interface bitcoin_common - $ - $ + SQLite3::SQLite3 univalue Boost::headers $ From e930c6d60fe283f9e49746184caef99275864141 Mon Sep 17 00:00:00 2001 From: w0xlt <94266259+w0xlt@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:57:32 -0800 Subject: [PATCH 024/122] rpc: fix race condition in gettxoutsetinfo Fix an assertion failure in gettxoutsetinfo (issue #34263) caused by capturing the best block before releasing cs_main, then checking it against a potentially newer best block in GetUTXOStats(). Remove the early pindex capture since ComputeUTXOStats() independently fetches the current best block under lock. Use stats.hashBlock and stats.nHeight (the actual computed values) instead of the potentially stale pindex when building the response. Github-Pull: #34451 Rebased-From: 5e77072fa60110a00d2bff31798d58b6c10bd3da --- src/rpc/blockchain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index d97b7c6c15c6..c631a93674aa 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1080,7 +1080,6 @@ static RPCHelpMan gettxoutsetinfo() LOCK(::cs_main); coins_view = &active_chainstate.CoinsDB(); blockman = &active_chainstate.m_blockman; - pindex = blockman->LookupBlockIndex(coins_view->GetBestBlock()); } if (!request.params[1].isNull()) { @@ -1104,7 +1103,7 @@ static RPCHelpMan gettxoutsetinfo() // If a specific block was requested and the index has already synced past that height, we can return the // data already even though the index is not fully synced yet. - if (pindex->nHeight > summary.best_block_height) { + if (pindex && pindex->nHeight > summary.best_block_height) { throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("Unable to get data because coinstatsindex is still syncing. Current height: %d", summary.best_block_height)); } } @@ -1130,8 +1129,9 @@ static RPCHelpMan gettxoutsetinfo() ret.pushKV("disk_size", stats.nDiskSize); } else { CCoinsStats prev_stats{}; - if (pindex->nHeight > 0) { - const std::optional maybe_prev_stats = GetUTXOStats(coins_view, *blockman, hash_type, node.rpc_interruption_point, pindex->pprev, index_requested); + if (stats.nHeight > 0) { + const CBlockIndex& block_index = *CHECK_NONFATAL(WITH_LOCK(::cs_main, return blockman->LookupBlockIndex(stats.hashBlock))); + const std::optional maybe_prev_stats = GetUTXOStats(coins_view, *blockman, hash_type, node.rpc_interruption_point, block_index.pprev, index_requested); if (!maybe_prev_stats) { throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to read UTXO set"); } From 335a098afa334a7c7355fdfb9de409c716c2fb2b Mon Sep 17 00:00:00 2001 From: w0xlt <94266259+w0xlt@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:18:35 -0800 Subject: [PATCH 025/122] kernel: acquire coinstats cursor and block info atomically Acquire the cursor and block index under the same cs_main lock to eliminate a potential race where a new block could be connected between capturing the block info and acquiring the cursor, causing the reported stats to reference a different block than the one being iterated. Github-Pull: #34451 Rebased-From: f3bf63ec4f028cf9ee0820226f44fcbe26d358c9 --- src/kernel/coinstats.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/kernel/coinstats.cpp b/src/kernel/coinstats.cpp index d287ec4be6e3..49b51d64f30c 100644 --- a/src/kernel/coinstats.cpp +++ b/src/kernel/coinstats.cpp @@ -109,9 +109,8 @@ static void ApplyStats(CCoinsStats& stats, const std::map& outpu //! Calculate statistics about the unspent transaction output set template -static bool ComputeUTXOStats(CCoinsView* view, CCoinsStats& stats, T hash_obj, const std::function& interruption_point) +static bool ComputeUTXOStats(CCoinsView* view, CCoinsStats& stats, T hash_obj, const std::function& interruption_point, std::unique_ptr pcursor) { - std::unique_ptr pcursor(view->Cursor()); assert(pcursor); Txid prevkey; @@ -149,21 +148,27 @@ static bool ComputeUTXOStats(CCoinsView* view, CCoinsStats& stats, T hash_obj, c std::optional ComputeUTXOStats(CoinStatsHashType hash_type, CCoinsView* view, node::BlockManager& blockman, const std::function& interruption_point) { - CBlockIndex* pindex = WITH_LOCK(::cs_main, return blockman.LookupBlockIndex(view->GetBestBlock())); + std::unique_ptr pcursor; + CBlockIndex* pindex; + { + LOCK(::cs_main); + pcursor = view->Cursor(); + pindex = blockman.LookupBlockIndex(pcursor->GetBestBlock()); + } CCoinsStats stats{Assert(pindex)->nHeight, pindex->GetBlockHash()}; bool success = [&]() -> bool { switch (hash_type) { case(CoinStatsHashType::HASH_SERIALIZED): { HashWriter ss{}; - return ComputeUTXOStats(view, stats, ss, interruption_point); + return ComputeUTXOStats(view, stats, ss, interruption_point, std::move(pcursor)); } case(CoinStatsHashType::MUHASH): { MuHash3072 muhash; - return ComputeUTXOStats(view, stats, muhash, interruption_point); + return ComputeUTXOStats(view, stats, muhash, interruption_point, std::move(pcursor)); } case(CoinStatsHashType::NONE): { - return ComputeUTXOStats(view, stats, nullptr, interruption_point); + return ComputeUTXOStats(view, stats, nullptr, interruption_point, std::move(pcursor)); } } // no default case, so the compiler can warn about missing cases assert(false); From d9a57912c663842d38a8fbc0cda3888984334a2d Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 19 Mar 2026 09:21:34 +0100 Subject: [PATCH 026/122] ci: Avoid intermittent Windows generate download failures Github-Pull: #34859 Rebased-From: fa71c6e84c16418ffc5568c06aed863027cb238f --- .github/ci-windows.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/ci-windows.py b/.github/ci-windows.py index 236c6301d017..e21a7da94a30 100755 --- a/.github/ci-windows.py +++ b/.github/ci-windows.py @@ -8,6 +8,7 @@ import shlex import subprocess import sys +import time from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent / "test")) @@ -73,7 +74,12 @@ def generate(ci_type): "--preset", "vs2026", ] + GENERATE_OPTIONS[ci_type] - run(command) + if run(command, check=False).returncode != 0: + print("=== ⚠️ ===") + print("Generate failure! Network issue? Retry once ...") + time.sleep(12) + print("=== ⚠️ ===") + run(command) def build(_ci_type): From 7118559f8cc12aaf5359838990852712f65f6b40 Mon Sep 17 00:00:00 2001 From: kevkevinpal Date: Thu, 19 Mar 2026 13:58:29 -0400 Subject: [PATCH 027/122] tests: applied PYTHON_GIL to the env for every test Github-Pull: #34869 Rebased-From: b14f2c76a1f6b41835c134584c82c45704c4cce0 --- test/functional/test_runner.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index a4052f910243..cef49a3845e0 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -584,6 +584,11 @@ def remove_tests(exclude_list): def run_tests(*, test_list, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, use_term_control, results_filepath=None): args = args or [] + # Some optional Python dependencies (e.g. pycapnp) may emit warnings or fail under + # CPython free-threaded builds when the GIL is disabled. Force it on for all + # functional tests so every child process inherits PYTHON_GIL=1. + os.environ["PYTHON_GIL"] = "1" + # Warn if bitcoind is already running try: # pgrep exits with code zero when one or more matching processes found From e53c20d75073fffb0b1564990790e80614f0b87a Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Tue, 9 Apr 2024 15:53:38 -0300 Subject: [PATCH 028/122] gui: Fix TransactionsView on setCurrentWallet Making sure that if the privacy mode is activaded during the wallet selection, the transaction view is not shown. Github-Pull: #gui815 Rebased-From: 0dc337f73d013e342b880746292f1c3247b287cf --- src/qt/bitcoingui.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 3100a055bb7f..96ea3f4a7060 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -796,9 +796,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel) connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus); connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction); connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy); - const bool privacy = isPrivacyModeActivated(); - wallet_view->setPrivacy(privacy); - enableHistoryAction(privacy); + wallet_view->setPrivacy(isPrivacyModeActivated()); const QString display_name = walletModel->getDisplayName(); m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel)); } @@ -857,7 +855,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled) overviewAction->setEnabled(enabled); sendCoinsAction->setEnabled(enabled); receiveCoinsAction->setEnabled(enabled); - historyAction->setEnabled(enabled); + historyAction->setEnabled(enabled && !isPrivacyModeActivated()); encryptWalletAction->setEnabled(enabled); backupWalletAction->setEnabled(enabled); changePassphraseAction->setEnabled(enabled); From 3b7985298462bc1fa7c924d0da407f2ad5a87029 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 20 Mar 2026 12:38:27 +0000 Subject: [PATCH 029/122] depends: Fix cross-compiling on macOS for Windows 1. Use `build_os` instead of `host_os` for native packages. 2. `XCODE_VERSION` is available only for `darwin` hosts. Therefore, simply disable the Xcode version check for `native_qt`. Github-Pull: #34878 Rebased-From: 7a9304f8872eb4183a7a74279a7aefcdac25b468 --- depends/packages/native_qt.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk index 310c9f1329e6..3e1e56266673 100644 --- a/depends/packages/native_qt.mk +++ b/depends/packages/native_qt.mk @@ -97,9 +97,9 @@ ifneq ($(V),) $(package)_cmake_opts += --log-level=STATUS endif -ifeq ($(host_os),darwin) -$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION) +ifeq ($(build_os),darwin) $(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON +$(package)_cmake_opts += -DQT_NO_XCODE_MIN_VERSION_CHECK=ON endif endef From 051afe9e1a00691275402105ad51ac5037282b24 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:51:01 +0000 Subject: [PATCH 030/122] depends: Remove no longer necessary `dsymutil` Github-Pull: #34850 Rebased-From: 578525d31d47bad878f8609a04258920b1deab42 --- depends/builders/darwin.mk | 2 -- depends/builders/default.mk | 2 +- depends/hosts/darwin.mk | 1 - depends/hosts/default.mk | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index 2b59353e84f3..dba4d1370dbc 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -5,7 +5,6 @@ build_darwin_RANLIB:=$(shell xcrun -f ranlib) build_darwin_STRIP:=$(shell xcrun -f strip) build_darwin_OBJDUMP:=$(shell xcrun -f objdump) build_darwin_NM:=$(shell xcrun -f nm) -build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) build_darwin_SHA256SUM=shasum -a 256 build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o @@ -17,7 +16,6 @@ darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) darwin_OBJDUMP:=$(shell xcrun -f objdump) darwin_NM:=$(shell xcrun -f nm) -darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) x86_64_darwin_CFLAGS += -arch x86_64 x86_64_darwin_CXXFLAGS += -arch x86_64 diff --git a/depends/builders/default.mk b/depends/builders/default.mk index 2a1709d98ad2..fa7dfbb00530 100644 --- a/depends/builders/default.mk +++ b/depends/builders/default.mk @@ -13,7 +13,7 @@ build_$(build_os)_$1 ?= $$(default_build_$1) build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) endef -$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OBJDUMP DSYMUTIL TOUCH,$(eval $(call add_build_tool_func,$(var)))) +$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OBJDUMP TOUCH,$(eval $(call add_build_tool_func,$(var)))) define add_build_flags_func build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 71fac7cc8909..214bafafca7c 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -17,7 +17,6 @@ clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") -darwin_DSYMUTIL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v dsymutil") darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") darwin_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy") darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index 22409c4004d6..21a9612aea48 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -39,5 +39,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef -$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OBJDUMP DSYMUTIL,$(eval $(call add_host_tool_func,$(tool)))) +$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OBJDUMP,$(eval $(call add_host_tool_func,$(tool)))) $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) From 6993aa19152c3b2c7831a05b41c3659004b462b8 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 16 Feb 2026 10:44:28 +0100 Subject: [PATCH 031/122] test: Scale feature_dbcrash.py timeout with factor This allows to run the test under valgrind: ./bld-cmake/test/functional/feature_dbcrash.py --timeout-factor=10 --valgrind For testing, the same test can be run multiple times in parallel: ./bld-cmake/test/functional/test_runner.py -j 10 $( printf 'feature_dbcrash.py %.0s' {1..10} ) --timeout-factor=10 --valgrind (Running the test under valgrind may take several hours!) I found that before this commit, 9 out of the 10 runs failed via: ``` ... TestFramework (INFO): Iteration 36, generating 2500 transactions [11, 5, 6] TestFramework (ERROR): Unexpected exception Traceback (most recent call last): File "/b-c/test/functional/test_framework/test_framework.py", line 142, in main self.run_test() ~~~~~~~~~~~~~^^ File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 262, in run_test self.sync_node3blocks(block_hashes) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 151, in sync_node3blocks nodei_utxo_hash = self.restart_node(i, block_hash) File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 102, in restart_node raise AssertionError(f"Unable to successfully restart node {node_index} in allotted time") AssertionError: Unable to successfully restart node 0 in allotted time ``` With this commit, all 10 runs passed. Github-Pull: #34589 Rebased-From: fadb77169bed77e0df8d42d55599615b916ee6e8 --- test/functional/feature_dbcrash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py index 7a60af40f49b..cc94be781d15 100755 --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -80,7 +80,7 @@ def restart_node(self, node_index, expected_tip): after a timeout. Returns the utxo hash of the given node.""" time_start = time.time() - while time.time() - time_start < 120: + while time.time() - time_start < 120 * self.options.timeout_factor: try: # Any of these RPC calls could throw due to node crash self.start_node(node_index) From 198bc4da872d20ccff798b900b55c0c596aae72d Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 10 Mar 2026 22:29:56 +0100 Subject: [PATCH 032/122] ci: Clarify why valgrind task has gui disabled A build with system libs (or with a normal depends build) will fail with: ```sh $ valgrind --exit-on-first-error=yes --error-exitcode=1 --quiet ./bld-cmake/bin/test_bitcoin-qt Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. ********* Start testing of AppTests ********* Config: Using QtTest library 6.10.2, Qt 6.10.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 15.2.0), ubuntu 26.04 PASS : AppTests::initTestCase() QINFO : AppTests::appTests() Backing up GUI settings to "/tmp/test_common bitcoin/60d474ffae390f81657d/regtest/guisettings.ini.bak" ==18007== Conditional jump or move depends on uninitialised value(s) ==18007== at 0x12655E26: ??? ==18007== by 0xCB28E7F: ??? ==18007== ==18007== ==18007== Exit program on first error (--exit-on-first-error=yes) ``` A DEBUG=1 depends build would work, but that seems tedious for questionable benefit. Github-Pull: #34589 Rebased-From: faf3ef4ee79ba4dc77340f47bf8eb303ef6ac825 --- ci/test/00_setup_env_native_valgrind.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index 30c84bf48743..89118324b1c1 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -15,7 +15,7 @@ export NO_DEPENDS=1 # bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export TEST_RUNNER_EXTRA="--exclude rpc_bind --exclude feature_bind_extra" export GOAL="install" -# TODO enable GUI +# GUI disabled, because it only passes with a DEBUG=1 depends build export BITCOIN_CONFIG="\ --preset=dev-mode \ -DBUILD_GUI=OFF \ From d171afa9e8d494ec198ba8c856dd98cce6344eb0 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 13 Feb 2026 13:46:08 +0100 Subject: [PATCH 033/122] ci: Temporarily use clang in valgrind tasks valgrind currently does not work on GCC -O2 compiled executables, which contain std::optional use, due to an upstream bug. See https://bugs.kde.org/show_bug.cgi?id=472329 One workaround could be to use -O1. However, that seems brittle, as variantions of the bug were seen with -O1 as well. So temporarily use clang in the valgrind CI tasks, because this also allows to drop a false-positive suppression for: -DCMAKE_CXX_FLAGS='-Wno-error=array-bounds' Also, update the comment in contrib/valgrind.supp to mention the background: * GCC -O2 wasn't tested with the suppressions file, due to the mentioned bug. * Clang-17 (or later) on aarch64 wasn't tested due to bug https://github.com/bitcoin/bitcoin/issues/29635 and the minimum supported clang version is clang-17 right now. * GUI isn't tested, because it requires a debug build, see the prior commit. This means the only tested config right now is the one mentioned in the suppression file. Github-Pull: #34589 Rebased-From: fa70b9ebaa46b5fedcc02200626499d25762d44a --- ci/test/00_setup_env_native_fuzz_with_valgrind.sh | 5 +++-- ci/test/00_setup_env_native_valgrind.sh | 6 ++++-- test/sanitizer_suppressions/valgrind.supp | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index d8b0f5f1b5bb..ed84ae84cf35 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" export CONTAINER_NAME=ci_native_fuzz_valgrind -export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto" +export PACKAGES="clang llvm libclang-rt-dev libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false @@ -17,5 +17,6 @@ export FUZZ_TESTS_CONFIG="--valgrind" export GOAL="all" export BITCOIN_CONFIG="\ -DBUILD_FOR_FUZZING=ON \ - -DCMAKE_CXX_FLAGS='-Wno-error=array-bounds' \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ " diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index 89118324b1c1..0ca02f77824c 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" export CONTAINER_NAME=ci_native_valgrind -export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip" +export PACKAGES="clang llvm libclang-rt-dev valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip" export PIP_PACKAGES="--break-system-packages pycapnp" export USE_VALGRIND=1 export NO_DEPENDS=1 @@ -17,7 +17,9 @@ export TEST_RUNNER_EXTRA="--exclude rpc_bind --exclude feature_bind_extra" export GOAL="install" # GUI disabled, because it only passes with a DEBUG=1 depends build export BITCOIN_CONFIG="\ - --preset=dev-mode \ + --preset=dev-mode \ -DBUILD_GUI=OFF \ -DWITH_USDT=OFF \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ " diff --git a/test/sanitizer_suppressions/valgrind.supp b/test/sanitizer_suppressions/valgrind.supp index 584cdcf755ef..8bcad9140e31 100644 --- a/test/sanitizer_suppressions/valgrind.supp +++ b/test/sanitizer_suppressions/valgrind.supp @@ -12,8 +12,10 @@ # --error-limit=no build/bin/test_bitcoin # # Note that suppressions may depend on OS and/or library versions. -# Tested on aarch64 and x86_64 with Ubuntu Noble system libs, using clang-16 -# and GCC, without gui. +# Tested on Debian Trixie system libs, +# * using clang (only x86_64, see https://bugs.kde.org/show_bug.cgi?id=485276), +# * and GCC (only -O1, see https://bugs.kde.org/show_bug.cgi?id=472329), +# without gui (because it only passes with a DEBUG=1 depends build). { Suppress leaks on shutdown Memcheck:Leak From 11b69922b3562a39d6bf9c605c439e9a5f708099 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 20 Mar 2026 21:07:03 -0400 Subject: [PATCH 034/122] wallet: fix amount computed as boolean in coin selection The comparison is evaluated before the assignment, so total_amount ends up holding a boolean instead of the actual amount: total_amount = (a - b < c) which is not what we want here. This has been working by accident. Github-Pull: #34888 Rebased-From: 0026b330c4abbbbdb96e4f0c4d380d70d8e592ab --- src/wallet/spend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 3db42d1b162a..3d1504264043 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -939,7 +939,7 @@ util::Result AutomaticCoinSelection(const CWallet& wallet, Coin if (group.m_ancestors >= max_ancestors || group.m_max_cluster_count >= max_cluster_count) total_unconf_long_chain += group.GetSelectionAmount(); } - if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded < value_to_select) { + if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded; total_amount < value_to_select) { // Special case, too-long-mempool cluster. if (total_amount + total_unconf_long_chain > value_to_select) { return util::Error{_("Unconfirmed UTXOs are available, but spending them creates a chain of transactions that will be rejected by the mempool")}; From 87d1691f3e7ba27435f50e5bfaeac69cc77c66ca Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 19 Mar 2026 14:57:45 -0400 Subject: [PATCH 035/122] wallet: feebumper, fix crash when combined bump fee is unavailable When a large cluster of unconfirmed transactions exceeds the limit, calculateCombinedBumpFee() returns std::nullopt. Previously, we continued executing and the optional value was accessed unconditionally, leading to a std::bad_optional_access exception. Fix this by returning early when the returned bumped fee is null. Note: This is a crash for the GUI, and an uncaught exception for the RPC bumpfee and psbtbumpfee. Github-Pull: #34870 Rebased-From: 6072a2a6a1fdde8444e3515f0d201de3fb3923a1 --- src/wallet/feebumper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index ff7a9f5a3ac5..7f84c6fa6682 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -80,9 +80,10 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans reused_inputs.push_back(txin.prevout); } - std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); + const std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); if (!combined_bump_fee.has_value()) { errors.push_back(Untranslated(strprintf("Failed to calculate bump fees, because unconfirmed UTXOs depend on an enormous cluster of unconfirmed transactions."))); + return feebumper::Result::WALLET_ERROR; } CAmount new_total_fee = newFeerate.GetFee(maxTxSize) + combined_bump_fee.value(); From e3d571691ae4a5d799d64fbb945774b57a2e17f7 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 19 Mar 2026 07:58:52 +0100 Subject: [PATCH 036/122] test: Remove confusing assert_debug_log in wallet_reindex.py Github-Pull: #34857 Rebased-From: fa30951af5b174a1ee5e1c23d84b115c542a9570 --- test/functional/wallet_reindex.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/functional/wallet_reindex.py b/test/functional/wallet_reindex.py index 71ab69e01bf2..a4180897bf4e 100755 --- a/test/functional/wallet_reindex.py +++ b/test/functional/wallet_reindex.py @@ -60,10 +60,8 @@ def birthtime_test(self, node, miner_wallet): assert_equal(wallet_watch_only.gettransaction(tx_id)['confirmations'], 50) assert_equal(wallet_watch_only.getbalances()['mine']['trusted'], 2) - # Reindex and wait for it to finish - with node.assert_debug_log(expected_msgs=["initload thread exit"]): - self.restart_node(0, extra_args=['-reindex=1', f'-mocktime={self.node_time}']) - node.syncwithvalidationinterfacequeue() + self.log.info("Reindex ...") # restart_node waits for it to finish + self.restart_node(0, extra_args=[ f'-mocktime={self.node_time}']) # Verify the transaction is still 'confirmed' after reindex wallet_watch_only = node.get_wallet_rpc('watch_only') From acd7e3d061ad25d1c39345aad6bfe0be6a89bbaa Mon Sep 17 00:00:00 2001 From: Enoch Azariah Date: Wed, 4 Mar 2026 00:25:51 +0100 Subject: [PATCH 037/122] test: verify createNewBlock wakes promptly when tip advances This adds a complementary test to interface_ipc_mining.py to ensure that createNewBlock() wakes up immediately once submitblock advances the tip, rather than needlessly waiting for the cooldown timer to expire on its own. Github-Pull: #34727 Rebased-From: 4ada575d6c6880f7d302c1f37581a82f394c0b5e --- test/functional/interface_ipc_mining.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py index bcb7f5f5d86c..67f77fee5f78 100755 --- a/test/functional/interface_ipc_mining.py +++ b/test/functional/interface_ipc_mining.py @@ -199,6 +199,25 @@ async def async_routine(): # spurious failures. assert_greater_than_or_equal(time.time() - start, 0.9) + self.log.debug("createNewBlock() should wake up promptly after tip advances") + success = False + duration = 0.0 + async def wait_fn(): + nonlocal success, duration + start = time.time() + res = await mining.createNewBlock(ctx, self.default_block_create_options) + duration = time.time() - start + success = res._has("result") + def do_fn(): + block_hex = self.nodes[1].getblock(node1_block_hash, False) + self.nodes[0].submitblock(block_hex) + await wait_and_do(wait_fn(), do_fn) + assert_equal(success, True) + if self.options.timeout_factor <= 1: + assert duration < 3.0, f"createNewBlock took {duration:.2f}s, did not wake up promptly after tip advances" + else: + self.log.debug("Skipping strict wake-up duration check because timeout_factor > 1") + self.log.debug("interrupt() should abort createNewBlock() during cooldown") async def create_block(): result = await mining.createNewBlock(ctx, self.default_block_create_options) From 660947352cdac99add7341334f57b3ce29f97865 Mon Sep 17 00:00:00 2001 From: Enoch Azariah Date: Wed, 4 Mar 2026 00:41:08 +0100 Subject: [PATCH 038/122] test: move make_mining_ctx to ipc_util.py The async routines in both interface_ipc.py and interface_ipc_mining.py contain redundant code to initialize the mining proxy object. Move the make_mining_ctx helper into test_framework/ipc_util.py and update both test files to use it. This removes the boilerplate and prevents code duplication across the IPC test suite. Github-Pull: #34727 Rebased-From: 63684d6922e5c034ff620d23c35ba175edae49c4 --- test/functional/interface_ipc.py | 15 ++++----------- test/functional/interface_ipc_mining.py | 19 ++++++------------- test/functional/test_framework/ipc_util.py | 7 +++++++ 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/test/functional/interface_ipc.py b/test/functional/interface_ipc.py index 16ec03079b0a..2c11f88305c9 100755 --- a/test/functional/interface_ipc.py +++ b/test/functional/interface_ipc.py @@ -11,6 +11,7 @@ from test_framework.ipc_util import ( load_capnp_modules, make_capnp_init_ctx, + make_mining_ctx, ) # Test may be skipped and not have capnp installed @@ -55,9 +56,7 @@ def run_mining_test(self): block_hash_size = 32 async def async_routine(): - ctx, init = await make_capnp_init_ctx(self) - self.log.debug("Create Mining proxy object") - mining = init.makeMining(ctx).result + ctx, mining = await make_mining_ctx(self) self.log.debug("Test simple inspectors") assert (await mining.isTestChain(ctx)).result assert not (await mining.isInitialBlockDownload(ctx)).result @@ -95,10 +94,7 @@ def run_unclean_disconnect_test(self): disconnected_log_check = ExitStack() async def async_routine(): - ctx, init = await make_capnp_init_ctx(self) - self.log.debug("Create Mining proxy object") - mining = init.makeMining(ctx).result - + ctx, mining = await make_mining_ctx(self) self.log.debug("Create a template") opts = self.capnp_modules['mining'].BlockCreateOptions() template = (await mining.createNewBlock(ctx, opts)).result @@ -131,10 +127,7 @@ def run_thread_busy_test(self): timeout = self.rpc_timeout * 1000.0 async def async_routine(): - ctx, init = await make_capnp_init_ctx(self) - self.log.debug("Create Mining proxy object") - mining = init.makeMining(ctx).result - + ctx, mining = await make_mining_ctx(self) self.log.debug("Create a template") opts = self.capnp_modules['mining'].BlockCreateOptions() template = (await mining.createNewBlock(ctx, opts)).result diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py index 67f77fee5f78..6f2237a883d4 100755 --- a/test/functional/interface_ipc_mining.py +++ b/test/functional/interface_ipc_mining.py @@ -37,11 +37,11 @@ destroying, mining_create_block_template, load_capnp_modules, - make_capnp_init_ctx, mining_get_block, mining_get_coinbase_tx, mining_wait_next_template, wait_and_do, + make_mining_ctx, ) # Test may be skipped and not have capnp installed @@ -106,13 +106,6 @@ async def build_coinbase_test(self, template, ctx, miniwallet): coinbase_tx.nLockTime = coinbase_res.lockTime return coinbase_tx - async def make_mining_ctx(self): - """Create IPC context and Mining proxy object.""" - ctx, init = await make_capnp_init_ctx(self) - self.log.debug("Create Mining proxy object") - mining = init.makeMining(ctx).result - return ctx, mining - def run_mining_interface_test(self): """Test Mining interface methods.""" self.log.info("Running Mining interface test") @@ -120,7 +113,7 @@ def run_mining_interface_test(self): timeout = 1000.0 # 1000 milliseconds async def async_routine(): - ctx, mining = await self.make_mining_ctx() + ctx, mining = await make_mining_ctx(self) blockref = await mining.getTip(ctx) current_block_height = self.nodes[0].getchaintips()[0]["height"] assert_equal(blockref.result.height, current_block_height) @@ -159,7 +152,7 @@ def run_early_startup_test(self): async def async_routine(): while True: try: - ctx, mining = await self.make_mining_ctx() + ctx, mining = await make_mining_ctx(self) break except (ConnectionRefusedError, FileNotFoundError): # Poll quickly to connect as soon as socket becomes @@ -182,7 +175,7 @@ def run_block_template_test(self): timeout = 1000.0 # 1000 milliseconds async def async_routine(): - ctx, mining = await self.make_mining_ctx() + ctx, mining = await make_mining_ctx(self) async with AsyncExitStack() as stack: self.log.debug("createNewBlock() should wait if tip is still updating") @@ -309,7 +302,7 @@ def run_ipc_option_override_test(self): self.restart_node(0, extra_args=[f"-blockreservedweight={MAX_BLOCK_WEIGHT}"]) async def async_routine(): - ctx, mining = await self.make_mining_ctx() + ctx, mining = await make_mining_ctx(self) self.miniwallet.send_self_transfer(fee_rate=10, from_node=self.nodes[0]) async with AsyncExitStack() as stack: @@ -349,7 +342,7 @@ def run_coinbase_and_submission_test(self): self.log.info("Running coinbase construction and submission test") async def async_routine(): - ctx, mining = await self.make_mining_ctx() + ctx, mining = await make_mining_ctx(self) current_block_height = self.nodes[0].getchaintips()[0]["height"] check_opts = self.capnp_modules['mining'].BlockCheckOptions() diff --git a/test/functional/test_framework/ipc_util.py b/test/functional/test_framework/ipc_util.py index 11497463eb31..c80f78f79b7e 100644 --- a/test/functional/test_framework/ipc_util.py +++ b/test/functional/test_framework/ipc_util.py @@ -148,3 +148,10 @@ async def mining_get_coinbase_tx(block_template, ctx) -> CoinbaseTxData: requiredOutputs=[bytes(output) for output in template_capnp.requiredOutputs], lockTime=int(template_capnp.lockTime), ) + +async def make_mining_ctx(self): + """Create IPC context and Mining proxy object.""" + ctx, init = await make_capnp_init_ctx(self) + self.log.debug("Create Mining proxy object") + mining = init.makeMining(ctx).result + return ctx, mining From 39c87621d554a3bec6c6d22f3fcdf6b9d3775aba Mon Sep 17 00:00:00 2001 From: Enoch Azariah Date: Mon, 9 Mar 2026 11:06:55 +0100 Subject: [PATCH 039/122] test: verify IPC error handling for invalid coinbase Add a test case to interface_ipc_mining.py to verify that the IPC server correctly handles and reports serialization errors rather than crashing the node. This covers the scenario where submitSolution is called with data that cannot be deserialized, as discussed in #33341 Also introduces the assert_capnp_failed helper in ipc_util.py to cleanly handle macOS-specific Cap'n Proto exception strings, and refactors an existing block weight test to use it. Github-Pull: #34727 Rebased-From: e7a918b69a5e6aaf3f02ca84ca6cde14401928ed --- test/functional/interface_ipc_mining.py | 19 +++++++++---------- test/functional/test_framework/ipc_util.py | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py index 6f2237a883d4..0c3b9cf869cc 100755 --- a/test/functional/interface_ipc_mining.py +++ b/test/functional/interface_ipc_mining.py @@ -7,7 +7,6 @@ import time from contextlib import AsyncExitStack from io import BytesIO -import platform from test_framework.blocktools import NULL_OUTPOINT from test_framework.messages import ( MAX_BLOCK_WEIGHT, @@ -42,6 +41,7 @@ mining_wait_next_template, wait_and_do, make_mining_ctx, + assert_capnp_failed ) # Test may be skipped and not have capnp installed @@ -325,15 +325,7 @@ async def async_routine(): await mining.createNewBlock(ctx, opts) raise AssertionError("createNewBlock unexpectedly succeeded") except capnp.lib.capnp.KjException as e: - if e.description == "remote exception: unknown non-KJ exception of type: kj::Exception": - # macOS + REDUCE_EXPORTS bug: Cap'n Proto fails to recognize - # its own exception type and returns a generic error instead. - # https://github.com/bitcoin/bitcoin/pull/34422#discussion_r2863852691 - # Assert this only occurs on Darwin until fixed. - assert_equal(platform.system(), "Darwin") - else: - assert_equal(e.description, "remote exception: std::exception: block_reserved_weight (0) must be at least 2000 weight units") - assert_equal(e.type, "FAILED") + assert_capnp_failed(e, "remote exception: std::exception: block_reserved_weight (0) must be at least 2000 weight units") asyncio.run(capnp.run(async_routine())) @@ -357,6 +349,13 @@ async def async_routine(): block.hashMerkleRoot = block.calc_merkle_root() original_version = block.nVersion + self.log.debug("Submit solution that can't be deserialized") + try: + await template.submitSolution(ctx, 0, 0, 0, b"") + raise AssertionError("submitSolution unexpectedly succeeded") + except capnp.lib.capnp.KjException as e: + assert_capnp_failed(e, "remote exception: std::exception: SpanReader::read(): end of data:") + self.log.debug("Submit a block with a bad version") block.nVersion = 0 block.solve() diff --git a/test/functional/test_framework/ipc_util.py b/test/functional/test_framework/ipc_util.py index c80f78f79b7e..03e3b5d511b3 100644 --- a/test/functional/test_framework/ipc_util.py +++ b/test/functional/test_framework/ipc_util.py @@ -10,9 +10,13 @@ from io import BytesIO from pathlib import Path import shutil +import platform from typing import Optional from test_framework.messages import CBlock +from test_framework.util import ( + assert_equal +) # Test may be skipped and not have capnp installed try: @@ -155,3 +159,14 @@ async def make_mining_ctx(self): self.log.debug("Create Mining proxy object") mining = init.makeMining(ctx).result return ctx, mining + +def assert_capnp_failed(e, description_prefix): + if e.description == "remote exception: unknown non-KJ exception of type: kj::Exception": + # macOS + REDUCE_EXPORTS bug: Cap'n Proto fails to recognize + # its own exception type and returns a generic error instead. + # https://github.com/bitcoin/bitcoin/pull/34422#discussion_r2863852691 + # Assert this only occurs on Darwin until fixed. + assert_equal(platform.system(), "Darwin") + else: + assert e.description.startswith(description_prefix), f"Expected description starting with '{description_prefix}', got '{e.description}'" + assert_equal(e.type, "FAILED") From ac13aca72bec934461c6bcaa3f5504ec452d255b Mon Sep 17 00:00:00 2001 From: Enoch Azariah Date: Fri, 13 Mar 2026 11:13:25 +0100 Subject: [PATCH 040/122] test: scale IPC mining wait timeouts by timeout_factor The IPC mining tests (interface_ipc_mining.py) currently use hardcoded timeouts (e.g., 1000ms, 60000ms) for operations like waitTipChanged and waiting for block templates. In heavily loaded CI environments, such as those running sanitizers with high parallelism, these hardcoded timeouts can be too short, leading to spurious test failures and brittleness. This commit multiplies these timeout variables by the test suite's global `self.options.timeout_factor`. This ensures that the IPC wait conditions scale appropriately when the test suite is run with a higher timeout factor, making the tests robust against slow execution environments. Addresses CI brittleness observed in bitcoin-core/libmultiprocess#253. Github-Pull: #34727 Rebased-From: ad75b147b5c3ab5eac268a1c1ced23894a8a79ba --- test/functional/interface_ipc_mining.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py index 0c3b9cf869cc..31ccec63fa86 100755 --- a/test/functional/interface_ipc_mining.py +++ b/test/functional/interface_ipc_mining.py @@ -110,7 +110,7 @@ def run_mining_interface_test(self): """Test Mining interface methods.""" self.log.info("Running Mining interface test") block_hash_size = 32 - timeout = 1000.0 # 1000 milliseconds + timeout = 1000.0 * self.options.timeout_factor # 1000 milliseconds async def async_routine(): ctx, mining = await make_mining_ctx(self) @@ -132,7 +132,7 @@ async def async_routine(): self.log.debug("interrupt() should abort waitTipChanged()") async def wait_for_tip(): - long_timeout = 60000.0 # 1 minute + long_timeout = max(timeout, 60000.0) # at least 1 minute result = (await mining.waitTipChanged(ctx, newblockref.hash, long_timeout)).result # Unlike a timeout, interrupt() returns an empty BlockRef. assert_equal(len(result.hash), 0) @@ -172,7 +172,7 @@ def run_block_template_test(self): """Test BlockTemplate interface methods.""" self.log.info("Running BlockTemplate interface test") block_header_size = 80 - timeout = 1000.0 # 1000 milliseconds + timeout = 1000.0 * self.options.timeout_factor async def async_routine(): ctx, mining = await make_mining_ctx(self) @@ -285,7 +285,7 @@ async def create_block(): self.log.debug("interruptWait should abort the current wait") async def wait_for_block(): new_waitoptions = self.capnp_modules['mining'].BlockWaitOptions() - new_waitoptions.timeout = timeout * 60 # 1 minute wait + new_waitoptions.timeout = max(timeout, 60000.0) # at least 1 minute new_waitoptions.feeThreshold = 1 template7 = await mining_wait_next_template(template6, stack, ctx, new_waitoptions) assert template7 is None From a30e50538b618e2ae0a15cab44cbca1600224d9c Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 25 Mar 2026 08:52:02 +0800 Subject: [PATCH 041/122] build: bump version to v31.0rc2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 242870da4a99..145de0ce5011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 1) +set(CLIENT_VERSION_RC 2) set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") From 718c31cfb73e03cc624a4a18bf2d8053b6ac2556 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 25 Mar 2026 08:57:03 +0800 Subject: [PATCH 042/122] doc: update manual pages for v31.0rc2 --- doc/man/bitcoin-cli.1 | 6 +++--- doc/man/bitcoin-qt.1 | 26 +++++++++++++------------- doc/man/bitcoin-tx.1 | 6 +++--- doc/man/bitcoin-util.1 | 6 +++--- doc/man/bitcoin-wallet.1 | 6 +++--- doc/man/bitcoin.1 | 4 ++-- doc/man/bitcoind.1 | 26 +++++++++++++------------- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index e11689ac8ecf..d42203296a44 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "March 2026" "bitcoin-cli v31.0.0rc1" "User Commands" +.TH BITCOIN-CLI "1" "March 2026" "bitcoin-cli v31.0.0rc2" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc1 +bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc2 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc1 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help \/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v31.0.0rc1 +Bitcoin Core RPC client version v31.0.0rc2 .PP The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. .PP diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index 24b7bd86c50d..25f010e0c91e 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "March 2026" "bitcoin-qt v31.0.0rc1" "User Commands" +.TH BITCOIN-QT "1" "March 2026" "bitcoin-qt v31.0.0rc2" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc1 +bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc2 .SH SYNOPSIS .B bitcoin-qt [\fI\,options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v31.0.0rc1 +Bitcoin Core version v31.0.0rc2 .PP The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. .PP @@ -32,13 +32,13 @@ datadir as a warning, not an error. 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: -00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +00000000000000000000ccebd6d74d9194d8dcdc1d177c478e094bfad51ba5ac, testnet3: -0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +000000007a61e4230b28ac5cb6b5e5a0130de37ac1faf2f8987d2fa6505b67f4, testnet4: -000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +0000000002368b1e4ee27e2e85676ae6f9f9e69579b29093e9a82c170bf7cf8a, signet: -000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +00000008414aab61092ef93f1aacc54cf9e9f16af29ddad493b908a01ff5c329) .HP \fB\-blockfilterindex=\fR .IP @@ -99,9 +99,9 @@ Specify data directory .HP \fB\-dbcache=\fR .IP -Maximum database cache size MiB (minimum 4, default: 450). Make sure -you have enough RAM. In addition, unused memory allocated to the -mempool is shared with this cache (see \fB\-maxmempool\fR). +Maximum database cache size MiB (minimum 4, default: 1024). Make +sure you have enough RAM. In addition, unused memory allocated to +the mempool is shared with this cache (see \fB\-maxmempool\fR). .HP \fB\-debuglogfile=\fR .IP @@ -592,9 +592,9 @@ is optional). If is not supplied or if is 1 or "all", output all debug logging. If is 0 or "none", any other categories are ignored. Other valid values for are: addrman, bench, blockstorage, cmpctblock, coindb, -estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, -mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, -rand, reindex, rpc, scan, selectcoins, tor, txpackages, +estimatefee, http, i2p, ipc, kernel, leveldb, libevent, mempool, +mempoolrej, net, privatebroadcast, proxy, prune, qt, rand, +reindex, rpc, scan, selectcoins, tor, txpackages, txreconciliation, validation, walletdb, zmq. This option can be specified multiple times to output multiple categories. .HP diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index f66cdbd2ef57..979458ba69b2 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "March 2026" "bitcoin-tx v31.0.0rc1" "User Commands" +.TH BITCOIN-TX "1" "March 2026" "bitcoin-tx v31.0.0rc2" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc1 +bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc2 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc1 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v31.0.0rc1 +Bitcoin Core bitcoin\-tx utility version v31.0.0rc2 .PP The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. .PP diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 936544e3da80..5039389cd649 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "March 2026" "bitcoin-util v31.0.0rc1" "User Commands" +.TH BITCOIN-UTIL "1" "March 2026" "bitcoin-util v31.0.0rc2" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v31.0.0rc1 +bitcoin-util \- manual page for bitcoin-util v31.0.0rc2 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,command\/\fR] @@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v31.0.0rc1 .B bitcoin-util [\fI\,options\/\fR] \fI\,grind \/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v31.0.0rc1 +Bitcoin Core bitcoin\-util utility version v31.0.0rc2 .PP The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. .SH OPTIONS diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index e9725c918c0c..6cded8cc9d5a 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "March 2026" "bitcoin-wallet v31.0.0rc1" "User Commands" +.TH BITCOIN-WALLET "1" "March 2026" "bitcoin-wallet v31.0.0rc2" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc1 +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc2 .SH SYNOPSIS .B bitcoin-wallet [\fI\,options\/\fR] \fI\,\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet utility version v31.0.0rc1 +Bitcoin Core bitcoin\-wallet utility version v31.0.0rc2 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. .PP diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 2120941efdcd..07df353495cd 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN "1" "March 2026" "bitcoin v31.0.0rc1" "User Commands" +.TH BITCOIN "1" "March 2026" "bitcoin v31.0.0rc2" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin v31.0.0rc1 +bitcoin \- manual page for bitcoin v31.0.0rc2 .SH SYNOPSIS .B bitcoin [\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index 0b44a13bb76e..ec0615e1d5af 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "March 2026" "bitcoind v31.0.0rc1" "User Commands" +.TH BITCOIND "1" "March 2026" "bitcoind v31.0.0rc2" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v31.0.0rc1 +bitcoind \- manual page for bitcoind v31.0.0rc2 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] .SH DESCRIPTION -Bitcoin Core daemon version v31.0.0rc1 bitcoind +Bitcoin Core daemon version v31.0.0rc2 bitcoind .PP The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. .PP @@ -32,13 +32,13 @@ datadir as a warning, not an error. 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: -00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +00000000000000000000ccebd6d74d9194d8dcdc1d177c478e094bfad51ba5ac, testnet3: -0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +000000007a61e4230b28ac5cb6b5e5a0130de37ac1faf2f8987d2fa6505b67f4, testnet4: -000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +0000000002368b1e4ee27e2e85676ae6f9f9e69579b29093e9a82c170bf7cf8a, signet: -000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +00000008414aab61092ef93f1aacc54cf9e9f16af29ddad493b908a01ff5c329) .HP \fB\-blockfilterindex=\fR .IP @@ -99,9 +99,9 @@ Specify data directory .HP \fB\-dbcache=\fR .IP -Maximum database cache size MiB (minimum 4, default: 450). Make sure -you have enough RAM. In addition, unused memory allocated to the -mempool is shared with this cache (see \fB\-maxmempool\fR). +Maximum database cache size MiB (minimum 4, default: 1024). Make +sure you have enough RAM. In addition, unused memory allocated to +the mempool is shared with this cache (see \fB\-maxmempool\fR). .HP \fB\-debuglogfile=\fR .IP @@ -592,9 +592,9 @@ is optional). If is not supplied or if is 1 or "all", output all debug logging. If is 0 or "none", any other categories are ignored. Other valid values for are: addrman, bench, blockstorage, cmpctblock, coindb, -estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, -mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, -rand, reindex, rpc, scan, selectcoins, tor, txpackages, +estimatefee, http, i2p, ipc, kernel, leveldb, libevent, mempool, +mempoolrej, net, privatebroadcast, proxy, prune, qt, rand, +reindex, rpc, scan, selectcoins, tor, txpackages, txreconciliation, validation, walletdb, zmq. This option can be specified multiple times to output multiple categories. .HP From b241f3c82d5a11eafc493b8faaa8cb5461a5199a Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 25 Mar 2026 08:58:45 +0800 Subject: [PATCH 043/122] doc: update example bitcoin conf for 31.0rc2 --- share/examples/bitcoin.conf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/share/examples/bitcoin.conf b/share/examples/bitcoin.conf index 22af1184faa1..6a128dbecdac 100644 --- a/share/examples/bitcoin.conf +++ b/share/examples/bitcoin.conf @@ -23,13 +23,13 @@ # 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: -# 00000000000000000000611fd22f2df7c8fbd0688745c3a6c3bb5109cc2a12cb, +# 00000000000000000000ccebd6d74d9194d8dcdc1d177c478e094bfad51ba5ac, # testnet3: -# 0000000000000065c6c38258e201971a3fdfcc2ceee0dd6e85a6c022d45dee34, +# 000000007a61e4230b28ac5cb6b5e5a0130de37ac1faf2f8987d2fa6505b67f4, # testnet4: -# 000000000000000180a58e7fa3b0db84b5ea76377524894f53660d93ac839d9b, +# 0000000002368b1e4ee27e2e85676ae6f9f9e69579b29093e9a82c170bf7cf8a, # signet: -# 000000128586e26813922680309f04e1de713c7542fee86ed908f56368aefe2e) +# 00000008414aab61092ef93f1aacc54cf9e9f16af29ddad493b908a01ff5c329) #assumevalid= # Maintain an index of compact filters by block (default: 0, values: @@ -78,9 +78,9 @@ # Specify data directory #datadir= -# Maximum database cache size MiB (minimum 4, default: 450). Make sure -# you have enough RAM. In addition, unused memory allocated to the -# mempool is shared with this cache (see -maxmempool). +# Maximum database cache size MiB (minimum 4, default: 1024). Make +# sure you have enough RAM. In addition, unused memory allocated to +# the mempool is shared with this cache (see -maxmempool). #dbcache= # Specify location of debug log file (default: debug.log). Relative paths @@ -492,9 +492,9 @@ # or "all", output all debug logging. If is 0 or "none", # any other categories are ignored. Other valid values for # are: addrman, bench, blockstorage, cmpctblock, coindb, -# estimatefee, http, i2p, ipc, kernel, leveldb, libevent, lock, -# mempool, mempoolrej, net, privatebroadcast, proxy, prune, qt, -# rand, reindex, rpc, scan, selectcoins, tor, txpackages, +# estimatefee, http, i2p, ipc, kernel, leveldb, libevent, mempool, +# mempoolrej, net, privatebroadcast, proxy, prune, qt, rand, +# reindex, rpc, scan, selectcoins, tor, txpackages, # txreconciliation, validation, walletdb, zmq. This option can be # specified multiple times to output multiple categories. #debug= From 98551a0efdccd27d9e4c1e45a9b3d02f02aaf8bf Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 25 Mar 2026 12:25:44 +0100 Subject: [PATCH 044/122] fuzz: Remove unused g_setup pointers These are unused and removing them avoids clang warnings like: src/test/fuzz/deserialize.cpp:42:26: error: variable g_setup set but not used [-Werror,-Wunused-but-set-variable] Github-Pull: #34918 Rebased-From: fabbfec3b00c138a28034a4f5594305d2220b9bb --- src/test/fuzz/deserialize.cpp | 7 +------ src/test/fuzz/mini_miner.cpp | 2 -- src/wallet/test/fuzz/crypter.cpp | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index 70cad07d69d9..1329f471c708 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -38,18 +38,13 @@ using kernel::CBlockFileInfo; using node::SnapshotMetadata; -namespace { -const BasicTestingSetup* g_setup; -} // namespace - void initialize_deserialize() { static const auto testing_setup = MakeNoLogFileContext<>(); - g_setup = testing_setup.get(); } #define FUZZ_TARGET_DESERIALIZE(name, code) \ - FUZZ_TARGET(name, .init = initialize_deserialize) \ + FUZZ_TARGET(name, .init = initialize_deserialize) \ { \ try { \ code \ diff --git a/src/test/fuzz/mini_miner.cpp b/src/test/fuzz/mini_miner.cpp index 6a5c164985ae..3575a8656bda 100644 --- a/src/test/fuzz/mini_miner.cpp +++ b/src/test/fuzz/mini_miner.cpp @@ -26,12 +26,10 @@ namespace { -const TestingSetup* g_setup; std::deque g_available_coins; void initialize_miner() { static const auto testing_setup = MakeNoLogFileContext(); - g_setup = testing_setup.get(); for (uint32_t i = 0; i < uint32_t{100}; ++i) { g_available_coins.emplace_back(Txid::FromUint256(uint256::ZERO), i); } diff --git a/src/wallet/test/fuzz/crypter.cpp b/src/wallet/test/fuzz/crypter.cpp index f8f5935416e8..81f8240333e5 100644 --- a/src/wallet/test/fuzz/crypter.cpp +++ b/src/wallet/test/fuzz/crypter.cpp @@ -11,11 +11,9 @@ namespace wallet { namespace { -const TestingSetup* g_setup; void initialize_crypter() { static const auto testing_setup = MakeNoLogFileContext(); - g_setup = testing_setup.get(); } FUZZ_TARGET(crypter, .init = initialize_crypter) From f3b64aa405369a92ecafcf2e08c6ac659d5a4da0 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 27 Mar 2026 17:31:02 -0700 Subject: [PATCH 045/122] fuzz: Use CAmount for storing best_waste Waste is a CAmount, which is an int64_t. This will overflow an int, so `best_waste` should also be a `CAmount`. Github-Pull: #34939 Rebased-From: 890a09b1e49925315a5636f29cc5af36928fe092 --- src/wallet/test/fuzz/coinselection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/test/fuzz/coinselection.cpp b/src/wallet/test/fuzz/coinselection.cpp index 8b30423c6f22..42a53a83c345 100644 --- a/src/wallet/test/fuzz/coinselection.cpp +++ b/src/wallet/test/fuzz/coinselection.cpp @@ -275,7 +275,7 @@ FUZZ_TARGET(bnb_finds_min_waste) // Brute force optimal solution (lowest waste, but cannot be superset of another solution) std::vector solutions; - int best_waste{std::numeric_limits::max()}; + CAmount best_waste{std::numeric_limits::max()}; int best_weight{std::numeric_limits::max()}; for (uint32_t pattern = 1; (pattern >> num_groups) == 0; ++pattern) { // BnB does not permit adding more inputs to a solution, i.e. a superset of a solution cannot ever be a solution. From 56cdeab8b548d6ab09660e239b6d1c12177340eb Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:26:22 +0100 Subject: [PATCH 046/122] depends, qt: Fix build on aarch64 macOS 26.4 Github-Pull: #34956 Rebased-From: 3aeccb7d739c7e9a82c95fbc8f5647ea85a79635 --- depends/packages/native_qt.mk | 4 +- depends/packages/qt.mk | 2 + depends/patches/qt/fix-macos26-qyield.patch | 44 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 depends/patches/qt/fix-macos26-qyield.patch diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk index 3e1e56266673..2bf088c10aca 100644 --- a/depends/packages/native_qt.mk +++ b/depends/packages/native_qt.mk @@ -9,6 +9,7 @@ $(package)_patches := dont_hardcode_pwd.patch $(package)_patches += qtbase_skip_tools.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += qttools_skip_dependencies.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) $(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash) @@ -137,7 +138,8 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ - patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch + patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch endef define $(package)_config_cmds diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 48f7e038bd9e..d5ea16e9f771 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -24,6 +24,7 @@ $(package)_patches += fix-gcc16-sfinae-qregularexpression.patch $(package)_patches += fix-gcc16-sfinae-qchar.patch $(package)_patches += fix-gcc16-sfinae-qbitarray.patch $(package)_patches += fix-gcc16-sfinae-qanystringview.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_patches += fix-qbytearray-include.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) @@ -281,6 +282,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qchar.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qbitarray.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qanystringview.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-qbytearray-include.patch endef ifeq ($(host),$(build)) diff --git a/depends/patches/qt/fix-macos26-qyield.patch b/depends/patches/qt/fix-macos26-qyield.patch new file mode 100644 index 000000000000..65514a01cc82 --- /dev/null +++ b/depends/patches/qt/fix-macos26-qyield.patch @@ -0,0 +1,44 @@ +commit a76004f16fdc43e1b7af83bfdf3f1a613491b234 +Author: Paul Wicking +Date: Thu Mar 26 07:09:43 2026 +0100 + + qyieldcpu: Fix compilation with macOS 26.4 SDK + + After updating to the macOS 26.4 SDK, qtbase fails to compile on + Apple Silicon with an implicit function declaration error for + __yield() in qyieldcpu.h. It appears that the SDK's Clang now + reports __has_builtin(__yield) as true, but __yield() requires + for its declaration. + + The compiler's own __builtin_arm_yield intrinsic was already checked + further down in the cascade. Moving it above the __yield check resolves + the build failure, without unnecessarily pulling in the header. + + Fixes: QTBUG-145239 + Change-Id: I94b4d8f72385a4944c272ed7a66d249537a82e7d + Reviewed-by: Tor Arne Vestbø + Reviewed-by: Fabian Kosmale + +--- a/qtbase/src/corelib/thread/qyieldcpu.h ++++ b/qtbase/src/corelib/thread/qyieldcpu.h +@@ -31,7 +31,9 @@ void qYieldCpu(void) + noexcept + #endif + { +-#if __has_builtin(__yield) ++#if __has_builtin(__builtin_arm_yield) ++ __builtin_arm_yield(); ++#elif __has_builtin(__yield) + __yield(); // Generic + #elif defined(_YIELD_PROCESSOR) && defined(Q_CC_MSVC) + _YIELD_PROCESSOR(); // Generic; MSVC's +@@ -45,9 +47,6 @@ void qYieldCpu(void) + _mm_pause(); + #elif defined(Q_PROCESSOR_X86) + __asm__("pause"); // hopefully asm() works in this compiler +- +-#elif __has_builtin(__builtin_arm_yield) +- __builtin_arm_yield(); + #elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 && defined(Q_CC_GNU) + __asm__("yield"); // this works everywhere + From f0e1014c396c80cc946beff719af04ebfd482f82 Mon Sep 17 00:00:00 2001 From: Alexander Wiederin Date: Wed, 1 Apr 2026 13:23:54 +0200 Subject: [PATCH 047/122] kernel: Remove NONNULL annotation from destroy method No other *_destroy function in the Kernel API carries this annotation. Following the convention set by free(), destroy functions should accept null pointers. Github-Pull: #34982 Rebased-From: 75608547b469b72caa890c8b356d0d3284998701 --- src/kernel/bitcoinkernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/bitcoinkernel.h b/src/kernel/bitcoinkernel.h index 5427e7761771..00bab4a0f9d2 100644 --- a/src/kernel/bitcoinkernel.h +++ b/src/kernel/bitcoinkernel.h @@ -1333,7 +1333,7 @@ BITCOINKERNEL_API btck_BlockValidationState* BITCOINKERNEL_WARN_UNUSED_RESULT bt * Destroy the btck_BlockValidationState. */ BITCOINKERNEL_API void btck_block_validation_state_destroy( - btck_BlockValidationState* block_validation_state) BITCOINKERNEL_ARG_NONNULL(1); + btck_BlockValidationState* block_validation_state); ///@} From ef10b2ec6573a35f5ef71133ae444b09b3040e33 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:29:43 +0100 Subject: [PATCH 048/122] guix: Clean up module list in manifest These modules are no longer in use: 1. `cmake-build-system` since bitcoin/bitcoin#34550. 2. `gnu-build-system` since bitcoin/bitcoin#34627. 3. `download` since bitcoin/bitcoin#34550. 4. `cc-for-target` from `utils` since bitcoin/bitcoin#34627. Github-Pull: #34944 Rebased-From: 325f743eedd25be268f74b9cf91198f50d2b3cf0 --- contrib/guix/manifest.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 9cadd410537c..927aa30f0771 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -22,17 +22,14 @@ ((gnu packages python-xyz) #:select (python-pydantic-2)) ((gnu packages tls) #:select (openssl)) ((gnu packages version-control) #:select (git-minimal)) - (guix build-system cmake) - (guix build-system gnu) (guix build-system python) (guix build-system pyproject) (guix build-system trivial) - (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) (guix packages) - ((guix utils) #:select (cc-for-target substitute-keyword-arguments))) + ((guix utils) #:select (substitute-keyword-arguments))) (define-syntax-rule (search-our-patches file-name ...) "Return the list of absolute file names corresponding to each From 1bc22a38a8f613676f1b513cb74f7ad8ed2b7e3e Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:17:45 +0800 Subject: [PATCH 049/122] Squashed 'src/ipc/libmultiprocess/' changes from 70f632bda8..3edbe8f67c 3edbe8f67c Merge bitcoin-core/libmultiprocess#268: Use throwRecoverableException instead of raw throw for stored exceptions 23be44b0d3 Use throwRecoverableException instead of raw throw for stored exceptions 75c2a2764c Merge bitcoin-core/libmultiprocess#266: test: increase spawn test child timeout to 30 seconds 8b5f805301 Merge bitcoin-core/libmultiprocess#267: doc: Bump version 9 > 10 cc0b23fc32 test: increase spawn test child timeout to 30 seconds 050f878db8 doc: Improve versions.md descriptions and formatting c6a288a889 doc: Bump version 9 > 10 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 3edbe8f67c182dde91c0050065d79ae268722489 --- doc/versions.md | 18 +++++++++++------- include/mp/type-context.h | 2 +- include/mp/version.h | 2 +- test/mp/test/spawn_tests.cpp | 6 ++++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/versions.md b/doc/versions.md index db5647df807e..2c2ec50e7c6d 100644 --- a/doc/versions.md +++ b/doc/versions.md @@ -7,33 +7,37 @@ Library versions are tracked with simple Versioning policy is described in the [version.h](../include/mp/version.h) include. -## v9 +## v10 - Current unstable version. +## [v9.0](https://github.com/bitcoin-core/libmultiprocess/commits/v9.0) +- Fixes race conditions where worker thread could be used after destruction, where getParams() could be called after request cancel, and where m_on_cancel could be called after request finishes. +- Adds `CustomHasField` hook to map Cap'n Proto null values to C++ null values. +- Improves `CustomBuildField` for `std::optional` to use move semantics. +- Adds LLVM 22 compatibility fix in type-map. +- Used in Bitcoin Core master branch, pulled in by [#34804](https://github.com/bitcoin/bitcoin/pull/34804). Also pulled into Bitcoin Core 31.x stable branch by [#34952](https://github.com/bitcoin/bitcoin/pull/34952). + ## [v8.0](https://github.com/bitcoin-core/libmultiprocess/commits/v8.0) - Better support for non-libmultiprocess IPC clients: avoiding errors on unclean disconnects, and allowing simultaneous requests to worker threads which previously triggered "thread busy" errors. -- Used in Bitcoin Core, pulled in by [#34422](https://github.com/bitcoin/bitcoin/pull/34422). +- Intermediate version used in Bitcoin Core master branch between 30.x and 31.x branches, pulled in by [#34422](https://github.com/bitcoin/bitcoin/pull/34422). ## [v7.0](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0) - Adds SpawnProcess race fix, cmake `target_capnp_sources` option, ci and documentation improvements. Adds `version.h` header declaring major and minor version numbers. -- Used in Bitcoin Core, pulled in by [#34363](https://github.com/bitcoin/bitcoin/pull/34363). +- Intermediate version used in Bitcoin Core master branch between 30.x and 31.x branches, pulled in by [#34363](https://github.com/bitcoin/bitcoin/pull/34363). ## [v7.0-pre2](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0-pre2) - Fixes intermittent mptest hang and makes other minor improvements. - Used in Bitcoin Core 30.1 and 30.2 releases and 30.x branch, pulled in by [#33518](https://github.com/bitcoin/bitcoin/pull/33518) and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). ## [v7.0-pre1](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0-pre1) - - Adds support for log levels to reduce logging and "thread busy" error to avoid a crash on misuse. -- Minimum required version for Bitcoin Core 30.1 and 30.2 releases and 30.x branch, pulled in by [#33412](https://github.com/bitcoin/bitcoin/pull/33412), [#33518](https://github.com/bitcoin/bitcoin/pull/33518), and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). +- Minimum required version since Bitcoin Core 30.1, pulled in by [#33412](https://github.com/bitcoin/bitcoin/pull/33412), [#33518](https://github.com/bitcoin/bitcoin/pull/33518), and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). ## [v6.0](https://github.com/bitcoin-core/libmultiprocess/commits/v6.0) - - Adds CI scripts and build and test fixes. - Used in Bitcoin Core 30.0 release, pulled in by [#32345](https://github.com/bitcoin/bitcoin/pull/32345), [#33241](https://github.com/bitcoin/bitcoin/pull/33241), and [#33322](https://github.com/bitcoin/bitcoin/pull/33322). ## [v6.0-pre1](https://github.com/bitcoin-core/libmultiprocess/commits/v6.0-pre1) - - Adds fixes for unclean shutdowns and thread sanitizer issues. - Drops `EventLoop::addClient` and `EventLoop::removeClient` methods, requiring clients to use new `EventLoopRef` class instead. diff --git a/include/mp/type-context.h b/include/mp/type-context.h index 8efd4fa767f4..46952f49f870 100644 --- a/include/mp/type-context.h +++ b/include/mp/type-context.h @@ -189,7 +189,7 @@ auto PassField(Priority<1>, TypeList<>, ServerContext& server_context, const Fn& } })) { MP_LOG(loop, Log::Error) << "IPC server request #" << req << " uncaught exception (" << kj::str(*exception).cStr() << ")"; - throw kj::mv(*exception); + kj::throwRecoverableException(kj::mv(*exception)); } return call_context; // End of scope: if KJ_DEFER was reached, it runs here diff --git a/include/mp/version.h b/include/mp/version.h index 5c8753cf8373..964667a98fb6 100644 --- a/include/mp/version.h +++ b/include/mp/version.h @@ -24,7 +24,7 @@ //! pointing at the prior merge commit. The /doc/versions.md file should also be //! updated, noting any significant or incompatible changes made since the //! previous version. -#define MP_MAJOR_VERSION 9 +#define MP_MAJOR_VERSION 10 //! Minor version number. Should be incremented in stable branches after //! backporting changes. The /doc/versions.md file should also be updated to diff --git a/test/mp/test/spawn_tests.cpp b/test/mp/test/spawn_tests.cpp index 4c7edba48308..a14e50e2a30f 100644 --- a/test/mp/test/spawn_tests.cpp +++ b/test/mp/test/spawn_tests.cpp @@ -20,6 +20,8 @@ namespace { +constexpr auto FAILURE_TIMEOUT = std::chrono::seconds{30}; + // Poll for child process exit using waitpid(..., WNOHANG) until the child exits // or timeout expires. Returns true if the child exited and status_out was set. // Returns false on timeout or error. @@ -94,9 +96,9 @@ KJ_TEST("SpawnProcess does not run callback in child") ::close(fd); int status{0}; - // Give the child up to 1 second to exit. If it does not, terminate it and + // Give the child some time to exit. If it does not, terminate it and // reap it to avoid leaving a zombie behind. - const bool exited{WaitPidWithTimeout(pid, std::chrono::milliseconds{1000}, status)}; + const bool exited{WaitPidWithTimeout(pid, FAILURE_TIMEOUT, status)}; if (!exited) { ::kill(pid, SIGKILL); ::waitpid(pid, &status, /*options=*/0); From afa8ba04e00029241d361142a801c9a8394d5340 Mon Sep 17 00:00:00 2001 From: Alfonso Roman Zubeldia <19962151+alfonsoromanz@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:40:43 -0300 Subject: [PATCH 050/122] test: remove macOS REDUCE_EXPORTS exception workaround The underlying issue was fixed in bitcoin-core/libmultiprocess#268. Remove the workaround that accepted degraded error messages on Darwin. Github-Pull: #35014 Rebased-From: b555a0b789fa4f21875e4fa356cd9455aef16879 --- test/functional/test_framework/ipc_util.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/functional/test_framework/ipc_util.py b/test/functional/test_framework/ipc_util.py index 03e3b5d511b3..0e10b90e0230 100644 --- a/test/functional/test_framework/ipc_util.py +++ b/test/functional/test_framework/ipc_util.py @@ -10,7 +10,6 @@ from io import BytesIO from pathlib import Path import shutil -import platform from typing import Optional from test_framework.messages import CBlock @@ -161,12 +160,5 @@ async def make_mining_ctx(self): return ctx, mining def assert_capnp_failed(e, description_prefix): - if e.description == "remote exception: unknown non-KJ exception of type: kj::Exception": - # macOS + REDUCE_EXPORTS bug: Cap'n Proto fails to recognize - # its own exception type and returns a generic error instead. - # https://github.com/bitcoin/bitcoin/pull/34422#discussion_r2863852691 - # Assert this only occurs on Darwin until fixed. - assert_equal(platform.system(), "Darwin") - else: - assert e.description.startswith(description_prefix), f"Expected description starting with '{description_prefix}', got '{e.description}'" + assert e.description.startswith(description_prefix), f"Expected description starting with '{description_prefix}', got '{e.description}'" assert_equal(e.type, "FAILED") From 275843f2a61cf1c676a12b774157c27aaeccf286 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:29:27 +0800 Subject: [PATCH 051/122] build: bump version to v31.0rc3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 145de0ce5011..8517225ab29c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 2) +set(CLIENT_VERSION_RC 3) set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") From c168baec80960a8118bdc553839f7c122e1ce471 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:31:14 +0800 Subject: [PATCH 052/122] doc: update manual pages for v31.0rc3 --- doc/man/bitcoin-cli.1 | 6 +++--- doc/man/bitcoin-qt.1 | 6 +++--- doc/man/bitcoin-tx.1 | 6 +++--- doc/man/bitcoin-util.1 | 6 +++--- doc/man/bitcoin-wallet.1 | 6 +++--- doc/man/bitcoin.1 | 4 ++-- doc/man/bitcoind.1 | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index d42203296a44..107a3c1477f5 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "March 2026" "bitcoin-cli v31.0.0rc2" "User Commands" +.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0rc3" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc2 +bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc3 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc2 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help \/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v31.0.0rc2 +Bitcoin Core RPC client version v31.0.0rc3 .PP The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. .PP diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index 25f010e0c91e..c84eed2f5669 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "March 2026" "bitcoin-qt v31.0.0rc2" "User Commands" +.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0rc3" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc2 +bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc3 .SH SYNOPSIS .B bitcoin-qt [\fI\,options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v31.0.0rc2 +Bitcoin Core version v31.0.0rc3 .PP The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. .PP diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 979458ba69b2..da1ca1d46388 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "March 2026" "bitcoin-tx v31.0.0rc2" "User Commands" +.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0rc3" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc2 +bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc3 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc2 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v31.0.0rc2 +Bitcoin Core bitcoin\-tx utility version v31.0.0rc3 .PP The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. .PP diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 5039389cd649..b755f9a2f649 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "March 2026" "bitcoin-util v31.0.0rc2" "User Commands" +.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0rc3" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v31.0.0rc2 +bitcoin-util \- manual page for bitcoin-util v31.0.0rc3 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,command\/\fR] @@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v31.0.0rc2 .B bitcoin-util [\fI\,options\/\fR] \fI\,grind \/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v31.0.0rc2 +Bitcoin Core bitcoin\-util utility version v31.0.0rc3 .PP The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. .SH OPTIONS diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 6cded8cc9d5a..571eee950e9b 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "March 2026" "bitcoin-wallet v31.0.0rc2" "User Commands" +.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0rc3" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc2 +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc3 .SH SYNOPSIS .B bitcoin-wallet [\fI\,options\/\fR] \fI\,\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet utility version v31.0.0rc2 +Bitcoin Core bitcoin\-wallet utility version v31.0.0rc3 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. .PP diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 07df353495cd..67f676b97034 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN "1" "March 2026" "bitcoin v31.0.0rc2" "User Commands" +.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0rc3" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin v31.0.0rc2 +bitcoin \- manual page for bitcoin v31.0.0rc3 .SH SYNOPSIS .B bitcoin [\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index ec0615e1d5af..210d252155d6 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "March 2026" "bitcoind v31.0.0rc2" "User Commands" +.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0rc3" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v31.0.0rc2 +bitcoind \- manual page for bitcoind v31.0.0rc3 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] .SH DESCRIPTION -Bitcoin Core daemon version v31.0.0rc2 bitcoind +Bitcoin Core daemon version v31.0.0rc3 bitcoind .PP The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. .PP From 2937d4ba417e20b84bde80e7189a683412b348d5 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Wed, 8 Apr 2026 11:52:56 -0700 Subject: [PATCH 053/122] guix: Restore download and build-system-cmake modules The time-machine commit in 31.x still requires these modules for the build to work. --- contrib/guix/manifest.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 927aa30f0771..e593d8d750c9 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -22,9 +22,11 @@ ((gnu packages python-xyz) #:select (python-pydantic-2)) ((gnu packages tls) #:select (openssl)) ((gnu packages version-control) #:select (git-minimal)) + (guix build-system cmake) (guix build-system python) (guix build-system pyproject) (guix build-system trivial) + (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) From 7d56e1017db77c46bd82d2fd1d8ff2ab5311815c Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Wed, 8 Apr 2026 11:54:46 -0700 Subject: [PATCH 054/122] build: bump version to v31.0rc4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8517225ab29c..ff8c1b995eb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 3) +set(CLIENT_VERSION_RC 4) set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") From 4a5fdb0d88aedec3b0147ba38cb2dea6f4dcb186 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Wed, 8 Apr 2026 11:59:09 -0700 Subject: [PATCH 055/122] doc: update manpages for v31.0rc4 --- doc/man/bitcoin-cli.1 | 6 +++--- doc/man/bitcoin-qt.1 | 6 +++--- doc/man/bitcoin-tx.1 | 6 +++--- doc/man/bitcoin-util.1 | 6 +++--- doc/man/bitcoin-wallet.1 | 6 +++--- doc/man/bitcoin.1 | 4 ++-- doc/man/bitcoind.1 | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 107a3c1477f5..82286fcc992e 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0rc3" "User Commands" +.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0rc4" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc3 +bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc4 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc3 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help \/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v31.0.0rc3 +Bitcoin Core RPC client version v31.0.0rc4 .PP The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. .PP diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index c84eed2f5669..5b3ff83f6268 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0rc3" "User Commands" +.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0rc4" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc3 +bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc4 .SH SYNOPSIS .B bitcoin-qt [\fI\,options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v31.0.0rc3 +Bitcoin Core version v31.0.0rc4 .PP The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. .PP diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index da1ca1d46388..50b2d9def8e0 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0rc3" "User Commands" +.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0rc4" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc3 +bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc4 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc3 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v31.0.0rc3 +Bitcoin Core bitcoin\-tx utility version v31.0.0rc4 .PP The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. .PP diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index b755f9a2f649..95284609b8aa 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0rc3" "User Commands" +.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0rc4" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v31.0.0rc3 +bitcoin-util \- manual page for bitcoin-util v31.0.0rc4 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,command\/\fR] @@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v31.0.0rc3 .B bitcoin-util [\fI\,options\/\fR] \fI\,grind \/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v31.0.0rc3 +Bitcoin Core bitcoin\-util utility version v31.0.0rc4 .PP The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. .SH OPTIONS diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 571eee950e9b..58da639f9cce 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0rc3" "User Commands" +.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0rc4" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc3 +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc4 .SH SYNOPSIS .B bitcoin-wallet [\fI\,options\/\fR] \fI\,\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet utility version v31.0.0rc3 +Bitcoin Core bitcoin\-wallet utility version v31.0.0rc4 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. .PP diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 67f676b97034..5d7833c5b9a0 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0rc3" "User Commands" +.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0rc4" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin v31.0.0rc3 +bitcoin \- manual page for bitcoin v31.0.0rc4 .SH SYNOPSIS .B bitcoin [\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index 210d252155d6..65707a22d91e 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0rc3" "User Commands" +.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0rc4" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v31.0.0rc3 +bitcoind \- manual page for bitcoind v31.0.0rc4 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] .SH DESCRIPTION -Bitcoin Core daemon version v31.0.0rc3 bitcoind +Bitcoin Core daemon version v31.0.0rc4 bitcoind .PP The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. .PP From bd40a3241144b25fb69f5e345d4bd9cef7ab537b Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 9 Apr 2026 11:36:14 -0700 Subject: [PATCH 056/122] build: Bump to 31.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff8c1b995eb7..892f30d94bfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 4) +set(CLIENT_VERSION_RC 0) set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") From 6a25f3e3d43877f3da91c808754c8f1d7a131db9 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 9 Apr 2026 11:38:53 -0700 Subject: [PATCH 057/122] doc: update manpages for v31.0 --- doc/man/bitcoin-cli.1 | 6 +++--- doc/man/bitcoin-qt.1 | 6 +++--- doc/man/bitcoin-tx.1 | 6 +++--- doc/man/bitcoin-util.1 | 6 +++--- doc/man/bitcoin-wallet.1 | 6 +++--- doc/man/bitcoin.1 | 4 ++-- doc/man/bitcoind.1 | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 82286fcc992e..721a470c7136 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0rc4" "User Commands" +.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc4 +bitcoin-cli \- manual page for bitcoin-cli v31.0.0 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc4 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help \/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v31.0.0rc4 +Bitcoin Core RPC client version v31.0.0 .PP The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. .PP diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index 5b3ff83f6268..aa90489c1fd8 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0rc4" "User Commands" +.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc4 +bitcoin-qt \- manual page for bitcoin-qt v31.0.0 .SH SYNOPSIS .B bitcoin-qt [\fI\,options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v31.0.0rc4 +Bitcoin Core version v31.0.0 .PP The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. .PP diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 50b2d9def8e0..8ecea692f77f 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0rc4" "User Commands" +.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc4 +bitcoin-tx \- manual page for bitcoin-tx v31.0.0 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc4 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v31.0.0rc4 +Bitcoin Core bitcoin\-tx utility version v31.0.0 .PP The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. .PP diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 95284609b8aa..6e7b1be2c064 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0rc4" "User Commands" +.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v31.0.0rc4 +bitcoin-util \- manual page for bitcoin-util v31.0.0 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,command\/\fR] @@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v31.0.0rc4 .B bitcoin-util [\fI\,options\/\fR] \fI\,grind \/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v31.0.0rc4 +Bitcoin Core bitcoin\-util utility version v31.0.0 .PP The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. .SH OPTIONS diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 58da639f9cce..33ea607c672b 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0rc4" "User Commands" +.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc4 +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0 .SH SYNOPSIS .B bitcoin-wallet [\fI\,options\/\fR] \fI\,\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet utility version v31.0.0rc4 +Bitcoin Core bitcoin\-wallet utility version v31.0.0 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. .PP diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 5d7833c5b9a0..78c93deeea30 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0rc4" "User Commands" +.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin v31.0.0rc4 +bitcoin \- manual page for bitcoin v31.0.0 .SH SYNOPSIS .B bitcoin [\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index 65707a22d91e..e42dcd7f7c02 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0rc4" "User Commands" +.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v31.0.0rc4 +bitcoind \- manual page for bitcoind v31.0.0 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] .SH DESCRIPTION -Bitcoin Core daemon version v31.0.0rc4 bitcoind +Bitcoin Core daemon version v31.0.0 bitcoind .PP The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. .PP From e9f1466155849d886faaf89b2ccf1a0a46b9b1fe Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 13 Apr 2026 13:41:59 -0700 Subject: [PATCH 058/122] doc: 31.0 release notes --- doc/release-notes.md | 373 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 372 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 69e7a1e2a29c..d5dd0f243c2b 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1 +1,372 @@ -See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/31.0-Release-Notes-Draft +v31.0 Release Notes +=================== + +Bitcoin Core version 31.0 is now available from: + + + +This release includes new features, various bug fixes and performance +improvements, as well as updated translations. + +Please report bugs using the issue tracker at GitHub: + + + +To receive security and update notifications, please subscribe to: + + + +How to Upgrade +============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes in some cases), then run the installer +(on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS) or +`bitcoind`/`bitcoin-qt` (on Linux). + +Upgrading directly from a version of Bitcoin Core that has reached its EOL is +possible, but it might take some time if the data directory needs to be +migrated. Old wallet versions of Bitcoin Core are generally supported. + +Compatibility +============== + +Bitcoin Core is supported and tested on the following operating systems or +newer: Linux Kernel 3.17, macOS 14, and Windows 10 (version 1903). Bitcoin Core +should also work on most other Unix-like systems but is not as frequently tested +on them. It is not recommended to use Bitcoin Core on unsupported systems. + +Notable changes +=============== + +The default `-dbcache` value has been increased to 1024 MiB from 450 MiB on +systems where at least 4096 MiB of RAM is detected. This improves performance +but increases memory usage. On some systems (for example when running in +containers), the detected RAM may exceed the memory actually available, which +can lead to out-of-memory conditions. To maintain the previous behavior, set +`-dbcache=450`. See +[reduce-memory.md](https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md) +for further guidance on low-memory systems. (#34692) + +Mempool +------- + +The mempool has been reimplemented with a new design ("cluster mempool"), to +facilitate better decision-making when constructing block templates, evicting +transactions, relaying transactions, and validating replacement transactions +(RBF). Most changes should be transparent to users, but some behavior changes +are noted: + +- The mempool no longer enforces ancestor or descendant size/count limits. +Instead, two new default policy limits are introduced governing connected +components, or clusters, in the mempool, limiting clusters to 64 transactions +and up to 101 kB in virtual size. Transactions are considered to be in the same +cluster if they are connected to each other via any combination of parent/child +relationships in the mempool. These limits can be overridden using command-line +arguments; see the extended help (`-help-debug`) for more information. + +- Within the mempool, transactions are ordered based on the feerate at which +they are expected to be mined, which takes into account the full set, or +"chunk", of transactions that would be included together (e.g., a parent and its +child, or more complicated subsets of transactions). This ordering is utilized +by the algorithms that implement transaction selection for constructing block +templates; eviction from the mempool when it is full; and transaction relay +announcements to peers. + +- The replace-by-fee validation logic has been updated so that transaction +replacements are only accepted if the resulting mempool's feerate diagram is +strictly better than before the replacement. This eliminates all known cases of +replacements occurring that make the mempool worse off, which was possible under +previous RBF rules. For singleton transactions (that are in clusters by +themselves) it's sufficient for a replacement to have a higher fee and feerate +than the original. See [delvingbitcoin.org +post](https://delvingbitcoin.org/t/an-overview-of-the-cluster-mempool-proposal/393#rbf-can-now-be-made-incentive-compatible-for-miners-11) +for more information. + +- Two new RPCs have been added: `getmempoolcluster` will provide the set of +transactions in the same cluster as the given transaction, along with the +ordering of those transactions and grouping into chunks; and +`getmempoolfeeratediagram` will return the feerate diagram of the entire +mempool. + +- Chunk size and chunk fees are now also included in the output of +`getmempoolentry`. + +- The "CPFP Carveout" has been removed from the mempool logic. The CPFP carveout +allowed one additional child transaction to be added to a package that's already +at its descendant limit, but only if that child has exactly one ancestor (the +package's root) and is small (no larger than 10kvB). Nothing is allowed to +bypass the cluster count limit. It is expected that smart contracting use-cases +requiring similar functionality employ TRUC transactions and sibling eviction +instead going forward. + +- Some additional discussion can be found at +[doc/policy/mempool-terminology.md](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-terminology.md) +and +[doc/policy/mempool-replacements.md](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md). + +P2P and network changes +----------------------- + +- Normally local transactions are broadcast to all connected peers with which we +do transaction relay. Now, for the `sendrawtransaction` RPC this behavior can be +changed to only do the broadcast via the Tor or I2P networks. A new boolean +option `-privatebroadcast` has been added to enable this behavior. This improves +the privacy of the transaction originator in two aspects: + 1. Their IP address (and thus geolocation) is never known to the recipients. + 2. If the originator sends two otherwise unrelated transactions, they will not + be linkable. This is because a separate connection is used for broadcasting + each transaction. (#29415) + +- New RPCs have been added to introspect and control private broadcast: +`getprivatebroadcastinfo` reports transactions currently being privately +broadcast, and `abortprivatebroadcast` removes matching transactions from the +private broadcast queue. (#34329) + +- Transactions participating in one-parent-one-child package relay can now have +the parent with a feerate lower than the `-minrelaytxfee` feerate, even 0 fee. +This expands the change from 28.0 to also cover packages of non-TRUC +transactions. Note that in general the package child can have additional +unconfirmed parents, but they must already be in-mempool for the new package to +be relayed. (#33892) + +- The release has asmap data embedded for the first time, allowing the asmap +feature to be used without any externally sourced file. The embedded map [was +created on 2026-03-05](https://github.com/bitcoin/bitcoin/pull/34696). Despite +the data being available, the option remains off-by-default. Users still need to +set `-asmap` or `-asmap=1` explicitly to make it possible to use a peer's ASN +(ISP/hoster identifier) in netgroup bucketing in order to ensure a higher +diversity in their peer set. + +Updated RPCs +------------ + +- `gettxspendingprevout` has 2 new optional arguments: `mempool_only` and +`return_spending_tx`. If `mempool_only` is true it will limit scans to the +mempool even if `txospenderindex` is available. If `return_spending_tx` is true, +the full spending tx will be returned. In addition if `txospenderindex` is +available and a confirmed spending transaction is found, its block hash will be +returned. (#24539) + +- The `getpeerinfo` RPC no longer returns the `startingheight` field unless the +configuration option `-deprecatedrpc=startingheight` is used. The +`startingheight` field will be fully removed in the next major release. (#34197) + +- The `getblock` RPC now returns a `coinbase_tx` object at verbosity levels 1, +2, and 3. It contains `version`, `locktime`, `sequence`, `coinbase` and +`witness`. This allows for efficiently querying coinbase transaction properties +without fetching the full transaction data at verbosity 2+. (#34512) + +REST API +-------- + +- A new REST API endpoint +(`/rest/blockpart/.?offset=&size=`) has been +introduced for efficiently fetching a range of bytes from block ``. +(#33657) + +Build System +------------ + +- The minimum supported Clang compiler version has been raised to 17.0 (#33555). +- The minimum supported GCC compiler version has been raised to 12.1 (#33842). + +Updated settings +---------------- + +- The `-paytxfee` startup option and the `settxfee` RPC are now deleted after +being deprecated in Bitcoin Core 30.0. They used to allow the user to set a +static fee rate for wallet transactions, which could potentially lead to +overpaying or underpaying. Users should instead rely on fee estimation or +specify a fee rate per transaction using the `fee_rate` argument in RPCs such as +`fundrawtransaction`, `sendtoaddress`, `send`, `sendall`, and `sendmany`. +(#32138) + +- Specifying `-asmap` or `-asmap=1` will load the embedded asmap data instead of +an external file. In previous releases, if `-asmap` was specified without a +filename, this would try to load an `ip_asn.map` data file. Now loading an +external asmap file always requires an explicit filename like +`-asmap=ip_asn.map`. + +- The `-maxorphantx` startup option has been removed. It was previously +deprecated and has no effect anymore since v30.0. (#33872) + +- `tor` has been removed as a network specification. It was deprecated in favour +of `onion` in v0.17.0. (#34031) + +- When `-logsourcelocations` is enabled, the log output now contains just the +function name instead of the entire function signature. (#34088) + +- The default `-dbcache` value has been increased to `1024` MiB from `450` MiB +on systems where at least `4096` MiB of RAM is detected. This is a performance +increase, but will use more memory. To maintain the previous behaviour, set +`-dbcache=450`. (#34692) + +- `-privatebroadcast` is added to enable private broadcast behavior for +`sendrawtransaction`. + +New settings +------------ + +- `-txospenderindex` enables the creation of a transaction output spender index +that, if present, will be scanned by `gettxspendingprevout` if a spending +transaction was not found in the mempool. (#24539) + +GUI changes +----------- + +- The GUI has been updated to Qt 6.8. (#34650) + +- The `createwallet`, `createwalletdescriptor` and `migratewallet` commands are +filtered from the console history to improve security and privacy. (gui#901) + +- The Restore Wallet dialog shows an error message if the restored wallet name +is empty. (gui#924) + +Fee Estimation +-------------- + +The Bitcoin Core fee estimator minimum fee rate bucket was updated from **1 +sat/vB** to **0.1 sat/vB**, which matches the node’s default `minrelaytxfee`. This +means that for a given confirmation target, if a sub-1 sat/vB fee rate bucket is +the minimum tracked with sufficient data, its average value will be returned as +the fee rate estimate. + +Restarting a node with this change invalidates previously saved +estimates in `fee_estimates.dat`, the fee estimator will start tracking fresh +stats. + +IPC Interface +------------- + +- The IPC mining interface now requires mining clients to use the latest +`mining.capnp` schema. Clients built against older schemas will fail when +calling `Init.makeMining` and receive an RPC error indicating the old mining +interface is no longer supported. Mining clients must update to the latest +schema and regenerate bindings to continue working. (#34568) +- `Mining.createNewBlock` now has a `cooldown` behavior (enabled by default) +that waits for IBD to finish and for the tip to catch up. This usually prevents +a flood of templates during startup, but is not guaranteed. (#34184) +- `Mining.interrupt()` can be used to interrupt `Mining.waitTipChanged` and +`Mining.createNewBlock`. (#34184) +- `Mining.createNewBlock` and `Mining.checkBlock` now require a `context` +parameter. +- `Mining.waitTipChanged` now has a default `timeout` (effectively infinite / +`maxDouble`) if the client omits it. +- `BlockTemplate.getCoinbaseTx()` now returns a structured `CoinbaseTx` instead +of raw bytes. +- Removed `BlockTemplate.getCoinbaseCommitment()` and +`BlockTemplate.getWitnessCommitmentIndex()`. +- Cap’n Proto default values were updated to match the corresponding C++ +defaults for mining-related option structs (e.g. `BlockCreateOptions`, +`BlockWaitOptions`, `BlockCheckOptions`). + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- 0xb10c +- Alexander Wiederin +- Alfonso Roman Zubeldia +- amisha +- ANAVHEOBA +- Andrew Toth +- Anthony Towns +- Antoine Poinsot +- ANtutov +- Anurag chavan +- Ava Chow +- bensig +- Ben Westgate +- billymcbip +- b-l-u-e +- Brandon Odiwuor +- brunoerg +- Bruno Garcia +- Calin Culianu +- Carl Dong +- Chandra Pratap +- Chris Stewart +- Coder +- Cory Fields +- da1sychain +- Daniela Brozzoni +- Daniel Pfeifer +- David Gumberg +- dergoegge +- Dmitry Goncharov +- Enoch Azariah +- Eugene Siegel +- Fabian Jahr +- fanquake +- Fibonacci747 +- flack +- frankomosh +- furszy +- glozow +- Greg Sanders +- Hao Xu +- Hennadii Stepanov +- Henry Romp +- Hodlinator +- ismaelsadeeq +- janb84 +- jayvaliya +- joaonevess +- John Moffett +- Josh Doman +- kevkevinpal +- l0rinc +- Luke Dashjr +- Mara van der Laan +- MarcoFalke +- marcofleon +- Martin Zumsande +- Matthew Zipkin +- Max Edwards +- Murch +- Musa Haruna +- naiyoma +- nervana21 +- Novo +- optout +- pablomartin4btc +- Padraic Slattery +- Pieter Wuille +- Pol Espinasa +- pythcoiner +- rkrux +- Robin David +- Roman Zeyde +- rustaceanrob +- Ryan Ofsky +- SatsAndSports +- scgbckbone +- Sebastian Falbesoner +- sedited +- seduless +- Sergi Delgado Segura +- Sjors Provoost +- SomberNight +- sstone +- stickies-v +- stratospher +- stringintech +- Suhas Daftuar +- tboy1337 +- TheCharlatan +- Tim Ruffing +- Vasil Dimov +- w0xlt +- WakeTrainDev +- Weixie Cui +- willcl-ark +- Woolfgm +- yancy +- Yash Bhutwala +- yuvicc +- zaidmstrr + +As well as to everyone that helped with translations on +[Transifex](https://explore.transifex.com/bitcoin/bitcoin/). From 27e5a3020a98c04978e8053b5678ed8dd6a86f5f Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 8 Apr 2026 06:51:59 +0200 Subject: [PATCH 059/122] net_processing: don't modify addrman for private broadcast connections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is best if the internal addrman database is not modified with information coming from private broadcast connections because that information can potentially later be sent via other connections. Co-authored-by: Greg Sanders Co-authored-by: Lőrinc Github-Pull: #35032 Rebased-From: 1ed1a124028aa6783ecdd8c82083a3d7a6a16e53 --- src/net_processing.cpp | 2 +- src/test/net_tests.cpp | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 4450ff23f55e..e2f7126e3ce6 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3603,7 +3603,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string } vRecv.ignore(8); // Ignore the addrMe service bits sent by the peer vRecv >> CNetAddr::V1(addrMe); - if (!pfrom.IsInboundConn()) + if (!pfrom.IsInboundConn() && !pfrom.IsPrivateBroadcastConn()) { // Overwrites potentially existing services. In contrast to this, // unvalidated services received via gossip relay in ADDR/ADDRV2 diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index 1fc8d5269441..32801d97b8bd 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include #include #include @@ -1559,4 +1560,34 @@ BOOST_AUTO_TEST_CASE(v2transport_test) } } +BOOST_AUTO_TEST_CASE(private_broadcast_version_does_not_update_addrman_services) +{ + LOCK(NetEventsInterface::g_msgproc_mutex); + + const CNetAddr source{LookupHost("2.3.4.5", /*fAllowLookup=*/false).value()}; + const CAddress addr{Lookup("1.2.3.4", 8333, /*fAllowLookup=*/false).value(), NODE_NONE}; + BOOST_REQUIRE(m_node.addrman->Add({addr}, source)); + CNode node{/*id=*/0, + /*sock=*/nullptr, + /*addrIn=*/addr, + /*nKeyedNetGroupIn=*/0, + /*nLocalHostNonceIn=*/0, + /*addrBindIn=*/CService{}, + /*addrNameIn=*/"", + /*conn_type_in=*/ConnectionType::PRIVATE_BROADCAST, + /*inbound_onion=*/false, + /*network_key=*/0}; + + auto& connman = static_cast(*m_node.connman); + connman.Handshake(node, + /*successfully_connected=*/false, + /*remote_services=*/NODE_NETWORK, + /*local_services=*/NODE_NONE, + /*version=*/PROTOCOL_VERSION, + /*relay_txs=*/true); + + BOOST_CHECK_EQUAL(m_node.addrman->Select().first.nServices, NODE_NONE); + m_node.peerman->FinalizeNode(node); +} + BOOST_AUTO_TEST_SUITE_END() From 20480f5eb9cdd451d2fb6e1529a3fae5b733bbc9 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 15 Apr 2026 09:38:52 +0200 Subject: [PATCH 060/122] test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py Apply the timeout factor inside the add_block function. Also, force named args for the two expected strings. Also, add trailing comma for style. Github-Pull: #35080 Rebased-From: fa02eb87df0b4a615a3e027711326f5506e5507a --- test/functional/tool_bitcoin_chainstate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/tool_bitcoin_chainstate.py b/test/functional/tool_bitcoin_chainstate.py index 8f33da357bed..c57da1fc376d 100755 --- a/test/functional/tool_bitcoin_chainstate.py +++ b/test/functional/tool_bitcoin_chainstate.py @@ -51,15 +51,15 @@ def generate_snapshot_chain(self): assert_equal(n0.getbestblockhash(), SNAPSHOT_BASE_BLOCK_HASH) return n0.dumptxoutset('utxos.dat', "latest") - def add_block(self, datadir, input, expected_stderr=None, expected_stdout=None): + def add_block(self, datadir, input, *, expected_stderr=None, expected_stdout=None): proc = subprocess.Popen( self.get_binaries().chainstate_argv() + ["-regtest", datadir], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - text=True + text=True, ) - stdout, stderr = proc.communicate(input=input + "\n", timeout=5) + stdout, stderr = proc.communicate(input=input + "\n", timeout=5 * self.options.timeout_factor) self.log.debug("STDOUT: {0}".format(stdout.strip("\n"))) self.log.info("STDERR: {0}".format(stderr.strip("\n"))) From e1545b56b9fbb268dcd2a3a6fd842be1b13e1b29 Mon Sep 17 00:00:00 2001 From: optout <13562139+optout21@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:53:30 +0200 Subject: [PATCH 061/122] test: Add clean shutdown to Socks5Server The `Socks5Server` utility handles multiple incoming connections, which are handled in separate background threads. The `stop()` method unblocks and waits for the main background thread cleanly, but it doesn't attempt to wait for any handler threads. This change stores handler threads and connections, and attempts to shut them down before `stop()` returns. Co-authored-by: vasild Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com> Github-Pull: #34863 Rebased-From: 6ac49373aac1228e427e17a4b7b38fc1ba029208 --- test/functional/test_framework/socks5.py | 141 ++++++++++++++++++----- 1 file changed, 114 insertions(+), 27 deletions(-) diff --git a/test/functional/test_framework/socks5.py b/test/functional/test_framework/socks5.py index 085c5a2e3241..28aa2e8e383f 100644 --- a/test/functional/test_framework/socks5.py +++ b/test/functional/test_framework/socks5.py @@ -49,8 +49,12 @@ def sendall(s, data): raise IOError('send() on socket returned 0') sent += n -def forward_sockets(a, b): - """Forward data received on socket a to socket b and vice versa, until EOF is received on one of the sockets.""" +def forward_sockets(a, b, wakeup_socket, serv): + """Forwards data between sockets a and b until EOF, error, or shutdown. + + Monitors wakeup_socket for a shutdown signal and checks serv.is_running() + to exit gracefully when the server is stopping. + """ # Mark as non-blocking so that we do not end up in a deadlock-like situation # where we block and wait on data from `a` while there is data ready to be # received on `b` and forwarded to `a`. And at the same time the application @@ -58,10 +62,14 @@ def forward_sockets(a, b): # respond. a.setblocking(False) b.setblocking(False) - sockets = [a, b] + sockets = [a, b, wakeup_socket] done = False while not done: - rlist, _, xlist = select.select(sockets, [], sockets) + # Blocking select with timeout + rlist, _, xlist = select.select(sockets, [], sockets, 2) + if not serv.is_running(): + logger.debug("forward_sockets: Exit due to shutdown") + return if len(xlist) > 0: raise IOError('Exceptional condition on socket') for s in rlist: @@ -71,7 +79,7 @@ def forward_sockets(a, b): break if s == a: sendall(b, data) - else: + elif s == b: sendall(a, data) # Implementation classes @@ -113,6 +121,11 @@ class Socks5Connection(): def __init__(self, serv, conn): self.serv = serv self.conn = conn + # Socket-pair used to wake up blocking forwarding select + # Note: a pipe could be used as well, but that does not work with select() on Windows + self.wakeup_socket_pair = socket.socketpair() + # Index of this handler (within the server) + self.handler_index = None def handle(self): """Handle socks5 request according to RFC1928.""" @@ -176,27 +189,63 @@ def handle(self): requested_to_addr = addr.decode("utf-8") requested_to = format_addr_port(requested_to_addr, port) - if self.serv.conf.destinations_factory is not None: - dest = self.serv.conf.destinations_factory(requested_to_addr, port) - if dest is not None: - logger.debug(f"Serving connection to {requested_to}, will redirect it to " - f"{dest['actual_to_addr']}:{dest['actual_to_port']} instead") - with socket.create_connection((dest["actual_to_addr"], dest["actual_to_port"])) as conn_to: - forward_sockets(self.conn, conn_to) + if self.serv.is_running(): + if self.serv.conf.destinations_factory is not None: + dest = self.serv.conf.destinations_factory(requested_to_addr, port) + if dest is not None: + logger.debug(f"Serving connection to {requested_to}, will redirect it to " + f"{dest['actual_to_addr']}:{dest['actual_to_port']} instead") + with socket.create_connection((dest["actual_to_addr"], dest["actual_to_port"])) as conn_to: + forward_sockets(self.conn, conn_to, self.wakeup_socket_pair[1], self.serv) + conn_to.close() + else: + logger.debug(f"Can't serve the connection to {requested_to}: the destinations factory returned None") else: - logger.debug(f"Can't serve the connection to {requested_to}: the destinations factory returned None") - else: - logger.debug(f"Can't serve the connection to {requested_to}: no destinations factory") + logger.debug(f"Can't serve the connection to {requested_to}: no destinations factory") # Fall through to disconnect except Exception as e: - logger.exception("socks5 request handling failed.") - self.serv.queue.put(e) + logger.exception(f"socks5 request handling failed (running {self.serv.is_running()})") + if self.serv.is_running(): + self.serv.queue.put(e) finally: if not self.serv.keep_alive: self.conn.close() else: logger.debug("Keeping client connection alive") + s0 = self.wakeup_socket_pair[0] + s1 = self.wakeup_socket_pair[1] + self.wakeup_socket_pair = None + try: + s0.close() + s1.close() + except OSError: + pass + self.serv.remove_handler(self.handler_index) + self.handler_index = None + + def wakeup(self): + # Wake up the blocking forwarding select by writing to the wake-up socket + try: + socket_pair = self.wakeup_socket_pair + if socket_pair is not None: + socket_pair[0].send("CloseWakeup".encode()) + logger.debug("Waking up forwarding thread") + except OSError as e: + logger.warning(f"Error waking up forwarding thread: {e}") + pass + + +# Wrapper for thread.join(), which may throw for daemon threads (in late stages of finalization). +# Return True if the thread is no longer active (join succeeded), False otherwise +# See PR #34863 for more details on using daemon threads. +def try_join_daemon_thread(thread, timeout=0) -> bool: + try: + thread.join(timeout=timeout) + return not thread.is_alive() + except Exception as e: + logger.debug(f"Exception in thread.join, {e}") + return True class Socks5Server(): def __init__(self, conf): @@ -212,31 +261,69 @@ def __init__(self, conf): # to reflect the actual bound address so callers can use it. self.conf.addr = self.s.getsockname() self.s.listen(5) - self.running = False + # Set to False when stop is initiated + self._running = False + self._running_lock = threading.Lock() self.thread = None self.queue = queue.Queue() # report connections and exceptions to client self.keep_alive = conf.keep_alive + # Store the background handlers, needed for clean shutdown + # Append-only array, completed handlers are set to None + self._handlers = [] + self._handlers_lock = threading.Lock() + + def is_running(self) -> bool: + with self._running_lock: + return self._running + + def set_running(self, new_value: bool): + with self._running_lock: + self._running = new_value def run(self): - while self.running: + while self.is_running(): (sockconn, _) = self.s.accept() - if self.running: + if self.is_running(): conn = Socks5Connection(self, sockconn) - thread = threading.Thread(None, conn.handle) - thread.daemon = True + # Use "daemon" threads, see PR #34863 for more discussion. + thread = threading.Thread(None, conn.handle, daemon=True) + with self._handlers_lock: + conn.handler_index = len(self._handlers) + self._handlers.append((thread, conn)) + assert(conn.handler_index < len(self._handlers)) thread.start() + def remove_handler(self, handler_index): + with self._handlers_lock: + if handler_index < len(self._handlers): + if self._handlers[handler_index] is not None: + self._handlers[handler_index] = None + logger.debug(f"Handler {handler_index} removed") + def start(self): - assert not self.running - self.running = True - self.thread = threading.Thread(None, self.run) - self.thread.daemon = True + assert not self.is_running() + self.set_running(True) + self.thread = threading.Thread(None, self.run, daemon=True) self.thread.start() def stop(self): - self.running = False + self.set_running(False) # connect to self to end run loop s = socket.socket(self.conf.af) s.connect(self.conf.addr) s.close() self.thread.join() + # if there are active handlers, close them + with self._handlers_lock: + items = list(self._handlers) + for i, item in enumerate(items): + if item is None: + continue + thread, conn = item + # check if thread is still active + if not try_join_daemon_thread(thread, timeout=0): + conn.wakeup() + if try_join_daemon_thread(thread, timeout=2): + logger.debug(f"Stop(): Handler {i} thread joined") + else: + logger.warning(f"Stop(): Handler thread {i} didn't finish after force close") From 332d2a2ef2f3bd64808d914ceec08135f3eae7f2 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 30 Jan 2026 11:18:17 +0100 Subject: [PATCH 062/122] test: Add is_connected_to helper Needed in the next commit. Co-Authored-By: David Gumberg Github-Pull: #34425 Rebased-From: faa404e119c54526077b056f6f380782e64986c4 --- test/functional/test_framework/test_node.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 4bcf01e37c00..45876f5e2d2c 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -920,6 +920,11 @@ def disconnect_p2ps(self): self.wait_until(lambda: self.num_test_p2p_connections() == 0) + def is_connected_to(self, other): + assert isinstance(other, TestNode) + other_subver = other.getnetworkinfo()["subversion"] + return any(peer["subver"] == other_subver for peer in self.getpeerinfo()) + def bumpmocktime(self, seconds): """Fast forward using setmocktime to self.mocktime + seconds. Requires setmocktime to have been called at some point in the past.""" From 402f347fd5e09b8ece1f63dc8a4e160e872f594e Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 27 Mar 2026 16:09:16 +0100 Subject: [PATCH 063/122] test: Stricter checks in rpc_setban.py Make the checks stricter and easier to follow: * Fix a typo. * After the first ban from node 1 wait until node 0 "sees" the ban. * Move the restart_node out of the debug log context, to avoid bloat. * Removed the timeout from the outer/lower exit stack to check "dropped (banned)\n" on node 1, because the inner/top exit stack waits longer. * The inner/top exit stack checks for the both disconnections peer=2 and possibly peer=3 (for v2->v1 retry). * And finally, add a redundant assert to confirm once more that node 0 is has "seen" the ban. Github-Pull: #34425 Rebased-From: fa21edddb2722f7188130e56b06985ee2ec3ec1c --- test/functional/rpc_setban.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/test/functional/rpc_setban.py b/test/functional/rpc_setban.py index 9b684ae45743..7d1873c796ae 100755 --- a/test/functional/rpc_setban.py +++ b/test/functional/rpc_setban.py @@ -26,19 +26,28 @@ def run_test(self): peerinfo = self.nodes[1].getpeerinfo()[0] assert "noban" not in peerinfo["permissions"] - # Node 0 get banned by Node 1 + # Node 0 gets banned by Node 1 self.nodes[1].setban("127.0.0.1", "add") + self.wait_until(lambda: not self.nodes[0].is_connected_to(self.nodes[1])) # Node 0 should not be able to reconnect + self.restart_node(1, []) context = ExitStack() - context.enter_context(self.nodes[1].assert_debug_log(expected_msgs=['dropped (banned)\n'], timeout=50)) + context.enter_context(self.nodes[1].assert_debug_log(expected_msgs=["dropped (banned)\n"])) # When disconnected right after connecting, a v2 node will attempt to reconnect with v1. - # Wait for that to happen so that it cannot mess with later tests. - if self.options.v2transport: - context.enter_context(self.nodes[0].assert_debug_log(expected_msgs=['trying v1 connection'], timeout=50)) + # Wait for all disconnects on node0, so that it cannot mess with later tests. + context.enter_context(self.nodes[0].assert_debug_log( + expected_msgs=[ + "retrying with v1 transport protocol for peer=2", + "Cleared nodestate for peer=2", + "Cleared nodestate for peer=3", + ] if self.options.v2transport else [ + "Cleared nodestate for peer=2", # Just one v1 disconnect to wait for + ], + timeout=8)) with context: - self.restart_node(1, []) self.nodes[0].addnode("127.0.0.1:" + str(p2p_port(1)), "onetry") + assert not self.nodes[0].is_connected_to(self.nodes[1]) # However, node 0 should be able to reconnect if it has noban permission self.restart_node(1, ['-whitelist=127.0.0.1']) From bb536df042499ac5d0aaaeefcd672520f6205d80 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 27 Jan 2026 22:50:43 +0100 Subject: [PATCH 064/122] test: Fix all races after a socket is closed gracefully This waits for any disconnect (e.g. from a restart of one of the nodes) to fully happen before the next connect. Can be reviewed with the git option: --color-moved=dimmed-zebra Github-Pull: #34425 Rebased-From: fab27726478d686dcd66d26d3b7b34aa323b8066 --- .../test_framework/test_framework.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 95bfc964d60b..f0cfafd617c2 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -558,6 +558,17 @@ def connect_nodes(self, a, b, *, peer_advertises_v2=None, wait_for_connect: bool """ from_connection = self.nodes[a] to_connection = self.nodes[b] + + # Use subversion as peer id. Test nodes have their node number appended to the user agent string + from_connection_subver = from_connection.getnetworkinfo()['subversion'] + to_connection_subver = to_connection.getnetworkinfo()['subversion'] + + def find_conn(node, peer_subversion, inbound): + return next(filter(lambda peer: peer['subver'] == peer_subversion and peer['inbound'] == inbound, node.getpeerinfo()), None) + + self.wait_until(lambda: not find_conn(from_connection, to_connection_subver, inbound=False)) + self.wait_until(lambda: not find_conn(to_connection, from_connection_subver, inbound=True)) + ip_port = "127.0.0.1:" + str(p2p_port(b)) if peer_advertises_v2 is None: @@ -573,13 +584,6 @@ def connect_nodes(self, a, b, *, peer_advertises_v2=None, wait_for_connect: bool if not wait_for_connect: return - # Use subversion as peer id. Test nodes have their node number appended to the user agent string - from_connection_subver = from_connection.getnetworkinfo()['subversion'] - to_connection_subver = to_connection.getnetworkinfo()['subversion'] - - def find_conn(node, peer_subversion, inbound): - return next(filter(lambda peer: peer['subver'] == peer_subversion and peer['inbound'] == inbound, node.getpeerinfo()), None) - self.wait_until(lambda: find_conn(from_connection, to_connection_subver, inbound=False) is not None) self.wait_until(lambda: find_conn(to_connection, from_connection_subver, inbound=True) is not None) From ab19213660c9415050528a7e4f57c13deaa36939 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 27 Mar 2026 16:21:42 +0100 Subject: [PATCH 065/122] test: Remove unused, confusing and brittle connect_nodes.wait_for_connect The option is unused since the last removals in: * 4c40a923f003420193aa574745f70788bcf35265, and * 81bf3ebff7e7108bbfbf6fe4e122f4e52f278701 It was brittle and lead to intermittent test issues. Generally, it is also confusing, because if a test wanted to connect nodes without checking their connection, it can use `addnode`, like the rpc_setban.py test. So fix all issues by removing it. Github-Pull: #34425 Rebased-From: fae807ed25561bab7148c5a0d7bd847314c79d88 --- test/functional/test_framework/test_framework.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index f0cfafd617c2..acc52c56c19e 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -548,14 +548,7 @@ def restart_node(self, i, extra_args=None, clear_addrman=False, *, expected_stde def wait_for_node_exit(self, i, timeout): self.nodes[i].process.wait(timeout) - def connect_nodes(self, a, b, *, peer_advertises_v2=None, wait_for_connect: bool = True): - """ - Kwargs: - wait_for_connect: if True, block until the nodes are verified as connected. You might - want to disable this when using -stopatheight with one of the connected nodes, - since there will be a race between the actual connection and performing - the assertions before one node shuts down. - """ + def connect_nodes(self, a, b, *, peer_advertises_v2=None): from_connection = self.nodes[a] to_connection = self.nodes[b] @@ -581,9 +574,6 @@ def find_conn(node, peer_subversion, inbound): # compatibility with older clients from_connection.addnode(ip_port, "onetry") - if not wait_for_connect: - return - self.wait_until(lambda: find_conn(from_connection, to_connection_subver, inbound=False) is not None) self.wait_until(lambda: find_conn(to_connection, from_connection_subver, inbound=True) is not None) From 2eafae9dc1bd0f37f42608f2881b81c22fcf3cbc Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 28 Apr 2026 18:00:36 +0000 Subject: [PATCH 066/122] multi_index: fix compilation failure with boost >= 1.91 This effectively reverts a3cb309e7c31853f272bffaa65fb6ab0a7cc4083 from PR #30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: #35175 Rebased-From: 0bc9d354dfd8074d1c36a891a69b6585a8775c65 --- src/node/txorphanage.cpp | 13 +++++++------ src/txmempool.h | 10 ++++------ src/txrequest.cpp | 12 +++++------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/node/txorphanage.cpp b/src/node/txorphanage.cpp index ca7eb20470a7..4b25ab4d2458 100644 --- a/src/node/txorphanage.cpp +++ b/src/node/txorphanage.cpp @@ -91,12 +91,13 @@ class TxOrphanageImpl final : public TxOrphanage { } }; - struct OrphanIndices final : boost::multi_index::indexed_by< - boost::multi_index::ordered_unique, WtxidExtractor>, - boost::multi_index::ordered_unique, ByPeerViewExtractor> - >{}; - - using AnnouncementMap = boost::multi_index::multi_index_container; + using AnnouncementMap = boost::multi_index::multi_index_container< + Announcement, + boost::multi_index::indexed_by< + boost::multi_index::ordered_unique, WtxidExtractor>, + boost::multi_index::ordered_unique, ByPeerViewExtractor> + > + >; template using Iter = typename AnnouncementMap::index::type::iterator; AnnouncementMap m_orphans; diff --git a/src/txmempool.h b/src/txmempool.h index d7b7de6e3b70..94b0b35cd7ff 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -211,7 +211,9 @@ class CTxMemPool static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; // public only for testing - struct CTxMemPoolEntry_Indices final : boost::multi_index::indexed_by< + using indexed_transaction_set = boost::multi_index_container< + CTxMemPoolEntry, + boost::multi_index::indexed_by< // sorted by txid boost::multi_index::hashed_unique, // sorted by wtxid @@ -227,11 +229,7 @@ class CTxMemPool CompareTxMemPoolEntryByEntryTime > > - {}; - typedef boost::multi_index_container< - CTxMemPoolEntry, - CTxMemPoolEntry_Indices - > indexed_transaction_set; + >; /** * This mutex needs to be locked when accessing `mapTx` or other members diff --git a/src/txrequest.cpp b/src/txrequest.cpp index 4d7240bee0d9..53136a8e7104 100644 --- a/src/txrequest.cpp +++ b/src/txrequest.cpp @@ -208,17 +208,15 @@ struct ByTimeViewExtractor } }; -struct Announcement_Indices final : boost::multi_index::indexed_by< - boost::multi_index::ordered_unique, ByPeerViewExtractor>, - boost::multi_index::ordered_non_unique, ByTxHashViewExtractor>, - boost::multi_index::ordered_non_unique, ByTimeViewExtractor> -> -{}; /** Data type for the main data structure (Announcement objects with ByPeer/ByTxHash/ByTime indexes). */ using Index = boost::multi_index_container< Announcement, - Announcement_Indices + boost::multi_index::indexed_by< + boost::multi_index::ordered_unique, ByPeerViewExtractor>, + boost::multi_index::ordered_non_unique, ByTxHashViewExtractor>, + boost::multi_index::ordered_non_unique, ByTimeViewExtractor> + > >; /** Helper type to simplify syntax of iterator types. */ From 0cedd6abf22866103ea852edb871d463f7ba1222 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 5 May 2026 07:52:08 -0400 Subject: [PATCH 067/122] validation: correct lifetime of precomputed tx data This makes sure `txsdata` always outlives the Script check queue (since local objects are destructed in reverse order of construction). This is the root cause for a security vulnerability reported by Cory Fields in 2024 that could be exploited by crafting an invalid block to cause nodes to read freed memory. The vulnerability was covertly fixed in commit `492e1f09943fcb6145c21d470299305a19e17d8b`. See security advisory for CVE-2024-52911 for more details. Github-Pull: #35209 Rebased-From: 1ed799fb21db51a12cbd5579420a61b9b5b3ee7d --- src/validation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 5c02ec2341cd..23181d4b3143 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2508,11 +2508,10 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state, // in multiple threads). Preallocate the vector size so a new allocation // doesn't invalidate pointers into the vector, and keep txsdata in scope // for as long as `control`. + std::vector txsdata(block.vtx.size()); std::optional> control; if (auto& queue = m_chainman.GetCheckQueue(); queue.HasThreads() && fScriptChecks) control.emplace(queue); - std::vector txsdata(block.vtx.size()); - std::vector prevheights; CAmount nFees = 0; int nInputs = 0; From 1bb9c40bb8a3e94d3bf5d9e94002aff3813944dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Sun, 3 May 2026 15:36:47 +0200 Subject: [PATCH 068/122] ci: unconfine seccomp for i686 no IPC Docker 29.4.2 blocks `socketcall(2)` in the default seccomp profile: https://docs.docker.com/engine/release-notes/29/#2942 https://github.com/moby/profiles/releases/tag/seccomp%2Fv0.2.2 https://github.com/moby/moby/pull/52501 That affects the `i686, no IPC` job because it runs 32-bit Linux test binaries inside Docker. Add Docker's documented `--security-opt seccomp=unconfined` workaround to this job's `CI_CONTAINER_CAP` - the hook `ci/test/02_run_container.py` already appends to `docker run`. This restores socket availability for the 32-bit test binaries throughout the job: https://docs.docker.com/engine/security/seccomp/#run-without-the-default-seccomp-profile Github-Pull: #35202 Rebased-From: 11c9ef92a8daf030f75f88f324396b2248c65a64 --- ci/test/00_setup_env_i686_no_ipc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/test/00_setup_env_i686_no_ipc.sh b/ci/test/00_setup_env_i686_no_ipc.sh index dca0486fb602..3d19232f2e5b 100755 --- a/ci/test/00_setup_env_i686_no_ipc.sh +++ b/ci/test/00_setup_env_i686_no_ipc.sh @@ -10,6 +10,7 @@ export HOST=i686-pc-linux-gnu export CONTAINER_NAME=ci_i686_no_multiprocess export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" export CI_IMAGE_PLATFORM="linux/amd64" +export CI_CONTAINER_CAP="--security-opt seccomp=unconfined" export PACKAGES="llvm clang g++-multilib" export DEP_OPTS="DEBUG=1 NO_IPC=1" export GOAL="install" From 6bb2b07587d31f844072cf65a95b40a5cceabf62 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 16 Apr 2026 09:17:04 +0100 Subject: [PATCH 069/122] doc: update release notes for v31.x --- doc/release-notes.md | 329 ++----------------------------------------- 1 file changed, 15 insertions(+), 314 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index d5dd0f243c2b..db2c7690e36c 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,9 +1,9 @@ -v31.0 Release Notes +v31.x Release Notes =================== -Bitcoin Core version 31.0 is now available from: +Bitcoin Core version 31.x is now available from: - + This release includes new features, various bug fixes and performance improvements, as well as updated translations. @@ -39,334 +39,35 @@ on them. It is not recommended to use Bitcoin Core on unsupported systems. Notable changes =============== -The default `-dbcache` value has been increased to 1024 MiB from 450 MiB on -systems where at least 4096 MiB of RAM is detected. This improves performance -but increases memory usage. On some systems (for example when running in -containers), the detected RAM may exceed the memory actually available, which -can lead to out-of-memory conditions. To maintain the previous behavior, set -`-dbcache=450`. See -[reduce-memory.md](https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md) -for further guidance on low-memory systems. (#34692) +### P2P -Mempool -------- +- #35032 net_processing: don't modify addrman for private broadcast connections -The mempool has been reimplemented with a new design ("cluster mempool"), to -facilitate better decision-making when constructing block templates, evicting -transactions, relaying transactions, and validating replacement transactions -(RBF). Most changes should be transparent to users, but some behavior changes -are noted: +### Test -- The mempool no longer enforces ancestor or descendant size/count limits. -Instead, two new default policy limits are introduced governing connected -components, or clusters, in the mempool, limiting clusters to 64 transactions -and up to 101 kB in virtual size. Transactions are considered to be in the same -cluster if they are connected to each other via any combination of parent/child -relationships in the mempool. These limits can be overridden using command-line -arguments; see the extended help (`-help-debug`) for more information. +- #34425 test: Fix all races after a socket is closed gracefully +- #34863 test: Clean shutdown in Socks5Server +- #35080 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py -- Within the mempool, transactions are ordered based on the feerate at which -they are expected to be mined, which takes into account the full set, or -"chunk", of transactions that would be included together (e.g., a parent and its -child, or more complicated subsets of transactions). This ordering is utilized -by the algorithms that implement transaction selection for constructing block -templates; eviction from the mempool when it is full; and transaction relay -announcements to peers. +### CI -- The replace-by-fee validation logic has been updated so that transaction -replacements are only accepted if the resulting mempool's feerate diagram is -strictly better than before the replacement. This eliminates all known cases of -replacements occurring that make the mempool worse off, which was possible under -previous RBF rules. For singleton transactions (that are in clusters by -themselves) it's sufficient for a replacement to have a higher fee and feerate -than the original. See [delvingbitcoin.org -post](https://delvingbitcoin.org/t/an-overview-of-the-cluster-mempool-proposal/393#rbf-can-now-be-made-incentive-compatible-for-miners-11) -for more information. +- #35202 ci: restore sockets in i686, no IPC job -- Two new RPCs have been added: `getmempoolcluster` will provide the set of -transactions in the same cluster as the given transaction, along with the -ordering of those transactions and grouping into chunks; and -`getmempoolfeeratediagram` will return the feerate diagram of the entire -mempool. +### Misc -- Chunk size and chunk fees are now also included in the output of -`getmempoolentry`. - -- The "CPFP Carveout" has been removed from the mempool logic. The CPFP carveout -allowed one additional child transaction to be added to a package that's already -at its descendant limit, but only if that child has exactly one ancestor (the -package's root) and is small (no larger than 10kvB). Nothing is allowed to -bypass the cluster count limit. It is expected that smart contracting use-cases -requiring similar functionality employ TRUC transactions and sibling eviction -instead going forward. - -- Some additional discussion can be found at -[doc/policy/mempool-terminology.md](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-terminology.md) -and -[doc/policy/mempool-replacements.md](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md). - -P2P and network changes ------------------------ - -- Normally local transactions are broadcast to all connected peers with which we -do transaction relay. Now, for the `sendrawtransaction` RPC this behavior can be -changed to only do the broadcast via the Tor or I2P networks. A new boolean -option `-privatebroadcast` has been added to enable this behavior. This improves -the privacy of the transaction originator in two aspects: - 1. Their IP address (and thus geolocation) is never known to the recipients. - 2. If the originator sends two otherwise unrelated transactions, they will not - be linkable. This is because a separate connection is used for broadcasting - each transaction. (#29415) - -- New RPCs have been added to introspect and control private broadcast: -`getprivatebroadcastinfo` reports transactions currently being privately -broadcast, and `abortprivatebroadcast` removes matching transactions from the -private broadcast queue. (#34329) - -- Transactions participating in one-parent-one-child package relay can now have -the parent with a feerate lower than the `-minrelaytxfee` feerate, even 0 fee. -This expands the change from 28.0 to also cover packages of non-TRUC -transactions. Note that in general the package child can have additional -unconfirmed parents, but they must already be in-mempool for the new package to -be relayed. (#33892) - -- The release has asmap data embedded for the first time, allowing the asmap -feature to be used without any externally sourced file. The embedded map [was -created on 2026-03-05](https://github.com/bitcoin/bitcoin/pull/34696). Despite -the data being available, the option remains off-by-default. Users still need to -set `-asmap` or `-asmap=1` explicitly to make it possible to use a peer's ASN -(ISP/hoster identifier) in netgroup bucketing in order to ensure a higher -diversity in their peer set. - -Updated RPCs ------------- - -- `gettxspendingprevout` has 2 new optional arguments: `mempool_only` and -`return_spending_tx`. If `mempool_only` is true it will limit scans to the -mempool even if `txospenderindex` is available. If `return_spending_tx` is true, -the full spending tx will be returned. In addition if `txospenderindex` is -available and a confirmed spending transaction is found, its block hash will be -returned. (#24539) - -- The `getpeerinfo` RPC no longer returns the `startingheight` field unless the -configuration option `-deprecatedrpc=startingheight` is used. The -`startingheight` field will be fully removed in the next major release. (#34197) - -- The `getblock` RPC now returns a `coinbase_tx` object at verbosity levels 1, -2, and 3. It contains `version`, `locktime`, `sequence`, `coinbase` and -`witness`. This allows for efficiently querying coinbase transaction properties -without fetching the full transaction data at verbosity 2+. (#34512) - -REST API --------- - -- A new REST API endpoint -(`/rest/blockpart/.?offset=&size=`) has been -introduced for efficiently fetching a range of bytes from block ``. -(#33657) - -Build System ------------- - -- The minimum supported Clang compiler version has been raised to 17.0 (#33555). -- The minimum supported GCC compiler version has been raised to 12.1 (#33842). - -Updated settings ----------------- - -- The `-paytxfee` startup option and the `settxfee` RPC are now deleted after -being deprecated in Bitcoin Core 30.0. They used to allow the user to set a -static fee rate for wallet transactions, which could potentially lead to -overpaying or underpaying. Users should instead rely on fee estimation or -specify a fee rate per transaction using the `fee_rate` argument in RPCs such as -`fundrawtransaction`, `sendtoaddress`, `send`, `sendall`, and `sendmany`. -(#32138) - -- Specifying `-asmap` or `-asmap=1` will load the embedded asmap data instead of -an external file. In previous releases, if `-asmap` was specified without a -filename, this would try to load an `ip_asn.map` data file. Now loading an -external asmap file always requires an explicit filename like -`-asmap=ip_asn.map`. - -- The `-maxorphantx` startup option has been removed. It was previously -deprecated and has no effect anymore since v30.0. (#33872) - -- `tor` has been removed as a network specification. It was deprecated in favour -of `onion` in v0.17.0. (#34031) - -- When `-logsourcelocations` is enabled, the log output now contains just the -function name instead of the entire function signature. (#34088) - -- The default `-dbcache` value has been increased to `1024` MiB from `450` MiB -on systems where at least `4096` MiB of RAM is detected. This is a performance -increase, but will use more memory. To maintain the previous behaviour, set -`-dbcache=450`. (#34692) - -- `-privatebroadcast` is added to enable private broadcast behavior for -`sendrawtransaction`. - -New settings ------------- - -- `-txospenderindex` enables the creation of a transaction output spender index -that, if present, will be scanned by `gettxspendingprevout` if a spending -transaction was not found in the mempool. (#24539) - -GUI changes ------------ - -- The GUI has been updated to Qt 6.8. (#34650) - -- The `createwallet`, `createwalletdescriptor` and `migratewallet` commands are -filtered from the console history to improve security and privacy. (gui#901) - -- The Restore Wallet dialog shows an error message if the restored wallet name -is empty. (gui#924) - -Fee Estimation --------------- - -The Bitcoin Core fee estimator minimum fee rate bucket was updated from **1 -sat/vB** to **0.1 sat/vB**, which matches the node’s default `minrelaytxfee`. This -means that for a given confirmation target, if a sub-1 sat/vB fee rate bucket is -the minimum tracked with sufficient data, its average value will be returned as -the fee rate estimate. - -Restarting a node with this change invalidates previously saved -estimates in `fee_estimates.dat`, the fee estimator will start tracking fresh -stats. - -IPC Interface -------------- - -- The IPC mining interface now requires mining clients to use the latest -`mining.capnp` schema. Clients built against older schemas will fail when -calling `Init.makeMining` and receive an RPC error indicating the old mining -interface is no longer supported. Mining clients must update to the latest -schema and regenerate bindings to continue working. (#34568) -- `Mining.createNewBlock` now has a `cooldown` behavior (enabled by default) -that waits for IBD to finish and for the tip to catch up. This usually prevents -a flood of templates during startup, but is not guaranteed. (#34184) -- `Mining.interrupt()` can be used to interrupt `Mining.waitTipChanged` and -`Mining.createNewBlock`. (#34184) -- `Mining.createNewBlock` and `Mining.checkBlock` now require a `context` -parameter. -- `Mining.waitTipChanged` now has a default `timeout` (effectively infinite / -`maxDouble`) if the client omits it. -- `BlockTemplate.getCoinbaseTx()` now returns a structured `CoinbaseTx` instead -of raw bytes. -- Removed `BlockTemplate.getCoinbaseCommitment()` and -`BlockTemplate.getWitnessCommitmentIndex()`. -- Cap’n Proto default values were updated to match the corresponding C++ -defaults for mining-related option structs (e.g. `BlockCreateOptions`, -`BlockWaitOptions`, `BlockCheckOptions`). +- #35175 multi_index: fix compilation failure with boost >= 1.91 Credits ======= Thanks to everyone who directly contributed to this release: -- 0xb10c -- Alexander Wiederin -- Alfonso Roman Zubeldia -- amisha -- ANAVHEOBA -- Andrew Toth -- Anthony Towns -- Antoine Poinsot -- ANtutov -- Anurag chavan -- Ava Chow -- bensig -- Ben Westgate -- billymcbip -- b-l-u-e -- Brandon Odiwuor -- brunoerg -- Bruno Garcia -- Calin Culianu -- Carl Dong -- Chandra Pratap -- Chris Stewart -- Coder - Cory Fields -- da1sychain -- Daniela Brozzoni -- Daniel Pfeifer -- David Gumberg -- dergoegge -- Dmitry Goncharov -- Enoch Azariah -- Eugene Siegel -- Fabian Jahr -- fanquake -- Fibonacci747 -- flack -- frankomosh -- furszy -- glozow - Greg Sanders -- Hao Xu -- Hennadii Stepanov -- Henry Romp -- Hodlinator -- ismaelsadeeq -- janb84 -- jayvaliya -- joaonevess -- John Moffett -- Josh Doman -- kevkevinpal -- l0rinc -- Luke Dashjr -- Mara van der Laan +- Lőrinc - MarcoFalke -- marcofleon -- Martin Zumsande -- Matthew Zipkin -- Max Edwards -- Murch -- Musa Haruna -- naiyoma -- nervana21 -- Novo -- optout -- pablomartin4btc -- Padraic Slattery -- Pieter Wuille -- Pol Espinasa -- pythcoiner -- rkrux -- Robin David -- Roman Zeyde -- rustaceanrob -- Ryan Ofsky -- SatsAndSports -- scgbckbone -- Sebastian Falbesoner -- sedited -- seduless -- Sergi Delgado Segura -- Sjors Provoost -- SomberNight -- sstone -- stickies-v -- stratospher -- stringintech -- Suhas Daftuar -- tboy1337 -- TheCharlatan -- Tim Ruffing +- optout21 - Vasil Dimov -- w0xlt -- WakeTrainDev -- Weixie Cui -- willcl-ark -- Woolfgm -- yancy -- Yash Bhutwala -- yuvicc -- zaidmstrr As well as to everyone that helped with translations on [Transifex](https://explore.transifex.com/bitcoin/bitcoin/). From 9d42e868fe4cf7be19dbcdbab4f9f7c6407bd775 Mon Sep 17 00:00:00 2001 From: Pol Espinasa Date: Thu, 2 Apr 2026 21:03:04 +0200 Subject: [PATCH 070/122] test: fix send_batch_request to pass callables when using --usecli send_batch_request() was building raw dicts without a "jsonrpc" version, which made Core to treat them as version 1.0 requests. This worked in normal mode, but failed with --usecli because TestNodeCLI.batch() expects callables, not dicts. This commit fixes it by using get_request() which is defined in both AuthServiceProxy and TestNodeCLIAttr. The assert is changed because by using get_reques() AuthServiceProxy treats it as "jsonrpc" version 2.0 requests, which don't return "error" keys. Github-Pull: #34991 Rebased-From: 5603ae0ffa3f0be3d22e8a09008e46c5d48ae12f --- test/functional/feature_index_prune.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/feature_index_prune.py b/test/functional/feature_index_prune.py index 49520be05868..0654e04f5865 100755 --- a/test/functional/feature_index_prune.py +++ b/test/functional/feature_index_prune.py @@ -18,11 +18,11 @@ def send_batch_request(node: TestNode, method: str, params: List[Any]) -> List[Any]: """Send batch request and parse all results""" - data = [{"method": method, "params": p} for p in params] + data = [getattr(node, method).get_request(*p) for p in params] response = node.batch(data) result = [] for item in response: - assert item["error"] is None, item["error"] + assert "error" not in item, item["error"] result.append(item["result"]) return result From 56190e5c5ce6a37378391d77c5df951ce9064c78 Mon Sep 17 00:00:00 2001 From: Pol Espinasa Date: Fri, 3 Apr 2026 22:34:23 +0200 Subject: [PATCH 071/122] ci: add --extended when using --usecli Add the flag --extended to a test (00_setup_env_i686_no_ipc.sh) with the --usecli flag to cover all tests with --usecli. Github-Pull: #34991 Rebased-From: a49bc1e24e69ac43beecbdc9c39da3d02160034e --- ci/test/00_setup_env_i686_no_ipc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_i686_no_ipc.sh b/ci/test/00_setup_env_i686_no_ipc.sh index 3d19232f2e5b..90e9d7c95df1 100755 --- a/ci/test/00_setup_env_i686_no_ipc.sh +++ b/ci/test/00_setup_env_i686_no_ipc.sh @@ -15,7 +15,7 @@ export PACKAGES="llvm clang g++-multilib" export DEP_OPTS="DEBUG=1 NO_IPC=1" export GOAL="install" export CI_LIMIT_STACK_SIZE=1 -export TEST_RUNNER_EXTRA="--v2transport --usecli" +export TEST_RUNNER_EXTRA="--v2transport --usecli --extended" export BITCOIN_CONFIG="\ --preset=dev-mode \ -DENABLE_IPC=OFF \ From 64ba4e2a3b6d8ce06348f83909aa08f4ddeb46c9 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 6 May 2026 16:04:54 +0200 Subject: [PATCH 072/122] depends: Unset `SOURCE_DATE_EPOCH` in `gen_id` script Github-Pull: #34228 Rebased-From: 9f7a2293c48f8afb5e87765a327a0c89fd21fa56 --- depends/gen_id | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/depends/gen_id b/depends/gen_id index 5504deeb0eb1..b9104c43359c 100755 --- a/depends/gen_id +++ b/depends/gen_id @@ -28,6 +28,10 @@ # Redirect stderr to stdout exec 2>&1 + # Unset SOURCE_DATE_EPOCH to prevent it from leaking into tool + # outputs and to maximize reuse of the built package cache. + unset SOURCE_DATE_EPOCH + echo "BEGIN ALL" # Include any ID salts supplied via command line From 313a225fef550c9dded3ead4303436b3ae10bd4e Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 7 May 2026 09:41:00 +0200 Subject: [PATCH 073/122] ci: Move --usecli --extended from i386 task to alpine task Github-Pull: #35230 Rebased-From: fad61896e869fe004cb1ebdacbd124ce587e6efc --- ci/test/00_setup_env_i686_no_ipc.sh | 1 - ci/test/00_setup_env_native_alpine_musl.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_i686_no_ipc.sh b/ci/test/00_setup_env_i686_no_ipc.sh index 90e9d7c95df1..93d5ab744604 100755 --- a/ci/test/00_setup_env_i686_no_ipc.sh +++ b/ci/test/00_setup_env_i686_no_ipc.sh @@ -15,7 +15,6 @@ export PACKAGES="llvm clang g++-multilib" export DEP_OPTS="DEBUG=1 NO_IPC=1" export GOAL="install" export CI_LIMIT_STACK_SIZE=1 -export TEST_RUNNER_EXTRA="--v2transport --usecli --extended" export BITCOIN_CONFIG="\ --preset=dev-mode \ -DENABLE_IPC=OFF \ diff --git a/ci/test/00_setup_env_native_alpine_musl.sh b/ci/test/00_setup_env_native_alpine_musl.sh index e42cb4a3f1e8..3ab56159a3a2 100755 --- a/ci/test/00_setup_env_native_alpine_musl.sh +++ b/ci/test/00_setup_env_native_alpine_musl.sh @@ -17,4 +17,5 @@ export BITCOIN_CONFIG="\ -DREDUCE_EXPORTS=ON \ -DCMAKE_BUILD_TYPE=Debug \ " +export TEST_RUNNER_EXTRA="--v2transport --usecli --extended" export BITCOIN_CMD="bitcoin -m" # Used in functional tests From 5022e9d411f5c49dffc7cc15a411e83675ca2a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Wed, 6 May 2026 09:34:12 +0200 Subject: [PATCH 074/122] test: fix P2SH output in coins cache fuzz The `coinscache_sim` fuzz target builds a 23-byte P2SH scriptPubKey manually. Place `OP_EQUAL` at index 22, after `OP_HASH160`, the 20-byte push opcode, and the 20-byte script hash. This matches `CScript::IsPayToScriptHash()`, which checks byte 22 for `OP_EQUAL`, see src/script/script.cpp#L229 Github-Pull: #35218 Rebased-From: ac58e6c53c262e08584cb809daf3fbc8dd4d3732 --- src/test/fuzz/coinscache_sim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/fuzz/coinscache_sim.cpp b/src/test/fuzz/coinscache_sim.cpp index c8534e4f60c8..4c782dffa9a3 100644 --- a/src/test/fuzz/coinscache_sim.cpp +++ b/src/test/fuzz/coinscache_sim.cpp @@ -70,7 +70,7 @@ struct PrecomputedData coins[i].out.scriptPubKey[0] = OP_HASH160; coins[i].out.scriptPubKey[1] = 20; std::copy(hash.begin(), hash.begin() + 20, coins[i].out.scriptPubKey.begin() + 2); - coins[i].out.scriptPubKey[12] = OP_EQUAL; + coins[i].out.scriptPubKey[22] = OP_EQUAL; break; case 2: /* P2WPKH */ coins[i].out.scriptPubKey.resize(22); @@ -451,7 +451,7 @@ FUZZ_TARGET(coinscache_sim) } } - // HaveCoinInCache ignores spent coins, so GetCacheSize() may exceed it. */ + // HaveCoinInCache ignores spent coins, so GetCacheSize() may exceed it. assert(cache.GetCacheSize() >= cache_size); } From 409b2d847597a3e6a3a4c0d74c59650a06692dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Wed, 6 May 2026 12:34:20 +0200 Subject: [PATCH 075/122] wallet: check BDB last page LSN The BDB metadata field `last_page` stores the last valid page number, not the number of pages. The read-only wallet migration parser currently checks reset LSNs with a half-open loop, so it skips the final page and may accept a database whose last page still depends on BDB log files. Github-Pull: #35227 Rebased-From: e2b0984f99519f76423ce26ce9077ca765b2b30b --- src/wallet/migrate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/migrate.cpp b/src/wallet/migrate.cpp index 1869a4566712..f42aa2be951b 100644 --- a/src/wallet/migrate.cpp +++ b/src/wallet/migrate.cpp @@ -567,7 +567,7 @@ void BerkeleyRODatabase::Open() // Check all Log Sequence Numbers (LSN) point to file 0 and offset 1 which indicates that the LSNs were // reset and that the log files are not necessary to get all of the data in the database. - for (uint32_t i = 0; i < outer_meta.last_page; ++i) { + for (uint32_t i = 0; i <= outer_meta.last_page; ++i) { // The LSN is composed of 2 32-bit ints, the first is a file id, the second an offset // It will always be the first 8 bytes of a page, so we deserialize it directly for every page uint32_t file; From e379148a7acae6e0c57eeb6fb57b03797986cbee Mon Sep 17 00:00:00 2001 From: junbyjun1238 <251473466+junbyjun1238@users.noreply.github.com> Date: Thu, 14 May 2026 00:30:10 +0900 Subject: [PATCH 076/122] doc: mention -DWITH_ZMQ=ON in BSD build guides The FreeBSD, NetBSD, and OpenBSD build guides state that ZMQ support is compiled in when the package is installed. Since WITH_ZMQ defaults to OFF, update the wording to mention the required CMake option. Github-Pull: #35283 Rebased-From: ca93ab808c488324990eb91ed8297a37dd10d580 --- doc/build-freebsd.md | 2 +- doc/build-netbsd.md | 2 +- doc/build-openbsd.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md index de373d1ecb15..40740d7fb7b3 100644 --- a/doc/build-freebsd.md +++ b/doc/build-freebsd.md @@ -64,7 +64,7 @@ Otherwise, if you don't need QR encoding support, use the `-DWITH_QRENCODE=OFF` #### Notifications ###### ZeroMQ -Bitcoin Core can provide notifications via ZeroMQ. If the package is installed, support will be compiled in. +Bitcoin Core can provide notifications via ZeroMQ. To compile ZMQ support, install the following dependency and pass `-DWITH_ZMQ=ON` when configuring. ```bash pkg install libzmq4 ``` diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md index f19eb4c5fec3..caa1c7b1e24c 100644 --- a/doc/build-netbsd.md +++ b/doc/build-netbsd.md @@ -82,7 +82,7 @@ Otherwise, if you don't need QR encoding support, use the `-DWITH_QRENCODE=OFF` #### Notifications ###### ZeroMQ -Bitcoin Core can provide notifications via ZeroMQ. If the package is installed, support will be compiled in. +Bitcoin Core can provide notifications via ZeroMQ. To compile ZMQ support, install the following dependency and pass `-DWITH_ZMQ=ON` when configuring. ```bash pkgin install zeromq ``` diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md index 4ea58795a056..5edc56f0bfc1 100644 --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -64,7 +64,7 @@ Otherwise, if you don't need QR encoding support, use the `-DWITH_QRENCODE=OFF` #### Notifications ###### ZeroMQ -Bitcoin Core can provide notifications via ZeroMQ. If the package is installed, support will be compiled in. +Bitcoin Core can provide notifications via ZeroMQ. To compile ZMQ support, install the following dependency and pass `-DWITH_ZMQ=ON` when configuring. ```bash pkg_add zeromq ``` From 7a975809975834b49209f5d854c877b6dd9e81de Mon Sep 17 00:00:00 2001 From: marcofleon Date: Thu, 14 May 2026 12:32:04 +0100 Subject: [PATCH 077/122] fuzz: Fix txorphan timeout by limiting block weight Github-Pull: #35289 Rebased-From: 004a7e3cfbc5b2118536651d2201cf8b72c87736 --- src/test/fuzz/txorphan.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/fuzz/txorphan.cpp b/src/test/fuzz/txorphan.cpp index f6720ffb897a..ef26fe429f3b 100644 --- a/src/test/fuzz/txorphan.cpp +++ b/src/test/fuzz/txorphan.cpp @@ -196,9 +196,13 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage) [&] { // Make a block out of txs and then EraseForBlock CBlock block; + int64_t block_weight{0}; int num_txs = fuzzed_data_provider.ConsumeIntegralInRange(0, 1000); for (int i{0}; i < num_txs; ++i) { auto& tx_to_remove = PickValue(fuzzed_data_provider, tx_history); + const auto tx_weight = GetTransactionWeight(*tx_to_remove); + if (block_weight + tx_weight > MAX_BLOCK_WEIGHT) break; + block_weight += tx_weight; block.vtx.push_back(tx_to_remove); } orphanage->EraseForBlock(block); From 04490618774bbf3db92fb8e472f54a1951573c0f Mon Sep 17 00:00:00 2001 From: Torkel Rogstad Date: Fri, 10 Apr 2026 10:23:30 +0200 Subject: [PATCH 078/122] contrib: Fix NameError in signet miner gbt() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The logging.warning call referenced `bci["bestblockhash"]`, a variable from the calling scope `do_generate()` that is not available inside the `Generate.gbt()` method. This would crash with a NameError when getblocktemplate returned a template based on an unexpected previous block. Use the `bestblockhash` parameter that was already being passed in and used correctly in the comparison on the line above. The bug was introduced in 7b31332370 when the gbt logic was extracted into its own method — the if-condition was updated but the logging call was not. Github-Pull: #35044 Rebased-From: 701bc2dc02f73a10498ecf70c5d3523e0bb6b953 --- contrib/signet/miner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index f46d88b52e19..a7548841eea7 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -333,7 +333,7 @@ class Generate: def gbt(self, bcli, bestblockhash, now): tmpl = json.loads(bcli("getblocktemplate", '{"rules":["signet","segwit"]}')) if tmpl["previousblockhash"] != bestblockhash: - logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bci["bestblockhash"]) + logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bestblockhash) time.sleep(1) return None From 506051cc6068be68547cad5fed33f9e5c342fa5d Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 7 May 2026 11:20:52 +0200 Subject: [PATCH 079/122] doc: update release notes for v31.x --- doc/release-notes.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index db2c7690e36c..a1b45a0bd661 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -39,22 +39,46 @@ on them. It is not recommended to use Bitcoin Core on unsupported systems. Notable changes =============== +### Validation + +- #35209 validation: correct lifetime of precomputed tx data + ### P2P - #35032 net_processing: don't modify addrman for private broadcast connections +### Wallet + +- #35227 wallet: check the final BDB page LSN during migration + +### Build + +- #34228 depends: Unset SOURCE_DATE_EPOCH in gen_id script + ### Test - #34425 test: Fix all races after a socket is closed gracefully - #34863 test: Clean shutdown in Socks5Server +- #34991 test: fix feature_index_prune.py bug when using --usecli - #35080 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py +- #35218 test: fix P2SH script in coins cache fuzz target + +### Fuzz + +- #35289 fuzz: Fix timeout in txorphan + +### Docs + +- #35283 doc: mention -DWITH_ZMQ=ON in BSD build guides ### CI - #35202 ci: restore sockets in i686, no IPC job +- #35230 ci: Move --usecli --extended from i386 task to alpine task ### Misc +- #35044 contrib: Fix NameError in signet miner gbt() - #35175 multi_index: fix compilation failure with boost >= 1.91 Credits @@ -63,10 +87,16 @@ Credits Thanks to everyone who directly contributed to this release: - Cory Fields +- darosior - Greg Sanders +- Hennadii Stepanov +- junbyjun1238 - Lőrinc - MarcoFalke +- marcofleon - optout21 +- Pol Espinasa +- Torkel Rogstad - Vasil Dimov As well as to everyone that helped with translations on From 101071722ee839668ed70eafccfd2f22d636940d Mon Sep 17 00:00:00 2001 From: rkrux Date: Wed, 13 May 2026 17:06:51 +0530 Subject: [PATCH 080/122] psbt, test: remove address type restrictions in test Because the corresponding Taproot fields were added in PSBT in PR 22558, so these restrictions are no longer necessary. Github-Pull: #35279 Rebased-From: 81348576cc411a63da295a10a3846302419a18e0 --- test/functional/rpc_psbt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index cc443f6a7cf3..35c694d7454e 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -65,7 +65,7 @@ class PSBTTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 3 self.extra_args = [ - ["-walletrbf=1", "-addresstype=bech32", "-changetype=bech32"], #TODO: Remove address type restrictions once taproot has psbt extensions + ["-walletrbf=1"], ["-walletrbf=0", "-changetype=legacy"], [] ] From 671e6c2c33bc8b1eb04dc9b682ab81e9fb3b5de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Wed, 6 May 2026 14:27:13 +0200 Subject: [PATCH 081/122] wallet: use outpoint when estimating input size `CalculateMaximumSignedInputSize()` is passed the outpoint being sized, but that context was not used when estimating the signed input size. Pass the outpoint through so externally selected inputs are not underestimated. Co-authored-by: Antoine Poinsot Github-Pull: #35228 Rebased-From: cd8d3bd937b5515ea000408eb07d2ae3cd1aa417 --- src/wallet/spend.cpp | 2 +- src/wallet/test/spend_tests.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 3d1504264043..613375385d37 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -94,7 +94,7 @@ int CalculateMaximumSignedInputSize(const CTxOut& txout, const COutPoint outpoin if (!provider) return -1; if (const auto desc = InferDescriptor(txout.scriptPubKey, *provider)) { - if (const auto weight = MaxInputWeight(*desc, {}, coin_control, true, can_grind_r)) { + if (const auto weight = MaxInputWeight(*desc, CTxIn{outpoint}, coin_control, true, can_grind_r)) { return static_cast(GetVirtualTransactionSize(*weight, 0, 0)); } } diff --git a/src/wallet/test/spend_tests.cpp b/src/wallet/test/spend_tests.cpp index 866ffa48c208..218792ff0333 100644 --- a/src/wallet/test/spend_tests.cpp +++ b/src/wallet/test/spend_tests.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include +#include #include #include