Commit Graph

46332 Commits

Author SHA1 Message Date
Suhas Daftuar
ff8f115dec policy: Remove CPFP carveout rule
The addition of a cluster size limit makes the CPFP carveout rule useless,
because carveout cannot be used to bypass the cluster size limit. Remove this
policy rule and update tests to no longer rely on the behavior.
2025-11-18 08:53:59 -05:00
Suhas Daftuar
c3f1afc934 test: rewrite PopulateMempool to not violate mempool policy (cluster size) limits 2025-11-18 08:53:59 -05:00
Suhas Daftuar
47ab32fdb1 Select transactions for blocks based on chunk feerate
Co-Authored-By: Gregory Sanders <gsanders87@gmail.com>
2025-11-18 08:53:58 -05:00
Suhas Daftuar
dec138d1dd fuzz: remove comparison between mini_miner block construction and miner
After cluster mempool, the mini_miner will no longer match the miner's block
construction. Eventually mini_miner should be reworked to directly use
linearizations done in the mempool.
2025-11-18 08:53:58 -05:00
Suhas Daftuar
6c2bceb200 bench: rewrite ComplexMemPool to not create oversized clusters 2025-11-18 08:53:58 -05:00
Suhas Daftuar
1ad4590f63 Limit mempool size based on chunk feerate
Rather than evicting the transactions with the lowest descendant feerate,
instead evict transactions that have the lowest chunk feerate.

Once mining is implemented based on choosing transactions with highest chunk
feerate (see next commit), mining and eviction will be opposites, so that we
will evict the transactions that would be mined last.
2025-11-18 08:53:58 -05:00
Suhas Daftuar
b11c89cab2 Rework miner_tests to not require large cluster limit 2025-11-18 08:53:58 -05:00
Suhas Daftuar
95a8297d48 Check cluster limits when using -walletrejectlongchains 2025-11-18 08:53:58 -05:00
Suhas Daftuar
95762e6759 Do not allow mempool clusters to exceed configured limits
Include an adjustment to mempool_tests.cpp due to the additional memory used by
txgraph.

Includes a temporary change to the mempool_ephemeral_dust.py functional test,
due to validation checks being reordered. This change will revert once the RBF
rules are changed in a later commit.
2025-11-18 08:53:58 -05:00
glozow
edb3e7cdf6 [test] rework/delete feature_rbf tests requiring large clusters 2025-11-18 08:53:58 -05:00
Suhas Daftuar
435fd56711 test: update feature_rbf.py replacement test
Preparatory commit to the rbf functional test, before changes are made to the
rbf rules as part of cluster mempool.
2025-11-18 08:53:58 -05:00
Suhas Daftuar
34e32985e8 Add new (unused) limits for cluster size/count 2025-11-18 08:53:58 -05:00
Suhas Daftuar
838d7e3553 Add transactions to txgraph, but without cluster dependencies
Effectively this is treating all transactions in txgraph as being in a cluster
of size 1.
2025-11-18 08:53:58 -05:00
Suhas Daftuar
d5ed9cb3eb Add accessor for sigops-adjusted weight 2025-11-10 16:01:34 -05:00
Suhas Daftuar
1bf3b51396 Add sigops adjusted weight calculator 2025-11-10 15:55:43 -05:00
Suhas Daftuar
c18c68a950 Create a txgraph inside CTxMemPool 2025-11-10 15:54:53 -05:00
Suhas Daftuar
29a94d5b2f Make CTxMemPoolEntry derive from TxGraph::Ref 2025-11-10 15:46:11 -05:00
Suhas Daftuar
92b0079fe3 Allow moving CTxMemPoolEntry objects, disallow copying 2025-11-10 15:45:55 -05:00
Suhas Daftuar
6c73e47448 mempool: Store iterators into mapTx in mapNextTx
This takes the same amount of space as CTransaction pointers, and saves a map
lookup in many common uses.
2025-10-14 14:03:42 -04:00
Suhas Daftuar
51430680ec Allow moving an Epoch::Marker 2025-10-14 14:03:42 -04:00
merge-script
9314113b29 Merge bitcoin/bitcoin#33610: doc: archive release notes for v29.2
c11a3dcc88 doc: archive release notes for v29.2 (fanquake)

Pull request description:

