48013 Commits

Author SHA1 Message Date
Hennadii Stepanov
6df4a045f7
qt: Replace three dots with ellipsis 2026-02-14 15:53:32 +00:00
MarcoFalke
211111b804
test: Avoid empty errmsg in JSONRPCException
It is unclear why the fallback should be an empty message, when it is
better to include all rpc_error details that are available.

Also, include the http status.

This allows to revert commit 6354b4fd7fe819eb13274b212e426a7d10ca75d3,
because it is no longer needed.
2026-02-13 18:55:53 +01:00
Hennadii Stepanov
b65ff0e5a1
Merge bitcoin/bitcoin#34548: ci: Add and use ci-windows-cross.py helper
fa13b13239e53b7198eabab2a3771277a2b433e1 ci: [refactor] Use pathlib over os.path (MarcoFalke)
fa2719ab1ba2252b53609e254413a38ac2097dc9 ci: [refactor] Move run_unit_tests to ci-windows-cross.py (MarcoFalke)
fa99ba5f14d4c7fbc48188504a1668d8e5106c77 ci: Set PREVIOUS_RELEASES_DIR env var in ci-windows-cross.py (MarcoFalke)
fa4a1cab6c179de4e48b574e0a325c74ab7a25f7 ci: Move run_functional_tests into ci-windows-cross.py (MarcoFalke)
1111108685ec0fd09b1e288b07c2b7982fc017e0 ci: [refactor] Move pyzmq install and get_previous_releases into ci-windows-cross.py (MarcoFalke)
fac9c7bd6635d59617949564b1c8075b8537a16b ci: [refactor] Move config.ini rewrite to ci-windows-cross.py (MarcoFalke)
faf738946668b6ec16de37298e5a1da23ed77222 ci: Move check_manifests step to ci-windows-cross.py (MarcoFalke)
fa674d55df57ac0b60f3aa9c9dfec0ae53e8af14 ci: [refactor] Move print_version step into ci-windows-cross.py helper (MarcoFalke)

Pull request description:

  Currently the ci yaml has a mix of Bash and Pwsh snippets, which is problematic:

  * The `shellcheck` tool does not review the Bash
  * The ci yaml is not merged with master on re-runs, but the code is, leading to possibly confusing CI errors on re-runs
  * The Pwsh isn't reviewed at all by any tool
  * It is tedious to run the CI commands locally on Windows

  Fix all issues by extracting them into a step-based Python script.

ACKs for top commit:
  janb84:
    re ACK fa13b13239e53b7198eabab2a3771277a2b433e1
  hebasto:
    ACK fa13b13239e53b7198eabab2a3771277a2b433e1, I have reviewed the code and it looks OK.

Tree-SHA512: 23d21d3bfb07e102fe1cc15ba5749d553d9766ae6c4a7648bd77df0705469bd138c76a9a2fdeb4d91d3f889a425b7caf25878ecb2e68b604faf9665f8df4eb6d
2026-02-13 14:31:35 +00:00
merge-script
03e5f063b5
Merge bitcoin/bitcoin#34559: ci: split vcpkg tools cache into restore/save
c413cf12c5c6e688e71be84397a6e4fc75b5eaa4 ci: Split vcpkg tools cache into restore/save (willcl-ark)

Pull request description:

  The vcpkg tools cache was using the combined actions/cache action, which by default saves on every run regardless of branch. Split it into the restore/save pattern used by the other caches, so that saves only happen on default branch pushes.

  This will have little impact in bitcoin/bitcoin (which uses few branches), but on forks, if you don't update master branch frequently (which saves all caches), then all cache space will eventually be taken up by multiple vckpg tools caches, resulting in bad cache hit rates in all other jobs.

ACKs for top commit:
  maflcko:
    lgtm ACK c413cf12c5c6e688e71be84397a6e4fc75b5eaa4

Tree-SHA512: e28a43b1aa17ce7f0a19d16b98efed0372004d83e4d7e92a126f642599d7e1a94684032a48a3b380b3a7c970c313c92bfe30146b977e33f81b45fe70b49755e3
2026-02-13 11:34:49 +00:00
merge-script
84e826ddc1
Merge bitcoin/bitcoin#34511: test: fully reset the state of CConnman in tests
2cb7e99deee1017a6edd94d82de556895138361d test: also reset CConnman::m_private_broadcast in tests (Vasil Dimov)
91b7c874e2b1479ed29f067cd1bef7724aabd951 test: add ConnmanTestMsg convenience method Reset() (Vasil Dimov)

