From 0dc337f73d013e342b880746292f1c3247b287cf Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Tue, 9 Apr 2024 15:53:38 -0300 Subject: [PATCH 001/332] gui: Fix TransactionsView on setCurrentWallet Making sure that if the privacy mode is activaded during the wallet selection, the transaction view is not shown. --- src/qt/bitcoingui.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 6d66c7473bd0..630450011ab8 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -756,9 +756,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel) connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus); connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction); connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy); - const bool privacy = isPrivacyModeActivated(); - wallet_view->setPrivacy(privacy); - enableHistoryAction(privacy); + wallet_view->setPrivacy(isPrivacyModeActivated()); const QString display_name = walletModel->getDisplayName(); m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel)); } @@ -817,7 +815,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled) overviewAction->setEnabled(enabled); sendCoinsAction->setEnabled(enabled); receiveCoinsAction->setEnabled(enabled); - historyAction->setEnabled(enabled); + historyAction->setEnabled(enabled && !isPrivacyModeActivated()); encryptWalletAction->setEnabled(enabled); backupWalletAction->setEnabled(enabled); changePassphraseAction->setEnabled(enabled); From af041c405756d3b8bb04cb2ebd8c32cf237ac2a9 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 15 Jul 2025 16:55:46 -0700 Subject: [PATCH 002/332] wallet: Always rewrite tx records during migration Since loading a wallet may change some parts of tx records (e.g. adding nOrderPos), we should rewrite the records instead of copying them so that the automatic upgrade does not need to be performed again when the wallet is loaded. --- src/wallet/wallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3d83f356f641..de7e7e167785 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3947,14 +3947,16 @@ util::Result CWallet::ApplyMigrationData(WalletBatch& local_wallet_batch, // Mark as to remove from the migrated wallet only if it does not also belong to it if (!is_mine) { txids_to_delete.push_back(hash); + continue; } - continue; } } if (!is_mine) { // Both not ours and not in the watchonly wallet return util::Error{strprintf(_("Error: Transaction %s in wallet cannot be identified to belong to migrated wallets"), wtx->GetHash().GetHex())}; } + // Rewrite the transaction so that anything that may have changed about it in memory also persists to disk + local_wallet_batch.WriteTx(*wtx); } // Do the removes From fa6497ba71e9573d341c1c051af09b3ec2fc8d74 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 6 Aug 2025 16:16:07 +0200 Subject: [PATCH 003/332] build: Set AUTHOR_WARNING on warnings --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42552b9613eb..6017775fa78c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -708,6 +708,7 @@ if(configure_warnings) message(WARNING "${warning}") endforeach() message(" ******\n") + message(AUTHOR_WARNING "Warnings have been encountered!") endif() # We want all build properties to be encapsulated properly. From d62f46eed4be8998f4aa75e20bd0dca2e453313f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 21 Nov 2025 11:33:07 +0000 Subject: [PATCH 004/332] doc: Add `INSTALL.md` to Linux release tarballs --- contrib/guix/libexec/build.sh | 1 + doc/INSTALL_linux.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 doc/INSTALL_linux.md diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 48301841841d..02e7f109caf4 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -309,6 +309,7 @@ mkdir -p "$DISTSRC" ;; *linux*) cp "${DISTSRC}/README.md" "${DISTNAME}/" + cp "${DISTSRC}/doc/INSTALL_linux.md" "${DISTNAME}/INSTALL.md" ;; esac diff --git a/doc/INSTALL_linux.md b/doc/INSTALL_linux.md new file mode 100644 index 000000000000..c6bec558feb7 --- /dev/null +++ b/doc/INSTALL_linux.md @@ -0,0 +1,29 @@ +Bitcoin Core +============= + +Below are notes on installing Bitcoin Core software on Linux systems. + +General Runtime Requirements +---------------------------- + +Bitcoin Core requires glibc (GNU C Library) 2.31 or newer. + +GUI Runtime Requirements +------------------------ + +The GUI executable, `bitcoin-qt`, is based on the Qt 6 framework and uses the `xcb` QPA (Qt Platform Abstraction) platform plugin +to run on X11. Its runtime library dependencies are as follows: +- `libfontconfig` +- `libfreetype` + +On Debian, Ubuntu, or their derivatives, you can run the following command to ensure all dependencies are installed: +```sh +sudo apt install libfontconfig1 libfreetype6 +``` + +On Fedora, run: +```sh +sudo dnf install fontconfig freetype +``` + +For other systems, please consult their documentation. From 675be930245e5c1ac2f7940bcf308430adeb18ee Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Sun, 29 Jan 2023 22:19:00 +0530 Subject: [PATCH 005/332] cli: modify -addrinfo to use getaddrmaninfo RPC endpoint currently -addrinfo returns addresses known to the node after filtering for quality and recency. However, the node considers all known addresses (even the filtered out addresses) when selecting peers to connect to. So update -addrinfo to also display the full set of known addresses for more useful node information. --- src/bitcoin-cli.cpp | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 14a0cb245fab..ddadc20298de 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -89,7 +89,7 @@ static void SetupCliArgs(ArgsManager& argsman) "RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000", DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES), ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); - argsman.AddArg("-addrinfo", "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.", ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); + argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); argsman.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the output of -getinfo 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)", ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); argsman.AddArg("-netinfo", strprintf("Get network peer connection information from the remote server. An optional argument from 0 to %d can be passed for different peers listings (default: 0). If a non-zero value is passed, an additional \"outonly\" (or \"o\") argument can be passed to see outbound peers only. Pass \"help\" (or \"h\") for detailed help documentation.", NETINFO_MAX_LEVEL), ArgsManager::ALLOW_ANY, OptionsCategory::CLI_COMMANDS); @@ -279,33 +279,32 @@ struct AddrinfoRequestHandler : BaseRequestHandler { if (!args.empty()) { throw std::runtime_error("-addrinfo takes no arguments"); } - UniValue params{RPCConvertValues("getnodeaddresses", std::vector{{"0"}})}; - return JSONRPCRequestObj("getnodeaddresses", params, 1); + return JSONRPCRequestObj("getaddrmaninfo", NullUniValue, 1); } UniValue ProcessReply(const UniValue& reply) override { - if (!reply["error"].isNull()) return reply; - const std::vector& nodes{reply["result"].getValues()}; - if (!nodes.empty() && nodes.at(0)["network"].isNull()) { - throw std::runtime_error("-addrinfo requires bitcoind server to be running v22.0 and up"); - } - // Count the number of peers known to our node, by network. - std::array counts{{}}; - for (const UniValue& node : nodes) { - std::string network_name{node["network"].get_str()}; - const int8_t network_id{NetworkStringToId(network_name)}; - if (network_id == UNKNOWN_NETWORK) continue; - ++counts.at(network_id); + if (!reply["error"].isNull()) { + if (reply["error"]["code"].getInt() == RPC_METHOD_NOT_FOUND) { + throw std::runtime_error("-addrinfo requires bitcoind v26.0 or later which supports getaddrmaninfo RPC. Please upgrade your node or use bitcoin-cli from the same version."); + } + return reply; } + // Process getaddrmaninfo reply + const std::vector& network_types{reply["result"].getKeys()}; + const std::vector& addrman_counts{reply["result"].getValues()}; + // Prepare result to return to user. UniValue result{UniValue::VOBJ}, addresses{UniValue::VOBJ}; - uint64_t total{0}; // Total address count - for (size_t i = 1; i < NETWORKS.size() - 1; ++i) { - addresses.pushKV(NETWORKS[i], counts.at(i)); - total += counts.at(i); + + for (size_t i = 0; i < network_types.size(); ++i) { + int addr_count = addrman_counts[i]["total"].getInt(); + if (network_types[i] == "all_networks") { + addresses.pushKV("total", addr_count); + } else { + addresses.pushKV(network_types[i], addr_count); + } } - addresses.pushKV("total", total); result.pushKV("addresses_known", std::move(addresses)); return JSONRPCReplyObj(std::move(result), NullUniValue, /*id=*/1, JSONRPCVersion::V2); } From ea1be3867757274f12ad53e7845f35f9d767c5c7 Mon Sep 17 00:00:00 2001 From: David Gumberg Date: Wed, 7 May 2025 14:09:02 -0700 Subject: [PATCH 006/332] guix: doc: Suggest guix-install.sh --uninstall --- contrib/guix/INSTALL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md index 515d4487d6ec..6320d971951d 100644 --- a/contrib/guix/INSTALL.md +++ b/contrib/guix/INSTALL.md @@ -784,7 +784,9 @@ an irreversible way, you may want to completely purge Guix from your system and start over. 1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt - purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source). + purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from + source, or running the GUIX [install script][install-script] with the + `--uninstall` [flag](https://guix.gnu.org/manual/devel/en/guix.html#index-uninstalling-Guix)). 2. Remove all build users and groups You may check for relevant users and groups using: From e76e8865818dc5369fd4e31e09c3d3103a6b75f8 Mon Sep 17 00:00:00 2001 From: David Gumberg Date: Wed, 7 May 2025 14:55:45 -0700 Subject: [PATCH 007/332] guix: doc: zdiff3 doesn't work --- contrib/guix/INSTALL.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md index 6320d971951d..812761dc5a81 100644 --- a/contrib/guix/INSTALL.md +++ b/contrib/guix/INSTALL.md @@ -763,6 +763,21 @@ Please see the following links for more details: - 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) +## zdiff3 + +[Currently](https://issues.guix.gnu.org/72942) `guix` builds may fail if the +global git config has `merge.conflictstyle` set to `zdiff3` as follows: + +``` +Updating channel 'guix' from Git repository at 'https://codeberg.org/guix/guix.git'... +guix time-machine: error: Git error: unknown style 'zdiff3' given for 'merge.conflictstyle' +``` + +This can be fixed by setting `merge.conflictstyle` to `diff3`: + +```bash +git config --global merge.conflictstyle diff3 +``` [install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball [install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball From b3046cca7182f3399a221757318d24e203092301 Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Mon, 13 Mar 2023 13:14:54 +0530 Subject: [PATCH 008/332] doc: add release notes for #26988 --- doc/release-notes-26988.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/release-notes-26988.md diff --git a/doc/release-notes-26988.md b/doc/release-notes-26988.md new file mode 100644 index 000000000000..7cd8f41a404c --- /dev/null +++ b/doc/release-notes-26988.md @@ -0,0 +1,8 @@ +Tools and Utilities +-------- + +- CLI -addrinfo now returns the full set of known addresses. In previous versions (v22.0 - v30.0) the set of returned + addresses was filtered for quality and recency. This was changed since it does not match the logic for selecting peers + to connect to, which does not filter. Note: CLI -addrinfo now requires bitcoind v26.0 or later, as it uses the + getaddrmaninfo RPC internally. Users querying older, unmaintained node versions would need to use an older bitcoin-cli + version. (#26988) From b149a28f6b863c85ab45c393e7781d4769b282f6 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:49:46 +0000 Subject: [PATCH 009/332] depends: Do not consider `CC` environment variable when detecting system Otherwise, the build system fails to detect cross-compiling mode properly in some cases when `CC` is set. --- depends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/Makefile b/depends/Makefile index fde108d2c2c9..c377187b50ac 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -49,7 +49,7 @@ FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources C_STANDARD ?= c11 CXX_STANDARD ?= c++20 -BUILD = $(shell ./config.guess) +BUILD = $(shell unset CC && ./config.guess) PATCHES_PATH = $(BASEDIR)/patches BASEDIR = $(CURDIR) HASH_LENGTH:=11 From 6e3a0afc2fac3b7a5bb3324c8f8667acfb6af3b3 Mon Sep 17 00:00:00 2001 From: rkrux Date: Fri, 23 Jan 2026 14:21:21 +0530 Subject: [PATCH 010/332] wallet: fix `gethdkeys` RPC for descriptors with partial xprvs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A non-watch-only wallet allows to import descriptors with partial private keys, eg: a multisig descriptor with one private key and one public key. In case an xpub is imported in any such descriptors whose private key the wallet doesn't have, then the `gethdkeys` RPC throws an unhandled error like below when the private keys are requested. This fix ensures that such calls are properly handled by conditionally finding the corresponding xprv. Some related documentation of this RPC is also updated. ``` ➜ bitcoincli -named gethdkeys private=true error code: -1 error message: map::at: key not found ``` --- src/wallet/rpc/wallet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp index 49808a8d6967..f15ba83bbb31 100644 --- a/src/wallet/rpc/wallet.cpp +++ b/src/wallet/rpc/wallet.cpp @@ -660,7 +660,7 @@ RPCHelpMan gethdkeys() {RPCResult::Type::ARR, "descriptors", "Array of descriptor objects that use this HD key", { {RPCResult::Type::OBJ, "", "", { - {RPCResult::Type::STR, "desc", "Descriptor string representation"}, + {RPCResult::Type::STR, "desc", "Descriptor string public representation"}, {RPCResult::Type::BOOL, "active", "Whether this descriptor is currently used to generate new addresses"}, }}, }}, @@ -707,7 +707,7 @@ RPCHelpMan gethdkeys() w_desc.descriptor->GetPubKeys(desc_pubkeys, desc_xpubs); for (const CExtPubKey& xpub : desc_xpubs) { std::string desc_str; - bool ok = desc_spkm->GetDescriptorString(desc_str, false); + bool ok = desc_spkm->GetDescriptorString(desc_str, /*priv=*/false); CHECK_NONFATAL(ok); wallet_xpubs[xpub].emplace(desc_str, wallet->IsActiveScriptPubKeyMan(*spkm), desc_spkm->HasPrivKey(xpub.pubkey.GetID())); if (std::optional key = priv ? desc_spkm->GetKey(xpub.pubkey.GetID()) : std::nullopt) { @@ -731,7 +731,7 @@ RPCHelpMan gethdkeys() UniValue xpub_info(UniValue::VOBJ); xpub_info.pushKV("xpub", EncodeExtPubKey(xpub)); xpub_info.pushKV("has_private", has_xprv); - if (priv) { + if (priv && has_xprv) { xpub_info.pushKV("xprv", EncodeExtKey(wallet_xprvs.at(xpub))); } xpub_info.pushKV("descriptors", std::move(descriptors)); From 43c528aba925dab2565d069285110238ef63458d Mon Sep 17 00:00:00 2001 From: rkrux Date: Thu, 22 Jan 2026 17:18:26 +0530 Subject: [PATCH 011/332] wallet, test: update `gethdkeys` functional test Update the `test_ranged_multisig` test case to verify the partial xprv fix in the `gethdkeys` RPC. Also, update some existing variable names. --- test/functional/wallet_gethdkeys.py | 50 +++++++++++++++++++---------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/test/functional/wallet_gethdkeys.py b/test/functional/wallet_gethdkeys.py index 9325627917ae..d25ed4ed24a6 100755 --- a/test/functional/wallet_gethdkeys.py +++ b/test/functional/wallet_gethdkeys.py @@ -10,6 +10,7 @@ assert_equal, assert_raises_rpc_error, assert_not_equal, + assert_greater_than, ) from test_framework.wallet_util import WalletUnlock @@ -130,31 +131,46 @@ def test_lone_key_imports(self): def test_ranged_multisig(self): self.log.info("HD keys of a multisig appear in gethdkeys") + def_wallet = self.nodes[0].get_wallet_rpc(self.default_wallet_name) + outside_wallet_xpub = def_wallet.gethdkeys()[0]["xpub"] + self.nodes[0].createwallet("ranged_multisig") wallet = self.nodes[0].get_wallet_rpc("ranged_multisig") - xpub1 = wallet.gethdkeys()[0]["xpub"] - xprv1 = wallet.gethdkeys(private=True)[0]["xprv"] - xpub2 = def_wallet.gethdkeys()[0]["xpub"] + hdkeys_info = wallet.gethdkeys(private=True) + assert_equal(len(hdkeys_info), 1) + within_wallet_xprv = hdkeys_info[0]["xprv"] + within_wallet_xpub = hdkeys_info[0]["xpub"] - prv_multi_desc = descsum_create(f"wsh(multi(2,{xprv1}/*,{xpub2}/*))") - pub_multi_desc = descsum_create(f"wsh(multi(2,{xpub1}/*,{xpub2}/*))") + prv_multi_desc = descsum_create(f"wsh(multi(2,{within_wallet_xprv}/*,{outside_wallet_xpub}/*))") + pub_multi_desc = descsum_create(f"wsh(multi(2,{within_wallet_xpub}/*,{outside_wallet_xpub}/*))") assert_equal(wallet.importdescriptors([{"desc": prv_multi_desc, "timestamp": "now"}])[0]["success"], True) - xpub_info = wallet.gethdkeys() - assert_equal(len(xpub_info), 2) - for x in xpub_info: - if x["xpub"] == xpub1: - found_desc = next((d for d in xpub_info[0]["descriptors"] if d["desc"] == pub_multi_desc), None) - assert found_desc is not None + rpcs_req_resp = [[False, wallet.gethdkeys()], [True, wallet.gethdkeys(private=True)]] + for rpc_req_resp in rpcs_req_resp: + requested_private, hdkeys_response = rpc_req_resp + assert_equal(len(hdkeys_response), 2) + + for hdkeys_info in hdkeys_response: + if hdkeys_info["xpub"] == within_wallet_xpub: + assert_equal(hdkeys_info["has_private"], True) + if requested_private: + assert_equal(hdkeys_info["xprv"], within_wallet_xprv) + else: + assert_equal("xprv" not in hdkeys_info, True) + assert_greater_than(len(hdkeys_info["descriptors"]), 1) # within wallet xpub by default is part of multiple descriptors + found_desc = next((d for d in hdkeys_info["descriptors"] if d["desc"] == pub_multi_desc), None) + elif hdkeys_info["xpub"] == outside_wallet_xpub: + assert_equal(hdkeys_info["has_private"], False) + assert_equal("xprv" not in hdkeys_info, True) + assert_equal(len(hdkeys_info["descriptors"]), 1) # outside wallet xpub is part of only the imported descriptor + found_desc = hdkeys_info["descriptors"][0] + else: + assert False + + assert_equal(found_desc["desc"], pub_multi_desc) assert_equal(found_desc["active"], False) - elif x["xpub"] == xpub2: - assert_equal(len(x["descriptors"]), 1) - assert_equal(x["descriptors"][0]["desc"], pub_multi_desc) - assert_equal(x["descriptors"][0]["active"], False) - else: - assert False def test_mixed_multisig(self): self.log.info("Non-HD keys of a multisig do not appear in gethdkeys") From da51b5e4d216a2eff0e93d31c93434f3eac02f60 Mon Sep 17 00:00:00 2001 From: Hodlinator <172445034+hodlinator@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:45:01 +0100 Subject: [PATCH 012/332] refactor(miniscript): Move keys to avoid copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As done in other ctors. Co-authored-by: Lőrinc --- src/script/miniscript.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/miniscript.h b/src/script/miniscript.h index 1b7e84f471d0..a65900c78402 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -607,7 +607,7 @@ class Node // This is kept private as no valid fragment has all of these arguments. // Only used by Clone() Node(internal::NoDupCheck, MiniscriptContext script_ctx, enum Fragment nt, std::vector sub, std::vector key, std::vector arg, uint32_t val) - : fragment(nt), k(val), keys(key), data(std::move(arg)), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {} + : fragment(nt), k(val), keys(std::move(key)), data(std::move(arg)), subs(std::move(sub)), m_script_ctx{script_ctx}, ops(CalcOps()), ss(CalcStackSize()), ws(CalcWitnessSize()), typ(CalcType()), scriptlen(CalcScriptLen()) {} //! Compute the length of the script for this miniscript (including children). size_t CalcScriptLen() const From fd5e9d990431a6af08dd99b25d1e17c6c9818b4d Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 28 Jan 2026 20:25:34 +0000 Subject: [PATCH 013/332] signals: Use a lambda to avoid connecting a signal to another signal This is undocumented and unspecified Boost behavior that happens to work as intended for now, but could break at any point in the future. See the boost discussion here: https://groups.google.com/g/boost-list/c/So4i8JXneJ0 It also complicates a potential replacement of Boost::signals2. --- src/wallet/wallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 64d7f191de76..bda104061b10 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3549,7 +3549,9 @@ bool CWallet::HaveCryptedKeys() const void CWallet::ConnectScriptPubKeyManNotifiers() { for (const auto& spk_man : GetActiveScriptPubKeyMans()) { - spk_man->NotifyCanGetAddressesChanged.connect(NotifyCanGetAddressesChanged); + spk_man->NotifyCanGetAddressesChanged.connect([this] { + NotifyCanGetAddressesChanged(); + }); spk_man->NotifyFirstKeyTimeChanged.connect([this](const ScriptPubKeyMan*, int64_t time) { MaybeUpdateBirthTime(time); }); From 2150153f372f99b789171b006626f66ff5d0299c Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Thu, 29 Jan 2026 16:09:08 +0000 Subject: [PATCH 014/332] signals: Temporarily add boost headers to bitcoind and bitcoin-node builds The current code forward-declares boost::signals2, which avoids the need for these includes. An upcoming commit will (temporarily) include boost headers directly instead. A follow-up commit will then replace boost with an internal signals implementation, which will allow this commit to be reverted. --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cf1f26c9f24c..1eb61f138cf4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -307,6 +307,7 @@ if(BUILD_DAEMON) target_link_libraries(bitcoind core_interface bitcoin_node + Boost::headers $ ) install_binary_component(bitcoind HAS_MANPAGE) @@ -320,6 +321,7 @@ if(ENABLE_IPC AND BUILD_DAEMON) core_interface bitcoin_node bitcoin_ipc + Boost::headers $ ) install_binary_component(bitcoin-node INTERNAL) From dd93362a1d874eb761ed7026956a490b5ed0472b Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sun, 1 Feb 2026 20:42:58 +0100 Subject: [PATCH 015/332] bench: simplify script verification benchmark, generalize signing Simplify the benchmark with the following changes: - Set the deterministic private key using uint256::ONE, put it in a `FlatSigningProvider` instance for easier signing - Use `GetScriptForDestination` for creating the output script - Use `SignTransaction` to sign, instead of doing it manually (also removes the need to caclulate the public key hash manually) - Pass standard script verification flags instead of combining them manually These steps, in particular the generalized signing, prepare the benchmarking extension for a different script type (P2TR key-path) in the next commit. --- src/bench/verify_script.cpp | 53 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index e740f86ce036..b8a71dd421ce 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -2,9 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include -#include #include +#include #include #include #include