Commit Graph

46909 Commits

Author SHA1 Message Date
Hennadii Stepanov
710031ebef Revert "guix: sqlite wants tcl"
This reverts commit 286f3e49c8.
2025-12-02 14:46:27 +00:00
Hennadii Stepanov
4cf5ea6c3d depends: Propagate native C compiler to sqlite package
This ensures that autosetup can build the local bootstrap `jimsh0` when
neither `jimsh` nor `tclsh` is available on the system.
2025-12-02 14:44:29 +00:00
merge-script
e0ba6bbed9 Merge bitcoin/bitcoin#33591: Cluster mempool followups
b8d279a81c doc: add comment to explain correctness of GatherClusters() (Suhas Daftuar)
aba7500a30 Fix parameter name in getmempoolcluster rpc (Suhas Daftuar)
6c1325a091 Rename weight -> clusterweight in RPC output, and add doc explaining mempool terminology (Suhas Daftuar)
bc2eb931da Require mempool lock to be held when invoking TRUC checks (Suhas Daftuar)
957ae23241 Improve comments for getTransactionAncestry to reference cluster counts instead of descendants (Suhas Daftuar)
d97d6199ce Fix comment to reference cluster limits, not chain limits (Suhas Daftuar)
a1b341ef98 Sanity check feerate diagram in CTxMemPool::check() (Suhas Daftuar)
23d6f457c4 rpc: improve getmempoolcluster output (Suhas Daftuar)
d2dcd37aac Avoid using mapTx.modify() to update modified fees (Suhas Daftuar)
d84ffc24d2 doc: add release notes snippet for cluster mempool (Suhas Daftuar)
b0417ba944 doc: Add design notes for cluster mempool and explain new mempool limits (Suhas Daftuar)
2d88966e43 miner: replace "package" with "chunk" (Suhas Daftuar)
6f3e8eb300 Add a GetFeePerVSize() accessor to CFeeRate, and use it in the BlockAssembler (Suhas Daftuar)
b5f245f6f2 Remove unused DEFAULT_ANCESTOR_SIZE_LIMIT_KVB and DEFAULT_DESCENDANT_SIZE_LIMIT_KVB (Suhas Daftuar)
1dac54d506 Use cluster size limit instead of ancestor size limit in txpackage unit test (Suhas Daftuar)
04f65488ca Use cluster size limit instead of ancestor/descendant size limits when sanity checking TRUC policy limits (Suhas Daftuar)
634291a7dc Use cluster limits instead of ancestor/descendant limits when sanity checking package policy limits (Suhas Daftuar)
fc18ef1f3f Remove ancestor and descendant vsize limits from MemPoolLimits (Suhas Daftuar)
ed8e819121 Warn user if using -limitancestorsize/-limitdescendantsize that the options have no effect (Suhas Daftuar)
80d8df2d47 Invoke removeUnchecked() directly in removeForBlock() (Suhas Daftuar)
9292570f4c Rewrite GetChildren without sets (Suhas Daftuar)
3e39ea8c30 Rewrite removeForReorg to avoid using sets (Suhas Daftuar)
a3c31dfd71 scripted-diff: rename AddToMempool -> TryAddToMempool (Suhas Daftuar)
a5a7905d83 Simplify removeRecursive (Suhas Daftuar)
01d8520038 Remove unused argument to RemoveStaged (Suhas Daftuar)
bc64013e6f Remove unused variable (cacheMap) in mempool (Suhas Daftuar)