Pull request description:

  Member variables of `CConnman::m_private_broadcast` (introduced in
  https://github.com/bitcoin/bitcoin/pull/29415) could influence the tests
  which creates non-determinism if the same instance of `CConnman` is used
  for repeated test iterations.

  So, reset the state of `CConnman::m_private_broadcast` from
  `ConnmanTestMsg::Reset()`. Currently this affects the fuzz tests
  `process_message` and `process_messages`.

  Reported in https://github.com/bitcoin/bitcoin/issues/34476#issuecomment-3849088794

ACKs for top commit:
  maflcko:
    review ACK 2cb7e99deee1017a6edd94d82de556895138361d 🚙
  Crypt-iQ:
    tACK 2cb7e99deee1017a6edd94d82de556895138361d
  frankomosh:
    Code Review ACK 2cb7e99deee1017a6edd94d82de556895138361d
  brunoerg:
    code review ACK 2cb7e99deee1017a6edd94d82de556895138361d

Tree-SHA512: 0f4b114542da8dc611689457ce67034c15cbfe409b006b2db72bc74078ee9513f5ce3d0e6e67d37c127cfa0a5170fe72fe3ea45ce2a61d45a358dd11bd1881f8
2026-02-13 11:17:26 +00:00
merge-script
309c51d89d
Merge bitcoin/bitcoin#34546: kernel: Avoid duplicating symbols in the kernel library
eafd530d20326a101be672243de68a67161ef83e kernel: avoid potential duplicate object in shared library/binary (Cory Fields)
24c3b47010036d67e6d777d9aa37ae3ef8146254 build: add kernel-specific warnings (Cory Fields)

Pull request description:

  This is a revival of https://github.com/bitcoin/bitcoin/pull/31807

  Introduces the [-Wunique-object-duplication](https://clang.llvm.org/docs/DiagnosticsReference.html#wunique-object-duplication) warning flag available in clang-21 for usage when building the kernel library. It warns of potential duplicate objects in shared libraries. REDUCE_EXPORTS needs to be ON to trigger it.

  Though we have a C API now that manages exporting symbols, I think it is prudent to also avoid any duplicate symbols on the internal c++ side in case we ever to decide to expose some of its headers. It also not clear that all linkers would handle these cases correctly even in the current internal usage.

ACKs for top commit:
  fanquake:
    ACK eafd530d20326a101be672243de68a67161ef83e
  hebasto:
    ACK eafd530d20326a101be672243de68a67161ef83e.

Tree-SHA512: 81961b50f0268dbe076497e130857f5b4b9151c748d107ec15158d1511dd25bce745e0beeb127b9cea51cb2edd78032735600606a75f7ff8a3fd572acced42e0
2026-02-13 11:11:14 +00:00
Pol Espinasa
24f93c9af7
release note 2026-02-13 10:52:28 +01:00
Pol Espinasa
331a5279d2
wallet, rpc:remove settxfee and paytxfee 2026-02-13 10:52:25 +01:00
Cory Fields
eafd530d20
kernel: avoid potential duplicate object in shared library/binary
Fixes warning and potential bug whereby init_flag may exist in both
libbitcoinkernel as well as a downstream user, as opposed to being shared as
intended.

src/support/lockedpool.h:224:31:
warning: 'init_flag' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage [-Wunique-object-duplication]
2026-02-13 08:50:50 +01:00
Cory Fields
24c3b47010
build: add kernel-specific warnings
In some cases, we'll want to be more aggressive or care about different things
when building the kernel. In this case, a warning is added for symbols which
may be duplicated between the kernel and downstream users.

This warning was introduced in clang 21, which is not yet the minimum
supported compiler version. REDUCE_EXPORTS needs to be ON to trigger it.
2026-02-13 08:50:17 +01:00
Andrew Toth
cae6d895f8
fuzz: add target for CoinsViewOverlay
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-12 21:31:23 -05:00
Andrew Toth
86eda88c8e
fuzz: move backend mutating block to end of coins_view
Refactor TestCoinsView() to move code that directly modifies
backend_coins_view to the end of the function.
This prepares for a CoinsViewOverlay fuzz target that asserts
the backend_coins_view is not mutated by any methods before
BatchWrite is called.

Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-12 21:31:23 -05:00
Andrew Toth
89824fb27b
fuzz: pass coins_view_cache to TestCoinsView in coins_view
Refactor TestCoinsView() to accept the cache as a parameter instead of
creating it internally. This prepares for adding a CoinsViewOverlay
fuzz target that needs to pass in a different cache type.

This is a non-functional change.

Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-12 21:31:23 -05:00
Andrew Toth
73e99a5966
coins: don't mutate main cache when connecting block
Use `CoinsViewOverlay` when connecting blocks in `ConnectTip`.

Add a new integration test to verify that using
CoinsViewOverlay does not mutate the main cache
during validation for an invalid block.

Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-12 21:31:23 -05:00
Andrew Toth
67c0d1798e
coins: introduce CoinsViewOverlay
Introduce `CoinsViewOverlay`, a `CCoinsViewCache` subclass that reads
coins without mutating the underlying cache via `FetchCoin()`.

Use `PeekCoin()` to look up a Coin through a stack of `CCoinsViewCache` layers without populating parent caches. This prevents the main cache from caching inputs pulled from disk for a block that has not yet been fully validated. Once `Flush()` is called on the view, these inputs will be added as spent to `coinsCache` in the main cache via `BatchWrite()`.

This is the foundation for async input fetching, where worker threads must not
mutate shared state.

Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-12 21:31:23 -05:00
Andrew Toth
69b01af0eb
coins: add PeekCoin()
Introduce a helper to look up a Coin through a stack of CCoinsViewCache layers without populating parent caches.

This is useful for ephemeral views (e.g. during ConnectBlock) that want to avoid polluting CoinsTip() when validating invalid blocks.

Co-authored-by: l0rinc <pap.lorinc@gmail.com>
Co-authored-by: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2026-02-12 21:31:23 -05:00
Ryan Ofsky
f700609e8a doc: Release notes for mining IPC interface bump 2026-02-12 08:39:11 -05:00
Hennadii Stepanov
79c934b51c
cmake: Fix NetBSD-specific workaround for Boost 2026-02-12 10:49:45 +00:00
MarcoFalke
fa90d44a22
test: Fix intermittent issues in feature_assumevalid.py 2026-02-12 11:23:24 +01:00
merge-script
07b924775e
Merge bitcoin/bitcoin#34427: lint: Flatten lint image entry points
faba426b3b666c0e93e4349ba88deb79517534c6 lint: Flatten lint image entry points (MarcoFalke)
1111fff91c768d6893868032a0dfba02a9709ffc lint: Add missing --platform=linux to docker build command (MarcoFalke)

Pull request description:

  Two fixups to the lint container:

  * Add a missing `--platform=linux` to avoid running a non-native arch, like s390x, which happens with podman if such a container was most recently used.
  * Flatten the entry points to remove the bash-based one:

  Previously, an additional entry point into the container that spawned a bash was supported. The bash had an alias `lint` to run all lint scripts. However, such a use-case seems limited (because it only runs inside the container), inflexible (because it only allows running all lint scripts), and possibly brittle (because it can miss re-building the image when the cache is stale). So remove it and just offer the single entry point via the `./ci/lint.py` script.

  If there is a use-case to skip the image building, it should be trivial to add an env var setting the the lint Python script like `DANGER_SKIP_IMAGE_RE_BUILD=1` (or so) in the future.

ACKs for top commit:
  willcl-ark:
    ACK faba426b3b666c0e93e4349ba88deb79517534c6

Tree-SHA512: 9afda16723c215602c6c42fa3a286d1828c887c8f6ff9512c8ec162ec8997789695f0c464d389cae94e67acf8b5e0f1a55e2ee0d60131a2eee091cf281f91514
2026-02-12 09:43:29 +00:00
Sjors Provoost
9453c15361 ipc mining: break compatibility with existing clients (version bump)
This increments the field number of the `Init.makeMining` method and makes the
old `makeMining` method return an error, so existing IPC mining clients not
using the latest schema file will get an error and not be able to access the
Mining interface.

Normally, there shouldn't be a need to break compatibility this way, but the
mining interface has evolved a lot since it was first introduced, with old
clients using the original methods less stable and performant than newer
clients. So now is a good time to introduce a cutoff, drop deprecated methods,
and stop supporting old clients which can't function as well.

Bumping the field number is also an opportunity to make other improvements that
would be awkward to implement compatibly, so a few of these were implemented in
commits immediately preceding this one.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2026-02-12 03:34:08 +01:00
Sjors Provoost
70de5cc2d2 ipc mining: pass missing context to BlockTemplate methods (incompatible schema change)
Adding a context parameter ensures that these methods are run in
their own thread and don't block other calls. They were missing
for:

- createNewBlock()
- checkBlock()

The missing parameters were first pointed out by plebhash in
https://github.com/bitcoin/bitcoin/issues/33575#issuecomment-3383290115 and
adding them should prevent possible performance problems and lockups,
especially with #34184 which can make the createNewBlock method block for a
long time before returning. It would be straightforward to make this change in
a backward compatible way
(https://github.com/bitcoin/bitcoin/pull/34184#discussion_r2770232149) but nice
to not need to go through the trouble.

Warning: This is an intermediate, review-only commit. Binaries built from it
should not be distributed or used to connect to other clients or servers. It
makes incompatible changes to the `mining.capnp` schema without updating the
`Init.makeMining` version, causing binaries to advertise support for a schema
they do not actually implement. Mixed versions may therefore exchange garbage
requests/responses instead of producing clear errors. The final commit in this
series bumps the mining interface number to ensure mismatches are detected.

git-bisect-skip: yes

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2026-02-12 03:34:08 +01:00
Ryan Ofsky
2278f017af ipc mining: remove deprecated methods (incompatible schema change)
This change removes deprecated methods from the ipc mining interface.

Warning: This is an intermediate, review-only commit. Binaries built from it
should not be distributed or used to connect to other clients or servers. It
makes incompatible changes to the `mining.capnp` schema without updating the
`Init.makeMining` version, causing binaries to advertise support for a schema
they do not actually implement. Mixed versions may therefore exchange garbage
requests/responses instead of producing clear errors. The final commit in this
series bumps the mining interface number to ensure mismatches are detected.

git-bisect-skip: yes
2026-02-11 21:34:08 -05:00
Ryan Ofsky
c6638fa7c5 ipc mining: provide default option values (incompatible schema change)
This change copies default option values from the C++ mining interface to the
Cap'n Proto interface. Currently, no capnp default values are set, so they are
implicitly all false or 0, which is inconvenient for the rust and python
clients and inconsistent with the C++ client.

Warning: This is an intermediate, review-only commit. Binaries built from it
should not be distributed or used to connect to other clients or servers. It
makes incompatible changes to the `mining.capnp` schema without updating the
`Init.makeMining` version, causing binaries to advertise support for a schema
they do not actually implement. Mixed versions may therefore exchange garbage
requests/responses instead of producing clear errors. The final commit in this
series bumps the mining interface number to ensure mismatches are detected.

git-bisect-skip: yes
2026-02-11 21:34:08 -05:00
Ryan Ofsky
a4603ac774 ipc mining: declare constants for default field values
This commit only declares constants without using them. They will be applied in
seperate commit since changing struct default field values in cap'n proto is
not backwards compatible.
2026-02-11 21:34:08 -05:00
Ryan Ofsky
ff995b50cf ipc test: add workaround to block_reserved_weight exception test
libmultiprocess currently handles uncaught exceptions from IPC methods badly
when an `mp.Context` parameter is passed and the IPC call executes on an a
worker thread, with the uncaught exception leading to a std::terminate call.

https://github.com/bitcoin-core/libmultiprocess/pull/218 was created to fix
this, but before that change is available, update an IPC test which can trigger
this behavior to handle it and recover when mp.Context parameters are added in
the an upcoming commit.

Having this workaround makes the test a little more complicated and less strict
but reduces dependencies between pending PRs so they don't need to be reviewed
or merged in a particular order.
2026-02-11 21:34:08 -05:00
Ryan Ofsky
b970cdf20f test framework: expand expected_stderr, expected_ret_code options
Allow `expected_stderr` option passed to `wait_until_stopped` and
`is_node_stopped` helper functions to be a regex pattern instead of just a
fixed string.

Allow `expected_ret_code` be list of possible exit codes instead of a single
error code to handle the case where exit codes vary depending on OS and libc.
2026-02-11 21:34:08 -05:00
Ryan Ofsky
df53a3e5ec rpc refactor: stop using deprecated getCoinbaseCommitment method
There should be no change in behavior

Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2026-02-11 21:34:08 -05:00
Ryan Ofsky
0b4cd08fcd
Merge bitcoin/bitcoin#33965: mining: fix -blockreservedweight shadows IPC option
b623fab1ba87ea93dd7e302b8c927e55f2036173 mining: enforce minimum reserved weight for IPC (Sjors Provoost)
d3e49528d479613ebe50088d530a621861463fa4 mining: fix -blockreservedweight shadows IPC option (Sjors Provoost)
418b7995ddfbc88764f1f0ceabf8993808b08bd8 test: have mining template helpers return None (Sjors Provoost)

Pull request description:

  Also enforce `MINIMUM_BLOCK_RESERVED_WEIGHT` for IPC clients.

  The `-blockreservedweight` startup option should only affect RPC code, because IPC clients (currently) do not have a way to signal their intent to use the node default (the `BlockCreateOptions` struct defaults merely document a recommendation for client software).

  Before this PR however, if the user set `-blockreservedweight` then `ApplyArgsManOptions` would cause the `block_reserved_weight` option passed by IPC clients to be ignored. _Users who don't set this value were not affected._

  Fix this by making BlockCreateOptions::block_reserved_weight an std::optional.

  Internal interface users, such as the RPC call sites, don't set a value so -blockreservedweight is used. Whereas IPC clients do set a value which is no longer ignored.

  Test coverage is added, with a preliminary commit that refactors the `create_block_template` and `wait_next_template` helpers.

  `mining_basic.py` already ensured `-blockreservedweight` is enforced by mining RPC methods. The second commit adds coverage for Mining interface IPC clients. It also verifies that `-blockreservedweight` has no effect on them.

  The third commit enforces `MINIMUM_BLOCK_RESERVED_WEIGHT` for IPC clients. Previously lower values were quietly clamped.

  ---

  Merge order preference: #34452 should ideally go first.

ACKs for top commit:
  sedited:
    Re-ACK b623fab1ba87ea93dd7e302b8c927e55f2036173
  ryanofsky:
    Code review ACK b623fab1ba87ea93dd7e302b8c927e55f2036173. Was rebased and test split up and comment updated since last review.
  ismaelsadeeq:
    ACK b623fab1ba87ea93dd7e302b8c927e55f2036173

Tree-SHA512: 9e651a520d8e4aeadb330da86788744b6ecad8060fa21d50dc8e6012a60083e7b262aaa08a64676b9ef18ba65b651bc1272d8383d184030342e4c0f2c6a9866d
2026-02-11 21:22:28 -05:00
Andrew Toth
2a1d0db799
doc: Mention private broadcast RPCs in release notes 2026-02-11 19:46:22 -05:00
Andrew Toth
c3378be10b
test: Cover abortprivatebroadcast in p2p_private_broadcast
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-11 19:46:22 -05:00
Andrew Toth
557260ca14
rpc: Add abortprivatebroadcast
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-11 19:46:19 -05:00
Andrew Toth
15dff452eb
test: Cover getprivatebroadcastinfo in p2p_private_broadcast
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-11 19:46:16 -05:00
Andrew Toth
996f20c18a
rpc: Add getprivatebroadcastinfo
Co-authored-by: Vasil Dimov <vd@freebsd.org>
2026-02-11 19:46:12 -05:00
Andrew Toth
5e64982541
net: Add PrivateBroadcast::GetBroadcastInfo
Co-authored-by: Daniela Brozzoni <danielabrozzoni@protonmail.com>
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
2026-02-11 19:46:12 -05:00
merge-script
55c49ff8f4
Merge bitcoin/bitcoin#34143: build: Prevent system header fallback and include path pollution
65134c7e5f99500baed18d575b576e33a6294ecf depends: Prefix include path for headers-only `systemtap` package (Hennadii Stepanov)
94a692b6aa09d2e5df97bbc9cc810854818f9333 cmake: Add missed `USDT::headers` (Hennadii Stepanov)
b5375c44ed16ed6aae3d46ac6316b3981330f100 depends: Prefix include path for headers-only `boost` package (Hennadii Stepanov)
d73378ffcca2de43a79c4903221e8164cf256469 cmake: Add missed `Boost::headers` (Hennadii Stepanov)

Pull request description:

  Currently, header-only dependencies in the depends subsystem are installed into the standard `include/` subdirectory. This inadvertently exposes their headers to the compiler via `-I` flags brought in by other dependencies (e.g., `libevent` or `sqlite`). This "include path pollution" masks missing dependencies in the build configuration. While the build might succeed by accident due to this overlap, it creates a fragile state. If the overlapping library is removed, the build will break, or, worse, the compiler may silently fall back to the host system's default paths (e.g., `/usr/include`).

  This PR improves build system security and hygiene by enforcing strict, distinguished include paths for header-only dependencies. The missing dependencies revealed by this change (`Boost::headers`, `USDT::headers`) have been fixed in separate commits.

ACKs for top commit:
  theuni:
    re-ACK 65134c7e5f99500baed18d575b576e33a6294ecf
  fanquake:
    ACK 65134c7e5f99500baed18d575b576e33a6294ecf

Tree-SHA512: 41667b46c3bd2f872951a5651b30f7d1468f49f1265196b7868233ed44b2eb0e33f1f69a1af348b55f07a8d1f594e276eb49b724e80b8eae85aed1c9bacae197
2026-02-11 17:43:10 +00:00
merge-script
c134b1a4bc
Merge bitcoin/bitcoin#34257: txgraph: deterministic optimal transaction order
6f113cb1847c6890f1fbd052ff7eb8ea41ccafc5 txgraph: use fallback order to sort chunks (feature) (Pieter Wuille)
0a3351947e736c646a6dfffef24b83d003c569e7 txgraph: use fallback order when linearizing (feature) (Pieter Wuille)
fba004a3df02d8d5d47f1ad0bb1ccbfde01bb2af txgraph: pass fallback_order to TxGraph (preparation) (Pieter Wuille)
941c432a4637efd4e5040259f47f2bfed073af7c txgraph test: subclass TxGraph::Ref like mempool does (preparation) (Pieter Wuille)
39d0052cbf478a729ae0288262003bba9c12690b clusterlin: make optimal linearizations deterministic (feature) (Pieter Wuille)
8bfbba32077cb8682208ef31748a10562be027db txgraph: sort distinct-cluster chunks by equal-feerate-prefix size (feature) (Pieter Wuille)
e0bc73ba9270b860d81e479a7bddcff8cfd8bfb6 clusterlin: sort tx in chunk by feerate and size (feature) (Pieter Wuille)
6c1bcb2c7c1a0017562e99195d74c3a05444633b txgraph: clear cluster's chunk index in ~Ref (preparation) (Pieter Wuille)
7427c7d0983050543f1fc7863121d8e2bf4b1511 txgraph: update chunk index on Compact (preparation) (Pieter Wuille)
3ddafceb9afd9d493b927bc91dae324225ed8e32 txgraph: initialize Ref in AddTransaction (preparation) (Pieter Wuille)

Pull request description:

  Part of #30289.

  TxGraph's fundamental responsibility is deciding the order of transactions in the mempool. It relies on the `cluster_linearize.h` code to optimize it, but there can and often will be many different orderings that are essentially equivalent from a quality perspective, so we have to pick one. At a high level, the solution will involve one or more of:
  * Deciding based on **internal identifiers** (`Cluster::m_sequence`, `DepGraphIndex`). This is very simple, but risks leaking information about transaction receive order.
  * Deciding **randomly**, which is private, but may interfere with relay expectations, block propagation, and ability to monitor network behavior.
  * Deciding **based on txid**, which is private and deterministic, but risks incentivizing grinding to get an edge (though we haven't really seen such behavior).
  * Deciding **based on size** (e.g. prefer smaller transactions), which is somewhat related to quality, but not unconditionally (depending on mempool layout, the ideal ordering might call for smaller transactions first, last, or anywhere in between). It's also not a strong ordering as there can be many identically-sized transactions. However, if it were to encourage grinding behavior, incentivizing smaller transactions is probably not a bad thing.

  As of #32545, the current behavior is primarily picking randomly, though inconsistently, as some code paths also use internal identifiers and size. #33335 sought to change it to use random (preferring size in a few places), with the downsides listed above.

  This PR is an alternative to that, which changes the order to tie-break based on size everywhere possible, and use lowest-txid-first as final fallback. This is fully deterministic: for any given set of mempool transactions, if all linearized optimally, the transaction order exposed by TxGraph is deterministic.

  The transactions within a chunk are sorted according to:
  1. `PostLinearize` (which improves sub-chunk order), using an initial linearization created using the rules 2-5 below.
  2. Topology (parents before children).
  3. Individual transaction feerate (high to low)
  4. Individual transaction weight (small to large)
  5. Txid (low to high txid)

  The chunks within a cluster are sorted according to:
  1. Topology (chunks after their dependencies)
  2. Chunk feerate (high to low)
  3. Chunk weight (small to large)
  4. Max-txid (chunk with lowest maximum-txid first)

  The chunks across clusters are sorted according to:
  1. Feerate (high to low)
  2. Equal-feerate-chunk-prefix weight (small to large)
  3. Max-txid (chunk with lowest maximum-txid first)

  The equal-feerate-chunk-prefix weight of a chunk C is defined as the sum of the weights of all chunks in the same cluster as C, with the same feerate as C, up to and including C itself, in linearization order (but excluding such chunks that appear after C). This is a well-defined approximation of sorting chunks from small to large across clusters, while remaining consistent with intra-cluster linearization order.

ACKs for top commit:
  ajtowns:
    reACK 6f113cb1847c6890f1fbd052ff7eb8ea41ccafc5 it was good before and now it's better
  instagibbs:
    ACK 6f113cb1847c6890f1fbd052ff7eb8ea41ccafc5
  marcofleon:
    light crACK 6f113cb1847c6890f1fbd052ff7eb8ea41ccafc5

Tree-SHA512: 16dc43c62b7e83c81db1ee14c01e068ae2f06c1ffaa0898837d87271fa7179dd98baeb74abc9fe79220e01fdba6876defe60022c2b72badc21d770644a0fe0ac
2026-02-11 17:40:38 +00:00
merge-script
4a05825a3f
Merge bitcoin/bitcoin#33689: http: replace WorkQueue and single threads handling for ThreadPool
38fd85c676a072ebf256e806beda9d7533790baa http: replace WorkQueue and threads handling for ThreadPool (furszy)
c323f882ed3841401edee90ab5261d68215ab316 fuzz: add test case for threadpool (TheCharlatan)
c528dd5f8ccc3955b00bdba869f0a774efa97fe1 util: introduce general purpose thread pool (furszy)
6354b4fd7fe819eb13274b212e426a7d10ca75d3 tests: log node JSON-RPC errors during test setup (furszy)
45930a79412dc45f9d391cd7689d029fa4f0189e http-server: guard against crashes from unhandled exceptions (furszy)

Pull request description:

  This has been a recent discovery; the general thread pool class created for #26966, cleanly
  integrates into the HTTP server. It simplifies init, shutdown and requests execution logic.
  Replacing code that was never unit tested for code that is properly unit and fuzz tested.
  Although our functional test framework extensively uses this RPC interface (that’s how
  we’ve been ensuring its correct behavior so far - which is not the best).

  This clearly separates the responsibilities:
  The HTTP server now focuses solely on receiving and dispatching requests, while ThreadPool handles
  concurrency, queuing, and execution.

  This will also allows us to experiment with further performance improvements at the task queuing and
  execution level, such as a lock-free structure or task prioritization or any other implementation detail
  like coroutines in the future, without having to deal with HTTP code that lives on a different layer.

  Note:
  The rationale behind introducing the ThreadPool first is to be able to easily cherry-pick it across different
  working paths. Some of the ones that are benefited from it are #26966 for the parallelization of the indexes
  initial sync, #31132 for the parallelization of the inputs fetching procedure, #32061 for the libevent replacement,
  the kernel API #30595 (https://github.com/bitcoin/bitcoin/pull/30595#discussion_r2413702370) to avoid blocking validation among others use cases not publicly available.

  Note 2:
  I could have created a wrapper around the existing code and replaced the `WorkQueue` in a subsequent
  commit, but it didn’t seem worth the extra commits and review effort. The `ThreadPool` implements
  essentially the same functionality in a more modern and cleaner way.

ACKs for top commit:
  Eunovo:
    ReACK 38fd85c676
  sedited:
    Re-ACK 38fd85c676a072ebf256e806beda9d7533790baa
  pinheadmz:
    ACK 38fd85c676a072ebf256e806beda9d7533790baa

Tree-SHA512: a0330e54ed504330ca874c42d4e318a909f548b2fb9ac46db8badf5935b9eec47dc4ed503d1b6f98574418e3473420ea45f60498be05545c4325cfa89dcca689
2026-02-11 18:04:17 +01:00
SomberNight
50cf6838e6
wallet: rpc: manpage: fix example missing fee_rate argument
The function signature for the `send` RPC is:
```
send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options version )
```

The last example in the manpage is missing the `fee_rate` arg, but is trying to specify the `options` arg, by index.
The parser confuses the intended `options` arg as the missing `fee_rate` arg.

See:
```
$ bitcoin-cli -rpcuser=doggman -rpcpassword=donkey -rpcport=18554 -regtest send '{"bcrt1qusm48zmlzwr32csxdw4ar7atw260h22c9ten9l": 0.1}' 1 economical '{"add_to_wallet": false, "inputs": [{"txid":"0b7e1a471dc948b7a6187936b16e6d7d9833629b2f9dd8a392eb89928f63aaad", "vout":0}]}'
error code: -8
error message:
Cannot specify both conf_target and fee_rate. Please provide either a confirmation target in blocks for automatic fee estimation, or an explicit fee rate.
```
vs
```
$ bitcoin-cli -rpcuser=doggman -rpcpassword=donkey -rpcport=18554 -regtest send '{"bcrt1qusm48zmlzwr32csxdw4ar7atw260h22c9ten9l": 0.1}' 1 economical null '{"add_to_wallet": false, "inputs": [{"txid":"0b7e1a471dc948b7a6187936b16e6d7d9833629b2f9dd8a392eb89928f63aaad", "vout":0}]}'
{
  "psbt": "cHNidP8BAHECAAAAAa2qY4+SieuSo9idL5tiM5h9bW6xNnkYprdIyR1HGn4LAAAAAAD9////AkR2DwQAAAAAFgAUpLDwJu+wFRHLQAgKAb0psk7UVd2AlpgAAAAAABYAFOQ3U4t/E4cVYgZrq9H7q3K0+6lYAAAAAAABAIUCAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wQC4wMA/////wLIF6gEAAAAABYAFLMY1zihXrefAA0DA5nld4MCPjkrAAAAAAAAAAAmaiSqIant4vYcP3HR3v0/qZnfo2lTdVxpBol5mWK0i+vYNpdOjPkAAAAAAQEfyBeoBAAAAAAWABSzGNc4oV63nwANAwOZ5XeDAj45KwEIawJHMEQCIElTV4pbUrsPR9qHWcioowVv3QVWHizxwevfD0u/I8YyAiBCY3OzF81PSLM00h4ueQkehYuxDFZu7Jk51iejphKnnwEhA0VKdYVSyBpWoxBwTDOupB58Fi3mEBs+u+OOqEYVd2sZACICA98YLWyH7dBCfXVxe7woiLSTgV1mJN8Zc8KgZ77pVSg+GNBMeT5UAACAAQAAgAAAAIABAAAAbAAAAAAA",
  "txid": "625b71b314a6ac4f738634e29dc007cd5edc0427c1ae96ab706d06a62910cea2",
  "hex": "02000000000101adaa638f9289eb92a3d89d2f9b6233987d6d6eb1367918a6b748c91d471a7e0b0000000000fdffffff0244760f0400000000160014a4b0f026efb01511cb40080a01bd29b24ed455dd8096980000000000160014e437538b7f13871562066babd1fbab72b4fba9580247304402204953578a5b52bb0f47da8759c8a8a3056fdd05561e2cf1c1ebdf0f4bbf23c6320220426373b317cd4f48b334d21e2e79091e858bb10c566eec9939d627a3a612a79f012103454a758552c81a56a310704c33aea41e7c162de6101b3ebbe38ea84615776b1900000000",
  "complete": true
}
```
2026-02-11 16:16:50 +00:00
ismaelsadeeq
c1355493e2
refactor: fees: split fee rate format from fee estimate mode
- Introduce a `FeeRateFormat` enum and change `CFeeRate::ToString()`
   to use it for `BTC/kvB` vs `sat/vB` output formatting.
 - Handle all enum values, hence remove default case in `CFeeRate::ToString()`
   and `assert(False)` when a `FeeRateFormat` value is not handled.
 - Keep `FeeEstimateMode` focused on fee estimation behavior by removing fee rate format
   values from `FeeEstimateMode`.
 - Update all formatting call sites and tests to pass `FeeRateFormat` explicitly, separating fee rate format
   from fee-estimation mode selection.
2026-02-11 15:48:00 +00:00
willcl-ark
c413cf12c5 ci: Split vcpkg tools cache into restore/save
The vcpkg tools cache was using the combined actions/cache action,
which saves on every run regardless of branch. Split it into the
restore/save pattern used by the other caches, so that saves only
happen on default branch pushes.
2026-02-11 15:35:46 +00:00
merge-script
337fef9f2f
Merge bitcoin/bitcoin#34554: build: avoid exporting secp256k1 symbols
2ccfdb582b646d9bda07f0f13b97cb8c37a452aa build: avoid exporting secp256k1 symbols (Cory Fields)

Pull request description:

  Take advantage of the [new secp256k1 option to avoid visibility attributes](https://github.com/bitcoin-core/secp256k1/pull/1696) on API functions.

  While most users of a shared libsecp always want API functions exported so that they can actually be linked against, we always build it statically. When that static lib is linked into a (static or shared) libbitcoinkernel, by default its symbols end up exported there as well.

  As libsecp is an implementation detail of the kernel (and any future Core lib), its symbols should never be exported.

  [This was the intended use for the above PR](https://github.com/bitcoin-core/secp256k1/pull/1696#issuecomment-3028838988), looks like we just forgot to follow-up and actually hook it up.

  This is most easily tested by building with `-DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON` (with or without `-DREDUCE_EXPORTS=ON`) and inspecting via:
  ```bash
  nm -CD lib/libbitcoinkernel.so | grep secp
  ```

  Before this change, secp's symbols will show up there. After, they should be absent.

  This should finally solve secp symbol visibility once and for all :)

ACKs for top commit:
  hebasto:
    ACK 2ccfdb582b646d9bda07f0f13b97cb8c37a452aa, this is implemented exactly as I [tested](https://github.com/bitcoin-core/secp256k1/pull/1696#pullrequestreview-3033584362) the upstream PR. Tested on Fedora 43.
  stickies-v:
    tACK 2ccfdb582b646d9bda07f0f13b97cb8c37a452aa

Tree-SHA512: 664ea7a6f811c2743ad1b4d8913c61aab9b358931ee77895d35cdf8a5607fbb08facda085877c53d731afbf42a7220dcc752fc365a7625ee679c1547e1c674d0
2026-02-11 13:53:03 +00:00
ismaelsadeeq
922ebf96ed
refactor: move-only: move FeeEstimateMode enum to util/fees.h 2026-02-11 11:38:20 +00:00
merge-script
cb1798000c
Merge bitcoin/bitcoin#33861: build: Bump VS minimum supported version to 18.3
452c743951fa69f25f09e42239d1e70a0acf5c2b refactor: Remove workaround for resolved MSVC bug (Hennadii Stepanov)
7164a0cab650bdf01cdcbc3da690f6b674fcc7b3 build: Bump VS minimum supported version to 18.3 (Hennadii Stepanov)

Pull request description:

  The new [VS 18.0](https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes) release includes numerous bug fixes.

  Bumped to v18.3.0 where [this](https://github.com/microsoft/vcpkg/issues/22074) bug in the builtin vcpkg is [fixed](https://github.com/microsoft/vcpkg/issues/22074#issuecomment-3880320585).

ACKs for top commit:
  maflcko:
    review ACK 452c743951fa69f25f09e42239d1e70a0acf5c2b 🍳
  hodlinator:
    crACK 452c743951fa69f25f09e42239d1e70a0acf5c2b
  janb84:
    ACK 452c743951fa69f25f09e42239d1e70a0acf5c2b

Tree-SHA512: a8f859d11d4cf0440cf7ff8353fd1babe90818356ef02eae28571a2a4a7960db1f85cdbc4f88b5fb8a1f8bf44bca8c8715cdfb9ea87997c3fcd81866cd0b156d
2026-02-11 11:20:34 +00:00
merge-script
7640863a0f
Merge bitcoin/bitcoin#34555: doc: archive release notes for v29.3
d29bc5e6dd715b814735d0810cccbd08a84fefa2 doc: archive release notes for v29.3 (sedited)

Pull request description:

  Archive v29.3 release notes.

ACKs for top commit:
  janb84:
    ACK d29bc5e6dd715b814735d0810cccbd08a84fefa2

Tree-SHA512: 212b69b058856e69276b7ac9483c420891904526308983ceea0ec62c2976af92b43c218f9c72e3851cbdf9ced3bcce7a4be27e601b34bd57b9002d8953440cb5
2026-02-11 10:39:16 +00:00
sedited
d29bc5e6dd
doc: archive release notes for v29.3 2026-02-11 11:27:32 +01:00
merge-script
fd625d84ae
Merge bitcoin/bitcoin#34539: test: Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep
fa8c89511d838d9adf706ec0aeac725e64427587 Fixup TODO comment in feature_dbcrash.py; remove unnecessary sleep (MarcoFalke)

Pull request description:

  Fixup some stale comments:

  * The `60 seconds` is outdated. It should say 120 seconds. However, just clarify that there is a timeout.
  * The TODO seems to imply that a timeout (failure to restart) can happen. However, I don't think we've seen it happen. So there isn't anything to do right now. Just remove the `TODO`, but keep the advice.

  Also, remove an unnecessary `time.sleep(1)`. If there is a need for it, a comment should explain why.

ACKs for top commit:
  l0rinc:
    ACK fa8c89511d838d9adf706ec0aeac725e64427587

Tree-SHA512: 5ee13b48fc4a5802f3fadb125d71118e01d2cb08ede9d310d6ed13acd8fb7b03185cad73c475c617054c4c4423156ea927a32d0e3a670c3cc13339b552dc8a5c
2026-02-11 09:25:37 +00:00
merge-script
6777314310
Merge bitcoin/bitcoin#34551: ci: Extend diff context for clang-format
f8d2f30bf37d6f77383adc0ee2ef5e489c6ed62e ci: Extend diff context for clang-format (Hennadii Stepanov)

Pull request description:

  This PR ensures `clang-format` can properly restore empty lines between header groups that were previously stripped by `fix_includes.py`.

  Addresses [this](https://github.com/bitcoin/bitcoin/pull/34448#issuecomment-3876394168) comment.

ACKs for top commit:
  maflcko:
    lgtm ACK f8d2f30bf37d6f77383adc0ee2ef5e489c6ed62e
  l0rinc:
    untested code review ACK f8d2f30bf37d6f77383adc0ee2ef5e489c6ed62e
  sedited:
    ACK f8d2f30bf37d6f77383adc0ee2ef5e489c6ed62e

Tree-SHA512: 97e5450fc15e415134aa1e74ee415f947173978d999afbc0f204e1cdb2f68309b763c8a2ad819c4597147fc15540600aa8c99477db64e961ad428d8f45f3d384
2026-02-11 10:02:59 +01:00
Hennadii Stepanov
452c743951
refactor: Remove workaround for resolved MSVC bug
The bug was fixed in Visual Studio 18.0.
2026-02-10 23:30:39 +00:00
Hennadii Stepanov
7164a0cab6
build: Bump VS minimum supported version to 18.3 2026-02-10 23:30:23 +00:00