ACKs for top commit:
  janb84:
    ACK c11a3dcc88
  stickies-v:
    ACK c11a3dcc88, matches 3226616493/doc/release-notes.md

Tree-SHA512: bb566000d6907f70785f45878208479c01df7aa3a50f46ccf9156478bbc798d56b64f5c3fd6555900e03fe44ad7021c0513ed711c22eec4a783e84cd89f8a73c
2025-10-14 18:18:52 +01:00
merge-script
6e1adbbaa1 Merge bitcoin/bitcoin#33612: test: change log rate limit version gate
7b544341c0 test: change log rate limit version gate from 299900 to 290100 (Eugene Siegel)

Pull request description:

  Change the version gate from 299900 to 290100 for bypassing the log rate limit in case an explicit version is set in the functional test framework.

  See discussion here: https://github.com/bitcoin/bitcoin/pull/33225#discussion_r2287838255

ACKs for top commit:
  maflcko:
    lgtm ACK 7b544341c0
  janb84:
    ACK 7b544341c0
  stickies-v:
    ACK 7b544341c0

Tree-SHA512: c07c8741dfdeca87c49748b7082c2ecb829da391908316f35daef7292bc017814a89f04e16e738f3a105541bbc38e4feb5bca3fb6ab718a1dc1de7c70a9c8a58
2025-10-14 17:26:17 +01:00
merge-script
fdcf67de80 Merge bitcoin/bitcoin#33157: cluster mempool: control/optimize TxGraph memory usage
023cd5a546 txgraph: add SingletonClusterImpl (mem optimization) (Pieter Wuille)
e346250732 txgraph: give Clusters a range of intended tx counts (preparation) (Pieter Wuille)
e93b0f09cc txgraph: abstract out creation of empty Clusters (refactor) (Pieter Wuille)
6baf12621f txgraph: comment fixes (doc fix) (Pieter Wuille)
726b995739 txgraph: make Cluster an abstract class (refactor) (Pieter Wuille)
2602d89edd txgraph: avoid accessing other Cluster internals (refactor) (Pieter Wuille)
04c808ac4c txgraph: expose memory usage estimate function (feature) (Pieter Wuille)
7680bb8fd4 txgraph: keep track of Cluster memory usage (preparation) (Pieter Wuille)
4ba562e5f4 txgraph: keep data structures compact (mem optimization) (Pieter Wuille)
bb5cb222ae depgraph: add memory usage control (feature) (Pieter Wuille)
b1637a90de txgraph: avoid holes in DepGraph positions (mem optimization) (Pieter Wuille)
2b1d302508 txgraph: move some sanity checks from Cluster to TxGraphImpl (refactor) (Pieter Wuille)
d40302fbaf txgraph: Make level of Cluster implicit (optimization) (Pieter Wuille)

Pull request description:

  Part of #30289.

  This adds a few optimizations to reduce `TxGraph`'s memory usage, and makes sure that dynamic memory it uses doesn't linger after shrinking clusters. Finally, it exposes a function `GetMainMemoryUsage()` to compute `TxGraph`'s approximate memory usage.

  It makes the `Cluster` type abstract, with two instances (`SingletonClusterImpl` for 1-transaction clusters, and `GenericClusterImpl` for others).

  On my 64-bit system, I obtain the following numbers:
  * `SingletonClusterImpl`: 48 bytes, plus 16 bytes malloc overhead in its `unique_ptr`, plus 8-byte pointer in `m_clusters`
  * `GenericClusterImpl`: 104 bytes, plus 16 bytes malloc overhead in its `unique_ptr`, plus 8-byte pointer in `m_clusters`, plus 72 bytes malloc overhead inside its vectors and `DepGraph`, plus 40 bytes per transaction in those.
  * `TxGraphImpl::Entry`: 72 bytes per transaction
  * `TxGraphImpl::ChunkData`: 8 bytes, plus 56 bytes in `std::set` overhead + malloc overhead, all per chunk.
  * `TxGraph::Ref`: 16 bytes per transaction

  This overall amounts to 200 bytes per cluster, plus 64 bytes per chunk, plus 128 bytes per transaction, but only 224 bytes overall per singleton cluster.

ACKs for top commit:
  l0rinc:
    code review reACK 023cd5a546
  instagibbs:
    reACK 023cd5a546
  ismaelsadeeq:
    reACK 023cd5a546  🚢
  glozow:
    reACK 023cd5a546