Pull request description:

  As suggested in the main cluster mempool PR (https://github.com/bitcoin/bitcoin/pull/28676#pullrequestreview-3177119367), I've pulled out some of the non-essential optimizations and cleanups into this separate PR.

  Will continue to add more commits here to address non-blocking suggestions/improvements as they come up.

ACKs for top commit:
  instagibbs:
    ACK b8d279a81c
  sipa:
    ACK b8d279a81c

Tree-SHA512: 1a05e99eaf8db2e274a1801307fed5d82f8f917e75ccb9ab0e1b0eb2f9672b13c79d691d78ea7cd96900d0e7d5031a3dd582ebcccc9b1d66eb7455b1d3642235
2025-12-02 09:46:00 +00:00
Suhas Daftuar
b8d279a81c doc: add comment to explain correctness of GatherClusters() 2025-12-01 10:53:22 -05:00
Suhas Daftuar
aba7500a30 Fix parameter name in getmempoolcluster rpc 2025-12-01 10:53:22 -05:00
Suhas Daftuar
6c1325a091 Rename weight -> clusterweight in RPC output, and add doc explaining mempool terminology
Co-authored-by: glozow <gloriajzhao@gmail.com>
2025-12-01 10:53:22 -05:00
Suhas Daftuar
bc2eb931da Require mempool lock to be held when invoking TRUC checks 2025-12-01 10:53:22 -05:00
Suhas Daftuar
957ae23241 Improve comments for getTransactionAncestry to reference cluster counts instead of descendants 2025-12-01 10:53:22 -05:00
Suhas Daftuar
d97d6199ce Fix comment to reference cluster limits, not chain limits 2025-12-01 10:53:22 -05:00
Suhas Daftuar
a1b341ef98 Sanity check feerate diagram in CTxMemPool::check()
Also switch Assume()'s to assert()'s, so that failures in this function are
always caught.
2025-12-01 10:53:22 -05:00
Suhas Daftuar
23d6f457c4 rpc: improve getmempoolcluster output 2025-12-01 10:53:19 -05:00
Suhas Daftuar
d2dcd37aac Avoid using mapTx.modify() to update modified fees
Now that the mempool no longer keeps any feerate-based indices, we can modify
feerates in mempool entries directly.
2025-12-01 10:50:05 -05:00
Suhas Daftuar
d84ffc24d2 doc: add release notes snippet for cluster mempool 2025-12-01 10:49:38 -05:00
Suhas Daftuar
b0417ba944 doc: Add design notes for cluster mempool and explain new mempool limits 2025-12-01 10:42:39 -05:00
merge-script
6356041e58 Merge bitcoin/bitcoin#33972: cmake: Make BUILD_KERNEL_TEST depend on BUILD_KERNEL_LIB
fe1815d48f cmake: Make `BUILD_KERNEL_TEST` depend on `BUILD_KERNEL_LIB` (Hennadii Stepanov)

Pull request description:

  The CMake script in the `test/kernel` subdirectory is already gated by `BUILD_KERNEL_LIB`:f6acbef108/src/CMakeLists.txt (L405-L409)

  As a result, the following configuration summary is misleading:
  ```
  $ cmake -B build -DBUILD_KERNEL_LIB=OFF -DBUILD_KERNEL_TEST=ON
  <snip>
    bitcoin-chainstate (experimental) ... OFF
    libbitcoinkernel (experimental) ..... OFF
    kernel-test (experimental) .......... ON
  <snip>
  ```

  This PR fixes the behaviour by making the `BUILD_KERNEL_TEST` option explicitly depend on `BUILD_KERNEL_LIB`.

ACKs for top commit:
  maflcko:
    lgtm ACK fe1815d48f
  sedited:
    ACK fe1815d48f

Tree-SHA512: 24524d43b195b0e3907f3257ef907c5ead8e9921b888bc82765f4dbbe44728b92956233c8fe624e8509bf8146a41cf8c1ac26f6043b8a21f681ad2ae19bebc5d
2025-12-01 10:37:36 +00:00
merge-script
7d7cb1bb48 Merge bitcoin/bitcoin#33971: cmake: Set WITH_ZMQ to ON in Windows presets
49c6728535 cmake: Set `WITH_ZMQ` to `ON` in Windows presets (Hennadii Stepanov)

Pull request description:

  The "zeromq" feature is already enabled by default in `vcpkg.json`, and there appears to be no reason to omit this configuration option when building on Windows.

ACKs for top commit:
  maflcko:
    lgtm ACK 49c6728535

Tree-SHA512: acaef1eba56e75f9979db1809c6ebac59b2ed49002ae557fcb172f6119f6b8927580583616628f24d71ccbb32544f4d96317ff1d3125a9b5446ae89d1d318de0
2025-12-01 09:58:12 +00:00
Suhas Daftuar
2d88966e43 miner: replace "package" with "chunk"
This makes the terminology consistent with other parts of the codebase, as part
of the cluster mempool implementation.
2025-11-30 13:50:04 -05:00
Suhas Daftuar
6f3e8eb300 Add a GetFeePerVSize() accessor to CFeeRate, and use it in the BlockAssembler 2025-11-30 13:50:04 -05:00
Suhas Daftuar
b5f245f6f2 Remove unused DEFAULT_ANCESTOR_SIZE_LIMIT_KVB and DEFAULT_DESCENDANT_SIZE_LIMIT_KVB 2025-11-30 13:50:04 -05:00
Suhas Daftuar
1dac54d506 Use cluster size limit instead of ancestor size limit in txpackage unit test 2025-11-30 13:50:04 -05:00
Suhas Daftuar
04f65488ca Use cluster size limit instead of ancestor/descendant size limits when sanity checking TRUC policy limits 2025-11-30 13:50:04 -05:00
Suhas Daftuar
634291a7dc Use cluster limits instead of ancestor/descendant limits when sanity checking package policy limits 2025-11-30 13:50:04 -05:00
Suhas Daftuar
fc18ef1f3f Remove ancestor and descendant vsize limits from MemPoolLimits 2025-11-30 13:50:04 -05:00
Suhas Daftuar
ed8e819121 Warn user if using -limitancestorsize/-limitdescendantsize that the options have no effect
Also update the help text for -limitancestorcount/-limitdescendantcount to
explain they no longer affect the mempool, and are only used by the wallet for
coin selection.
2025-11-30 13:50:00 -05:00
Suhas Daftuar
80d8df2d47 Invoke removeUnchecked() directly in removeForBlock() 2025-11-30 11:02:08 -05:00
Suhas Daftuar
9292570f4c Rewrite GetChildren without sets 2025-11-30 11:02:08 -05:00
Suhas Daftuar
3e39ea8c30 Rewrite removeForReorg to avoid using sets
Also improve test coverage for removeForReorg by creating a scenario where
there are in-mempool descendants that are only invalidated due to an in-mempool
parent no longer spending a mature coin.
2025-11-30 11:01:57 -05:00
Suhas Daftuar
a3c31dfd71 scripted-diff: rename AddToMempool -> TryAddToMempool
-BEGIN VERIFY SCRIPT-
find src/test -type f -exec sed -i 's/AddToMempool/TryAddToMempool/g' {} +
find src/bench -type f -exec sed -i 's/AddToMempool/TryAddToMempool/g' {} +
-END VERIFY SCRIPT-
2025-11-30 10:57:48 -05:00
Suhas Daftuar
a5a7905d83 Simplify removeRecursive 2025-11-30 10:57:48 -05:00
Suhas Daftuar
01d8520038 Remove unused argument to RemoveStaged 2025-11-30 10:57:15 -05:00
Hennadii Stepanov
fe1815d48f cmake: Make BUILD_KERNEL_TEST depend on BUILD_KERNEL_LIB 2025-11-30 13:44:26 +00:00
Hennadii Stepanov
49c6728535 cmake: Set WITH_ZMQ to ON in Windows presets
The "zeromq" feature is already enabled by default in `vcpkg.json`, and
there appears to be no reason to omit this configuration option when
building on Windows.
2025-11-30 13:15:49 +00:00
merge-script
f6acbef108 Merge bitcoin/bitcoin#33764: ci: Add Windows + UCRT jobs for cross-compiling and native testing
2e27bd9c3a ci: Add Windows + UCRT jobs for cross-compiling and native testing (Hennadii Stepanov)
bd130db994 ci: Rename items specific to Windows + MSVCRT (Hennadii Stepanov)

Pull request description:

  This PR is part of the ongoing effort to migrate to the modern UCRT runtime for cross-compiled Windows binaries, including release builds.

  For more details about this migration, see:
  - https://github.com/bitcoin/bitcoin/issues/30210
  - https://github.com/bitcoin/bitcoin/pull/33593

  MSVCRT-related CI jobs should be removed from the CI framework once the migration to UCRT is complete.

ACKs for top commit:
  maflcko:
    review ACK 2e27bd9c3a 🖊
  fanquake:
    ACK 2e27bd9c3a

Tree-SHA512: 222ca5e54646bcce9db6e20191d5891e988274e18b2f30085de6435a3b288a9d0fc414e8f76342e275ae58ee6603f751933d1faa8bdff446edf2695091f8ca4c
2025-11-28 16:42:44 +00:00
merge-script
808f1d972b Merge bitcoin/bitcoin#32009: contrib: turn off compression of macOS SDK to fix determinism (across distros)
3e01b5d0e7 contrib: rename gen-sdk to gen-sdk.py (fanquake)
c1213a35ab macdeploy: disable compression in macOS gen-sdk script (fanquake)
a33d034545 contrib: more selectively pick files for macOS SDK (fanquake)

Pull request description:

  This includes three changes. The first is to more selectively pick files for inclusion into our macOS SDK tarball (skip manpages, binaries etc), which is nice because it redues the size of the tarball (from ~80mb to 20mb), and makes the size increase that happens with the next commit, less-bad.

  The second change removes compression of the tarball. Starting with Python 3.11, Pythons gzip might delegate to zlib. Depending on the OS, i.e Ubuntu vs Fedora, the underlying zlib implementation might differ, resulting in different output.

  For now, or until a better solution exists, remove compression. This results in the SDK increasing in size to ~157mb. Which is not unreasonable, to regain determinism (and would be significantly worse without the previous commit).

  See: https://docs.python.org/3/library/gzip.html#gzip.compress

  The third renames `gen-sdk` to `gen-sdk.py`, so that it will be linted, along with the rest of our Python files.

  Fixes #31873. We could probably also put this into 30.x.

ACKs for top commit:
  stickies-v:
    ACK 3e01b5d0e7 modulo the new .tar SDK being uploaded
  davidgumberg:
    Tested ACK 3e01b5d0e7

Tree-SHA512: 272164a98e0e6f10822870162c1b3a405693c2f64d3ed085a2d2243a48641d940704b5ef6022256915ac9cf383e87a4f8d4dc2ec4eaa9d25e2abd30f5498778b
2025-11-27 15:03:46 +00:00
merge-script
4de26b111f Merge bitcoin/bitcoin#33514: ci: clear out space on CentOS, depends, gui GHA job
e07e57368e ci: clear out space on centos job (will)

Pull request description:

  Fixes #33293

  Clear out space on jobs running on GHA by deleteing unnecessary files.

  Raised in #33293 which pointed to a solution like b7f04d7822 which is adapted slightly here.

  Only runs when cache provider (runner) is `gha`.

  A run on my fork can be seen here: https://github.com/willcl-ark/bitcoin/actions/runs/19703413734/job/56444984809

ACKs for top commit:
  maflcko:
    lgtm ACK e07e57368e
  m3dwards:
    ACK e07e57368e
  janb84:
    ACK e07e57368e

Tree-SHA512: 723589df4c434dd3eaed43acefe25f1788837743882e910e79eceee25e2bd98990cd01b8b80a46ba82418867b32c5ee1b96341223696244504e118eae6ad4a16
2025-11-27 14:30:48 +00:00
merge-script
38c8474d0d Merge bitcoin/bitcoin#33914: Change Parse descriptor argument to string_view
c0bfe72f6e Change Parse descriptor argument to string_view (Sjors Provoost)

Pull request description:

  While investigating a silent merge conflict in #33135 I noticed that #32983 changed the descriptor `Parse` function signature from `const std::string& descriptor` to `std::span<const char> descriptor`.

  Calling that new version of `Parse` with a string literal will trigger a confusing "Invalid characters in payload" due to the trailing "\0".

  It can be worked around by having (the test) wrap string literals in `std::string()`, but that's easy to forget.

  Using `string_view` is easier and more compact than (as a previous version of this PR did) checking for trailing `\0`.

  Also add a test.

ACKs for top commit:
  maflcko:
    review ACK c0bfe72f6e 🍨
  enirox001:
    tACK c0bfe72
  stickies-v:
    ACK c0bfe72f6e
  rkrux:
    crACK c0bfe72f6e

Tree-SHA512: 6b20307f834dae66826c8763f6c2ba0071f4e369375184cb5ff8543b85220fcaf33a47ddb065e418d1af3ed9a3fac401a7854f8924f52aab2b000b1f65328f2c
2025-11-27 09:53:11 +00:00
merge-script
4b25b274de Merge bitcoin/bitcoin#33951: test: check for output to stdout in TestShell test
52230a7f69 test: check for output to stdout in `TestShell` test (Sebastian Falbesoner)

Pull request description:

  This is a small follow-up PR to the recently added `TestShell` test (#33546), verifying the stdout message "TestShell is already running!" when trying to instantiate a second instance.

ACKs for top commit:
  maflcko:
    lgtm ACK 52230a7f69
  rkrux:
    crACK 52230a7f69

Tree-SHA512: 096d70e1bd0f09c1b389e58fa4b880442406c56f0c8ef8b8fbd0627081bc390b1ce5d6032bcca19b03206b7a444d9c523f9b62078b5ca5b7f1ae3c57bb4129c9
2025-11-27 09:27:03 +00:00
Sebastian Falbesoner
52230a7f69 test: check for output to stdout in TestShell test 2025-11-26 16:51:12 +01:00
merge-script
85d058dc53 Merge bitcoin/bitcoin#33946: interfaces: remove redundant mempool lock in ChainImpl::isInMempool()
2909655fba fix: remove redundant mempool lock in ChainImpl::isInMempool() (Fibonacci747)

Pull request description:

  This PR removes an unnecessary `LOCK(mempool->cs)` in `ChainImpl::isInMempool()`. The method calls `CTxMemPool::exists()`, which already locks `mempool->cs` internally. Because the mempool mutex is a RecursiveMutex, double-locking was safe but redundant. Dropping the outer lock matches patterns used elsewhere in ChainImpl (e.g. `hasDescendantsInMempool()` and `GetTransactionAncestry()` callers) where mempool read APIs are invoked without an additional lock and rely on the callee’s internal locking. `isRBFOptIn()` remains unchanged since `IsRBFOptIn(tx, pool)` explicitly requires the caller to hold `pool.cs` as indicated by its thread-safety annotation.

ACKs for top commit:
  maflcko:
    lgtm ACK 2909655fba
  instagibbs:
    utACK 2909655fba
  stickies-v:
    ACK 2909655fba

Tree-SHA512: 4dfd88e01d8c7a4b6ceb3c736243fb22bfee5ccfc422d134acb633b908ca14c807637a2aa20de89e86e583b23ec70a1d121d77e35af60e114d93971b2a4bfd3b
2025-11-26 14:55:38 +00:00
will
e07e57368e ci: clear out space on centos job
Clear out space on the centos job be deleteing unnecessary files.

Raised by #33293 which pointed to a solution like b7f04d7822

Only runs when cache provider (runner) is `gha`, and on the CentOS job.
2025-11-26 14:18:18 +00:00
merge-script
79d6e874e1 Merge bitcoin/bitcoin#32587: test: Fix reorg patterns in tests to use proper fork-based approach
70d9e8f0a1 fix: reorg behaviour in mempool tests to match real one (yuvicc)
540ed333f6 Move the create_empty_fork method to the test framework's blocktools.py module to enable reuse across multiple tests. (yuvicc)

Pull request description:

  Updated functional tests to replace direct use of `invalidateblock` with proper fork-based reorg behaviour. The direct invalidation approach bypasses important validation checks and has depth limitations(10 block) that don't match real-world reorg scenarios. For more details see #32531.

  Fixes #32531

ACKs for top commit:
  instagibbs:
    reACK 70d9e8f0a1
  theStack:
    re-ACK 70d9e8f0a1

Tree-SHA512: 8aae298bfa295b4e0e4627b522e9eac549399008fd8e336a66f8c9950c886917da0b3f0bdc62d0c8ea2b8082f36639300cac4070986a7766398e15bc1f666da5
2025-11-26 14:02:22 +00:00
merge-script
e249ea7da6 Merge bitcoin/bitcoin#33945: depends: latest config.guess & config.sub
3e4355314b depends: latest config.sub (fanquake)
04eb84fe3f depends: latest config.guess (fanquake)

Pull request description:

  It's been about a year since these were last updated.
  Pull in the latest versions.

ACKs for top commit:
  hebasto:
    ACK 3e4355314b, I have reviewed the code and it looks OK.

Tree-SHA512: f18a0b95e71588e9f1ea55efb6379664aa6e9154801448e9425362414c3f3c4dab29dbe0e3ab02c46ac1f2e2ad1d067bc6feb8c550ccde37cabd1c0bd9d1b87c
2025-11-26 11:27:43 +00:00
fanquake
3e01b5d0e7 contrib: rename gen-sdk to gen-sdk.py
This puts it in scope for the Python linters.
2025-11-26 11:08:31 +00:00
fanquake
c1213a35ab macdeploy: disable compression in macOS gen-sdk script
Starting with Python 3.11, Pythons gzip might delegate to zlib.
Depending on the OS, i.e Ubuntu vs Fedora, the underlying zlib
implementation might differ, resulting in different output.

For now, or until a better solution exists, disable compression. This
results in the SDK increasing in size to ~157mb. Which is not
unreasonable, to regain determinism (and would be significantly worse
without the previous commit).

See: https://docs.python.org/3/library/gzip.html#gzip.compress

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2025-11-26 11:07:48 +00:00
fanquake
a33d034545 contrib: more selectively pick files for macOS SDK
Only include what we really need. Skip 100s of mb of manpages,
swiftmodules, modulemaps.
Note that System/Library is only needed for the Qt build.
2025-11-26 11:05:56 +00:00
yuvicc
70d9e8f0a1 fix: reorg behaviour in mempool tests to match real one 2025-11-26 13:44:18 +05:30
yuvicc
540ed333f6 Move the create_empty_fork method to the test framework's blocktools.py module to enable reuse across multiple tests. 2025-11-26 13:44:17 +05:30
Fibonacci747
2909655fba fix: remove redundant mempool lock in ChainImpl::isInMempool() 2025-11-25 20:22:39 +01:00
merge-script
d5ed4ba9d8 Merge bitcoin/bitcoin#33906: depends: Add patch for Windows11Style plugin
8558902e57 depends: Add patch for Windows11Style plugin (Hennadii Stepanov)

Pull request description:

  This PR fixes https://github.com/bitcoin-core/gui/issues/906:

  <img width="561" height="179" alt="image" src="https://github.com/user-attachments/assets/6bb6d12b-91a6-4659-b6eb-be64093ec86d" />

ACKs for top commit:
  waketraindev:
    ACK 8558902e57
  fanquake:
    ACK 8558902e57 - did not test on Windows.

Tree-SHA512: c8c0518b9cfccffb364f9305febec238236ef51134e915885f491c7f0bef59401367f60bbb034e0216edf0a74a99a07a3dcc22804d8396260375ea60a60756a9
2025-11-25 17:06:53 +00:00
fanquake
3e4355314b depends: latest config.sub 2025-11-25 16:29:23 +00:00