diff --git a/README.md b/README.md
index c5b6ce4588..727bb2cec7 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@ Translations
------------
Changes to translations as well as new translations can be submitted to
-[Bitcoin Core's Transifex page](https://www.transifex.com/bitcoin/bitcoin/).
+[Bitcoin Core's Transifex page](https://explore.transifex.com/bitcoin/bitcoin/).
Translations are periodically pulled from Transifex and merged into the git repository. See the
[translation process](doc/translation_process.md) for details on how this works.
diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md
index 515d4487d6..910f8f2546 100644
--- a/contrib/guix/INSTALL.md
+++ b/contrib/guix/INSTALL.md
@@ -319,7 +319,7 @@ Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
Start by cloning Guix:
```
-git clone https://git.savannah.gnu.org/git/guix.git
+git clone https://codeberg.org/guix/guix.git
cd guix
```
@@ -607,7 +607,7 @@ checklist.
```
Generation 38 Feb 22 2021 16:39:31 (current)
guix f350df4
- repository URL: https://git.savannah.gnu.org/git/guix.git
+ repository URL: https://codeberg.org/guix/guix.git
branch: version-1.2.0
commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7
```
@@ -760,8 +760,8 @@ Please see the following links for more details:
- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5)
-- A commit to skip this test in Guix has been merged into the core-updates branch:
-[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
+- A commit to skip this test is included since Guix 1.4.0:
+[codeberg/guix@6ba1058](https://codeberg.org/guix/guix/commit/6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build
index 2ea574fe4b..715568c154 100755
--- a/contrib/guix/guix-build
+++ b/contrib/guix/guix-build
@@ -69,6 +69,24 @@ fi
mkdir -p "$VERSION_BASE"
+################
+# SOURCE_DATE_EPOCH should not unintentionally be set
+################
+
+if [ -n "$SOURCE_DATE_EPOCH" ] && [ -z "$FORCE_SOURCE_DATE_EPOCH" ]; then
+cat << EOF
+ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility.
+
+ Aborting...
+
+Hint: You may want to:
+ 1. Unset this variable: \`unset SOURCE_DATE_EPOCH\` before rebuilding
+ 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on
+ using your own epoch
+EOF
+exit 1
+fi
+
################
# Build directories should not exist
################
diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash
index 428fc41e73..f7fc932dfd 100644
--- a/contrib/guix/libexec/prelude.bash
+++ b/contrib/guix/libexec/prelude.bash
@@ -50,7 +50,7 @@ fi
# across time.
time-machine() {
# shellcheck disable=SC2086
- guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
+ guix time-machine --url=https://codeberg.org/guix/guix.git \
--commit=53396a22afc04536ddf75d8f82ad2eafa5082725 \
--cores="$JOBS" \
--keep-failed \
diff --git a/contrib/tracing/p2p_monitor.py b/contrib/tracing/p2p_monitor.py
index 78225366d9..7a7cc20e86 100755
--- a/contrib/tracing/p2p_monitor.py
+++ b/contrib/tracing/p2p_monitor.py
@@ -54,7 +54,7 @@ int trace_inbound_message(struct pt_regs *ctx) {
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
bpf_usdt_readarg(3, ctx, &pconn_type);
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
- bpf_usdt_readarg(4, ctx, &pconn_type);
+ bpf_usdt_readarg(4, ctx, &pmsg_type);
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
bpf_usdt_readarg(5, ctx, &msg.msg_size);
@@ -71,7 +71,7 @@ int trace_outbound_message(struct pt_regs *ctx) {
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
bpf_usdt_readarg(3, ctx, &pconn_type);
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
- bpf_usdt_readarg(4, ctx, &pconn_type);
+ bpf_usdt_readarg(4, ctx, &pmsg_type);
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
bpf_usdt_readarg(5, ctx, &msg.msg_size);
diff --git a/depends/README.md b/depends/README.md
index 848137f03f..e0aef7c178 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -90,15 +90,15 @@ For linux S390X cross compilation:
### Install the required dependencies: FreeBSD
- pkg install bash
+ pkg install bash cmake curl gmake
### Install the required dependencies: NetBSD
- pkgin install bash gmake
+ pkgin install bash cmake curl gmake perl
### Install the required dependencies: OpenBSD
- pkg_add bash gmake gtar
+ pkg_add bash cmake curl gmake gtar
### Dependency Options
diff --git a/depends/builders/openbsd.mk b/depends/builders/openbsd.mk
index 9c94c4baae..4b3214ae81 100644
--- a/depends/builders/openbsd.mk
+++ b/depends/builders/openbsd.mk
@@ -1,7 +1,7 @@
build_openbsd_CC = clang
build_openbsd_CXX = clang++
-build_openbsd_SHA256SUM = sha256
+build_openbsd_SHA256SUM = sha256 -r
build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
build_openbsd_TAR = gtar
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
index fef0beaa7b..a97f82e7fe 100644
--- a/depends/packages/freetype.mk
+++ b/depends/packages/freetype.mk
@@ -4,6 +4,7 @@ $(package)_download_path=https://download.savannah.gnu.org/releases/$(package)
$(package)_file_name=$(package)-$($(package)_version).tar.xz
$(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7
$(package)_build_subdir=build
+$(package)_patches += cmake_minimum.patch
define $(package)_set_vars
$(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DBUILD_SHARED_LIBS=TRUE
@@ -12,6 +13,10 @@ define $(package)_set_vars
$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE
endef
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch
+endef
+
define $(package)_config_cmds
$($(package)_cmake) -S .. -B .
endef
diff --git a/depends/packages/native_capnp.mk b/depends/packages/native_capnp.mk
index e67b103716..a3a089d4fa 100644
--- a/depends/packages/native_capnp.mk
+++ b/depends/packages/native_capnp.mk
@@ -1,9 +1,9 @@
package=native_capnp
-$(package)_version=1.1.0
+$(package)_version=1.2.0
$(package)_download_path=https://capnproto.org/
$(package)_download_file=capnproto-c++-$($(package)_version).tar.gz
$(package)_file_name=capnproto-cxx-$($(package)_version).tar.gz
-$(package)_sha256_hash=07167580e563f5e821e3b2af1c238c16ec7181612650c5901330fa9a0da50939
+$(package)_sha256_hash=ed00e44ecbbda5186bc78a41ba64a8dc4a861b5f8d4e822959b0144ae6fd42ef
define $(package)_set_vars
$(package)_config_opts := -DBUILD_TESTING=OFF
diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk
index 29c349a21b..0a534556ee 100644
--- a/depends/packages/xproto.mk
+++ b/depends/packages/xproto.mk
@@ -21,6 +21,8 @@ define $(package)_build_cmds
$(MAKE)
endef
+# mkdir detection is broken on Alpine. Set MKDIRPROG to ensure we always
+# use "mkdir -p", and avoid parallelism issues during install.
define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
+ $(MAKE) MKDIRPROG="mkdir -p" DESTDIR=$($(package)_staging_dir) install
endef
diff --git a/depends/patches/freetype/cmake_minimum.patch b/depends/patches/freetype/cmake_minimum.patch
new file mode 100644
index 0000000000..0a976f8ab8
--- /dev/null
+++ b/depends/patches/freetype/cmake_minimum.patch
@@ -0,0 +1,13 @@
+build: set minimum required CMake to 3.12
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -97,7 +97,7 @@
+ # FreeType explicitly marks the API to be exported and relies on the compiler
+ # to hide all other symbols. CMake supports a C_VISBILITY_PRESET property
+ # starting with 2.8.12.
+-cmake_minimum_required(VERSION 2.8.12)
++cmake_minimum_required(VERSION 3.12)
+
+ if (NOT CMAKE_VERSION VERSION_LESS 3.3)
+ # Allow symbol visibility settings also on static libraries. CMake < 3.3
diff --git a/doc/bips.md b/doc/bips.md
index a95b3159ec..97645d0eeb 100644
--- a/doc/bips.md
+++ b/doc/bips.md
@@ -58,7 +58,8 @@ BIPs that are implemented by Bitcoin Core:
Validation rules for Taproot (including Schnorr signatures and Tapscript
leaves) are implemented as of **v0.21.0** ([PR 19953](https://github.com/bitcoin/bitcoin/pull/19953)),
with mainnet activation as of **v0.21.1** ([PR 21377](https://github.com/bitcoin/bitcoin/pull/21377),
- [PR 21686](https://github.com/bitcoin/bitcoin/pull/21686)).
+ [PR 21686](https://github.com/bitcoin/bitcoin/pull/21686)),
+ always active as of **v24.0** ([PR 23536](https://github.com/bitcoin/bitcoin/pull/23536)).
* [`BIP 350`](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki): Addresses for native v1+ segregated Witness outputs use Bech32m instead of Bech32 as of **v22.0** ([PR 20861](https://github.com/bitcoin/bitcoin/pull/20861)).
* [`BIP 371`](https://github.com/bitcoin/bips/blob/master/bip-0371.mediawiki): Taproot fields for PSBT as of **v24.0** ([PR 22558](https://github.com/bitcoin/bitcoin/pull/22558)).
* [`BIP 379`](https://github.com/bitcoin/bips/blob/master/bip-0379.md): Miniscript was partially implemented in **v24.0** ([PR 24148](https://github.com/bitcoin/bitcoin/pull/24148)), and fully implemented as of **v26.0** ([PR 27255](https://github.com/bitcoin/bitcoin/pull/27255)).
diff --git a/doc/build-unix.md b/doc/build-unix.md
index d891aabc89..85add7fa53 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -60,7 +60,7 @@ executables, which are based on BerkeleyDB 4.8. Otherwise, you can build Berkele
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
-ZMQ dependencies (provides ZMQ API):
+ZMQ-enabled binaries are compiled with `-DWITH_ZMQ=ON` and require the following dependency:
sudo apt-get install libzmq3-dev
@@ -108,7 +108,7 @@ are based on Berkeley DB 4.8. Otherwise, you can build Berkeley DB [yourself](#b
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
-ZMQ dependencies (provides ZMQ API):
+ZMQ-enabled binaries are compiled with `-DWITH_ZMQ=ON` and require the following dependency:
sudo dnf install zeromq-devel
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 0678887279..ae2ad5231f 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -2,7 +2,7 @@ Bitcoin Core version 29.x is now available from:
-This release includes new features, various bug fixes and performance
+This release includes various bug fixes and performance
improvements, as well as updated translations.
Please report bugs using the issue tracker at GitHub:
@@ -39,6 +39,7 @@ Notable changes
### Wallet
+- #31757 wallet: fix crash on double block disconnection
- #32553 wallet: Fix logging of wallet version
### Test
@@ -47,6 +48,8 @@ Notable changes
- #32312 test: Fix feature_pruning test after nTime typo fix
- #32336 test: Suppress upstream -Wduplicate-decl-specifier in bpfcc
- #32483 test: fix two intermittent failures in wallet_basic.py
+- #32630 test: fix sync function in rpc_psbt.py
+- #32765 test: Fix list index out of range error in feature_bip68_sequence.py
### Util
@@ -57,6 +60,12 @@ Notable changes
- #32356 cmake: Respect user-provided configuration-specific flags
- #32437 crypto: disable ASan for sha256_sse4 with Clang
- #32469 cmake: Allow WITH_DBUS on all Unix-like systems
+- #32439 guix: accomodate migration to codeberg
+- #32551 cmake: Add missed SSE41_CXXFLAGS
+- #32568 depends: use "mkdir -p" when installing xproto
+- #32678 guix: warn and abort when SOURCE_DATE_EPOCH is set
+- #32690 depends: fix SHA256SUM command on OpenBSD (use GNU mode output)
+- #32760 depends: capnp 1.2.0
### Gui
@@ -65,8 +74,18 @@ Notable changes
### Doc
+- #32333 doc: Add missing top-level description to pruneblockchain RPC
- #32353 doc: Fix fuzz test_runner.py path
- #32389 doc: Fix test_bitcoin path
+- #32607 rpc: Note in fundrawtransaction doc, fee rate is for package
+- #32679 doc: update tor docs to use bitcoind binary from path
+- #32693 depends: fix cmake compatibility error for freetype
+- #32696 doc: make -DWITH_ZMQ=ON explicit on build-unix.md
+- #32708 rpc, doc: update listdescriptors RCP help
+- #32711 doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md
+- #32719 doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project"
+- #32776 doc: taproot became always active in v24.0
+- #32777 doc: fix Transifex 404s
### CI
@@ -76,6 +95,7 @@ Notable changes
- #32187 refactor: Remove spurious virtual from final ~CZMQNotificationInterface
- #32454 tracing: fix invalid argument in mempool_monitor
+- #32771 contrib: tracing: Fix read of pmsg_type in p2p_monitor.py
Credits
=======
@@ -83,16 +103,28 @@ Credits
Thanks to everyone who directly contributed to this release:
- achow101
+- benthecarman
- Brandon Odiwuor
+- davidgumberg
- enirox001
- fanquake
- furszy
- Hennadii Stepanov
+- hodlinator
+- ismaelsadeeq
- jb55
+- josibake
- laanwj
+- luisschwab
- MarcoFalke
- Martin Zumsande
- monlovesmango
+- nervana21
+- rkrux
+- Sjors
+- theStack
+- willcl-ark
+- zaidmstrr
As well as to everyone that helped with translations on
-[Transifex](https://www.transifex.com/bitcoin/bitcoin/).
+[Transifex](https://explore.transifex.com/bitcoin/bitcoin/).
diff --git a/doc/release-process.md b/doc/release-process.md
index 1c5810d023..9159b8cc8c 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -57,10 +57,10 @@ Release Process
- Clear the release notes and move them to the wiki (see "Write the release notes" below).
- Translations on Transifex:
- Pull translations from Transifex into the master branch.
- - Create [a new resource](https://www.transifex.com/bitcoin/bitcoin/content/) named after the major version with the slug `qt-translation-x`, where `RRR` is the major branch number padded with zeros. Use `src/qt/locale/bitcoin_en.xlf` to create it.
+ - Create [a new resource](https://app.transifex.com/bitcoin/bitcoin/content/) named after the major version with the slug `qt-translation-x`, where `RRR` is the major branch number padded with zeros. Use `src/qt/locale/bitcoin_en.xlf` to create it.
- In the project workflow settings, ensure that [Translation Memory Fill-up](https://help.transifex.com/en/articles/6224817-setting-up-translation-memory-fill-up) is enabled and that [Translation Memory Context Matching](https://help.transifex.com/en/articles/6224753-translation-memory-with-context) is disabled.
- Update the Transifex slug in [`.tx/config`](/.tx/config) to the slug of the resource created in the first step. This identifies which resource the translations will be synchronized from.
- - Make an announcement that translators can start translating for the new version. You can use one of the [previous announcements](https://www.transifex.com/bitcoin/communication/) as a template.
+ - Make an announcement that translators can start translating for the new version. You can use one of the [previous announcements](https://app.transifex.com/bitcoin/communication/) as a template.
- Change the auto-update URL for the resource to `master`, e.g. `https://raw.githubusercontent.com/bitcoin/bitcoin/master/src/qt/locale/bitcoin_en.xlf`. (Do this only after the previous steps, to prevent an auto-update from interfering.)
#### After branch-off (on the major release branch)
diff --git a/doc/tor.md b/doc/tor.md
index 30c2381049..30eddb91e3 100644
--- a/doc/tor.md
+++ b/doc/tor.md
@@ -62,7 +62,7 @@ outgoing connections, but more is possible.
In a typical situation, this suffices to run behind a Tor proxy:
- ./bitcoind -proxy=127.0.0.1:9050
+ bitcoind -proxy=127.0.0.1:9050
## 2. Automatically create a Bitcoin Core onion service
@@ -187,25 +187,25 @@ should be equal to binding address and port for inbound Tor connections (127.0.0
In a typical situation, where you're only reachable via Tor, this should suffice:
- ./bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
+ bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
(obviously, replace the .onion address with your own). It should be noted that you still
listen on all devices and another node could establish a clearnet connection, when knowing
your address. To mitigate this, additionally bind the address of your Tor proxy:
- ./bitcoind ... -bind=127.0.0.1:8334=onion
+ bitcoind ... -bind=127.0.0.1:8334=onion
If you don't care too much about hiding your node, and want to be reachable on IPv4
as well, use `discover` instead:
- ./bitcoind ... -discover
+ bitcoind ... -discover
and open port 8333 on your firewall (or use port mapping, i.e., `-natpmp`).
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
for normal IPv4/IPv6 communication, use:
- ./bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
+ bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
## 4. Privacy recommendations
diff --git a/doc/translation_process.md b/doc/translation_process.md
index 429e92b2b3..9bd7b14240 100644
--- a/doc/translation_process.md
+++ b/doc/translation_process.md
@@ -41,7 +41,7 @@ git commit
### Creating a Transifex account
Visit the [Transifex Signup](https://www.transifex.com/signup/) page to create an account. Take note of your username and password, as they will be required to configure the command-line tool.
-You can find the Bitcoin translation project at [https://www.transifex.com/bitcoin/bitcoin/](https://www.transifex.com/bitcoin/bitcoin/).
+You can find the Bitcoin translation project at [https://explore.transifex.com/bitcoin/bitcoin/](https://explore.transifex.com/bitcoin/bitcoin/).
### Installing the Transifex client command-line tool
The client is used to fetch updated translations. Please check installation instructions and any other details at https://developers.transifex.com/docs/cli.
diff --git a/src/bitcoin-cli-res.rc b/src/bitcoin-cli-res.rc
index e0d4ee5f3c..dd7f01b170 100644
--- a/src/bitcoin-cli-res.rc
+++ b/src/bitcoin-cli-res.rc
@@ -14,7 +14,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " CLIENT_NAME ")"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "InternalName", "bitcoin-cli"
diff --git a/src/bitcoin-tx-res.rc b/src/bitcoin-tx-res.rc
index d5d7e3b7ca..77ffb6bdfa 100644
--- a/src/bitcoin-tx-res.rc
+++ b/src/bitcoin-tx-res.rc
@@ -14,7 +14,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "InternalName", "bitcoin-tx"
diff --git a/src/bitcoin-util-res.rc b/src/bitcoin-util-res.rc
index e121d17f23..8dda22b77f 100644
--- a/src/bitcoin-util-res.rc
+++ b/src/bitcoin-util-res.rc
@@ -14,7 +14,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", "bitcoin-util (CLI Bitcoin utility)"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "InternalName", "bitcoin-util"
diff --git a/src/bitcoin-wallet-res.rc b/src/bitcoin-wallet-res.rc
index 4c7895f48d..cc3f272b3a 100644
--- a/src/bitcoin-wallet-res.rc
+++ b/src/bitcoin-wallet-res.rc
@@ -14,7 +14,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", "bitcoin-wallet (CLI tool for " CLIENT_NAME " wallets)"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "InternalName", "bitcoin-wallet"
diff --git a/src/bitcoind-res.rc b/src/bitcoind-res.rc
index 4d689d7e16..3a512c3db4 100644
--- a/src/bitcoind-res.rc
+++ b/src/bitcoind-res.rc
@@ -14,7 +14,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "InternalName", "bitcoind"
diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
index 1109806a77..92653ade5a 100644
--- a/src/crypto/CMakeLists.txt
+++ b/src/crypto/CMakeLists.txt
@@ -47,7 +47,7 @@ if(HAVE_SSE41 AND HAVE_X86_SHANI)
target_compile_definitions(bitcoin_crypto PRIVATE ENABLE_SSE41 ENABLE_X86_SHANI)
target_sources(bitcoin_crypto PRIVATE sha256_x86_shani.cpp)
set_property(SOURCE sha256_x86_shani.cpp PROPERTY
- COMPILE_OPTIONS ${X86_SHANI_CXXFLAGS}
+ COMPILE_OPTIONS ${SSE41_CXXFLAGS} ${X86_SHANI_CXXFLAGS}
)
endif()
diff --git a/src/qt/res/bitcoin-qt-res.rc b/src/qt/res/bitcoin-qt-res.rc
index 9a379f06d4..52cf91ffa8 100644
--- a/src/qt/res/bitcoin-qt-res.rc
+++ b/src/qt/res/bitcoin-qt-res.rc
@@ -21,7 +21,7 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
- VALUE "CompanyName", "Bitcoin"
+ VALUE "CompanyName", CLIENT_NAME " project"
VALUE "FileDescription", CLIENT_NAME " (GUI node for Bitcoin)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-qt"
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index ac1ce6285f..2c4e471bab 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -838,7 +838,9 @@ std::optional GetPruneHeight(const BlockManager& blockman, const CChain& ch
static RPCHelpMan pruneblockchain()
{
- return RPCHelpMan{"pruneblockchain", "",
+ return RPCHelpMan{"pruneblockchain",
+ "Attempts to delete block and undo data up to a specified height or timestamp, if eligible for pruning.\n"
+ "Requires `-prune` to be enabled at startup. While pruned data may be re-fetched in some cases (e.g., via `getblockfrompeer`), local deletion is irreversible.\n",
{
{"height", RPCArg::Type::NUM, RPCArg::Optional::NO, "The block height to prune up to. May be set to a discrete height, or to a " + UNIX_EPOCH_TIME + "\n"
" to prune blocks whose block time is at least 2 hours older than the provided timestamp."},
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
index ac23b092d4..64f3f95a17 100644
--- a/src/wallet/rpc/backup.cpp
+++ b/src/wallet/rpc/backup.cpp
@@ -1781,7 +1781,7 @@ RPCHelpMan listdescriptors()
{
return RPCHelpMan{
"listdescriptors",
- "\nList descriptors imported into a descriptor-enabled wallet.\n",
+ "\nList all descriptors present in a descriptor-enabled wallet.\n",
{
{"private", RPCArg::Type::BOOL, RPCArg::Default{false}, "Show private descriptors."}
},
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp
index 0cba830e2a..64aae701eb 100644
--- a/src/wallet/rpc/spend.cpp
+++ b/src/wallet/rpc/spend.cpp
@@ -749,7 +749,10 @@ RPCHelpMan fundrawtransaction()
"Note that all inputs selected must be of standard form and P2SH scripts must be\n"
"in the wallet using importaddress or addmultisigaddress (to calculate fees).\n"
"You can see whether this is the case by checking the \"solvable\" field in the listunspent output.\n"
- "Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only\n",
+ "Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only.\n"
+ "Note that if specifying an exact fee rate, the resulting transaction may have a higher fee rate\n"
+ "if the transaction has unconfirmed inputs. This is because the wallet will attempt to make the\n"
+ "entire package have the given fee rate, not the resulting transaction.\n",
{
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex string of the raw transaction"},
{"options", RPCArg::Type::OBJ_NAMED_PARAMS, RPCArg::Optional::OMITTED, "For backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}",
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 7abd17d31e..09eda0c28e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1548,8 +1548,11 @@ void CWallet::blockDisconnected(const interfaces::BlockInfo& block)
int disconnect_height = block.height;
- for (const CTransactionRef& ptx : Assert(block.data)->vtx) {
- SyncTransaction(ptx, TxStateInactive{});
+ for (size_t index = 0; index < block.data->vtx.size(); index++) {
+ const CTransactionRef& ptx = Assert(block.data)->vtx[index];
+ // Coinbase transactions are not only inactive but also abandoned,
+ // meaning they should never be relayed standalone via the p2p protocol.
+ SyncTransaction(ptx, TxStateInactive{/*abandoned=*/index == 0});
for (const CTxIn& tx_in : ptx->vin) {
// No other wallet transactions conflicted with this transaction
diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py
index 2d61987e94..7f576464b8 100755
--- a/test/functional/feature_bip68_sequence.py
+++ b/test/functional/feature_bip68_sequence.py
@@ -148,8 +148,10 @@ class BIP68Test(BitcoinTestFramework):
# between height/time locking). Small random chance of making the locks
# all pass.
for _ in range(400):
+ available_utxos = len(utxos)
+
# Randomly choose up to 10 inputs
- num_inputs = random.randint(1, 10)
+ num_inputs = random.randint(1, min(10, available_utxos))
random.shuffle(utxos)
# Track whether any sequence locks used should fail
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 8042bdf071..f1c83b869b 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -79,7 +79,7 @@ class PSBTTest(BitcoinTestFramework):
wallet = node.get_wallet_rpc(self.default_wallet_name)
address = wallet.getnewaddress()
wallet.sendtoaddress(address=address, amount=1.0)
- self.generate(node, nblocks=1, sync_fun=lambda: self.sync_all(self.nodes[:2]))
+ self.generate(node, nblocks=1)
utxos = wallet.listunspent(addresses=[address])
psbt = wallet.createpsbt([{"txid": utxos[0]["txid"], "vout": utxos[0]["vout"]}], [{wallet.getnewaddress(): 0.9999}])
diff --git a/test/functional/wallet_reorgsrestore.py b/test/functional/wallet_reorgsrestore.py
index a600930acd..d9be3bd2e9 100755
--- a/test/functional/wallet_reorgsrestore.py
+++ b/test/functional/wallet_reorgsrestore.py
@@ -19,6 +19,7 @@ import shutil
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
+ assert_greater_than,
assert_raises_rpc_error
)
@@ -90,6 +91,54 @@ class ReorgsRestoreTest(BitcoinTestFramework):
# Verify the coinbase descendant was also marked as abandoned
assert_equal(wallet0.gettransaction(descendant_tx_id)['details'][0]['abandoned'], True)
+ def test_reorg_handling_during_unclean_shutdown(self):
+ self.log.info("Test that wallet doesn't crash due to a duplicate block disconnection event after an unclean shutdown")
+ node = self.nodes[0]
+ # Receive coinbase reward on a new wallet
+ node.createwallet(wallet_name="reorg_crash", load_on_startup=True)
+ wallet = node.get_wallet_rpc("reorg_crash")
+ self.generatetoaddress(node, 1, wallet.getnewaddress(), sync_fun=self.no_op)
+
+ # Restart to ensure node and wallet are flushed
+ self.restart_node(0)
+ wallet = node.get_wallet_rpc("reorg_crash")
+ assert_greater_than(wallet.getwalletinfo()['immature_balance'], 0)
+
+ # Disconnect tip and sync wallet state
+ tip = wallet.getbestblockhash()
+ wallet.invalidateblock(tip)
+ wallet.syncwithvalidationinterfacequeue()
+
+ # Tip was disconnected, ensure coinbase has been abandoned
+ assert_equal(wallet.getwalletinfo()['immature_balance'], 0)
+ coinbase_tx_id = wallet.getblock(tip, verbose=1)["tx"][0]
+ assert_equal(wallet.gettransaction(coinbase_tx_id)['details'][0]['abandoned'], True)
+
+ # Abort process abruptly to mimic an unclean shutdown (no chain state flush to disk)
+ node.process.kill()
+
+ # Restart the node and confirm that it has not persisted the last chain state changes to disk
+ self.start_node(0)
+ assert_equal(node.getbestblockhash(), tip)
+
+ # Due to an existing bug, the wallet incorrectly keeps the transaction in an abandoned state, even though that's
+ # no longer the case (after the unclean shutdown, the node's chain returned to the pre-invalidation tip).
+ # This issue blocks any future spending and results in an incorrect balance display.
+ wallet = node.get_wallet_rpc("reorg_crash")
+ assert_equal(wallet.getwalletinfo()['immature_balance'], 0) # FIXME: #31824.
+
+ # Previously, a bug caused the node to crash if two block disconnection events occurred consecutively.
+ # Ensure this is no longer the case by simulating a new reorg.
+ node.invalidateblock(tip)
+ assert(node.getbestblockhash() != tip)
+ # Ensure wallet state is consistent now
+ assert_equal(wallet.gettransaction(coinbase_tx_id)['details'][0]['abandoned'], True)
+ assert_equal(wallet.getwalletinfo()['immature_balance'], 0)
+
+ # And finally, verify the state if the block ends up being into the best chain again
+ node.reconsiderblock(tip)
+ assert_equal(wallet.gettransaction(coinbase_tx_id)['details'][0]['abandoned'], False)
+ assert_greater_than(wallet.getwalletinfo()['immature_balance'], 0)
def run_test(self):
# Send a tx from which to conflict outputs later
@@ -163,6 +212,9 @@ class ReorgsRestoreTest(BitcoinTestFramework):
# Verify we mark coinbase txs, and their descendants, as abandoned during startup
self.test_coinbase_automatic_abandon_during_startup()
+ # Verify reorg behavior during an unclean shutdown
+ self.test_reorg_handling_during_unclean_shutdown()
+
if __name__ == '__main__':
ReorgsRestoreTest(__file__).main()