Tree-SHA512: c957b27f47318be7c25d71453df2ae9d4e7bf21dab13b6e5e975cca122a221a99b15c584872491225785d276a9165f090675ee0f4460a2775bd3271933e3b246
2025-10-14 11:56:52 -04:00
Eugene Siegel
7b544341c0 test: change log rate limit version gate from 299900 to 290100 2025-10-14 10:57:17 -04:00
merge-script
6c4fe401e9 Merge bitcoin/bitcoin#33508: ci: fix buildx gha cache authentication on forks
bc706955d7 ci: expose all ACTIONS_* vars (willcl-ark)

Pull request description:

  When using `docker buildx build` in conjunction with the `gha` backend cache type (as we do in our CI) it's important to specify the URL and TOKEN needed to authenticate.

  On Cirrus runners this is working with only `ACTIONS_CACHE_URL` and `ACTIONS_RUNTIME_TOKEN`, but this is not enough for the GitHub backend.

  Fix this by exporting all `ACTIONS_*` variables.

  This fixes docker build layer cache restore/save on forks or where GH-hosted runners are being used, and addresses https://github.com/bitcoin/bitcoin/issues/31965#issuecomment-3324707093

ACKs for top commit:
  m3dwards:
    ACK bc706955d7
  maflcko:
    lgtm ACK bc706955d7

Tree-SHA512: 13e973bb1c1ca5448dd6c3c176fb5ce39c725886ba2012d3253158205309a7038a1430135b37400e1f2f69408a9d0f4e2b3c5f0515154a593ec382ab7db10266
2025-10-14 09:53:06 +01:00
fanquake
c11a3dcc88 doc: archive release notes for v29.2 2025-10-13 16:19:32 +01:00
merge-script
64a7c7cbb9 Merge bitcoin/bitcoin#33558: ci: Use native platform for win-cross task
fa6fd16f36 ci: Use native platform for win-cross task (MarcoFalke)

Pull request description:

  Forcing the architecture to amd64 is no longer required. Dropping it should have some benefits:

  * Faster CI speed on other arches (riscv64, arm, ...)
  * Unlock the CI task to run on riscv64 at all

ACKs for top commit:
  hebasto:
    ACK fa6fd16f36, tested on Ubuntu 24.04, RISC-V.

Tree-SHA512: 68a3fc90cc22ab085d6946deb106e50b22e06eebc61523a9dcb53b38a50021a19da26cc29e2cd20f4673ffc5cc10f441dacca7cc799782258351609d9fa04969
2025-10-13 13:50:41 +01:00
merge-script
93b56e95c0 Merge bitcoin/bitcoin#33601: doc: archive release notes for v30.0
8d6e49158e doc: archive release notes for v30.0 (fanquake)

Pull request description:

  Archive v30.0 release notes.

ACKs for top commit:
  janb84:
    ACK 8d6e49158e
  willcl-ark:
    ACK 8d6e49158e

Tree-SHA512: 322daee16e8d46808c3b669d9c893172eccefe5dafcd79646c9d265360bd606df7be1222a6c12c16517dec88ae1fee6d1aaa7e71761cc5d7fdc8b5e0bdc82292
2025-10-13 13:45:31 +01:00
Hennadii Stepanov
563747971b Merge bitcoin/bitcoin#33580: depends: Use $(package)_file_name when downloading from the fallback
671b774d1b depends: Use $(package)_file_name when downloading from the fallback (Ava Chow)

Pull request description:

  The server hosting the fallbacks uses `make download` so the files are only available with their overridden names rather than the original name on the upstream source. We should therefore also use the overridden name when downloading from the fallback.

  Fixes https://github.com/bitcoin-core/bitcoincore.org/issues/1168

ACKs for top commit:
  theuni:
    utACK 671b774d1b. I was going to PR the same change.
  janb84:
    ut ACK 671b774d1b
  hebasto:
    ACK 671b774d1b, tested with the following patch:

