From 6974e30bdd2b32197f543050c21f8fc2cca5a0b9 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 27 Aug 2024 13:16:06 -0400 Subject: [PATCH 01/86] build: Bump to 28.0rc1 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4221a58a2165..3bc6b13efc85 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 28) -define(_CLIENT_VERSION_MINOR, 99) +define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 0) -define(_CLIENT_VERSION_IS_RELEASE, false) +define(_CLIENT_VERSION_RC, 1) +define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2024) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) From 08887d3297175ca1eed800319b958d5d8247b885 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 27 Aug 2024 13:16:15 -0400 Subject: [PATCH 02/86] doc: Generate manpages --- doc/man/bitcoin-cli.1 | 190 ++++++++- doc/man/bitcoin-qt.1 | 849 ++++++++++++++++++++++++++++++++++++++- doc/man/bitcoin-tx.1 | 156 ++++++- doc/man/bitcoin-util.1 | 74 +++- doc/man/bitcoin-wallet.1 | 135 ++++++- doc/man/bitcoind.1 | 825 ++++++++++++++++++++++++++++++++++++- 6 files changed, 2211 insertions(+), 18 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 6bcad7006b08..914b8fe34920 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,5 +1,189 @@ -.TH BITCOIN-CLI "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-CLI "1" "August 2024" "bitcoin-cli v28.0.0rc1" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli +bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc1 +.SH SYNOPSIS +.B bitcoin-cli +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,-named \/\fR[\fI\,name=value\/\fR]... \fI\,Send command to Bitcoin Core (with named arguments)\/\fR +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,help List commands\/\fR +.br +.B bitcoin-cli +[\fI\,options\/\fR] \fI\,help Get help for a command\/\fR +.SH DESCRIPTION +Bitcoin Core RPC client version v28.0.0rc1 +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.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\-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. +.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\-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\-named\fR +.IP +Pass named instead of positional arguments (default: false) +.HP +\fB\-netinfo\fR +.IP +Get network peer connection information from the remote server. An +optional integer argument from 0 to 4 can be passed for different +peers listings (default: 0). Pass "help" for detailed help +documentation. +.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. +.SH COPYRIGHT +Copyright (C) 2009-2024 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" +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..f232266c4294 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,5 +1,848 @@ -.TH BITCOIN-QT "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-QT "1" "August 2024" "bitcoin-qt v28.0.0rc1" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt +bitcoin-qt \- manual page for bitcoin-qt v28.0.0rc1 +.SH SYNOPSIS +.B bitcoin-qt +[\fI\,command-line options\/\fR] [\fI\,URI\/\fR] +.SH DESCRIPTION +Bitcoin Core version v28.0.0rc1 +.PP +Optional URI is a Bitcoin address in BIP21 URI format. +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.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: +000000000000000000011c5890365bdbe5d25b97ce0057589acaef4f1a57263f, +testnet3: +000000000000000465b1a66c9f386308e8c75acef9201f3f577811da09fc90ad, +testnet4: +000000005be348057db991fa5d89fe7c4695b667cfb311391a8db374b6f681fd, +signet: +0000014aad1d58dddcb964dd749b073374c6306e716b22f573a2efe68d414539) +.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 (4 to 16384, default: 450). In +addition, unused mempool memory is shared for 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\-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\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.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\-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 (default: +ip_asn.map). Relative paths will be prefixed by the net\-specific +datadir location. +.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 (default: +none) +.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. +.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 NAT\-PMP to map the listening port (default: 0) +.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). +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable (default: +disabled). May be a local file path prefixed with 'unix:' if the +proxy supports it. +.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\-upnp\fR +.IP +Use UPnP to map the listening port (default: 0) +.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", or +"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", or +"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\-paytxfee=\fR +.IP +Fee rate (in BTC/kvB) to add to transactions you send (default: 0.00) +.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 +If paytxfee is not set, 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, leveldb, libevent, mempool, +mempoolrej, net, 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 debug 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 scriptPubKey is of +this size or less (default: 83) +.HP +\fB\-mempoolfullrbf\fR +.IP +(DEPRECATED) Accept transaction replace\-by\-fee without requiring +replaceability signaling (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kvB) smaller than this are considered zero fee for +relaying, mining and transaction creation (default: 0.00001) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay transactions creating non\-P2SH multisig outputs (default: 1) +.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\-blockmaxweight=\fR +.IP +Set maximum BIP141 block weight (default: 3996000) +.HP +\fB\-blockmintxfee=\fR +.IP +Set lowest fee rate (in BTC/kvB) for transactions to be included in +block creation. (default: 0.00001) +.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). 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: 4) +.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-2024 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" +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..5da1ffe3c5e6 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,5 +1,155 @@ -.TH BITCOIN-TX "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-TX "1" "August 2024" "bitcoin-tx v28.0.0rc1" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx +bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc1 +.SH SYNOPSIS +.B bitcoin-tx +[\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR +.br +.B bitcoin-tx +[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR +.SH DESCRIPTION +Bitcoin Core bitcoin\-tx utility version v28.0.0rc1 +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.HP +\fB\-create\fR +.IP +Create new, empty TX. +.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-2024 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" +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..b1319cafc017 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,5 +1,73 @@ -.TH BITCOIN-UTIL "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-UTIL "1" "August 2024" "bitcoin-util v28.0.0rc1" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util +bitcoin-util \- manual page for bitcoin-util v28.0.0rc1 +.SH SYNOPSIS +.B bitcoin-util +[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR +.SH DESCRIPTION +Bitcoin Core bitcoin\-util utility version v28.0.0rc1 +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.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-2024 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" +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..40a2bd68bf33 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,5 +1,134 @@ -.TH BITCOIN-WALLET "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIN-WALLET "1" "August 2024" "bitcoin-wallet v28.0.0rc1" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet +bitcoin-wallet \- manual page for bitcoin-wallet v28.0.0rc1 +.SH DESCRIPTION +Bitcoin Core bitcoin\-wallet version v28.0.0rc1 +.PP +bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. +By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir. +To change the target wallet, use the \fB\-datadir\fR, \fB\-wallet\fR and \fB\-regtest\fR/\-signet/\-testnet/\-testnet4 arguments. +.SS "Usage:" +.IP +bitcoin\-wallet [options] +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-descriptors\fR +.IP +Create descriptors wallet. Only for 'create' +.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\-format=\fR +.IP +The format of the wallet file to create. Either "bdb" or "sqlite". Only +used with 'createfromdump' +.HP +\fB\-legacy\fR +.IP +Create legacy wallet. Only for 'create' +.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). +.HP +\fB\-withinternalbdb\fR +.IP +Use the internal Berkeley DB parser when dumping a Berkeley DB wallet +file (default: false) +.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 new 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 +.IP +salvage +.IP +Attempt to recover private keys from a corrupt wallet. Warning: +\&'salvage' is experimental. +.SH COPYRIGHT +Copyright (C) 2009-2024 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" +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..c370a45a68de 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,5 +1,824 @@ -.TH BITCOIND "1" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH BITCOIND "1" "August 2024" "bitcoind v28.0.0rc1" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind +bitcoind \- manual page for bitcoind v28.0.0rc1 +.SH SYNOPSIS +.B bitcoind +[\fI\,options\/\fR] \fI\,Start Bitcoin Core\/\fR +.SH DESCRIPTION +Bitcoin Core version v28.0.0rc1 +.SH OPTIONS +.HP +\-? +.IP +Print this help message and exit +.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: +000000000000000000011c5890365bdbe5d25b97ce0057589acaef4f1a57263f, +testnet3: +000000000000000465b1a66c9f386308e8c75acef9201f3f577811da09fc90ad, +testnet4: +000000005be348057db991fa5d89fe7c4695b667cfb311391a8db374b6f681fd, +signet: +0000014aad1d58dddcb964dd749b073374c6306e716b22f573a2efe68d414539) +.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 (4 to 16384, default: 450). In +addition, unused mempool memory is shared for 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\-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\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.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\-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 (default: +ip_asn.map). Relative paths will be prefixed by the net\-specific +datadir location. +.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 (default: +none) +.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. +.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 NAT\-PMP to map the listening port (default: 0) +.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). +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable (default: +disabled). May be a local file path prefixed with 'unix:' if the +proxy supports it. +.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\-upnp\fR +.IP +Use UPnP to map the listening port (default: 0) +.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", or +"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", or +"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\-paytxfee=\fR +.IP +Fee rate (in BTC/kvB) to add to transactions you send (default: 0.00) +.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 +If paytxfee is not set, 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, leveldb, libevent, mempool, +mempoolrej, net, 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 debug 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 scriptPubKey is of +this size or less (default: 83) +.HP +\fB\-mempoolfullrbf\fR +.IP +(DEPRECATED) Accept transaction replace\-by\-fee without requiring +replaceability signaling (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kvB) smaller than this are considered zero fee for +relaying, mining and transaction creation (default: 0.00001) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay transactions creating non\-P2SH multisig outputs (default: 1) +.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\-blockmaxweight=\fR +.IP +Set maximum BIP141 block weight (default: 3996000) +.HP +\fB\-blockmintxfee=\fR +.IP +Set lowest fee rate (in BTC/kvB) for transactions to be included in +block creation. (default: 0.00001) +.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). 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: 4) +.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-2024 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" +bitcoind(1), bitcoin-cli(1), bitcoin-tx(1), bitcoin-wallet(1), bitcoin-util(1), bitcoin-qt(1) From 27b63004851c1c2bb14387fc537052a27265145f Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 27 Aug 2024 13:16:17 -0400 Subject: [PATCH 03/86] examples: Generate example bitcoin.conf --- share/examples/bitcoin.conf | 708 +++++++++++++++++++++++++++++++++++- 1 file changed, 707 insertions(+), 1 deletion(-) diff --git a/share/examples/bitcoin.conf b/share/examples/bitcoin.conf index 5bee4bf92e73..1b768924ed56 100644 --- a/share/examples/bitcoin.conf +++ b/share/examples/bitcoin.conf @@ -1 +1,707 @@ -# 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: +# 000000000000000000011c5890365bdbe5d25b97ce0057589acaef4f1a57263f, +# testnet3: +# 000000000000000465b1a66c9f386308e8c75acef9201f3f577811da09fc90ad, +# testnet4: +# 000000005be348057db991fa5d89fe7c4695b667cfb311391a8db374b6f681fd, +# signet: +# 0000014aad1d58dddcb964dd749b073374c6306e716b22f573a2efe68d414539) +#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 (4 to 16384, default: 450). In +# addition, unused mempool memory is shared for 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= + +# Keep at most unconnectable transactions in memory (default: 100) +#maxorphantx= + +# 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 + +# 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 (default: +# ip_asn.map). Relative paths will be prefixed by the net-specific +# datadir location. +#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 (default: +# none) +#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. +#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 NAT-PMP to map the listening port (default: 0) +#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). +#port= + +# Connect through SOCKS5 proxy, set -noproxy to disable (default: +# disabled). May be a local file path prefixed with 'unix:' if the +# proxy supports it. +#proxy= + +# 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= + +# Use UPnP to map the listening port (default: 0) +#upnp=1 + +# 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", or +# "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", or +# "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= + +# Fee rate (in BTC/kvB) to add to transactions you send (default: 0.00) +#paytxfee= + +# External signing tool, see doc/external-signer.md +#signer= + +# Spend unconfirmed change when sending transactions (default: 1) +#spendzeroconfchange=1 + +# If paytxfee is not set, include enough fee so transactions begin +# confirmation on average within n blocks (default: 6) +#txconfirmtarget= + +# 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, leveldb, libevent, mempool, +# mempoolrej, net, 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= + +# Print help message with debugging options and exit +#help-debug=1 + +# Include IP addresses in debug 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 scriptPubKey is of +# this size or less (default: 83) +#datacarriersize=1 + +# (DEPRECATED) Accept transaction replace-by-fee without requiring +# replaceability signaling (default: 1) +#mempoolfullrbf=1 + +# Fees (in BTC/kvB) smaller than this are considered zero fee for +# relaying, mining and transaction creation (default: 0.00001) +#minrelaytxfee= + +# Relay transactions creating non-P2SH multisig outputs (default: 1) +#permitbaremultisig=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 maximum BIP141 block weight (default: 3996000) +#blockmaxweight= + +# Set lowest fee rate (in BTC/kvB) for transactions to be included in +# block creation. (default: 0.00001) +#blockmintxfee= + + +### 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). 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: 4) +#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 testnet +[test] + +# Options for signet +[signet] + +# Options for regtest +[regtest] From bd45bc611b8b245d0a6bc8e0f5a224b0642f06d0 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 27 Aug 2024 13:16:19 -0400 Subject: [PATCH 04/86] doc: Point release notes to 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 96e28c376331..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 extensively tested on operating systems -using the Linux Kernel 3.17+, macOS 11.0+, and Windows 7 and newer. 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://www.transifex.com/bitcoin/bitcoin/). diff --git a/doc/release-notes.md b/doc/release-notes.md new file mode 100644 index 000000000000..7a587cfec90b --- /dev/null +++ b/doc/release-notes.md @@ -0,0 +1 @@ +See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/28.0-Release-Notes-Draft From 5577d5a3c0904a4805e7b768cb60144daa2a0854 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sun, 25 Aug 2024 20:57:22 +0200 Subject: [PATCH 05/86] test: fix `TestShell` initialization (late follow-up for #30463) Github-Pull: #30714 Rebased-From: bd7ce05f9d9d21903163a2bd9dd2df3ed3990c3e --- test/functional/test_framework/test_shell.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/functional/test_framework/test_shell.py b/test/functional/test_framework/test_shell.py index 09ccec28a1aa..e232430507b7 100644 --- a/test/functional/test_framework/test_shell.py +++ b/test/functional/test_framework/test_shell.py @@ -2,9 +2,11 @@ # Copyright (c) 2019-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. +import pathlib from test_framework.test_framework import BitcoinTestFramework + class TestShell: """Wrapper Class for BitcoinTestFramework. @@ -67,7 +69,13 @@ def __new__(cls): # This implementation enforces singleton pattern, and will return the # previously initialized instance if available if not TestShell.instance: - TestShell.instance = TestShell.__TestShell() + # BitcoinTestFramework instances are supposed to be constructed with the path + # of the calling test in order to find shared data like configuration and the + # cache. Since TestShell is meant for interactive use, there is no concrete + # test; passing a dummy name is fine though, as only the containing directory + # is relevant for successful initialization. + tests_directory = pathlib.Path(__file__).resolve().parent.parent + TestShell.instance = TestShell.__TestShell(tests_directory / "testshell_dummy.py") TestShell.instance.running = False return TestShell.instance From 342baabaffc385dc44a44f6d8cf32728a25a0356 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 30 Aug 2024 12:05:13 +0200 Subject: [PATCH 06/86] test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py Github-Pull: #30761 Rebased-From: fa247e6e8c7fddf9e3461c3e2e6f5fade0fe64cf --- test/functional/p2p_headers_sync_with_minchainwork.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/functional/p2p_headers_sync_with_minchainwork.py b/test/functional/p2p_headers_sync_with_minchainwork.py index 9055232cf316..6e7b4b399e51 100755 --- a/test/functional/p2p_headers_sync_with_minchainwork.py +++ b/test/functional/p2p_headers_sync_with_minchainwork.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022 The Bitcoin Core developers +# Copyright (c) 2019-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test that we reject low difficulty headers to prevent our block tree from filling up with useless bloat""" @@ -21,6 +21,8 @@ from test_framework.util import assert_equal +import time + NODE1_BLOCKS_REQUIRED = 15 NODE2_BLOCKS_REQUIRED = 2047 @@ -48,6 +50,10 @@ def reconnect_all(self): self.connect_nodes(0, 2) self.connect_nodes(0, 3) + def mocktime_all(self, time): + for n in self.nodes: + n.setmocktime(time) + def test_chains_sync_when_long_enough(self): self.log.info("Generate blocks on the node with no required chainwork, and verify nodes 1 and 2 have no new headers in their headers tree") with self.nodes[1].assert_debug_log(expected_msgs=["[net] Ignoring low-work chain (height=14)"]), self.nodes[2].assert_debug_log(expected_msgs=["[net] Ignoring low-work chain (height=14)"]), self.nodes[3].assert_debug_log(expected_msgs=["Synchronizing blockheaders, height: 14"]): @@ -149,7 +155,9 @@ def test_large_reorgs_can_succeed(self): self.reconnect_all() + self.mocktime_all(int(time.time())) # Temporarily hold time to avoid internal timeouts self.sync_blocks(timeout=300) # Ensure tips eventually agree + self.mocktime_all(0) def run_test(self): From 199bb09d88e28d951c5068eb65643390dbedd066 Mon Sep 17 00:00:00 2001 From: Jadi Date: Mon, 2 Sep 2024 16:18:33 +0330 Subject: [PATCH 07/86] test: fixing failing system_tests/run_command under some Locales the run_command test under system_tests fails if the locale is anything other than English ones because results such as "No such file or directory" will be different under Non-English locales. On the old version, a `ls nonexistingfile` was used to generate the error output which is not ideal. In the current version we are using a Python one-liner to generate a non 0 zero return value and "err" on stderr and check the expected value against this. fixes #30608 Github-Pull: #30788 Rebased-From: ae48a22a3df086fb59843b7b814619ed5df7557b --- src/test/system_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index baa759e42c26..07d15f5552bb 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -54,8 +54,8 @@ BOOST_AUTO_TEST_CASE(run_command) } { // Return non-zero exit code, with error message for stderr - const std::string command{"ls nosuchfile"}; - const std::string expected{"No such file or directory"}; + const std::string command{"python3 -c 'import sys; print(\"err\", file=sys.stderr); sys.exit(2)'"}; + const std::string expected{"err"}; BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) { const std::string what(e.what()); BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned", command)) != std::string::npos); From b2a137929a20baed161988e24de592b1f59c0096 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 28 Aug 2024 17:35:29 +0100 Subject: [PATCH 08/86] depends: build libevent with -D_GNU_SOURCE Currently, builds of libevent in depends, using CMake, fail on some systems, like Alpine, with the following: ```bash /bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_': /bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function) 456 | if (sig < 0 || sig >= NSIG) ``` From what I can tell the `_GNU_SOURCE` "detection" in libevents CMake build system, never? really worked, and it's not clear what a nice fix is. For now, always use `_GNU_SOURCE` when building libevent in depends. Github-Pull: #30743 Rebased-From: 556775408797d8e27154c3edaf139820b0979cce --- depends/packages/libevent.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 24e940eaa0dc..4c05e8a0a742 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -14,6 +14,7 @@ define $(package)_set_vars $(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON $(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC + $(package)_cppflags += -D_GNU_SOURCE $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 ifeq ($(NO_HARDEN),) From 598415bcc1d1f8d516159a1501dda24e8d7c2ea9 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 6 Sep 2024 16:03:48 +0200 Subject: [PATCH 09/86] test: Work around boost compilation error Github-Pull: bitcoin/bitcoin#30834 Rebased-From: fa9d7d5d205ada8915cbbc29599ab8e7bf1fffe0 --- src/test/validation_chainstatemanager_tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp index cf819f8751dd..214a3290a21e 100644 --- a/src/test/validation_chainstatemanager_tests.cpp +++ b/src/test/validation_chainstatemanager_tests.cpp @@ -152,10 +152,10 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_rebalance_caches, TestChain100Setup) manager.MaybeRebalanceCaches(); } - BOOST_CHECK_CLOSE(c1.m_coinstip_cache_size_bytes, max_cache * 0.05, 1); - BOOST_CHECK_CLOSE(c1.m_coinsdb_cache_size_bytes, max_cache * 0.05, 1); - BOOST_CHECK_CLOSE(c2.m_coinstip_cache_size_bytes, max_cache * 0.95, 1); - BOOST_CHECK_CLOSE(c2.m_coinsdb_cache_size_bytes, max_cache * 0.95, 1); + BOOST_CHECK_CLOSE(double(c1.m_coinstip_cache_size_bytes), max_cache * 0.05, 1); + BOOST_CHECK_CLOSE(double(c1.m_coinsdb_cache_size_bytes), max_cache * 0.05, 1); + BOOST_CHECK_CLOSE(double(c2.m_coinstip_cache_size_bytes), max_cache * 0.95, 1); + BOOST_CHECK_CLOSE(double(c2.m_coinsdb_cache_size_bytes), max_cache * 0.95, 1); } struct SnapshotTestSetup : TestChain100Setup { From c6b5db1d591f0984cd0e6918970a9e4fc32595d3 Mon Sep 17 00:00:00 2001 From: furszy Date: Tue, 3 Sep 2024 11:00:55 -0300 Subject: [PATCH 10/86] assumeUTXO: fix peers disconnection during sync Because AssumeUTXO nodes prioritize tip synchronization, they relay their local address through the network before completing the background chain sync. This, combined with the advertising of full-node service (NODE_NETWORK), can result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing) and requesting an historical block the node does not have. This behavior leads to an abrupt disconnection due to perceived unresponsiveness (lack of response) from the AssumeUTXO node. This lack of response occurs because nodes ignore getdata requests when they do not have the block data available (further discussion can be found in PR 30385). Fix this by refraining from signaling full-node service support while the background chain is being synced. During this period, the node will only signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK') support will be re-enabled once the background chain sync is completed. Github-Pull: bitcoin/bitcoin#30807 Rebased-From: 6d5812e5c852c233bd7ead2ceef051f8567619ed --- src/init.cpp | 16 +++++++++--- src/net.cpp | 5 ++-- src/net.h | 10 ++++++-- src/rpc/blockchain.cpp | 7 ++++++ src/validation.cpp | 4 +-- src/validation.h | 2 +- test/functional/feature_assumeutxo.py | 36 +++++++++++++++++++++++++++ 7 files changed, 70 insertions(+), 10 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index faaf3353d070..2572f9d78c4e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1558,7 +1558,12 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) // This is defined and set here instead of inline in validation.h to avoid a hard // dependency between validation and index/base, since the latter is not in // libbitcoinkernel. - chainman.restart_indexes = [&node]() { + chainman.snapshot_download_completed = [&node]() { + if (!node.chainman->m_blockman.IsPruneMode()) { + LogPrintf("[snapshot] re-enabling NODE_NETWORK services\n"); + node.connman->AddLocalServices(NODE_NETWORK); + } + LogPrintf("[snapshot] restarting indexes\n"); // Drain the validation interface queue to ensure that the old indexes @@ -1695,8 +1700,13 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) } } } else { - LogPrintf("Setting NODE_NETWORK on non-prune mode\n"); - nLocalServices = ServiceFlags(nLocalServices | NODE_NETWORK); + // Prior to setting NODE_NETWORK, check if we can provide historical blocks. + if (!WITH_LOCK(chainman.GetMutex(), return chainman.BackgroundSyncInProgress())) { + LogPrintf("Setting NODE_NETWORK on non-prune mode\n"); + nLocalServices = ServiceFlags(nLocalServices | NODE_NETWORK); + } else { + LogPrintf("Running node in NODE_NETWORK_LIMITED mode until snapshot background sync completes\n"); + } } // ********************************************************* Step 11: import blocks diff --git a/src/net.cpp b/src/net.cpp index e1206745a425..05b98d1029b7 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1789,7 +1789,8 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr&& sock, const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end(); // The V2Transport transparently falls back to V1 behavior when an incoming V1 connection is // detected, so use it whenever we signal NODE_P2P_V2. - const bool use_v2transport(nLocalServices & NODE_P2P_V2); + ServiceFlags local_services = GetLocalServices(); + const bool use_v2transport(local_services & NODE_P2P_V2); CNode* pnode = new CNode(id, std::move(sock), @@ -1807,7 +1808,7 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr&& sock, .use_v2transport = use_v2transport, }); pnode->AddRef(); - m_msgproc->InitializeNode(*pnode, nLocalServices); + m_msgproc->InitializeNode(*pnode, local_services); { LOCK(m_nodes_mutex); m_nodes.push_back(pnode); diff --git a/src/net.h b/src/net.h index beec58c38987..b04b73e696fa 100644 --- a/src/net.h +++ b/src/net.h @@ -1221,6 +1221,11 @@ class CConnman //! that peer during `net_processing.cpp:PushNodeVersion()`. ServiceFlags GetLocalServices() const; + //! Updates the local services that this node advertises to other peers + //! during connection handshake. + void AddLocalServices(ServiceFlags services) { nLocalServices = ServiceFlags(nLocalServices | services); }; + void RemoveLocalServices(ServiceFlags services) { nLocalServices = ServiceFlags(nLocalServices & ~services); } + uint64_t GetMaxOutboundTarget() const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex); std::chrono::seconds GetMaxOutboundTimeframe() const; @@ -1460,11 +1465,12 @@ class CConnman * This data is replicated in each Peer instance we create. * * This data is not marked const, but after being set it should not - * change. + * change. Unless AssumeUTXO is started, in which case, the peer + * will be limited until the background chain sync finishes. * * \sa Peer::our_services */ - ServiceFlags nLocalServices; + std::atomic nLocalServices; std::unique_ptr semOutbound; std::unique_ptr semAddnode; diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index b449444aff42..8b8576ab88d8 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2866,6 +2866,13 @@ static RPCHelpMan loadtxoutset() throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("Unable to load UTXO snapshot: %s. (%s)", util::ErrorString(activation_result).original, path.utf8string())); } + // Because we can't provide historical blocks during tip or background sync. + // Update local services to reflect we are a limited peer until we are fully sync. + node.connman->RemoveLocalServices(NODE_NETWORK); + // Setting the limited state is usually redundant because the node can always + // provide the last 288 blocks, but it doesn't hurt to set it. + node.connman->AddLocalServices(NODE_NETWORK_LIMITED); + CBlockIndex& snapshot_index{*CHECK_NONFATAL(*activation_result)}; UniValue result(UniValue::VOBJ); diff --git a/src/validation.cpp b/src/validation.cpp index 8f75b2e30a0c..a6b7f3d36148 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3574,8 +3574,8 @@ bool Chainstate::ActivateBestChain(BlockValidationState& state, std::shared_ptr< // // This cannot be done while holding cs_main (within // MaybeCompleteSnapshotValidation) or a cs_main deadlock will occur. - if (m_chainman.restart_indexes) { - m_chainman.restart_indexes(); + if (m_chainman.snapshot_download_completed) { + m_chainman.snapshot_download_completed(); } break; } diff --git a/src/validation.h b/src/validation.h index f905d6e62403..bc9bacf7cebf 100644 --- a/src/validation.h +++ b/src/validation.h @@ -976,7 +976,7 @@ class ChainstateManager //! Function to restart active indexes; set dynamically to avoid a circular //! dependency on `base/index.cpp`. - std::function restart_indexes = std::function(); + std::function snapshot_download_completed = std::function(); const CChainParams& GetParams() const { return m_options.chainparams; } const Consensus::Params& GetConsensus() const { return m_options.chainparams.GetConsensus(); } diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index a212704311d3..058991079579 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -247,6 +247,11 @@ def test_snapshot_not_on_most_work_chain(self, dump_output_path): node1.submitheader(main_block1) node1.submitheader(main_block2) + def assert_only_network_limited_service(self, node): + node_services = node.getnetworkinfo()['localservicesnames'] + assert 'NETWORK' not in node_services + assert 'NETWORK_LIMITED' in node_services + def run_test(self): """ Bring up two (disconnected) nodes, mine some new blocks on the first, @@ -343,6 +348,9 @@ def run_test(self): self.test_snapshot_block_invalidated(dump_output['path']) self.test_snapshot_not_on_most_work_chain(dump_output['path']) + # Prune-node sanity check + assert 'NETWORK' not in n1.getnetworkinfo()['localservicesnames'] + self.log.info(f"Loading snapshot into second node from {dump_output['path']}") # This node's tip is on an ancestor block of the snapshot, which should # be the normal case @@ -350,6 +358,10 @@ def run_test(self): assert_equal(loaded['coins_loaded'], SNAPSHOT_BASE_HEIGHT) assert_equal(loaded['base_height'], SNAPSHOT_BASE_HEIGHT) + self.log.info("Confirm that local services remain unchanged") + # Since n1 is a pruned node, the 'NETWORK' service flag must always be unset. + self.assert_only_network_limited_service(n1) + self.log.info("Check that UTXO-querying RPCs operate on snapshot chainstate") snapshot_hash = loaded['tip_hash'] snapshot_num_coins = loaded['coins_loaded'] @@ -453,6 +465,9 @@ def check_tx_counts(final: bool) -> None: 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.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 @@ -469,6 +484,9 @@ def check_tx_counts(final: bool) -> None: 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 + self.assert_only_network_limited_service(n1) + # Send snapshot block to n1 out of order. This makes the test less # realistic because normally the snapshot block is one of the last # blocks downloaded, but its useful to test because it triggers more @@ -487,6 +505,10 @@ def check_tx_counts(final: bool) -> None: self.log.info("Ensuring background validation completes") self.wait_until(lambda: len(n1.getchainstates()['chainstates']) == 1) + # Since n1 is a pruned node, it will not signal NODE_NETWORK after + # completing the background sync. + self.assert_only_network_limited_service(n1) + # Ensure indexes have synced. completed_idx_state = { 'basic block filter index': COMPLETE_IDX, @@ -517,12 +539,18 @@ def check_tx_counts(final: bool) -> None: self.log.info("-- Testing all indexes + reindex") assert_equal(n2.getblockcount(), START_HEIGHT) + assert 'NETWORK' in n2.getnetworkinfo()['localservicesnames'] # sanity check self.log.info(f"Loading snapshot into third node from {dump_output['path']}") loaded = n2.loadtxoutset(dump_output['path']) assert_equal(loaded['coins_loaded'], SNAPSHOT_BASE_HEIGHT) assert_equal(loaded['base_height'], SNAPSHOT_BASE_HEIGHT) + # Even though n2 is a full node, it will unset the 'NETWORK' service flag during snapshot loading. + # This indicates other peers that the node will temporarily not provide historical blocks. + self.log.info("Check node2 updated the local services during snapshot load") + self.assert_only_network_limited_service(n2) + for reindex_arg in ['-reindex=1', '-reindex-chainstate=1']: self.log.info(f"Check that restarting with {reindex_arg} will delete the snapshot chainstate") self.restart_node(2, extra_args=[reindex_arg, *self.extra_args[2]]) @@ -546,6 +574,11 @@ def check_tx_counts(final: bool) -> None: msg = "Unable to load UTXO snapshot: Can't activate a snapshot-based chainstate more than once" assert_raises_rpc_error(-32603, msg, n2.loadtxoutset, dump_output['path']) + # Upon restart, the node must stay in 'limited' mode until the background + # chain sync completes. + self.restart_node(2, extra_args=self.extra_args[2]) + self.assert_only_network_limited_service(n2) + self.connect_nodes(0, 2) self.wait_until(lambda: n2.getchainstates()['chainstates'][-1]['blocks'] == FINAL_HEIGHT) self.sync_blocks(nodes=(n0, n2)) @@ -553,6 +586,9 @@ def check_tx_counts(final: bool) -> None: self.log.info("Ensuring background validation completes") self.wait_until(lambda: len(n2.getchainstates()['chainstates']) == 1) + # Once background chain sync completes, the full node must start offering historical blocks again. + assert {'NETWORK', 'NETWORK_LIMITED'}.issubset(n2.getnetworkinfo()['localservicesnames']) + completed_idx_state = { 'basic block filter index': COMPLETE_IDX, 'coinstatsindex': COMPLETE_IDX, From b329ed739b7311b3b47cae1ef8d576a90e0a36a1 Mon Sep 17 00:00:00 2001 From: furszy Date: Tue, 9 Jul 2024 11:07:29 -0300 Subject: [PATCH 11/86] test: add coverage for assumeUTXO honest peers disconnection Exercising and verifying the following points: 1. An IBD node can sync headers from an AssumeUTXO node at any time. 2. IBD nodes do not request historical blocks from AssumeUTXO nodes while they are syncing the background-chain. 3. The assumeUTXO node dynamically adjusts the network services it offers according to its state. 4. IBD nodes can fully sync from AssumeUTXO nodes after they finish the background-chain sync. Github-Pull: bitcoin/bitcoin#30807 Rebased-From: 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac --- test/functional/feature_assumeutxo.py | 78 ++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index 058991079579..b7d8192430b1 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -9,6 +9,7 @@ The assumeutxo value generated and used here is committed to in `CRegTestParams::m_assumeutxo_data` in `src/kernel/chainparams.cpp`. """ +import time from shutil import rmtree from dataclasses import dataclass @@ -16,12 +17,21 @@ create_block, create_coinbase ) -from test_framework.messages import tx_from_hex +from test_framework.messages import ( + CBlockHeader, + from_hex, + msg_headers, + tx_from_hex +) +from test_framework.p2p import ( + P2PInterface, +) from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_approx, assert_equal, assert_raises_rpc_error, + try_rpc, ) from test_framework.wallet import ( getnewdestination, @@ -247,6 +257,69 @@ def test_snapshot_not_on_most_work_chain(self, dump_output_path): node1.submitheader(main_block1) node1.submitheader(main_block2) + def test_sync_from_assumeutxo_node(self, snapshot): + """ + This test verifies that: + 1. An IBD node can sync headers from an AssumeUTXO node at any time. + 2. IBD nodes do not request historical blocks from AssumeUTXO nodes while they are syncing the background-chain. + 3. The assumeUTXO node dynamically adjusts the network services it offers according to its state. + 4. IBD nodes can fully sync from AssumeUTXO nodes after they finish the background-chain sync. + """ + self.log.info("Testing IBD-sync from assumeUTXO node") + # Node2 starts clean and loads the snapshot. + # Node3 starts clean and seeks to sync-up from snapshot_node. + miner = self.nodes[0] + snapshot_node = self.nodes[2] + ibd_node = self.nodes[3] + + # Start test fresh by cleaning up node directories + for node in (snapshot_node, ibd_node): + self.stop_node(node.index) + rmtree(node.chain_path) + self.start_node(node.index, extra_args=self.extra_args[node.index]) + + # Sync-up headers chain on snapshot_node to load snapshot + headers_provider_conn = snapshot_node.add_p2p_connection(P2PInterface()) + headers_provider_conn.wait_for_getheaders() + msg = msg_headers() + for block_num in range(1, miner.getblockcount()+1): + msg.headers.append(from_hex(CBlockHeader(), miner.getblockheader(miner.getblockhash(block_num), verbose=False))) + headers_provider_conn.send_message(msg) + + # Ensure headers arrived + default_value = {'status': ''} # No status + headers_tip_hash = miner.getbestblockhash() + self.wait_until(lambda: next(filter(lambda x: x['hash'] == headers_tip_hash, snapshot_node.getchaintips()), default_value)['status'] == "headers-only") + snapshot_node.disconnect_p2ps() + + # Load snapshot + snapshot_node.loadtxoutset(snapshot['path']) + + # Connect nodes and verify the ibd_node can sync-up the headers-chain from the snapshot_node + self.connect_nodes(ibd_node.index, snapshot_node.index) + snapshot_block_hash = snapshot['base_hash'] + self.wait_until(lambda: next(filter(lambda x: x['hash'] == snapshot_block_hash, ibd_node.getchaintips()), default_value)['status'] == "headers-only") + + # Once the headers-chain is synced, the ibd_node must avoid requesting historical blocks from the snapshot_node. + # If it does request such blocks, the snapshot_node will ignore requests it cannot fulfill, causing the ibd_node + # to stall. This stall could last for up to 10 min, ultimately resulting in an abrupt disconnection due to the + # ibd_node's perceived unresponsiveness. + time.sleep(3) # Sleep here because we can't detect when a node avoids requesting blocks from other peer. + assert_equal(len(ibd_node.getpeerinfo()[0]['inflight']), 0) + + # Now disconnect nodes and finish background chain sync + self.disconnect_nodes(ibd_node.index, snapshot_node.index) + self.connect_nodes(snapshot_node.index, miner.index) + self.sync_blocks(nodes=(miner, snapshot_node)) + # Check the base snapshot block was stored and ensure node signals full-node service support + self.wait_until(lambda: not try_rpc(-1, "Block not found", snapshot_node.getblock, snapshot_block_hash)) + assert 'NETWORK' in snapshot_node.getnetworkinfo()['localservicesnames'] + + # Now the snapshot_node is sync, verify the ibd_node can sync from it + self.connect_nodes(snapshot_node.index, ibd_node.index) + assert 'NETWORK' in ibd_node.getpeerinfo()[0]['servicesnames'] + self.sync_blocks(nodes=(ibd_node, snapshot_node)) + def assert_only_network_limited_service(self, node): node_services = node.getnetworkinfo()['localservicesnames'] assert 'NETWORK' not in node_services @@ -623,6 +696,9 @@ def check_tx_counts(final: bool) -> None: self.test_snapshot_in_a_divergent_chain(dump_output['path']) + # The following test cleans node2 and node3 chain directories. + self.test_sync_from_assumeutxo_node(snapshot=dump_output) + @dataclass class Block: hash: str From d39262e5d41e92d22e020d283ddb6e4e406647b2 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Thu, 12 Sep 2024 16:16:54 +0200 Subject: [PATCH 12/86] test: Wait for local services to update in feature_assumeutxo Github-Pull: bitcoin/bitcoin#30880 Rebased-From: 19f4a7c95a99162122068d4badffeea240967a65 --- test/functional/feature_assumeutxo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index b7d8192430b1..91957fd17eec 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -313,9 +313,9 @@ def test_sync_from_assumeutxo_node(self, snapshot): self.sync_blocks(nodes=(miner, snapshot_node)) # Check the base snapshot block was stored and ensure node signals full-node service support self.wait_until(lambda: not try_rpc(-1, "Block not found", snapshot_node.getblock, snapshot_block_hash)) - assert 'NETWORK' in snapshot_node.getnetworkinfo()['localservicesnames'] + self.wait_until(lambda: 'NETWORK' in snapshot_node.getnetworkinfo()['localservicesnames']) - # Now the snapshot_node is sync, verify the ibd_node can sync from it + # Now that the snapshot_node is synced, verify the ibd_node can sync from it self.connect_nodes(snapshot_node.index, ibd_node.index) assert 'NETWORK' in ibd_node.getpeerinfo()[0]['servicesnames'] self.sync_blocks(nodes=(ibd_node, snapshot_node)) @@ -660,7 +660,7 @@ def check_tx_counts(final: bool) -> None: self.wait_until(lambda: len(n2.getchainstates()['chainstates']) == 1) # Once background chain sync completes, the full node must start offering historical blocks again. - assert {'NETWORK', 'NETWORK_LIMITED'}.issubset(n2.getnetworkinfo()['localservicesnames']) + self.wait_until(lambda: {'NETWORK', 'NETWORK_LIMITED'}.issubset(n2.getnetworkinfo()['localservicesnames'])) completed_idx_state = { 'basic block filter index': COMPLETE_IDX, From 674dded8756ddf9b731f3149c66dd044090e4c8e Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 12 Sep 2024 18:50:43 -0300 Subject: [PATCH 13/86] gui: fix crash when closing wallet The crash occurs because 'WalletController::removeAndDeleteWallet' is called twice for the same wallet model: first in the GUI's button connected function 'WalletController::closeWallet', and then again when the backend emits the 'WalletModel::unload' signal. This causes the issue because 'removeAndDeleteWallet' inlines an erase(std::remove()). So, if 'std::remove' returns an iterator to the end (indicating the element wasn't found because it was already erased), the subsequent call to 'erase' leads to an undefined behavior. Github-Pull: bitcoin-core/gui#835 Rebased-From: a965f2bc07a3588f8c2b8d6a542961562e3f5d0e --- src/qt/walletcontroller.cpp | 18 ++++++++++-------- src/qt/walletcontroller.h | 3 +++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index 512ea8a1dc11..dd093e984a37 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -79,6 +79,14 @@ std::map> WalletController::listWallet return wallets; } +void WalletController::removeWallet(WalletModel* wallet_model) +{ + // Once the wallet is successfully removed from the node, the model will emit the 'WalletModel::unload' signal. + // This signal is already connected and will complete the removal of the view from the GUI. + // Look at 'WalletController::getOrCreateWallet' for the signal connection. + wallet_model->wallet().remove(); +} + void WalletController::closeWallet(WalletModel* wallet_model, QWidget* parent) { QMessageBox box(parent); @@ -89,10 +97,7 @@ void WalletController::closeWallet(WalletModel* wallet_model, QWidget* parent) box.setDefaultButton(QMessageBox::Yes); if (box.exec() != QMessageBox::Yes) return; - // First remove wallet from node. - wallet_model->wallet().remove(); - // Now release the model. - removeAndDeleteWallet(wallet_model); + removeWallet(wallet_model); } void WalletController::closeAllWallets(QWidget* parent) @@ -105,11 +110,8 @@ void WalletController::closeAllWallets(QWidget* parent) QMutexLocker locker(&m_mutex); for (WalletModel* wallet_model : m_wallets) { - wallet_model->wallet().remove(); - Q_EMIT walletRemoved(wallet_model); - delete wallet_model; + removeWallet(wallet_model); } - m_wallets.clear(); } WalletModel* WalletController::getOrCreateWallet(std::unique_ptr wallet) diff --git a/src/qt/walletcontroller.h b/src/qt/walletcontroller.h index 7902c3b23544..4d2ba4353923 100644 --- a/src/qt/walletcontroller.h +++ b/src/qt/walletcontroller.h @@ -85,6 +85,9 @@ class WalletController : public QObject friend class WalletControllerActivity; friend class MigrateWalletActivity; + + //! Starts the wallet closure procedure + void removeWallet(WalletModel* wallet_model); }; class WalletControllerActivity : public QObject From 1b853fdb0a40064a5c75b2dae96dfe1d590de6e1 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:10:38 +0100 Subject: [PATCH 14/86] qt: Translations update The recent translations from Transifex.com 28.x fetched with the bitcoin-maintainer-tools/update-translations.py tool. Github-Pull: bitcoin/bitcoin#30899 Rebased-From: ae0529576147a1a5bee992574e2cefc8a1fa37d0 --- src/qt/locale/bitcoin_am.ts | 182 +++++++++++++++++++++++ src/qt/locale/bitcoin_bn.ts | 4 + src/qt/locale/bitcoin_de.ts | 77 +++++----- src/qt/locale/bitcoin_de_CH.ts | 16 ++ src/qt/locale/bitcoin_gl_ES.ts | 12 +- src/qt/locale/bitcoin_ru.ts | 39 +++++ src/qt/locale/bitcoin_sw.ts | 260 ++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_th.ts | 7 + 8 files changed, 559 insertions(+), 38 deletions(-) diff --git a/src/qt/locale/bitcoin_am.ts b/src/qt/locale/bitcoin_am.ts index 2fcf7a1e63bc..c02049b98404 100644 --- a/src/qt/locale/bitcoin_am.ts +++ b/src/qt/locale/bitcoin_am.ts @@ -175,6 +175,10 @@ Signing is only possible with addresses of the type 'legacy'. Wallet encrypted ቦርሳዎ ምስጢር ተደርጓል + + Back + ተመለስ + Wallet to be encrypted ለመመስጠር የተዘጋጀ ዋሌት @@ -253,6 +257,18 @@ Signing is only possible with addresses of the type 'legacy'. Error: %1 ስህተት፥ %1 + + Embedded "%1" + የተከተተ "%1" + + + Default system font "%1" + ነባሪ የስርዓት ቅርጸ-ቁምፊ "%1 + + + Custom… + ብጁ… + Amount መጠን @@ -362,6 +378,14 @@ Signing is only possible with addresses of the type 'legacy'. &Receive &ተቀበል + + &Change Passphrase… + &የይለፍ ቃል ቀይር… + + + Sign messages with your Bitcoin addresses to prove you own them + በእርሶ የተያዙ መሆኑን ለማረጋገጥ በBitcoin አድራሻዎችዎ መልዕክቶችን ይፈርሙ + &File &ፋይል @@ -405,6 +429,14 @@ Signing is only possible with addresses of the type 'legacy'. Close wallet ዋሌት ዝጋ + + Migrate Wallet + ዋሌትዎን ያዛውሩ + + + Migrate a wallet + ዋሌትዎን ያዛውሩ + Wallet Name Label of the input field where the name of the wallet is entered. @@ -422,6 +454,14 @@ Signing is only possible with addresses of the type 'legacy'. %n active connection(s) to Bitcoin network. + + Error creating wallet + ዋሌትዎን ለፍጠር ተሳስተዋል + + + Cannot create new wallet, the software was compiled without sqlite support (required for descriptor wallets) + አዲስ ዋሌት መፍጠር አልተቻለም፣ ሶፍትዌሩ የተቀናበረው ያለ ስኩላይት ድጋፍ ነው (ለገላጭ ዋሌቶች ያስፈልጋል) + Error: %1 ስህተት፥ %1 @@ -484,6 +524,49 @@ Signing is only possible with addresses of the type 'legacy'. (መለያ ስም የለም) + + MigrateWalletActivity + + Migrate wallet + ዋሌት ያዛውሩ + + + Migrating the wallet will convert this wallet to one or more descriptor wallets. A new wallet backup will need to be made. +If this wallet contains any watchonly scripts, a new wallet will be created which contains those watchonly scripts. +If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts. + +The migration process will create a backup of the wallet before migrating. This backup file will be named <wallet name>-<timestamp>.legacy.bak and can be found in the directory for this wallet. In the event of an incorrect migration, the backup can be restored with the "Restore Wallet" functionality. + ዋሌትን ማዛወር ይህንን ዋሌት አንድ ወይም ከዚያ በላይ ወደሆነ ገላጭ ዋሌቶች ይቀይረዋል።አዲስ ዋሌት ማዘጋጀት ያስፈልጋል ።ይህ ዋሌት ምንም ዓይነት የመመልከት ብቻ ስክሪፕቶችን የያዘ ከሆነ፣እነዚያን የመመልከት ብቻ ስክሪፕቶችን የያዘ አዲስ ዋሌት ይፈጠራል።ይህ ዋሌት ሊፈቱ የሚችሉ ነገር ግን የመመልከት ብቻ ያልሆኑ ስክሪፕቶችን የያዘ ከሆነ ፣ እነዚህን የያዘ አዲስ እና ልዩ የሆነ ዋሌት ይፈጠራል ።የማዛወር ሂደቱ ማዘዋወር ከመፈጸሙ በፊት የነዚህን ዋሌቶች መጠባበቂያ ቅጂ ይይዛል።ይህ መጠባበቂያ ቅጂ 1-2 legacy.bak ተብሎ ተሰይሞ በዋሌቱ ማውጫ ውስጥ ይገኛል።የተሳሳተ ዝውውር በሚከሰትበት ጊዜየመጠባበቂያ ቅጂው በ ዋሌት መመለሻ መተግበሪያ ውስጥ ይከማቻል። + + + Migrate Wallet + ዋሌትዎን ያዛውሩ + + + Migrating Wallet <b>%1</b>… + ዋሌት ማዘዋወር <b>%1</b>… + + + The wallet '%1' was migrated successfully. + ዋሌት '%1' በትክክል ተዛውሯል + + + Watchonly scripts have been migrated to a new wallet named '%1'. + የመመልከት ብቻ ስክሪፕቶች'%1'.ወደ ተሰኘው ዋሌት ተዛውረዋል + + + Solvable but not watched scripts have been migrated to a new wallet named '%1'. + ሊፈቱ የሚችሉ ነገር ግን የማይታዩ ስክሪፕቶች ወደ አዲስ ዋሌት ተዛውረዋል '%1'። + + + Migration failed + ዝውውሩ አልተሳካም + + + Migration Successful + ዝውውር ተሳክቷል + + OpenWalletActivity @@ -501,6 +584,14 @@ Signing is only possible with addresses of the type 'legacy'. CreateWalletDialog + + You are one step away from creating your new wallet! + አዲሱን ዋሌትዎን ለመፍጠር አንድ እርምጃ ይቀርዎታል + + + Please provide a name and, if desired, enable any advanced options + እባክዎ ስም ያስገቡ እና ከተፈለገ ማንኛውንም የላቁ አማራጮችን ያንቁ + Wallet Name ዋሌት ስም @@ -589,6 +680,10 @@ Signing is only possible with addresses of the type 'legacy'. OptionsDialog + + Font in the Overview tab: + በአጠቃላይ እይታ ትር ውስጥ ያለ ፊደል + Error ስህተት @@ -601,6 +696,13 @@ Signing is only possible with addresses of the type 'legacy'. + + PSBTOperationsDialog + + Sends %1 to %2 + %1 ወደ %2 ይልካል + + PeerTableModel @@ -609,6 +711,56 @@ Signing is only possible with addresses of the type 'legacy'. አድራሻ + + RPCConsole + + Local Addresses + የአካባቢ አድራሻዎች + + + Network addresses that your Bitcoin node is currently using to communicate with other nodes. + የእርስዎ Bitcoin ኖድ ከሌሎች ኖዶች ጋር ለመገናኘት በአሁኑ ጊዜ እየተጠቀመበት ያለው የአውታረ መረብ አድራሻ። + + + Hide Peers Detail + የአቻዎችን ዝርዝር ደብቅ + + + The transport layer version: %1 + የማጓጓዣ ንብርብር ስሪት፡ %1 + + + Transport + መጓጓዣ + + + Session ID + የክፍለ ጊዜ መለያ + + + The BIP324 session ID string in hex. + የBIP324 ክፍለ ጊዜ መለያ ሕብረቁምፊ በሄክስ። + + + detecting: peer could be v1 or v2 + Explanatory text for "detecting" transport type. + ማወቅ፡ እኩያ v1 ወይም v2 ሊሆን ይችላል። + + + v1: unencrypted, plaintext transport protocol + Explanatory text for v1 transport type. + v1፡ ያልተመሰጠረ፣ ግልጽ የጽሑፍ ትራንስፖርት ፕሮቶኮል + + + v2: BIP324 encrypted transport protocol + Explanatory text for v2 transport type. + v2፡ BIP324 የተመሰጠረ የትራንስፖርት ፕሮቶኮል + + + Node window - [%1] + የኖድ መስኮት - [%1] + + ReceiveRequestDialog @@ -661,6 +813,10 @@ Signing is only possible with addresses of the type 'legacy'. Copy fee ክፍያው ቅዳ + + %1 from wallet '%2' + %1 ከዋሌት %2' + Estimated to begin confirmation within %n block(s). @@ -673,6 +829,17 @@ Signing is only possible with addresses of the type 'legacy'. (መለያ ስም የለም) + + SignVerifyMessageDialog + + You can sign messages/agreements with your legacy (P2PKH) addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + ወደ እነርሱ የተላኩ ቢትኮይን መቀበል እንደሚችሉ ለማረጋገጥ ከርስዎ (P2PKH) አድራሻዎች ጋር መልዕክቶችን/ስምምነቶችን መፈረም ይችላሉ። የማስገር ጥቃቶች እርስዎን ማንነትዎን በእነሱ ላይ እንዲፈርሙ ሊያታልሉዎት ስለሚችሉ ግልጽ ያልሆነ ወይም በዘፈቀደ ላለመፈረም ይጠንቀቁ። የተስማሙባቸውን ሙሉ ዝርዝር መግለጫዎች ብቻ ይፈርሙ። + + + The entered address does not refer to a legacy (P2PKH) key. Message signing for SegWit and other non-P2PKH address types is not supported in this version of %1. Please check the address and try again. + የገባው አድራሻ የቅርስ (P2PKH) ቁልፍን አያመለክትም። ለሴግዊት እና ሌሎች P2PKH ላልሆኑ የአድራሻ አይነቶች የመልዕክት መፈረም በዚህ የ%1 ስሪት ውስጥ አይደገፍም። እባክዎ አድራሻውን ያረጋግጡ እና እንደገና ይሞክሩ። + + TransactionDesc @@ -686,6 +853,10 @@ Signing is only possible with addresses of the type 'legacy'. matures in %n more block(s) + + %1 (Certificate was not verified) + %1 (ማረጋገጫው አልተረጋገጠም) + Amount መጠን @@ -741,6 +912,17 @@ Signing is only possible with addresses of the type 'legacy'. ስህተት + + WalletModel + + Fee-bump PSBT copied to clipboard + ከክፍያ-ነፃ PSBT ወደ ቅንጥብ ሰሌዳ ተቀድቷል። + + + Signer error + የፈራሚ ስህተት + + WalletView diff --git a/src/qt/locale/bitcoin_bn.ts b/src/qt/locale/bitcoin_bn.ts index d22624ad85aa..bfb104a7a3ae 100644 --- a/src/qt/locale/bitcoin_bn.ts +++ b/src/qt/locale/bitcoin_bn.ts @@ -275,6 +275,10 @@ Signing is only possible with addresses of the type 'legacy'. Load Partially Signed Bitcoin Transaction আংশিক স্বাক্ষরিত বিটকয়েন লেনদেন লোড করুন + + Load PSBT from &clipboard… + &ক্লিপবোর্ড থেকে আংশিক স্বাক্ষরিত বিটকয়েন লেনদেন আনুন + Load Partially Signed Bitcoin Transaction from clipboard ক্লিপবোর্ড থেকে আংশিক স্বাক্ষরিত বিটকয়েন লেনদেন লোড করুন diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 474ce2a08840..807a1c64eefd 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -615,11 +615,15 @@ Das Signieren ist nur mit Adressen vom Typ 'Legacy' möglich. Processing blocks on disk… Verarbeite Blöcke auf Datenträger... + + Connecting to peers… + Verbindung zu Peers wird hergestellt… + Processed %n block(s) of transaction history. - Processed %n block(s) of transaction history. - Processed %n block(s) of transaction history. + %n Block der Transaktionshistorie prozessiert. + %n Block/Blöcke der Transaktionshistorie prozessiert. @@ -710,7 +714,7 @@ Das Signieren ist nur mit Adressen vom Typ 'Legacy' möglich. Show Peers tab A context menu item. The "Peers tab" is an element of the "Node window". - Gegenstellen Reiter anzeigen + Reiter mit Peers anzeigen Disable network activity @@ -1420,7 +1424,7 @@ Während des Migrationsprozesses wird vor der Migration ein Backup der Wallet er %1 is currently syncing. It will download headers and blocks from peers and validate them until reaching the tip of the block chain. - %1 synchronisiert gerade. Es lädt Header und Blöcke von Gegenstellen und validiert sie bis zum Erreichen der Spitze der Blockchain. + %1 synchronisiert gerade. Es lädt Header und Blöcke von Peers und validiert sie bis zum Erreichen der Spitze der Blockchain. Unknown. Syncing Headers (%1, %2%)… @@ -1639,7 +1643,7 @@ Während des Migrationsprozesses wird vor der Migration ein Backup der Wallet er Used for reaching peers via: - Benutzt um Gegenstellen zu erreichen über: + Benutzt um Peers zu erreichen über: &Window @@ -1703,7 +1707,7 @@ Während des Migrationsprozesses wird vor der Migration ein Backup der Wallet er Use separate SOCKS&5 proxy to reach peers via Tor onion services: - Nutze separaten SOCKS&5-Proxy um Gegenstellen über Tor-Onion-Dienste zu erreichen: + Nutze separaten SOCKS&5-Proxy um Peers über Tor-Onion-Dienste zu erreichen: &Cancel @@ -2041,11 +2045,6 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Title of Peers Table column which contains the peer's User Agent string. User-Agent - - Peer - Title of Peers Table column which contains a unique number used to identify a connection. - Gegenstelle - Age Title of Peers Table column which indicates the duration (length of time) since the peer connection started. @@ -2170,6 +2169,14 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Number of connections Anzahl der Verbindungen + + Local Addresses + Lokale Adressen + + + Network addresses that your Bitcoin node is currently using to communicate with other nodes. + Netzwerk-Adressen, die dein Bitcoin-Node aktuell verwendet, um mit anderen Nodes zu kommunizieren. + Block chain Blockchain @@ -2202,17 +2209,21 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Sent Gesendet - - &Peers - &Gegenstellen - Banned peers - Gesperrte Gegenstellen + Gesperrte Peers Select a peer to view detailed information. - Gegenstelle auswählen, um detaillierte Informationen zu erhalten. + Peers auswählen, um detaillierte Informationen zu erhalten. + + + Hide Peers Detail + Reiter mit Peers verstecken + + + Ctrl+X + Strg+X The transport layer version: %1 @@ -2220,7 +2231,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Whether we relay transactions to this peer. - Ob wir Adressen an diese Gegenstelle weiterleiten. + Ob wir Adressen an diesen Peer weiterleiten. Transaction Relay @@ -2244,7 +2255,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI The mapped Autonomous System used for diversifying peer selection. - Das zugeordnete autonome System zur Diversifizierung der Gegenstellen-Auswahl. + Das zugeordnete autonome System zur Diversifizierung der Peer-Auswahl. Mapped AS @@ -2253,7 +2264,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Whether we relay addresses to this peer. Tooltip text for the Address Relay field in the peer details area, which displays whether we relay addresses to this peer (Yes/No). - Ob wir Adressen an diese Gegenstelle weiterleiten. + Ob wir Adressen an diesen Peer weiterleiten. Address Relay @@ -2263,12 +2274,12 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI The total number of addresses received from this peer that were processed (excludes addresses that were dropped due to rate-limiting). Tooltip text for the Addresses Processed field in the peer details area, which displays the total number of addresses received from this peer that were processed (excludes addresses that were dropped due to rate-limiting). - Die Gesamtzahl der von dieser Gegenstelle empfangenen Adressen, die aufgrund von Ratenbegrenzung verworfen (nicht verarbeitet) wurden. + Die Gesamtzahl der von diesem Peer empfangenen Adressen, die aufgrund von Ratenbegrenzung verworfen (nicht verarbeitet) wurden. The total number of addresses received from this peer that were dropped (not processed) due to rate-limiting. Tooltip text for the Addresses Rate-Limited field in the peer details area, which displays the total number of addresses received from this peer that were dropped (not processed) due to rate-limiting. - Die Gesamtzahl der von dieser Gegenstelle empfangenen Adressen, die aufgrund von Ratenbegrenzung verworfen (nicht verarbeitet) wurden. + Die Gesamtzahl der von diesem Peer empfangenen Adressen, die aufgrund von Ratenbegrenzung verworfen (nicht verarbeitet) wurden. Addresses Processed @@ -2306,7 +2317,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI The direction and type of peer connection: %1 - Die Richtung und der Typ der Gegenstellen-Verbindung: %1 + Die Richtung und der Typ der Peer-Verbindung: %1 Direction/Type @@ -2318,7 +2329,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS. - Das Netzwerkprotokoll, über das diese Gegenstelle verbunden ist, ist: IPv4, IPv6, Onion, I2P oder CJDNS. + Das Netzwerkprotokoll, über das dieser Peer verbunden ist, ist: IPv4, IPv6, Onion, I2P oder CJDNS. Services @@ -2338,7 +2349,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Elapsed time since a novel block passing initial validity checks was received from this peer. - Abgelaufene Zeit seitdem ein neuer Block mit erfolgreichen initialen Gültigkeitsprüfungen von dieser Gegenstelle empfangen wurde. + Verstrichene Zeit, seit ein neuer Block, der initiale Validierungsprüfungen bestanden hat, von diesem Peer empfangen wurde. Last Block @@ -2347,7 +2358,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Elapsed time since a novel transaction accepted into our mempool was received from this peer. Tooltip text for the Last Transaction field in the peer details area. - Abgelaufene Zeit seit eine neue Transaktion, die in unseren Speicherpool hineingelassen wurde, von dieser Gegenstelle empfangen wurde. + Verstrichene Zeit, seit eine neue Transaktion, die in unseren Mempool aufgenommen wurde, von diesem Peer empfangen wurde. Last Send @@ -2416,7 +2427,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Inbound: initiated by peer Explanatory text for an inbound peer connection. - Eingehend: wurde von Gegenstelle initiiert + Eingehend: wurde vom Peer initiiert Outbound Full Relay: default @@ -2446,7 +2457,7 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI detecting: peer could be v1 or v2 Explanatory text for "detecting" transport type. - Erkennen: Peer könnte v1 oder v2 sein + Erkenne: Peer könnte v1 oder v2 sein v1: unencrypted, plaintext transport protocol @@ -2460,11 +2471,11 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI we selected the peer for high bandwidth relay - Wir haben die Gegenstelle zum Weiterleiten mit hoher Bandbreite ausgewählt + Wir haben den Peer zum Weiterleiten mit hoher Bandbreite ausgewählt the peer selected us for high bandwidth relay - Die Gegenstelle hat uns zum Weiterleiten mit hoher Bandbreite ausgewählt + Der Peer hat uns zum Weiterleiten mit hoher Bandbreite ausgewählt no high bandwidth relay selected @@ -2584,7 +2595,7 @@ Für weitere Informationen über diese Konsole, tippe %6. (peer: %1) - (Gegenstelle: %1) + (Peer: %1) via %1 @@ -3996,7 +4007,7 @@ Gehen Sie zu Datei > Wallet Öffnen, um eine Wallet zu laden. %s request to listen on port %u. This port is considered "bad" and thus it is unlikely that any peer will connect to it. See doc/p2p-bad-ports.md for details and a full list. - %s Aufforderung, auf Port %u zu lauschen. Dieser Port wird als "schlecht" eingeschätzt und es ist daher unwahrscheinlich, dass sich Bitcoin Core Gegenstellen mit ihm verbinden. Siehe doc/p2p-bad-ports.md für Details und eine vollständige Liste. + %s Aufforderung, auf Port %u zu lauschen. Dieser Port wird als "schlecht" eingeschätzt und es ist daher unwahrscheinlich, dass sich Peers mit ihm verbinden. Siehe doc/p2p-bad-ports.md für Details und eine vollständige Liste. Cannot downgrade wallet from version %i to version %i. Wallet version unchanged. @@ -4161,7 +4172,7 @@ Bitte nutzen Sie entweder "bdb" oder "sqlite". Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. - Warnung: Wir scheinen nicht vollständig mit unseren Gegenstellen übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen Ihre Client-Software aktualisieren. + Warnung: Wir scheinen nicht vollständig mit unseren Peers übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen Ihre Client-Software aktualisieren. Witness data for blocks after height %d requires validation. Please restart with -reindex. diff --git a/src/qt/locale/bitcoin_de_CH.ts b/src/qt/locale/bitcoin_de_CH.ts index a9a15f08ffd0..ffbc761ac1ba 100644 --- a/src/qt/locale/bitcoin_de_CH.ts +++ b/src/qt/locale/bitcoin_de_CH.ts @@ -2226,6 +2226,14 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Number of connections Anzahl der Verbindungen + + Local Addresses + Lokale Adressen + + + Network addresses that your Bitcoin node is currently using to communicate with other nodes. + Netzwerk-Adressen, die dein Bitcoin-Node aktuell verwendet, um mit anderen Nodes zu kommunizieren. + Block chain Blockchain @@ -2270,6 +2278,14 @@ Wenn Sie diese Fehlermeldung erhalten, sollten Sie den Händler bitten, einen BI Select a peer to view detailed information. Gegenstelle auswählen, um detaillierte Informationen zu erhalten. + + Hide Peers Detail + Gegenstellen Reiter verstecken + + + Ctrl+X + Strg+X + The transport layer version: %1 Die Transportschicht-Version: %1 diff --git a/src/qt/locale/bitcoin_gl_ES.ts b/src/qt/locale/bitcoin_gl_ES.ts index 77f9f3278c4d..47951fa6f2ee 100644 --- a/src/qt/locale/bitcoin_gl_ES.ts +++ b/src/qt/locale/bitcoin_gl_ES.ts @@ -1,10 +1,6 @@ AddressBookPage - - Right-click to edit address or label - cd vcpkg/buildtrees/libvpx/srccd *./configuresed -i 's/CFLAGS+=-I/CFLAGS+=-fPIC -I/g' Makefilesed -i 's/CXXFLAGS+=-I/CXXFLAGS+=-fPIC -I/g' Makefilemakecp libvpx.a $HOME/vcpkg/installed/x64-linux/lib/cd - Create a new address Crea un novo enderezo @@ -93,6 +89,14 @@ Firmar é posible unicamente con enderezos de tipo 'legacy'. An error message. %1 is a stand-in argument for the name of the file we attempted to save to. Houbo un erro tentando gardar a lista de enderezos en %1. Por favor proba de novo. + + Sending addresses - %1 + Enviando enderezos - %1 + + + Receiving addresses - %1 + Recibindo enderezos - %1 + Exporting Failed Exportación Fallida diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 204b66774e7a..7a54b457684e 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -310,6 +310,10 @@ Signing is only possible with addresses of the type 'legacy'. unknown неизвестно + + Default system font "%1" + Системный шрифт по умолчанию "%1" + %n second(s) @@ -1525,6 +1529,10 @@ The migration process will create a backup of the wallet before migrating. This Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu. Сворачивать вместо выхода из приложения при закрытии окна. Если данный параметр включён, приложение закроется только после нажатия "Выход" в меню. + + Font in the Overview tab: + Шрифт на вкладке «Обзор»: + Options set in this dialog are overridden by the command line: Параметры командной строки, которые переопределили параметры из этого окна: @@ -1950,6 +1958,17 @@ The migration process will create a backup of the wallet before migrating. This (нет метки) + + SignVerifyMessageDialog + + You can sign messages/agreements with your legacy (P2PKH) addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + Вы можете подписывать сообщения/соглашения своими устаревшими (P2PKH) адресами, чтобы доказать, что вы можете получать биткоины на них. Будьте осторожны и не подписывайте непонятные или случайные сообщения, так как мошенники могут таким образом пытаться присвоить вашу личность. Подписывайте только такие сообщения, с которыми вы согласны вплоть до мелочей. + + + The entered address does not refer to a legacy (P2PKH) key. Message signing for SegWit and other non-P2PKH address types is not supported in this version of %1. Please check the address and try again. + Введенный адрес не относится к устаревшему (P2PKH) ключу. Подписывание сообщений для SegWit и других не--P2PKH типов адресов не поддерживается в этой версии %1. Пожалуйста, проверьте адрес и попробуйте ещё раз. + + TransactionDesc @@ -1960,6 +1979,10 @@ The migration process will create a backup of the wallet before migrating. This matures in %n more block(s) + + %1 (Certificate was not verified) + %1 (Сертификат не был подтверждён) + Amount Сумма @@ -2634,5 +2657,21 @@ Unable to restore backup of wallet. Error: Unable to read all records in the database Ошибка: не удалось прочитать все записи из базе данных + + Failed to disconnect block. + Не удалось отключить блок + + + Failed to read block. + Не удалось прочитать блок + + + Failed to write block. + Не удалось записать блок + + + Wallet file creation failed: %s + Не удалось создать кошелёк 1%s + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_sw.ts b/src/qt/locale/bitcoin_sw.ts index 199a0552b5cf..0497444d5e68 100644 --- a/src/qt/locale/bitcoin_sw.ts +++ b/src/qt/locale/bitcoin_sw.ts @@ -325,7 +325,11 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. - + + default wallet + mkoba chaguo-msingi + + BitcoinGUI @@ -413,10 +417,19 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. &Options… &Chaguo... + + &Encrypt Wallet… + &Simba Mkoba... + Encrypt the private keys that belong to your wallet Funga funguo za siri zinazomiliki mkoba wako. + + &Backup Wallet… + &Hifadhi Mkoba... + + &Change Passphrase… &Badilisha Nenosiri... @@ -429,10 +442,18 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. Sign messages with your Bitcoin addresses to prove you own them Saini ujumbe na anwani zako za Bitcoin ili kuthibitisha umiliki wao. + + &Verify message… + &Thibitisha ujumbe... + Verify messages to ensure they were signed with specified Bitcoin addresses Hakikisha ujumbe umethibitishwa kuwa ulisainiwa na anwani za Bitcoin zilizotajwa + + &Load PSBT from file… + &Pakia PSBT kutoka faili... + Open &URI… Fungua &URI ... @@ -508,6 +529,14 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. + + %1 behind + %1 nyuma + + + Catching up… + Inakamata... + Transactions after this will not yet be visible. Shughuli baada ya hii bado hazitaonekana. @@ -524,23 +553,136 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. Information Habari + + Up to date + Imesasishwa + + + Load Partially Signed Bitcoin Transaction + Pakia Muamala wa Bitcoin Uliosainiwa Kiasi + + + Load PSBT from &clipboard… + Pakia PSBT kutoka &clipboard... + + + Load Partially Signed Bitcoin Transaction from clipboard + Pakia Muamala wa Bitcoin Uliosainiwa Kiasi kutoka kwenye ubao wa kunakili + + + Node window + Dirisha la nodi + + + Open node debugging and diagnostic console + Fungua utatuzi wa nodi na koni ya uchunguzi + + + &Sending addresses + &Anwani za kutuma + + + &Receiving addresses + &Inapokea anwani + + + Open a bitcoin: URI + Fungua bitcoin: URI + Open Wallet Fungua Pochi + + Open a wallet + Fungua pochi + Close wallet Funga pochi + + Restore Wallet… + Name of the menu item that restores wallet from a backup file. + Rejesha Pochi... + + + Restore a wallet from a backup file + Status tip for Restore Wallet menu item + Rejesha mkoba kutoka kwa faili ya chelezo + + + Close all wallets + Funga pochi zote + + + Migrate Wallet + Hamisha Pochi + + + Migrate a wallet + Hamisha mkoba + + + Show the %1 help message to get a list with possible Bitcoin command-line options + Onyesha %1 ujumbe wa usaidizi ili kupata orodha na chaguo zinazowezekana za mstari wa amri za Bitcoin + + + &Mask values + &Funga maadili + + + Mask the values in the Overview tab + Ficha maadili kwenye kichupo cha Muhtasari + + + No wallets available + Hakuna pochi zinazopatikana + + + Wallet Data + Name of the wallet data file format. + Data ya Pochi + + + Load Wallet Backup + The title for Restore Wallet File Windows + Pakia Hifadhi Nakala ya Wallet + + + Restore Wallet + Title of pop-up window shown when the user is attempting to restore a wallet. + Rejesha Pochi + Wallet Name Label of the input field where the name of the wallet is entered. Jina la Wallet + + &Window + &Dirisha + + + Zoom + Kuza + + + Main Window + Dirisha Kuu + + + %1 client + %1 mteja + &Hide &Ficha + + S&how + Jinsi & jinsi + %n active connection(s) to Bitcoin network. A substring of the tooltip. @@ -549,16 +691,100 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. + + Click for more actions. + A substring of the tooltip. "More actions" are available via the context menu. + Bofya kwa vitendo zaidi. + + + Show Peers tab + A context menu item. The "Peers tab" is an element of the "Node window". + Onyesha kichupo cha Marika + + + Disable network activity + A context menu item. + Zima shughuli za mtandao + + + Enable network activity + A context menu item. The network activity was disabled previously. + Washa shughuli za mtandao + + + Pre-syncing Headers (%1%)… + Kusawazisha Vichwa vya awali (%1%)... + + + Error creating wallet + Hitilafu unapounda pochi + + + Cannot create new wallet, the software was compiled without sqlite support (required for descriptor wallets) + Haiwezi kuunda pochi mpya, programu iliundwa bila usaidizi wa sqlite (inahitajika kwa pochi za maelezo) + Error: %1 Kosa: %1 + + Warning: %1 + Onyo: %1 + + + Date: %1 + + Tarehe: %1 + + + Amount: %1 + + Kiasi: %1 + + + + Wallet: %1 + + Pochi: %1 + + + + Type: %1 + + Aina: %1 + Label: %1 Chapa: %1 + + Address: %1 + + Anwani: %1 + + + + Sent transaction + Umetuma muamala + + + Incoming transaction + Muamala unaoingia + + + HD key generation is <b>enabled</b> + Uzalishaji wa ufunguo wa HD ni <b>kuwezeshwa </b> + + + HD key generation is <b>disabled</b> + Uzalishaji wa ufunguo wa HD ni <b>kutowezeshwa</b> + + + Private key <b>disabled</b> + Ufunguo wa kibinafsi <b> umezimwa </b> + CoinControlDialog @@ -591,6 +817,13 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. (hamna chapa) + + MigrateWalletActivity + + Migrate Wallet + Hamisha Pochi + + OpenWalletActivity @@ -601,6 +834,11 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. RestoreWalletActivity + + Restore Wallet + Title of progress window which is displayed when wallets are being restored. + Rejesha Pochi + Restore wallet warning Title of message box which is displayed when the wallet is restored with some warning. @@ -617,6 +855,10 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled. Kufunga pochi kwa muda mrefu sana kunaweza kusababisha kusawazisha tena mnyororo mzima ikiwa upogoaji umewezeshwa. + + Close all wallets + Funga pochi zote + CreateWalletDialog @@ -729,6 +971,10 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. OptionsDialog + + &Window + &Dirisha + Error Onyo @@ -749,6 +995,13 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. URI inayotokea ni ndefu sana. Jaribu kupunguza maandishi ya chapa / ujumbe. + + RPCConsole + + Node window + Dirisha la nodi + + ReceiveCoinsDialog @@ -925,6 +1178,11 @@ Kutia sahihi kunawezekana tu kwa anwani za aina ya 'urithi'. Export the data in the current tab to a file Toa data katika kichupo cha sasa hadi kwenye faili + + Wallet Data + Name of the wallet data file format. + Data ya Pochi + bitcoin-core diff --git a/src/qt/locale/bitcoin_th.ts b/src/qt/locale/bitcoin_th.ts index 3706a7bd9822..464e39cbac09 100644 --- a/src/qt/locale/bitcoin_th.ts +++ b/src/qt/locale/bitcoin_th.ts @@ -1,4 +1,11 @@ + + AskPassphraseDialog + + Back + ย้อนกลับ + + QObject From 8229e981167f61e2d4c2e8b7761cba68374ea92f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 12 Sep 2024 10:40:19 -0400 Subject: [PATCH 15/86] streams: cache file position within AutoFile Github-Pull: bitcoin/bitcoin#30884 Rebased-From: e624a9bef16b6335fd119c10698352b59bf2930a --- src/bench/streams_findbyte.cpp | 2 +- src/index/txindex.cpp | 5 +--- src/node/blockstorage.cpp | 4 +-- src/node/utxo_snapshot.cpp | 4 ++- src/streams.cpp | 53 +++++++++++++++++++++------------- src/streams.h | 3 +- src/test/streams_tests.cpp | 6 ++-- src/util/asmap.cpp | 6 ++-- 8 files changed, 48 insertions(+), 35 deletions(-) diff --git a/src/bench/streams_findbyte.cpp b/src/bench/streams_findbyte.cpp index 5098262e9afa..004bf8ffc9dc 100644 --- a/src/bench/streams_findbyte.cpp +++ b/src/bench/streams_findbyte.cpp @@ -19,7 +19,7 @@ static void FindByte(benchmark::Bench& bench) uint8_t data[file_size] = {0}; data[file_size-1] = 1; file << data; - std::rewind(file.Get()); + file.seek(0, SEEK_SET); BufferedFile bf{file, /*nBufSize=*/file_size + 1, /*nRewindIn=*/file_size}; bench.run([&] { diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 80f615ed0e77..425a7f00a0d0 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -87,10 +87,7 @@ bool TxIndex::FindTx(const uint256& tx_hash, uint256& block_hash, CTransactionRe CBlockHeader header; try { file >> header; - if (fseek(file.Get(), postx.nTxOffset, SEEK_CUR)) { - LogError("%s: fseek(...) failed\n", __func__); - return false; - } + file.seek(postx.nTxOffset, SEEK_CUR); file >> TX_WITH_WITNESS(tx); } catch (const std::exception& e) { LogError("%s: Deserialize or I/O error - %s\n", __func__, e.what()); diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 96cf69927c35..65d51417b1fa 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -683,7 +683,7 @@ bool BlockManager::UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos fileout << GetParams().MessageStart() << nSize; // Write undo data - long fileOutPos = ftell(fileout.Get()); + long fileOutPos = fileout.tell(); if (fileOutPos < 0) { LogError("%s: ftell failed\n", __func__); return false; @@ -981,7 +981,7 @@ bool BlockManager::WriteBlockToDisk(const CBlock& block, FlatFilePos& pos) const fileout << GetParams().MessageStart() << nSize; // Write block - long fileOutPos = ftell(fileout.Get()); + long fileOutPos = fileout.tell(); if (fileOutPos < 0) { LogError("%s: ftell failed\n", __func__); return false; diff --git a/src/node/utxo_snapshot.cpp b/src/node/utxo_snapshot.cpp index 976421e45539..dbb93a15b520 100644 --- a/src/node/utxo_snapshot.cpp +++ b/src/node/utxo_snapshot.cpp @@ -73,7 +73,9 @@ std::optional ReadSnapshotBaseBlockhash(fs::path chaindir) } afile >> base_blockhash; - if (std::fgetc(afile.Get()) != EOF) { + int64_t position = afile.tell(); + afile.seek(0, SEEK_END); + if (position != afile.tell()) { LogPrintf("[snapshot] warning: unexpected trailing data in %s\n", read_from_str); } else if (std::ferror(afile.Get())) { LogPrintf("[snapshot] warning: i/o error reading %s\n", read_from_str); diff --git a/src/streams.cpp b/src/streams.cpp index cdd36a86feb1..1ba260f57c90 100644 --- a/src/streams.cpp +++ b/src/streams.cpp @@ -7,18 +7,25 @@ #include +AutoFile::AutoFile(std::FILE* file, std::vector data_xor) + : m_file{file}, m_xor{std::move(data_xor)} +{ + if (!IsNull()) { + auto pos{std::ftell(m_file)}; + if (pos >= 0) m_position = pos; + } +} + std::size_t AutoFile::detail_fread(Span dst) { if (!m_file) throw std::ios_base::failure("AutoFile::read: file handle is nullptr"); - if (m_xor.empty()) { - return std::fread(dst.data(), 1, dst.size(), m_file); - } else { - const auto init_pos{std::ftell(m_file)}; - if (init_pos < 0) throw std::ios_base::failure("AutoFile::read: ftell failed"); - std::size_t ret{std::fread(dst.data(), 1, dst.size(), m_file)}; - util::Xor(dst.subspan(0, ret), m_xor, init_pos); - return ret; + size_t ret = std::fread(dst.data(), 1, dst.size(), m_file); + if (!m_xor.empty()) { + if (!m_position.has_value()) throw std::ios_base::failure("AutoFile::read: position unknown"); + util::Xor(dst.subspan(0, ret), m_xor, *m_position); } + if (m_position.has_value()) *m_position += ret; + return ret; } void AutoFile::seek(int64_t offset, int origin) @@ -29,18 +36,23 @@ void AutoFile::seek(int64_t offset, int origin) if (std::fseek(m_file, offset, origin) != 0) { throw std::ios_base::failure(feof() ? "AutoFile::seek: end of file" : "AutoFile::seek: fseek failed"); } + if (origin == SEEK_SET) { + m_position = offset; + } else if (origin == SEEK_CUR && m_position.has_value()) { + *m_position += offset; + } else { + int64_t r{std::ftell(m_file)}; + if (r < 0) { + throw std::ios_base::failure("AutoFile::seek: ftell failed"); + } + m_position = r; + } } int64_t AutoFile::tell() { - if (IsNull()) { - throw std::ios_base::failure("AutoFile::tell: file handle is nullptr"); - } - int64_t r{std::ftell(m_file)}; - if (r < 0) { - throw std::ios_base::failure("AutoFile::tell: ftell failed"); - } - return r; + if (!m_position.has_value()) throw std::ios_base::failure("AutoFile::tell: position unknown"); + return *m_position; } void AutoFile::read(Span dst) @@ -60,6 +72,7 @@ void AutoFile::ignore(size_t nSize) throw std::ios_base::failure(feof() ? "AutoFile::ignore: end of file" : "AutoFile::ignore: fread failed"); } nSize -= nNow; + if (m_position.has_value()) *m_position += nNow; } } @@ -70,19 +83,19 @@ void AutoFile::write(Span src) if (std::fwrite(src.data(), 1, src.size(), m_file) != src.size()) { throw std::ios_base::failure("AutoFile::write: write failed"); } + if (m_position.has_value()) *m_position += src.size(); } else { - auto current_pos{std::ftell(m_file)}; - if (current_pos < 0) throw std::ios_base::failure("AutoFile::write: ftell failed"); + if (!m_position.has_value()) throw std::ios_base::failure("AutoFile::write: position unknown"); std::array buf; while (src.size() > 0) { auto buf_now{Span{buf}.first(std::min(src.size(), buf.size()))}; std::copy(src.begin(), src.begin() + buf_now.size(), buf_now.begin()); - util::Xor(buf_now, m_xor, current_pos); + util::Xor(buf_now, m_xor, *m_position); if (std::fwrite(buf_now.data(), 1, buf_now.size(), m_file) != buf_now.size()) { throw std::ios_base::failure{"XorFile::write: failed"}; } src = src.subspan(buf_now.size()); - current_pos += buf_now.size(); + *m_position += buf_now.size(); } } } diff --git a/src/streams.h b/src/streams.h index c2a9dea2878d..2fcb83826efc 100644 --- a/src/streams.h +++ b/src/streams.h @@ -390,9 +390,10 @@ class AutoFile protected: std::FILE* m_file; std::vector m_xor; + std::optional m_position; public: - explicit AutoFile(std::FILE* file, std::vector data_xor={}) : m_file{file}, m_xor{std::move(data_xor)} {} + explicit AutoFile(std::FILE* file, std::vector data_xor={}); ~AutoFile() { fclose(); } diff --git a/src/test/streams_tests.cpp b/src/test/streams_tests.cpp index 9296cbb41c4e..35453737546a 100644 --- a/src/test/streams_tests.cpp +++ b/src/test/streams_tests.cpp @@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file) for (uint8_t j = 0; j < 40; ++j) { file << j; } - std::rewind(file.Get()); + file.seek(0, SEEK_SET); // The buffer size (second arg) must be greater than the rewind // amount (third arg). @@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file_skip) for (uint8_t j = 0; j < 40; ++j) { file << j; } - std::rewind(file.Get()); + file.seek(0, SEEK_SET); // The buffer is 25 bytes, allow rewinding 10 bytes. BufferedFile bf{file, 25, 10}; @@ -444,7 +444,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file_rand) for (uint8_t i = 0; i < fileSize; ++i) { file << i; } - std::rewind(file.Get()); + file.seek(0, SEEK_SET); size_t bufSize = InsecureRandRange(300) + 1; size_t rewindSize = InsecureRandRange(bufSize); diff --git a/src/util/asmap.cpp b/src/util/asmap.cpp index f50cd8a28c12..04b0673c49b4 100644 --- a/src/util/asmap.cpp +++ b/src/util/asmap.cpp @@ -203,10 +203,10 @@ std::vector DecodeAsmap(fs::path path) LogPrintf("Failed to open asmap file from disk\n"); return bits; } - fseek(filestr, 0, SEEK_END); - int length = ftell(filestr); + file.seek(0, SEEK_END); + int length = file.tell(); LogPrintf("Opened asmap file %s (%d bytes) from disk\n", fs::quoted(fs::PathToString(path)), length); - fseek(filestr, 0, SEEK_SET); + file.seek(0, SEEK_SET); uint8_t cur_byte; for (int i = 0; i < length; ++i) { file >> cur_byte; From ff95cb31da6ab6af70125b2c0b78aa976780c61e Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 13 Sep 2024 21:59:29 -0400 Subject: [PATCH 16/86] streams: remove AutoFile::Get() entirely Co-Authored-By: David Gumberg Github-Pull: bitcoin/bitcoin#30884 Rebased-From: a240e150e837b5a95ed19765a2e8b7c5b6013f35 --- src/addrdb.cpp | 2 +- src/index/blockfilterindex.cpp | 6 +++--- src/node/mempool_persist.cpp | 4 ++-- src/node/utxo_snapshot.cpp | 2 +- src/streams.cpp | 16 ++++++++++++++++ src/streams.h | 10 ++++------ src/test/fuzz/autofile.cpp | 1 - 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/addrdb.cpp b/src/addrdb.cpp index e9838d722291..b89141c88e32 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -73,7 +73,7 @@ bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data remove(pathTmp); return false; } - if (!FileCommit(fileout.Get())) { + if (!fileout.Commit()) { fileout.fclose(); remove(pathTmp); LogError("%s: Failed to flush file %s\n", __func__, fs::PathToString(pathTmp)); diff --git a/src/index/blockfilterindex.cpp b/src/index/blockfilterindex.cpp index 41bdca9df562..26de7eee32fc 100644 --- a/src/index/blockfilterindex.cpp +++ b/src/index/blockfilterindex.cpp @@ -151,7 +151,7 @@ bool BlockFilterIndex::CustomCommit(CDBBatch& batch) LogError("%s: Failed to open filter file %d\n", __func__, pos.nFile); return false; } - if (!FileCommit(file.Get())) { + if (!file.Commit()) { LogError("%s: Failed to commit filter file %d\n", __func__, pos.nFile); return false; } @@ -201,11 +201,11 @@ size_t BlockFilterIndex::WriteFilterToDisk(FlatFilePos& pos, const BlockFilter& LogPrintf("%s: Failed to open filter file %d\n", __func__, pos.nFile); return 0; } - if (!TruncateFile(last_file.Get(), pos.nPos)) { + if (!last_file.Truncate(pos.nPos)) { LogPrintf("%s: Failed to truncate filter file %d\n", __func__, pos.nFile); return 0; } - if (!FileCommit(last_file.Get())) { + if (!last_file.Commit()) { LogPrintf("%s: Failed to commit filter file %d\n", __func__, pos.nFile); return 0; } diff --git a/src/node/mempool_persist.cpp b/src/node/mempool_persist.cpp index a265c2e12d15..ff7de8c64a25 100644 --- a/src/node/mempool_persist.cpp +++ b/src/node/mempool_persist.cpp @@ -199,8 +199,8 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock LogInfo("Writing %d unbroadcast transactions to file.\n", unbroadcast_txids.size()); file << unbroadcast_txids; - if (!skip_file_commit && !FileCommit(file.Get())) - throw std::runtime_error("FileCommit failed"); + if (!skip_file_commit && !file.Commit()) + throw std::runtime_error("Commit failed"); file.fclose(); if (!RenameOver(dump_path + ".new", dump_path)) { throw std::runtime_error("Rename failed"); diff --git a/src/node/utxo_snapshot.cpp b/src/node/utxo_snapshot.cpp index dbb93a15b520..7d589c886b82 100644 --- a/src/node/utxo_snapshot.cpp +++ b/src/node/utxo_snapshot.cpp @@ -77,7 +77,7 @@ std::optional ReadSnapshotBaseBlockhash(fs::path chaindir) afile.seek(0, SEEK_END); if (position != afile.tell()) { LogPrintf("[snapshot] warning: unexpected trailing data in %s\n", read_from_str); - } else if (std::ferror(afile.Get())) { + } else if (afile.IsError()) { LogPrintf("[snapshot] warning: i/o error reading %s\n", read_from_str); } return base_blockhash; diff --git a/src/streams.cpp b/src/streams.cpp index 1ba260f57c90..5f7baf92b9e8 100644 --- a/src/streams.cpp +++ b/src/streams.cpp @@ -4,6 +4,7 @@ #include #include +#include #include @@ -99,3 +100,18 @@ void AutoFile::write(Span src) } } } + +bool AutoFile::Commit() +{ + return ::FileCommit(m_file); +} + +bool AutoFile::IsError() +{ + return ferror(m_file); +} + +bool AutoFile::Truncate(unsigned size) +{ + return ::TruncateFile(m_file, size); +} diff --git a/src/streams.h b/src/streams.h index 2fcb83826efc..431a4d77c6ce 100644 --- a/src/streams.h +++ b/src/streams.h @@ -420,12 +420,6 @@ class AutoFile return ret; } - /** Get wrapped FILE* without transfer of ownership. - * @note Ownership of the FILE* will remain with this class. Use this only if the scope of the - * AutoFile outlives use of the passed pointer. - */ - std::FILE* Get() const { return m_file; } - /** Return true if the wrapped FILE* is nullptr, false otherwise. */ bool IsNull() const { return m_file == nullptr; } @@ -459,6 +453,10 @@ class AutoFile ::Unserialize(*this, obj); return *this; } + + bool Commit(); + bool IsError(); + bool Truncate(unsigned size); }; /** Wrapper around an AutoFile& that implements a ring buffer to diff --git a/src/test/fuzz/autofile.cpp b/src/test/fuzz/autofile.cpp index 45316b6b218d..81761c7bf969 100644 --- a/src/test/fuzz/autofile.cpp +++ b/src/test/fuzz/autofile.cpp @@ -56,7 +56,6 @@ FUZZ_TARGET(autofile) WriteToStream(fuzzed_data_provider, auto_file); }); } - (void)auto_file.Get(); (void)auto_file.IsNull(); if (fuzzed_data_provider.ConsumeBool()) { FILE* f = auto_file.release(); From 5315886bf5bb430ced1b23ebfcd0b8865b523675 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 5 Sep 2024 18:32:41 -0400 Subject: [PATCH 17/86] build: Bump to 28.0rc2 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3bc6b13efc85..70fc37c5c540 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 28) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 1) +define(_CLIENT_VERSION_RC, 2) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2024) define(_COPYRIGHT_HOLDERS,[The %s developers]) From 06a7df70df30879e0b691d1a252636f703b8cdfb Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 5 Sep 2024 18:48:03 -0400 Subject: [PATCH 18/86] doc: Generate manpages --- 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/bitcoind.1 | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 914b8fe34920..969e03404e6c 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" "August 2024" "bitcoin-cli v28.0.0rc1" "User Commands" +.TH BITCOIN-CLI "1" "September 2024" "bitcoin-cli v28.0.0rc2" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc1 +bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc2 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc1 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help Get help for a command\/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v28.0.0rc1 +Bitcoin Core RPC client version v28.0.0rc2 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index f232266c4294..c3d03a97e92b 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" "August 2024" "bitcoin-qt v28.0.0rc1" "User Commands" +.TH BITCOIN-QT "1" "September 2024" "bitcoin-qt v28.0.0rc2" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v28.0.0rc1 +bitcoin-qt \- manual page for bitcoin-qt v28.0.0rc2 .SH SYNOPSIS .B bitcoin-qt [\fI\,command-line options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v28.0.0rc1 +Bitcoin Core version v28.0.0rc2 .PP Optional URI is a Bitcoin address in BIP21 URI format. .SH OPTIONS diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 5da1ffe3c5e6..c6e8585a380f 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" "August 2024" "bitcoin-tx v28.0.0rc1" "User Commands" +.TH BITCOIN-TX "1" "September 2024" "bitcoin-tx v28.0.0rc2" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc1 +bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc2 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc1 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v28.0.0rc1 +Bitcoin Core bitcoin\-tx utility version v28.0.0rc2 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index b1319cafc017..5697b8924490 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "August 2024" "bitcoin-util v28.0.0rc1" "User Commands" +.TH BITCOIN-UTIL "1" "September 2024" "bitcoin-util v28.0.0rc2" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v28.0.0rc1 +bitcoin-util \- manual page for bitcoin-util v28.0.0rc2 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v28.0.0rc1 +Bitcoin Core bitcoin\-util utility version v28.0.0rc2 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 40a2bd68bf33..f6918203a73f 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "August 2024" "bitcoin-wallet v28.0.0rc1" "User Commands" +.TH BITCOIN-WALLET "1" "September 2024" "bitcoin-wallet v28.0.0rc2" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v28.0.0rc1 +bitcoin-wallet \- manual page for bitcoin-wallet v28.0.0rc2 .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet version v28.0.0rc1 +Bitcoin Core bitcoin\-wallet version v28.0.0rc2 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir. diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index c370a45a68de..db0ad0a21d33 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" "August 2024" "bitcoind v28.0.0rc1" "User Commands" +.TH BITCOIND "1" "September 2024" "bitcoind v28.0.0rc2" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v28.0.0rc1 +bitcoind \- manual page for bitcoind v28.0.0rc2 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] \fI\,Start Bitcoin Core\/\fR .SH DESCRIPTION -Bitcoin Core version v28.0.0rc1 +Bitcoin Core version v28.0.0rc2 .SH OPTIONS .HP \-? From e24a25d882ba8c8dacc1eede6b9373fe7601f85b Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 23 Sep 2024 13:02:28 -0400 Subject: [PATCH 19/86] test: Use shell builtins in run_command test case Github-Pull: bitcoin/bitcoin#30952 Rebased-From: 7bd3ee62f6d6f59ca599e85f81776d282dee1539 --- src/test/system_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index 07d15f5552bb..c9dd9c82cd14 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(run_command) } { // Return non-zero exit code, with error message for stderr - const std::string command{"python3 -c 'import sys; print(\"err\", file=sys.stderr); sys.exit(2)'"}; + const std::string command{"sh -c 'echo err 1>&2 && false'"}; const std::string expected{"err"}; BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) { const std::string what(e.what()); From 7fcd7b85c64ffbcd67d8ff1add46d258b26b2029 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Tue, 24 Sep 2024 14:11:20 -0400 Subject: [PATCH 20/86] validation: Disable CheckForkWarningConditions for background chainstate The comparison of m_best_invalid with the tip of the respective chainstate makes no sense for the background chainstate, and can lead to incorrect error messages. Github-Pull: bitcoin/bitcoin#30962 Rebased-From: c0a0c72b4d68a4f0c53c2c4b95f4d6e399f8e4ee --- src/validation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index a6b7f3d36148..59beb5cbdafd 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2023,7 +2023,8 @@ void Chainstate::CheckForkWarningConditions() // Before we get past initial download, we cannot reliably alert about forks // (we assume we don't get stuck on a fork before finishing our initial sync) - if (m_chainman.IsInitialBlockDownload()) { + // Also not applicable to the background chainstate + if (m_chainman.IsInitialBlockDownload() || this->GetRole() == ChainstateRole::BACKGROUND) { return; } From 5feef9ce7ebf608e45aa9682512599494c0d46d8 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 24 Sep 2024 11:58:46 -0400 Subject: [PATCH 21/86] build: Bump to 28.0 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 70fc37c5c540..c2bf42e39b95 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 28) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 2) +define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2024) define(_COPYRIGHT_HOLDERS,[The %s developers]) From 98745e03ffc9f69f901b827e19e4d8d645a27112 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 24 Sep 2024 12:04:49 -0400 Subject: [PATCH 22/86] doc: generate manpages --- 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/bitcoind.1 | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index 969e03404e6c..f7d12ad2b42a 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" "September 2024" "bitcoin-cli v28.0.0rc2" "User Commands" +.TH BITCOIN-CLI "1" "September 2024" "bitcoin-cli v28.0.0" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc2 +bitcoin-cli \- manual page for bitcoin-cli v28.0.0 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v28.0.0rc2 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help Get help for a command\/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v28.0.0rc2 +Bitcoin Core RPC client version v28.0.0 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index c3d03a97e92b..ef92fe1223df 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" "September 2024" "bitcoin-qt v28.0.0rc2" "User Commands" +.TH BITCOIN-QT "1" "September 2024" "bitcoin-qt v28.0.0" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v28.0.0rc2 +bitcoin-qt \- manual page for bitcoin-qt v28.0.0 .SH SYNOPSIS .B bitcoin-qt [\fI\,command-line options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v28.0.0rc2 +Bitcoin Core version v28.0.0 .PP Optional URI is a Bitcoin address in BIP21 URI format. .SH OPTIONS diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index c6e8585a380f..3d5773666586 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" "September 2024" "bitcoin-tx v28.0.0rc2" "User Commands" +.TH BITCOIN-TX "1" "September 2024" "bitcoin-tx v28.0.0" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc2 +bitcoin-tx \- manual page for bitcoin-tx v28.0.0 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v28.0.0rc2 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v28.0.0rc2 +Bitcoin Core bitcoin\-tx utility version v28.0.0 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 5697b8924490..e6045b671f7a 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "September 2024" "bitcoin-util v28.0.0rc2" "User Commands" +.TH BITCOIN-UTIL "1" "September 2024" "bitcoin-util v28.0.0" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v28.0.0rc2 +bitcoin-util \- manual page for bitcoin-util v28.0.0 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v28.0.0rc2 +Bitcoin Core bitcoin\-util utility version v28.0.0 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index f6918203a73f..23b3d47ae436 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "September 2024" "bitcoin-wallet v28.0.0rc2" "User Commands" +.TH BITCOIN-WALLET "1" "September 2024" "bitcoin-wallet v28.0.0" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v28.0.0rc2 +bitcoin-wallet \- manual page for bitcoin-wallet v28.0.0 .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet version v28.0.0rc2 +Bitcoin Core bitcoin\-wallet version v28.0.0 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir. diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index db0ad0a21d33..5fdcaa2ead8b 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" "September 2024" "bitcoind v28.0.0rc2" "User Commands" +.TH BITCOIND "1" "September 2024" "bitcoind v28.0.0" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v28.0.0rc2 +bitcoind \- manual page for bitcoind v28.0.0 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] \fI\,Start Bitcoin Core\/\fR .SH DESCRIPTION -Bitcoin Core version v28.0.0rc2 +Bitcoin Core version v28.0.0 .SH OPTIONS .HP \-? From 5de225f5c145368f70cb5f870933bcf9df6b92c8 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 30 Sep 2024 17:13:20 -0400 Subject: [PATCH 23/86] doc: 28.0 Release Notes --- doc/release-notes.md | 360 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 359 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 7a587cfec90b..3a151f81761d 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1 +1,359 @@ -See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/28.0-Release-Notes-Draft +Bitcoin Core version 28.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. + +Running bitcoin core binaries on macOS requires self signing. +``` +cd /path/to/bitcoin-core/bin +xattr -d com.apple.quarantine bitcoin-cli bitcoin-qt bitcoin-tx bitcoin-util bitcoin-wallet bitcoind test_bitcoin +codesign -s - bitcoin-cli bitcoin-qt bitcoin-tx bitcoin-util bitcoin-wallet bitcoind test_bitcoin +``` + +Compatibility +============== + +Bitcoin Core is supported and extensively tested on operating systems +using the Linux Kernel 3.17+, macOS 11.0+, and Windows 7 and newer. 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 +=============== + +Testnet4/BIP94 support +----- + +Support for Testnet4 as specified in [BIP94](https://github.com/bitcoin/bips/blob/master/bip-0094.mediawiki) +has been added. The network can be selected with the `-testnet4` option and +the section header is also named `[testnet4]`. + +While the intention is to phase out support for Testnet3 in an upcoming +version, support for it is still available via the known options in this +release. + +Windows Data Directory +---------------------- + +The default data directory on Windows has been moved from `C:\Users\Username\AppData\Roaming\Bitcoin` +to `C:\Users\Username\AppData\Local\Bitcoin`. Bitcoin Core will check the existence +of the old directory first and continue to use that directory for backwards +compatibility if it is present. (#27064) + +P2P and network changes +----------------------- + +- Previously if Bitcoin Core was listening for P2P connections, either using + default settings or via `bind=addr:port` it would always also bind to + `127.0.0.1:8334` to listen for Tor connections. It was not possible to switch + this off, even if the node didn't use Tor. This has been changed and now + `bind=addr:port` results in binding on `addr:port` only. The default behavior + of binding to `0.0.0.0:8333` and `127.0.0.1:8334` has not been changed. + + If you are using a `bind=...` configuration without `bind=...=onion` and rely + on the previous implied behavior to accept incoming Tor connections at + `127.0.0.1:8334`, you need to now make this explicit by using + `bind=... bind=127.0.0.1:8334=onion`. (#22729) + +- Bitcoin Core will now fail to start up if any of its P2P binds fail, rather + than the previous behaviour where it would only abort startup if all P2P + binds had failed. (#22729) + +- UNIX domain sockets can now be used for proxy connections. Set `-onion` or `-proxy` +to the local socket path with the prefix `unix:` (e.g. `-onion=unix:/home/me/torsocket`). +(#27375) + +- unix socket paths are now accepted for `-zmqpubrawblock` and `-zmqpubrawtx` with +the format `-zmqpubrawtx=unix:/path/to/file` + +- Additional flags "in" and "out" have been added to `-whitelist` to control whether + permissions apply to incoming connections and/or manual (default: incoming only). + +- Transactions that are too low feerate will be opportunistically paired with their child +transactions and submitted as a package, thus enabling the node to download +1-parent-1-child packages using the existing transaction relay protocol. Combined with +other mempool policies, this allows limited "package relay" when a parent transaction +is below mempool minimum feerate; TRUC parents are additionally allowed to be below +minimum relay feerate (i.e. pay 0 fees). Use the `submitpackage` RPC to submit packages +directly to the node. Warning: this p2p feature is limited (unlike the `submitpackage` +interface, a child with multiple unconfirmed parents is not supported) and not yet +reliable under adversarial conditions. (#28970) + +Mempool Policy Changes +---------------------- + +- Transactions with version number set to 3 are now treated as standard on all networks (#29496), + subject to Opt-in Topologically Restricted Until Confirmation (TRUC) Transactions policy as + described in [BIP 431](https://github.com/bitcoin/bips/blob/master/bip-0431.mediawiki). The + policy includes limits on spending unconfirmed outputs (#28948), eviction of a previous descendant + if a more incentive-compatible one is submitted (#29306), and a maximum transaction size of 10,000vB + (#29873). These restrictions simplify the assessment of incentive compatibility of accepting or + replacing TRUC transactions, thus ensuring any replacements are more profitable for the node and + making fee-bumping more reliable. + +- Pay To Anchor (P2A) is a new standard witness output type for spending, + a newly recognised output template. This allows for key-less anchor + outputs, with compact spending conditions for additional efficiencies on + top of an equivalent `sh(OP_TRUE)` output, in addition to the txid stability + of the spending transaction. + N.B. propagation of this output spending on the network will be limited + until a sufficient number of nodes on the network adopt this upgrade. + +- Limited package RBF is now enabled, where the proposed conflicting package would result in + a connected component, aka cluster, of size 2 in the mempool. All clusters being conflicted + against must be of size 2 or lower. + +- `mempoolfullrbf=1` is now set by default. + +Updated RPCs +------------ + +- The JSON-RPC server now recognizes JSON-RPC 2.0 requests and responds with +strict adherence to the [specification](https://www.jsonrpc.org/specification). +See [JSON-RPC-interface.md](https://github.com/bitcoin/bitcoin/blob/master/doc/JSON-RPC-interface.md#json-rpc-11-vs-20) for details. + +- The `dumptxoutset` RPC now returns the UTXO set dump in a new and + improved format. At the same time the `loadtxoutset` RPC now + expects this new format in dumps it tries to load. Dumps with the + old format are no longer supported and need to be recreated using + the new format in order to be usable. + +- AssumeUTXO mainnet parameters have been added for height 840,000. + This means the `loadtxoutset` RPC can now be used on mainnet with + the matching UTXO set from that height. + +- The `warnings` field in `getblockchaininfo`, `getmininginfo` and + `getnetworkinfo` now returns all the active node warnings as an array + of strings, instead of just a single warning. The current behaviour + can temporarily be restored by running bitcoind with configuration + option `-deprecatedrpc=warnings`. + +- Previously when using the `sendrawtransaction` rpc and specifying outputs + that are already in the UXTO set an RPC error code `-27` with RPC error + text "Transaction already in block chain" was returned in response. + The help text has been updated to "Transaction outputs already in utxo set" + to more accurately describe the source of the issue. + +- The default mode for the `estimatesmartfee` RPC has been updated from `conservative` to `economical`. + which is expected to reduce overestimation for many users, particularly if Replace-by-Fee is an option. + For users that require high confidence in their fee estimates at the cost of potentially overestimating, + the `conservative` mode remains available. + +- An item of `unspents`, of `scantxoutset`, has two new fields: `blockhash` + and `confirmations`. `blockhash` is the hash of the block where the UTXO was + created. `confirmations` is the number of confirmations of the UTXO. (#30515) + +- `maxfeerate` and `maxburnamount` arguments are added to submitpackage. + +Changes to wallet related RPCs can be found in the Wallet section below. + +New RPCs +-------- + +Updated REST APIs +----------------- +- Parameter validation for `/rest/getutxos` has been improved by rejecting + truncated or overly large txids and malformed outpoint indices by raising an + HTTP_BAD_REQUEST "Parse error". Previously, these malformed requests would be + silently handled. (#30482, #30444) + +Build System +------------ + +- GCC 11.1 or later, or Clang 16.0 or later, +are now required to compile Bitcoin Core. + +- The minimum required glibc to run Bitcoin Core is now +2.31. This means that RHEL 8 and Ubuntu 18.04 (Bionic) +are no-longer supported. (#29987) + +- `--enable-lcov-branch-coverage` has been removed, given +incompatibilities between lcov version 1 & 2. `LCOV_OPTS` +should be used to set any options instead. + +Updated settings +---------------- + +- When running with `-alertnotify`, an alert can now be raised multiple +times instead of just once. Previously, it was only raised when unknown +new consensus rules were activated, whereas the scope has now been +increased to include all kernel warnings. Specifically, alerts will now +also be raised when an invalid chain with a large amount of work has +been detected. Additional warnings may be added in the future. +(#30058) + +Changes to GUI or wallet related settings can be found in the GUI or Wallet section below. + +New settings +------------ + +Tools and Utilities +------------------- + +Wallet +------ + +- The wallet now detects when wallet transactions conflict with the mempool. Mempool +conflicting transactions can be seen in the `"mempoolconflicts"` field of +`gettransaction`. The inputs of mempool conflicted transactions can now be respent +without manually abandoning the transactions when the parent transaction is dropped +from the mempool, which can cause wallet balances to appear higher. + +- A new `max_tx_weight` option has been added to the RPCs `fundrawtransaction`, `walletcreatefundedpsbt`, and `send`. +It specifies the maximum transaction weight. If the limit is exceeded during funding, the transaction will not be built. +The default value is 4,000,000 WU. + +- A new RPC `createwalletdescriptor` is added which allows users to add new automatically +generated descriptors to their wallet. This can be used to upgrade wallets created prior to +the introduction of a new standard descriptor, such as taproot. + +- A new RPC `gethdkeys` is added which will list all of the BIP 32 HD keys in use by all +of the descriptors in the wallet. These keys can be used in conjunction with `createwalletdescriptor` +to create and add single key descriptors to the wallet for a particular key that the wallet +already knows. + +- The `sendall` RPC can spend unconfirmed change and will include additional fees as necessary +for the resulting transaction to bump the unconfirmed transactions' feerates to the specified feerate. + +- If a `fee_rate` is specified when using the `bumpfee` RPC, the feerate is no longer restricted to +following the wallet's incremental feerate of 5 sat/vb. The feerate must still be at least the sum +of the original fee and the mempool's incremental feerate. + +GUI changes +----------- + +- The "Migrate Wallet" menu allows users to migrate any legacy wallet in their wallet +directory, regardless of the wallets loaded. (gui#824) + +- The "Information" window now displays the maximum mempool size along with the +mempool usage. (gui#825) + +Low-level changes +================= + +RPC +--- + +Tests +----- + +- The BIP94 timewarp attack mitigation is now active on the `regtest` network + +- `-testdatadir` is added to `test_bitcoin` to allow specifying the location for unit test data directories. + +Blockstorage +------------ + +- Block files are now XOR'd by default with a key stored in the blocksdir. +Previous releases of Bitcoin Core or previous external software will not be able to read the blocksdir with a non-zero XOR-key. +Refer to the `-blocksxor` help for more details. + +Credits +======= + +Thanks to everyone who directly contributed to this release: +- 0xb10c +- Alfonso Roman Zubeldia +- Andrew Toth +- AngusP +- Anthony Towns +- Antoine Poinsot +- Anton A +- Ava Chow +- Ayush Singh +- Ben Westgate +- Brandon Odiwuor +- brunoerg +- bstin +- Charlie +- Christopher Bergqvist +- Cory Fields +- crazeteam +- Daniela Brozzoni +- David Gumberg +- dergoegge +- Edil Medeiros +- Epic Curious +- Fabian Jahr +- fanquake +- furszy +- glozow +- Greg Sanders +- hanmz +- Hennadii Stepanov +- Hernan Marino +- Hodlinator +- ishaanam +- ismaelsadeeq +- Jadi +- Jon Atack +- josibake +- jrakibi +- kevkevin +- kevkevinpal +- Konstantin Akimov +- laanwj +- Larry Ruane +- Lőrinc +- Luis Schwab +- Luke Dashjr +- MarcoFalke +- marcofleon +- Marnix +- Martin Saposnic +- Martin Zumsande +- Matt Corallo +- Matthew Zipkin +- Matt Whitlock +- Max Edwards +- Michael Dietz +- Murch +- nanlour +- pablomartin4btc +- Peter Todd +- Pieter Wuille +- @RandyMcMillan +- RoboSchmied +- Roman Zeyde +- Ryan Ofsky +- Sebastian Falbesoner +- Sergi Delgado Segura +- Sjors Provoost +- spicyzboss +- StevenMia +- stickies-v +- stratospher +- Suhas Daftuar +- sunerok +- tdb3 +- TheCharlatan +- umiumi +- Vasil Dimov +- virtu +- willcl-ark + +As well as to everyone that helped with translations on +[Transifex](https://www.transifex.com/bitcoin/bitcoin/). From 09f55604a743cdcd4976fb85c2bda8e66a929079 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 11:12:51 +1000 Subject: [PATCH 24/86] signet/miner: drop get_reward_address function --- contrib/signet/miner | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 4216ada5fa63..a5976dbf38a1 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -139,35 +139,26 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None): return do_createpsbt(block, signme, spendme) -def get_reward_address(args, height): - if args.address is not None: - return args.address - - if '*' not in args.descriptor: - addr = json.loads(args.bcli("deriveaddresses", args.descriptor))[0] - args.address = addr - return addr - - remove = [k for k in args.derived_addresses.keys() if k+20 <= height] - for k in remove: - del args.derived_addresses[k] - - addr = args.derived_addresses.get(height, None) - if addr is None: - addrs = json.loads(args.bcli("deriveaddresses", args.descriptor, "[%d,%d]" % (height, height+20))) - addr = addrs[0] - for k, a in enumerate(addrs): - args.derived_addresses[height+k] = a - - return addr - def get_reward_addr_spk(args, height): assert args.address is not None or args.descriptor is not None if hasattr(args, "reward_spk"): return args.address, args.reward_spk - reward_addr = get_reward_address(args, height) + if args.address is not None: + reward_addr = args.address + elif '*' not in args.descriptor: + reward_addr = args.address = json.loads(args.bcli("deriveaddresses", args.descriptor))[0] + else: + remove = [k for k in args.derived_addresses.keys() if k+20 <= height] + for k in remove: + del args.derived_addresses[k] + if height not in args.derived_addresses: + addrs = json.loads(args.bcli("deriveaddresses", args.descriptor, "[%d,%d]" % (height, height+20))) + for k, a in enumerate(addrs): + args.derived_addresses[height+k] = a + reward_addr = args.derived_addresses[height] + reward_spk = bytes.fromhex(json.loads(args.bcli("getaddressinfo", reward_addr))["scriptPubKey"]) if args.address is not None: # will always be the same, so cache From be91615324e8413526c083c51552c77db498b772 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 11:13:53 +1000 Subject: [PATCH 25/86] signet/miner: drop do_createpsbt function --- contrib/signet/miner | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index a5976dbf38a1..e7ec0a1d13ef 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -72,17 +72,6 @@ def signet_txs(block, challenge): return spend, to_spend -def do_createpsbt(block, signme, spendme): - psbt = PSBT() - psbt.g = PSBTMap( {PSBT_GLOBAL_UNSIGNED_TX: signme.serialize(), - PSBT_SIGNET_BLOCK: block.serialize() - } ) - psbt.i = [ PSBTMap( {PSBT_IN_NON_WITNESS_UTXO: spendme.serialize(), - PSBT_IN_SIGHASH_TYPE: bytes([1,0,0,0])}) - ] - psbt.o = [ PSBTMap() ] - return psbt.to_base64() - def do_decode_psbt(b64psbt): psbt = PSBT.from_base64(b64psbt) @@ -137,7 +126,15 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None): signme, spendme = signet_txs(block, signet_spk_bin) - return do_createpsbt(block, signme, spendme) + psbt = PSBT() + psbt.g = PSBTMap( {PSBT_GLOBAL_UNSIGNED_TX: signme.serialize(), + PSBT_SIGNET_BLOCK: block.serialize() + } ) + psbt.i = [ PSBTMap( {PSBT_IN_NON_WITNESS_UTXO: spendme.serialize(), + PSBT_IN_SIGHASH_TYPE: bytes([1,0,0,0])}) + ] + psbt.o = [ PSBTMap() ] + return psbt.to_base64() def get_reward_addr_spk(args, height): assert args.address is not None or args.descriptor is not None From 517df644fc5ebcc68c0b8c0de1a360284a7ef451 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 11:16:25 +1000 Subject: [PATCH 26/86] signet/miner: drop create_coinbase function --- contrib/signet/miner | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index e7ec0a1d13ef..84b28b6699c4 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -32,12 +32,6 @@ SIGNET_HEADER = b"\xec\xc7\xda\xa2" PSBT_SIGNET_BLOCK = b"\xfc\x06signetb" # proprietary PSBT global field holding the block being signed RE_MULTIMINER = re.compile(r"^(\d+)(-(\d+))?/(\d+)$") -def create_coinbase(height, value, spk): - cb = CTransaction() - cb.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(height), 0xffffffff)] - cb.vout = [CTxOut(value, spk)] - return cb - def signet_txs(block, challenge): # assumes signet solution has not been added yet so does not need # to be removed @@ -103,7 +97,9 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None): signet_spk = tmpl["signet_challenge"] signet_spk_bin = bytes.fromhex(signet_spk) - cbtx = create_coinbase(height=tmpl["height"], value=tmpl["coinbasevalue"], spk=reward_spk) + cbtx = CTransaction() + cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(tmpl["height"]), 0xffffffff)] + cbtx.vout = [CTxOut(tmpl["coinbasevalue"], reward_spk)] cbtx.vin[0].nSequence = 2**32-2 cbtx.rehash() From eab0bed83f790f5993469c0d4d8726ed9318840d Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 11:18:03 +1000 Subject: [PATCH 27/86] signet/miner: rename do_decode_psbt to decode_psbt --- contrib/signet/miner | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 84b28b6699c4..a3190838f1c4 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -66,7 +66,7 @@ def signet_txs(block, challenge): return spend, to_spend -def do_decode_psbt(b64psbt): +def decode_psbt(b64psbt): psbt = PSBT.from_base64(b64psbt) assert len(psbt.tx.vin) == 1 @@ -166,7 +166,7 @@ def do_genpsbt(args): print(psbt) def do_solvepsbt(args): - block, signet_solution = do_decode_psbt(sys.stdin.read()) + block, signet_solution = decode_psbt(sys.stdin.read()) block = finish_block(block, signet_solution, args.grind_cmd) print(block.serialize().hex()) @@ -398,7 +398,7 @@ def do_generate(args): logging.debug("Generated PSBT: %s" % (psbt,)) sys.stderr.write("PSBT signing failed\n") return 1 - block, signet_solution = do_decode_psbt(psbt_signed["psbt"]) + block, signet_solution = decode_psbt(psbt_signed["psbt"]) block = finish_block(block, signet_solution, args.grind_cmd) # submit block From 855e94802e8f7138878622178e7231cf4e858d81 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 11:25:01 +1000 Subject: [PATCH 28/86] signet/miner: move next_block_* functions into new Generator class --- contrib/signet/miner | 72 ++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index a3190838f1c4..6aefc56ea2c6 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -209,36 +209,46 @@ def seconds_to_hms(s): out = "-" + out return out -def next_block_delta(last_nbits, last_hash, ultimate_target, do_poisson, max_interval): - # strategy: - # 1) work out how far off our desired target we are - # 2) cap it to a factor of 4 since that's the best we can do in a single retarget period - # 3) use that to work out the desired average interval in this retarget period - # 4) if doing poisson, use the last hash to pick a uniformly random number in [0,1), and work out a random multiplier to vary the average by - # 5) cap the resulting interval between 1 second and 1 hour to avoid extremes - +class Generate: INTERVAL = 600.0*2016/2015 # 10 minutes, adjusted for the off-by-one bug - current_target = nbits_to_target(last_nbits) - retarget_factor = ultimate_target / current_target - retarget_factor = max(0.25, min(retarget_factor, 4.0)) - avg_interval = INTERVAL * retarget_factor + def __init__(self, multiminer=None, ultimate_target=None, poisson=False, max_interval=1800): + if multiminer is None: + multiminer = (0, 1, 1) + (self.multi_low, self.multi_high, self.multi_period) = multiminer + self.ultimate_target = ultimate_target + self.poisson = poisson + self.max_interval = max_interval - if do_poisson: - det_rand = int(last_hash[-8:], 16) * 2**-32 - this_interval_variance = -math.log1p(-det_rand) - else: - this_interval_variance = 1 + def next_block_delta(self, last_nbits, last_hash): + # strategy: + # 1) work out how far off our desired target we are + # 2) cap it to a factor of 4 since that's the best we can do in a single retarget period + # 3) use that to work out the desired average interval in this retarget period + # 4) if doing poisson, use the last hash to pick a uniformly random number in [0,1), and work out a random multiplier to vary the average by + # 5) cap the resulting interval between 1 second and 1 hour to avoid extremes - this_interval = avg_interval * this_interval_variance - this_interval = max(1, min(this_interval, max_interval)) + current_target = nbits_to_target(last_nbits) + retarget_factor = self.ultimate_target / current_target + retarget_factor = max(0.25, min(retarget_factor, 4.0)) - return this_interval + avg_interval = self.INTERVAL * retarget_factor + + if self.poisson: + det_rand = int(last_hash[-8:], 16) * 2**-32 + this_interval_variance = -math.log1p(-det_rand) + else: + this_interval_variance = 1 -def next_block_is_mine(last_hash, my_blocks): - det_rand = int(last_hash[-16:-8], 16) - return my_blocks[0] <= (det_rand % my_blocks[2]) < my_blocks[1] + this_interval = avg_interval * this_interval_variance + this_interval = max(1, min(this_interval, self.max_interval)) + + return this_interval + + def next_block_is_mine(self, last_hash): + det_rand = int(last_hash[-16:-8], 16) + return self.multi_low <= (det_rand % self.multi_period) < self.multi_high def do_generate(args): if args.max_blocks is not None: @@ -298,6 +308,8 @@ def do_generate(args): ultimate_target = nbits_to_target(int(args.nbits,16)) + gen = Generate(multiminer=my_blocks, ultimate_target=ultimate_target, poisson=args.poisson, max_interval=args.max_interval) + mined_blocks = 0 bestheader = {"hash": None} lastheader = None @@ -312,9 +324,9 @@ def do_generate(args): if lastheader is None: lastheader = bestheader["hash"] elif bestheader["hash"] != lastheader: - next_delta = next_block_delta(int(bestheader["bits"], 16), bestheader["hash"], ultimate_target, args.poisson, args.max_interval) + next_delta = gen.next_block_delta(int(bestheader["bits"], 16), bestheader["hash"]) next_delta += bestheader["time"] - time.time() - next_is_mine = next_block_is_mine(bestheader["hash"], my_blocks) + next_is_mine = gen.next_block_is_mine(bestheader["hash"]) logging.info("Received new block at height %d; next in %s (%s)", bestheader["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup")) lastheader = bestheader["hash"] @@ -326,17 +338,17 @@ def do_generate(args): action_time = now is_mine = True elif bestheader["height"] == 0: - time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval) + time_delta = gen.next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"]) time_delta *= 100 # 100 blocks logging.info("Backdating time for first block to %d minutes ago" % (time_delta/60)) mine_time = now - time_delta action_time = now is_mine = True else: - time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval) + time_delta = gen.next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"]) mine_time = bestheader["time"] + time_delta - is_mine = next_block_is_mine(bci["bestblockhash"], my_blocks) + is_mine = gen.next_block_is_mine(bci["bestblockhash"]) action_time = mine_time if not is_mine: @@ -407,9 +419,9 @@ def do_generate(args): # report bstr = "block" if is_mine else "backup block" - next_delta = next_block_delta(block.nBits, block.hash, ultimate_target, args.poisson, args.max_interval) + next_delta = gen.next_block_delta(block.nBits, block.hash) next_delta += block.nTime - time.time() - next_is_mine = next_block_is_mine(block.hash, my_blocks) + next_is_mine = gen.next_block_is_mine(block.hash) logging.debug("Block hash %s payout to %s", block.hash, reward_addr) logging.info("Mined %s at height %d; next in %s (%s)", bstr, tmpl["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup")) From 792fdee7d720c91b83952159cd57a2cd14afacae Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 13:15:19 +1000 Subject: [PATCH 29/86] signet/miner: add Generate.next_block_time function --- contrib/signet/miner | 107 +++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 6aefc56ea2c6..f80f8aecfe07 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -213,13 +213,17 @@ class Generate: INTERVAL = 600.0*2016/2015 # 10 minutes, adjusted for the off-by-one bug - def __init__(self, multiminer=None, ultimate_target=None, poisson=False, max_interval=1800): + def __init__(self, multiminer=None, ultimate_target=None, poisson=False, max_interval=1800, + standby_delay=0, backup_delay=0, set_block_time=None): if multiminer is None: multiminer = (0, 1, 1) (self.multi_low, self.multi_high, self.multi_period) = multiminer self.ultimate_target = ultimate_target self.poisson = poisson self.max_interval = max_interval + self.standby_delay = standby_delay + self.backup_delay = backup_delay + self.set_block_time = set_block_time def next_block_delta(self, last_nbits, last_hash): # strategy: @@ -250,6 +254,42 @@ class Generate: det_rand = int(last_hash[-16:-8], 16) return self.multi_low <= (det_rand % self.multi_period) < self.multi_high + def next_block_time(self, now, bestheader, is_first_block): + if self.set_block_time is not None: + logging.debug("Setting start time to %d", self.set_block_time) + self.mine_time = self.set_block_time + self.action_time = now + self.is_mine = True + elif bestheader["height"] == 0: + time_delta = self.INTERVAL * 100 # plenty of time to mine 100 blocks + logging.info("Backdating time for first block to %d minutes ago" % (time_delta/60)) + self.mine_time = now - time_delta + self.action_time = now + self.is_mine = True + else: + time_delta = self.next_block_delta(int(bestheader["bits"], 16), bestheader["hash"]) + self.mine_time = bestheader["time"] + time_delta + + self.is_mine = self.next_block_is_mine(bestheader["hash"]) + + self.action_time = self.mine_time + if not self.is_mine: + self.action_time += self.backup_delay + + if self.standby_delay > 0: + self.action_time += self.standby_delay + elif is_first_block: + # for non-standby, always mine immediately on startup, + # even if the next block shouldn't be ours + self.action_time = now + + # don't want fractional times so round down + self.mine_time = int(self.mine_time) + self.action_time = int(self.action_time) + + # can't mine a block 2h in the future; 1h55m for some safety + self.action_time = max(self.action_time, self.mine_time - 6900) + def do_generate(args): if args.max_blocks is not None: if args.ongoing: @@ -308,7 +348,8 @@ def do_generate(args): ultimate_target = nbits_to_target(int(args.nbits,16)) - gen = Generate(multiminer=my_blocks, ultimate_target=ultimate_target, poisson=args.poisson, max_interval=args.max_interval) + gen = Generate(multiminer=my_blocks, ultimate_target=ultimate_target, poisson=args.poisson, max_interval=args.max_interval, + standby_delay=args.standby_delay, backup_delay=args.backup_delay, set_block_time=args.set_block_time) mined_blocks = 0 bestheader = {"hash": None} @@ -332,52 +373,18 @@ def do_generate(args): # when is the next block due to be mined? now = time.time() - if args.set_block_time is not None: - logging.debug("Setting start time to %d", args.set_block_time) - mine_time = args.set_block_time - action_time = now - is_mine = True - elif bestheader["height"] == 0: - time_delta = gen.next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"]) - time_delta *= 100 # 100 blocks - logging.info("Backdating time for first block to %d minutes ago" % (time_delta/60)) - mine_time = now - time_delta - action_time = now - is_mine = True - else: - time_delta = gen.next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"]) - mine_time = bestheader["time"] + time_delta - - is_mine = gen.next_block_is_mine(bci["bestblockhash"]) - - action_time = mine_time - if not is_mine: - action_time += args.backup_delay - - if args.standby_delay > 0: - action_time += args.standby_delay - elif mined_blocks == 0: - # for non-standby, always mine immediately on startup, - # even if the next block shouldn't be ours - action_time = now - - # don't want fractional times so round down - mine_time = int(mine_time) - action_time = int(action_time) - - # can't mine a block 2h in the future; 1h55m for some safety - action_time = max(action_time, mine_time - 6900) + gen.next_block_time(now, bestheader, (mined_blocks == 0)) # ready to go? otherwise sleep and check for new block - if now < action_time: - sleep_for = min(action_time - now, 60) - if mine_time < now: + if now < gen.action_time: + sleep_for = min(gen.action_time - now, 60) + if gen.mine_time < now: # someone else might have mined the block, # so check frequently, so we don't end up late # mining the next block if it's ours sleep_for = min(20, sleep_for) - minestr = "mine" if is_mine else "backup" - logging.debug("Sleeping for %s, next block due in %s (%s)" % (seconds_to_hms(sleep_for), seconds_to_hms(mine_time - now), minestr)) + minestr = "mine" if gen.is_mine else "backup" + logging.debug("Sleeping for %s, next block due in %s (%s)" % (seconds_to_hms(sleep_for), seconds_to_hms(gen.mine_time - now), minestr)) time.sleep(sleep_for) continue @@ -390,20 +397,20 @@ def do_generate(args): logging.debug("GBT template: %s", tmpl) - if tmpl["mintime"] > mine_time: - logging.info("Updating block time from %d to %d", mine_time, tmpl["mintime"]) - mine_time = tmpl["mintime"] - if mine_time > now: - logging.error("GBT mintime is in the future: %d is %d seconds later than %d", mine_time, (mine_time-now), now) + if tmpl["mintime"] > gen.mine_time: + logging.info("Updating block time from %d to %d", gen.mine_time, tmpl["mintime"]) + gen.mine_time = tmpl["mintime"] + if gen.mine_time > now: + logging.error("GBT mintime is in the future: %d is %d seconds later than %d", gen.mine_time, (gen.mine_time-now), now) return 1 # address for reward reward_addr, reward_spk = get_reward_addr_spk(args, tmpl["height"]) # mine block - logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(mine_time-bestheader["time"]), mine_time, is_mine) + logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(gen.mine_time-bestheader["time"]), gen.mine_time, gen.is_mine) mined_blocks += 1 - psbt = generate_psbt(tmpl, reward_spk, blocktime=mine_time) + psbt = generate_psbt(tmpl, reward_spk, blocktime=gen.mine_time) input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') psbt_signed = json.loads(args.bcli("-stdin", "walletprocesspsbt", input=input_stream)) if not psbt_signed.get("complete",False): @@ -417,7 +424,7 @@ def do_generate(args): r = args.bcli("-stdin", "submitblock", input=block.serialize().hex().encode('utf8')) # report - bstr = "block" if is_mine else "backup block" + bstr = "block" if gen.is_mine else "backup block" next_delta = gen.next_block_delta(block.nBits, block.hash) next_delta += block.nTime - time.time() From 7038de737e991bc62ded58d80e54fc3b4c7362d5 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 13:19:22 +1000 Subject: [PATCH 30/86] signet/miner: add Generate.gbt function --- contrib/signet/miner | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index f80f8aecfe07..02187476c53c 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -290,6 +290,22 @@ class Generate: # can't mine a block 2h in the future; 1h55m for some safety self.action_time = max(self.action_time, self.mine_time - 6900) + 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"]) + time.sleep(1) + return None + + if tmpl["mintime"] > self.mine_time: + logging.info("Updating block time from %d to %d", self.mine_time, tmpl["mintime"]) + self.mine_time = tmpl["mintime"] + if self.mine_time > now: + logging.error("GBT mintime is in the future: %d is %d seconds later than %d", self.mine_time, (self.mine_time-now), now) + return None + + return tmpl + def do_generate(args): if args.max_blocks is not None: if args.ongoing: @@ -389,21 +405,12 @@ def do_generate(args): continue # gbt - tmpl = json.loads(args.bcli("getblocktemplate", '{"rules":["signet","segwit"]}')) - if tmpl["previousblockhash"] != bci["bestblockhash"]: - logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bci["bestblockhash"]) - time.sleep(1) + tmpl = gen.gbt(args.bcli, bci["bestblockhash"], now) + if tmpl is None: continue logging.debug("GBT template: %s", tmpl) - if tmpl["mintime"] > gen.mine_time: - logging.info("Updating block time from %d to %d", gen.mine_time, tmpl["mintime"]) - gen.mine_time = tmpl["mintime"] - if gen.mine_time > now: - logging.error("GBT mintime is in the future: %d is %d seconds later than %d", gen.mine_time, (gen.mine_time-now), now) - return 1 - # address for reward reward_addr, reward_spk = get_reward_addr_spk(args, tmpl["height"]) From 14e10e7c774839bdd3360c117dd86b4b95b427fe Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 1 Oct 2022 13:24:22 +1000 Subject: [PATCH 31/86] signet/miner: add Generate.mine function --- contrib/signet/miner | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 02187476c53c..2f7a883503a5 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -306,6 +306,17 @@ class Generate: return tmpl + def mine(self, bcli, grind_cmd, tmpl, reward_spk): + psbt = generate_psbt(tmpl, reward_spk, blocktime=self.mine_time) + input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') + psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream)) + if not psbt_signed.get("complete",False): + logging.debug("Generated PSBT: %s" % (psbt,)) + sys.stderr.write("PSBT signing failed\n") + return None + block, signet_solution = decode_psbt(psbt_signed["psbt"]) + return finish_block(block, signet_solution, grind_cmd) + def do_generate(args): if args.max_blocks is not None: if args.ongoing: @@ -417,15 +428,9 @@ def do_generate(args): # mine block logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(gen.mine_time-bestheader["time"]), gen.mine_time, gen.is_mine) mined_blocks += 1 - psbt = generate_psbt(tmpl, reward_spk, blocktime=gen.mine_time) - input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') - psbt_signed = json.loads(args.bcli("-stdin", "walletprocesspsbt", input=input_stream)) - if not psbt_signed.get("complete",False): - logging.debug("Generated PSBT: %s" % (psbt,)) - sys.stderr.write("PSBT signing failed\n") + block = gen.mine(args.bcli, args.grind_cmd, tmpl, reward_spk) + if block is None: return 1 - block, signet_solution = decode_psbt(psbt_signed["psbt"]) - block = finish_block(block, signet_solution, args.grind_cmd) # submit block r = args.bcli("-stdin", "submitblock", input=block.serialize().hex().encode('utf8')) From 213a003dc4b06e62b50660d35c67b78432c9510e Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 6 Sep 2023 01:01:44 +1000 Subject: [PATCH 32/86] signet/miner: add support for a poolnum/poolid tag in mined blocks --- contrib/signet/miner | 38 +++++++++++++++++++++++----- test/functional/tool_signet_miner.py | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 2f7a883503a5..7d9140bf82bb 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -21,7 +21,7 @@ sys.path.insert(0, PATH_BASE_TEST_FUNCTIONAL) from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height # noqa: E402 from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex # noqa: E402 from test_framework.psbt import PSBT, PSBTMap, PSBT_GLOBAL_UNSIGNED_TX, PSBT_IN_FINAL_SCRIPTSIG, PSBT_IN_FINAL_SCRIPTWITNESS, PSBT_IN_NON_WITNESS_UTXO, PSBT_IN_SIGHASH_TYPE # noqa: E402 -from test_framework.script import CScriptOp # noqa: E402 +from test_framework.script import CScript, CScriptOp # noqa: E402 logging.basicConfig( format='%(asctime)s %(levelname)s %(message)s', @@ -93,12 +93,16 @@ def finish_block(block, signet_solution, grind_cmd): block.rehash() return block -def generate_psbt(tmpl, reward_spk, *, blocktime=None): +def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None): signet_spk = tmpl["signet_challenge"] signet_spk_bin = bytes.fromhex(signet_spk) + scriptSig = script_BIP34_coinbase_height(tmpl["height"]) + if poolid is not None: + scriptSig = CScript(b"" + scriptSig + CScriptOp.encode_op_pushdata(poolid)) + cbtx = CTransaction() - cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(tmpl["height"]), 0xffffffff)] + cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), scriptSig, 0xffffffff)] cbtx.vout = [CTxOut(tmpl["coinbasevalue"], reward_spk)] cbtx.vin[0].nSequence = 2**32-2 cbtx.rehash() @@ -132,6 +136,17 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None): psbt.o = [ PSBTMap() ] return psbt.to_base64() +def get_poolid(args): + if args.poolid is not None: + if args.poolnum is not None: + logging.error("Can only specify one of --poolid and --poolnum") + raise Exception("bad arguments") + return args.poolid.encode('utf8') + elif args.poolnum is not None: + return b"/signet:%d/" % (args.poolnum) + else: + return None + def get_reward_addr_spk(args, height): assert args.address is not None or args.descriptor is not None @@ -160,9 +175,10 @@ def get_reward_addr_spk(args, height): return reward_addr, reward_spk def do_genpsbt(args): + poolid = get_poolid(args) tmpl = json.load(sys.stdin) _, reward_spk = get_reward_addr_spk(args, tmpl["height"]) - psbt = generate_psbt(tmpl, reward_spk) + psbt = generate_psbt(tmpl, reward_spk, poolid=poolid) print(psbt) def do_solvepsbt(args): @@ -214,7 +230,8 @@ class Generate: def __init__(self, multiminer=None, ultimate_target=None, poisson=False, max_interval=1800, - standby_delay=0, backup_delay=0, set_block_time=None): + standby_delay=0, backup_delay=0, set_block_time=None, + poolid=None): if multiminer is None: multiminer = (0, 1, 1) (self.multi_low, self.multi_high, self.multi_period) = multiminer @@ -224,6 +241,7 @@ class Generate: self.standby_delay = standby_delay self.backup_delay = backup_delay self.set_block_time = set_block_time + self.poolid = poolid def next_block_delta(self, last_nbits, last_hash): # strategy: @@ -307,7 +325,7 @@ class Generate: return tmpl def mine(self, bcli, grind_cmd, tmpl, reward_spk): - psbt = generate_psbt(tmpl, reward_spk, blocktime=self.mine_time) + psbt = generate_psbt(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid) input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream)) if not psbt_signed.get("complete",False): @@ -373,10 +391,12 @@ def do_generate(args): logging.error("--max-interval must be at least 960 (16 minutes)") return 1 + poolid = get_poolid(args) + ultimate_target = nbits_to_target(int(args.nbits,16)) gen = Generate(multiminer=my_blocks, ultimate_target=ultimate_target, poisson=args.poisson, max_interval=args.max_interval, - standby_delay=args.standby_delay, backup_delay=args.backup_delay, set_block_time=args.set_block_time) + standby_delay=args.standby_delay, backup_delay=args.backup_delay, set_block_time=args.set_block_time, poolid=poolid) mined_blocks = 0 bestheader = {"hash": None} @@ -501,6 +521,8 @@ def main(): cmds = parser.add_subparsers(help="sub-commands") genpsbt = cmds.add_parser("genpsbt", help="Generate a block PSBT for signing") genpsbt.set_defaults(fn=do_genpsbt) + genpsbt.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") + genpsbt.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") solvepsbt = cmds.add_parser("solvepsbt", help="Solve a signed block PSBT") solvepsbt.set_defaults(fn=do_solvepsbt) @@ -517,6 +539,8 @@ def main(): generate.add_argument("--backup-delay", default=300, type=int, help="Seconds to delay before mining blocks reserved for other miners (default=300)") generate.add_argument("--standby-delay", default=0, type=int, help="Seconds to delay before mining blocks (default=0)") generate.add_argument("--max-interval", default=1800, type=int, help="Maximum interblock interval (seconds)") + generate.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") + generate.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") calibrate = cmds.add_parser("calibrate", help="Calibrate difficulty") calibrate.set_defaults(fn=do_calibrate) diff --git a/test/functional/tool_signet_miner.py b/test/functional/tool_signet_miner.py index bdefb92ae621..67fb5c9f94f3 100755 --- a/test/functional/tool_signet_miner.py +++ b/test/functional/tool_signet_miner.py @@ -57,6 +57,7 @@ def run_test(self): f'--grind-cmd={self.options.bitcoinutil} grind', '--nbits=1d00ffff', f'--set-block-time={int(time.time())}', + '--poolnum=99', ], check=True, stderr=subprocess.STDOUT) assert_equal(node.getblockcount(), 1) From a0aa4c7476fdf8907fbc525bfe0f1762cb71ac1d Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 10 Aug 2024 02:11:26 +1000 Subject: [PATCH 33/86] signet/miner: Use argparse exclusive groups Let argparse take care of making arguments make sense in more cases. Co-Authored-By: Ava Chow --- contrib/signet/miner | 53 +++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/contrib/signet/miner b/contrib/signet/miner index 7d9140bf82bb..3c90fe96a1d8 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -138,9 +138,6 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None): def get_poolid(args): if args.poolid is not None: - if args.poolnum is not None: - logging.error("Can only specify one of --poolid and --poolnum") - raise Exception("bad arguments") return args.poolid.encode('utf8') elif args.poolnum is not None: return b"/signet:%d/" % (args.poolnum) @@ -336,12 +333,11 @@ class Generate: return finish_block(block, signet_solution, grind_cmd) def do_generate(args): - if args.max_blocks is not None: - if args.ongoing: - logging.error("Cannot specify both --ongoing and --max-blocks") - return 1 + if args.set_block_time is not None: + max_blocks = 1 + elif args.max_blocks is not None: if args.max_blocks < 1: - logging.error("N must be a positive integer") + logging.error("--max_blocks must specify a positive integer") return 1 max_blocks = args.max_blocks elif args.ongoing: @@ -349,17 +345,11 @@ def do_generate(args): else: max_blocks = 1 - if args.set_block_time is not None and max_blocks != 1: - logging.error("Cannot specify --ongoing or --max-blocks > 1 when using --set-block-time") - return 1 if args.set_block_time is not None and args.set_block_time < 0: args.set_block_time = time.time() logging.info("Treating negative block time as current time (%d)" % (args.set_block_time)) if args.min_nbits: - if args.nbits is not None: - logging.error("Cannot specify --nbits and --min-nbits") - return 1 args.nbits = "1e0377ae" logging.info("Using nbits=%s" % (args.nbits)) @@ -521,35 +511,38 @@ def main(): cmds = parser.add_subparsers(help="sub-commands") genpsbt = cmds.add_parser("genpsbt", help="Generate a block PSBT for signing") genpsbt.set_defaults(fn=do_genpsbt) - genpsbt.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") - genpsbt.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") solvepsbt = cmds.add_parser("solvepsbt", help="Solve a signed block PSBT") solvepsbt.set_defaults(fn=do_solvepsbt) generate = cmds.add_parser("generate", help="Mine blocks") generate.set_defaults(fn=do_generate) - generate.add_argument("--ongoing", action="store_true", help="Keep mining blocks") - generate.add_argument("--max-blocks", default=None, type=int, help="Max blocks to mine (default=1)") - generate.add_argument("--set-block-time", default=None, type=int, help="Set block time (unix timestamp)") - generate.add_argument("--nbits", default=None, type=str, help="Target nBits (specify difficulty)") - generate.add_argument("--min-nbits", action="store_true", help="Target minimum nBits (use min difficulty)") + howmany = generate.add_mutually_exclusive_group() + howmany.add_argument("--ongoing", action="store_true", help="Keep mining blocks") + howmany.add_argument("--max-blocks", default=None, type=int, help="Max blocks to mine (default=1)") + howmany.add_argument("--set-block-time", default=None, type=int, help="Set block time (unix timestamp); implies --max-blocks=1") + nbit_target = generate.add_mutually_exclusive_group() + nbit_target.add_argument("--nbits", default=None, type=str, help="Target nBits (specify difficulty)") + nbit_target.add_argument("--min-nbits", action="store_true", help="Target minimum nBits (use min difficulty)") generate.add_argument("--poisson", action="store_true", help="Simulate randomised block times") generate.add_argument("--multiminer", default=None, type=str, help="Specify which set of blocks to mine (eg: 1-40/100 for the first 40%%, 2/3 for the second 3rd)") generate.add_argument("--backup-delay", default=300, type=int, help="Seconds to delay before mining blocks reserved for other miners (default=300)") generate.add_argument("--standby-delay", default=0, type=int, help="Seconds to delay before mining blocks (default=0)") generate.add_argument("--max-interval", default=1800, type=int, help="Maximum interblock interval (seconds)") - generate.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") - generate.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") calibrate = cmds.add_parser("calibrate", help="Calibrate difficulty") calibrate.set_defaults(fn=do_calibrate) - calibrate.add_argument("--nbits", type=str, default=None) - calibrate.add_argument("--seconds", type=int, default=None) + calibrate_by = calibrate.add_mutually_exclusive_group() + calibrate_by.add_argument("--nbits", type=str, default=None) + calibrate_by.add_argument("--seconds", type=int, default=None) for sp in [genpsbt, generate]: - sp.add_argument("--address", default=None, type=str, help="Address for block reward payment") - sp.add_argument("--descriptor", default=None, type=str, help="Descriptor for block reward payment") + payto = sp.add_mutually_exclusive_group(required=True) + payto.add_argument("--address", default=None, type=str, help="Address for block reward payment") + payto.add_argument("--descriptor", default=None, type=str, help="Descriptor for block reward payment") + pool = sp.add_mutually_exclusive_group() + pool.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") + pool.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") for sp in [solvepsbt, generate, calibrate]: sp.add_argument("--grind-cmd", default=None, type=str, required=(sp==calibrate), help="Command to grind a block header for proof-of-work") @@ -559,12 +552,6 @@ def main(): args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(args.cli.split(" "), list(a), input=input, **kwargs) if hasattr(args, "address") and hasattr(args, "descriptor"): - if args.address is None and args.descriptor is None: - sys.stderr.write("Must specify --address or --descriptor\n") - return 1 - elif args.address is not None and args.descriptor is not None: - sys.stderr.write("Only specify one of --address or --descriptor\n") - return 1 args.derived_addresses = {} if args.debug: From 8a13a8e019c8c130f61c07cdf6a25a77077f580e Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 14 Sep 2022 13:15:42 +1000 Subject: [PATCH 34/86] Move mapFlagNames and FormatScriptFlags logic to deploymentinfo.h Moves FormatScriptFlags logic into GetScriptFlagNames which returns a vector of strings. For completeness, also has GetScriptFlagNames report on any bits that do not match a known script flag. --- src/deploymentinfo.cpp | 47 ++++++++++++++++++++++++++++++++++ src/deploymentinfo.h | 8 ++++++ src/test/script_tests.cpp | 17 +++++++++++- src/test/transaction_tests.cpp | 47 +++++----------------------------- 4 files changed, 77 insertions(+), 42 deletions(-) diff --git a/src/deploymentinfo.cpp b/src/deploymentinfo.cpp index 185a7dcb54ce..71572496eb4a 100644 --- a/src/deploymentinfo.cpp +++ b/src/deploymentinfo.cpp @@ -5,6 +5,8 @@ #include #include +#include