Tree-SHA512: ba010adb64900d8d748487cc1a658e2b163872354f4e7b38c4dfc37a14fcb22fec4379a635d2c6788c64dd46bef0d94aa3eb6f522ec700680e886d5468678031
2025-10-13 11:53:58 +01:00
Pieter Wuille
023cd5a546 txgraph: add SingletonClusterImpl (mem optimization)
This adds a specialized Cluster implementation for singleton clusters, saving
a significant amount of memory by avoiding the need for m_depgraph, m_mapping,
and m_linearization, and their overheads.
2025-10-11 17:46:43 -04:00
Pieter Wuille
e346250732 txgraph: give Clusters a range of intended tx counts (preparation) 2025-10-11 17:32:35 -04:00
Pieter Wuille
e93b0f09cc txgraph: abstract out creation of empty Clusters (refactor) 2025-10-11 17:32:35 -04:00
Pieter Wuille
6baf12621f txgraph: comment fixes (doc fix) 2025-10-11 17:32:35 -04:00
Pieter Wuille
726b995739 txgraph: make Cluster an abstract class (refactor) 2025-10-11 17:32:32 -04:00
Pieter Wuille
2602d89edd txgraph: avoid accessing other Cluster internals (refactor)
This adds 4 functions to Cluster to help implement Merge() and Split() without
needing access to the internals of the other Cluster. This is a preparation for
a follow-up that will make Clusters a virtual class whose internals are abstracted
away.
2025-10-11 17:26:39 -04:00
Pieter Wuille
04c808ac4c txgraph: expose memory usage estimate function (feature) 2025-10-11 17:25:09 -04:00
Pieter Wuille
7680bb8fd4 txgraph: keep track of Cluster memory usage (preparation) 2025-10-11 17:25:09 -04:00
Pieter Wuille
4ba562e5f4 txgraph: keep data structures compact (mem optimization) 2025-10-11 17:25:09 -04:00
Pieter Wuille
bb5cb222ae depgraph: add memory usage control (feature)
Co-Authored-By: Lőrinc <pap.lorinc@gmail.com>
2025-10-11 17:25:09 -04:00
Pieter Wuille
b1637a90de txgraph: avoid holes in DepGraph positions (mem optimization) 2025-10-11 17:25:05 -04:00
Pieter Wuille
2b1d302508 txgraph: move some sanity checks from Cluster to TxGraphImpl (refactor) 2025-10-11 17:16:05 -04:00
Pieter Wuille
d40302fbaf txgraph: Make level of Cluster implicit (optimization)
This reduces per-Cluster memory usage by making Clusters not aware of their
own level. Instead, track it either in calling code, or infer it based on
the transactions in them.
2025-10-11 17:13:50 -04:00
fanquake
8d6e49158e doc: archive release notes for v30.0 2025-10-11 20:45:28 +01:00
merge-script
d2987102dd Merge bitcoin/bitcoin#33573: doc: bump the template macOS version
f6567527d8 doc: bump the template macOS version (kevkevinpal)

Pull request description:

  Motivated by https://github.com/bitcoin/bitcoin/pull/33489#issuecomment-3361601497

  The minimum version of MacOS for this repo is now 14 and above so it makes sense to update the issue template to reflect that.
  We are now using a higher version but since it is just a bug template, there is no need to put the lowest version we support.

ACKs for top commit:
  maflcko:
    lgtm ACK f6567527d8
  l0rinc:
    ACK f6567527d8
  janb84:
    ACK f6567527d8

Tree-SHA512: 701b161bda25245996c94b6d2119b5cc85a34917551dcf8c92ffacf3aa80fa7fe84bb3497edc7e600c5b2443de13a6f6107fc7289721e585b16c4972d07a796c
2025-10-10 20:52:00 +01:00
kevkevinpal
f6567527d8 doc: bump the template macOS version
It makes more sense to have a higher OS version than one that is not
supported
2025-10-10 14:34:32 -04:00
merge-script
becf150013 Merge bitcoin/bitcoin#33518: Update libmultiprocess subtree to support reduced logging
0f01e1577f Squashed 'src/ipc/libmultiprocess/' changes from 47d79db8a552..a4f929696490 (Ryan Ofsky)

Pull request description:

  Includes:

  - https://github.com/bitcoin-core/libmultiprocess/pull/213
  - https://github.com/bitcoin-core/libmultiprocess/pull/214
  - https://github.com/bitcoin-core/libmultiprocess/pull/221
  - https://github.com/bitcoin-core/libmultiprocess/pull/220
  - https://github.com/bitcoin-core/libmultiprocess/pull/222
  - https://github.com/bitcoin-core/libmultiprocess/pull/224

  The change https://github.com/bitcoin-core/libmultiprocess/pull/220 is needed to support #33517 and fix poor performance in some cases caused by slow logging.

  The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh)

ACKs for top commit:
  Sjors:
    utACK eda91b07fd
  theuni:
    utACK eda91b07fd.

Tree-SHA512: 43c2f47bb95f56181f3ce8cf41380e83b1c00b363a7c732d735a9115ed251fa2c2c9bd096d9be011e47503047a740b2e05c9a79d7e4170a4de9c20ad0de3e501
2025-10-10 08:13:10 +01:00
merge-script
cd1b7fa1ff Merge bitcoin/bitcoin#33577: Revert "depends: Update URL for qrencode package source tarball"
e4335a3192 Revert "depends: Update URL for `qrencode` package source tarball" (Ava Chow)
a89a822e6e Revert "depends: Use hash instead of file name for package download stamp" (Ava Chow)

Pull request description:

  The new URL breaks CI on the current release branches, see https://github.com/bitcoin/bitcoin/pull/33494#issuecomment-3380802351.

  The old URL also no longer exists so the tarball is fetched from the depends sources cache that we host, but the original tarball has already been overwritten on there. We will need to manually reinstate the original tarball.

ACKs for top commit:
  m3dwards:
    utACK e4335a3192
  maflcko:
    review ACK e4335a3192 💤
  glozow:
    ACK e4335a3192

Tree-SHA512: a5028342d77b4768daaec8688acd364795d683aed2bea0407c7827d44f814a97d50cc3b30c2de2a8296a2b212115fe1e76c57685a74e93387fc57afdabb93bd2
2025-10-09 15:23:27 -04:00
Ava Chow
6b4a92b0fa Merge bitcoin/bitcoin#33568: doc: how to update a subtree
a1226bc760 doc: how to update a subtree (Sjors Provoost)

Pull request description:

  We have instructions on how to verify a subtree update, but not on how to perform one.

ACKs for top commit:
  yuvicc:
    ACK a1226bc760
  achow101:
    ACK a1226bc760
  janb84:
    ACK a1226bc760
  furszy:
    ACK a1226bc760

Tree-SHA512: ba3ccc56a9f1c7f461e0db9699612e1fd64b7c72bfd1dae63d4cb830db416871a493820d3a7924c19b6ce353fc20c5fe07578b053dec6ea68273a007cbebc512
2025-10-09 11:00:04 -07:00
merge-script
90b2884ce4 Merge bitcoin/bitcoin#33581: ci: Properly include $FILE_ENV in DEPENDS_HASH
ceeb53adcd ci: Properly include $FILE_ENV in DEPENDS_HASH (Ava Chow)

Pull request description:

  $FILE_ENV has a full relative path already, prepending with ci/test/ results in a non-existent path which means that DEPENDS_HASH was not actually committing to the test's environment file.

ACKs for top commit:
  maflcko:
    lgtm ACK ceeb53adcd

Tree-SHA512: 80a7a23676ff8bf2f48a7d3c5897217f11d7d4d4f8a54897d2b7c42689585d2d63e45fad2b8f4c442111f128a87eeb6edeac2b25c79862e6bc035eeb1ebc7f4e
2025-10-09 16:42:14 +01:00
merge-script
d44b860cd0 Merge bitcoin/bitcoin#33584: ci: upgrade GitHub Action to download-artifact@v5
b35341b9ba Update ci.yml (Coder)

Pull request description:

  Release notes:https://github.com/actions/download-artifact/releases/tag/v5.0.0

  Change:
  uses: actions/download-artifact@v4 -> uses: actions/download-artifact@v5

ACKs for top commit:
  maflcko:
    lgtm ACK b35341b9ba
  willcl-ark:
    ACK b35341b9ba
  hebasto:
    ACK b35341b9ba, I have reviewed the code and it looks OK.

Tree-SHA512: f82dd0fe3ca8d431b9ff6ef9f23a4f2e92a1463c6f55fbe9b46b9e13750d311bd2aa915a8570f76600363b3a1ccbf394c95216cfac0f6db30846d9be7ec7c4cf
2025-10-09 16:32:44 +01:00