44778 Commits

Author SHA1 Message Date
merge-script
c9ab10910c
Merge bitcoin/bitcoin#31444: cluster mempool: add txgraph diagrams/mining/eviction
8673e8f01917b48a5f5476792f759f44ea49d5a5 txgraph: Special-case singletons in chunk index (optimization) (Pieter Wuille)
abdd9d35a34dd9cd589c1b925ab4241d15e6446c txgraph: Skipping end of cluster has no impact (optimization) (Pieter Wuille)
604acc2c289fb187f55439a29dca02d39163df25 txgraph: Reuse discarded chunkindex entries (optimization) (Pieter Wuille)
c734081454d7d7552b1388a27de648bcdd2e4b3a txgraph: Introduce TxGraph::GetWorstMainChunk (feature) (Pieter Wuille)
394dbe21427ee30cca73d2b1e31f18a00a76a1a1 txgraph: Introduce BlockBuilder interface (feature) (Pieter Wuille)
883df3648ee92841e515bb6d8d259cb7054493b1 txgraph: Generalize GetClusterRefs to support subsections (preparation) (Pieter Wuille)
c28a602e007fcc0275bc34f58690820ebe4c9162 txgraph: Introduce TxGraphImpl observer tracking (preparation) (Pieter Wuille)
9095d8ac1c319cdf1b9d44a1fa5993e9a55ccb21 txgraph: Maintain chunk index (preparation) (Pieter Wuille)
87e74e1242ece5fc30e65d4881f24be3a0d02e44 txgraph: abstract out transaction ordering (refactor) (Pieter Wuille)
2614fea17fe3c179ca3a256fadf498ae8cbc03e0 txgraph: Add GetMainStagingDiagrams function (feature) (Pieter Wuille)

Pull request description:

  Part of cluster mempool: #30289.

  This adds more functionality to the txgraph module, specifically:
  * `TxGraph::GetMainStagingDiagrams()`, a function to obtain feerate diagrams for both the main graph and the staged changes to it, including only the clusters that differ between the two.
  * `TxGraph::GetBlockBuilder()`, a function to obtain an object which can efficiently iterate the chunks of the (main) graph from high to low chunk feerate, allowing each to be skipped or included.
  * `TxGraph::GetWorstMainChunk()`, a function to obtain the last chunk that would be returned by `GetBlockBuilder()`'s returned object, intended for eviction.

ACKs for top commit:
  monlovesmango:
    reACK 8673e8f01917b48a5f5476792f759f44ea49d5a5
  instagibbs:
    reACK 8673e8f01917b48a5f5476792f759f44ea49d5a5
  glozow:
    reACK 8673e8f0191

Tree-SHA512: 5c98c54919c44eb2f9545dfc130e54dfc25b5b54d43cf5ca9bcf46e019b9fd405a572fcd70e71e2a7c5b4b096cfd540a4d09ef1f52ba188504418682f1dfc4af
2025-05-13 16:27:30 -04:00
merge-script
8309a9747a
Merge bitcoin/bitcoin#32028: Update secp256k1 subtree to latest master
c31fcaaad38b68fa170cf9fd900f2237c24016e3 Squashed 'src/secp256k1/' changes from 0cdc758a56..4187a46649 (Hennadii Stepanov)

Pull request description:

  This PR updates the `secp256k1` subtree to 4ba1ba2af9, which includes the following changes:
  - https://github.com/bitcoin-core/secp256k1/pull/1633
  - https://github.com/bitcoin-core/secp256k1/pull/1634
  - https://github.com/bitcoin-core/secp256k1/pull/1641
  - https://github.com/bitcoin-core/secp256k1/pull/1650
  - https://github.com/bitcoin-core/secp256k1/pull/1646
  - https://github.com/bitcoin-core/secp256k1/pull/1654
  - https://github.com/bitcoin-core/secp256k1/pull/1642
  - https://github.com/bitcoin-core/secp256k1/pull/1639
  - https://github.com/bitcoin-core/secp256k1/pull/1614
  - https://github.com/bitcoin-core/secp256k1/pull/1656
  - https://github.com/bitcoin-core/secp256k1/pull/1647
  - https://github.com/bitcoin-core/secp256k1/pull/1655
  - https://github.com/bitcoin-core/secp256k1/pull/1593
  - https://github.com/bitcoin-core/secp256k1/pull/1359
  - https://github.com/bitcoin-core/secp256k1/pull/1657
  - https://github.com/bitcoin-core/secp256k1/pull/1660
  - https://github.com/bitcoin-core/secp256k1/pull/1659
  - https://github.com/bitcoin-core/secp256k1/pull/1661
  - https://github.com/bitcoin-core/secp256k1/pull/1662
  - https://github.com/bitcoin-core/secp256k1/pull/1669
  - https://github.com/bitcoin-core/secp256k1/pull/1492

  https://github.com/bitcoin-core/secp256k1/pull/1647 is required for https://github.com/bitcoin/bitcoin/pull/31507.

ACKs for top commit:
  fanquake:
    ACK 915c1fa72c07a1908f7dc18a065230c7c4a64db2

Tree-SHA512: 2c409ef2cd14fb14c2ea108f65411b673da786e886aabf75015be25220d5a3983ad8d9e76db1cb95453357a07fbaf05497ef4e5bb83d92b96caf62c1cddaa616
2025-05-13 16:39:22 +01:00
merge-script
cbd8e3d511
Merge bitcoin/bitcoin#32476: refactor: Remove unused HaveKey and HaveWatchOnly
fabdc5ad06bce8cd3b0e525071d10f616a30bb04 Remove unused LegacyDataSPKM::HaveWatchOnly() (MarcoFalke)
fa7b7f796ac8cd99de19722af68a570b49f37939 Remove HaveKey helper, unused after sethdseed removal (MarcoFalke)

Pull request description:

  removes some dead code

ACKs for top commit:
  Sjors:
    utACK fabdc5ad06bce8cd3b0e525071d10f616a30bb04

Tree-SHA512: 3cf6838eff6cedfe6a7337071d41e17d34033a2875b3661a6a1741e13c7a8e81b57eb874aebbb9d96d05ea7efa261a3a98e1bcf982b12cfafb163405d860b8bf
2025-05-13 12:34:36 +01:00
Hennadii Stepanov
915c1fa72c
Update secp256k1 subtree to latest master 2025-05-13 11:31:34 +01:00
Hennadii Stepanov
c31fcaaad3 Squashed 'src/secp256k1/' changes from 0cdc758a56..4187a46649
4187a46649 Merge bitcoin-core/secp256k1#1492: tests: Add Wycheproof ECDH vectors
e266ba11ae tests: Add Wycheproof ECDH vectors
13906b7154 Merge bitcoin-core/secp256k1#1669: gitignore: Add Python cache files
c1bcb03276 gitignore: Add Python cache files
70f149b9a1 Merge bitcoin-core/secp256k1#1662: bench: add ellswift to bench help output
6b3fe51fb6 bench: add ellswift to bench help output
d84bb83e26 Merge bitcoin-core/secp256k1#1661: configure: Show exhaustive tests in summary
3f54ed8c1b Merge bitcoin-core/secp256k1#1659: include: remove WARN_UNUSED_RESULT for functions always returning 1
20b05c9d3f configure: Show exhaustive tests in summary
e56716a3bc Merge bitcoin-core/secp256k1#1660: ci: Fix exiting from ci.sh on error
d87c3bc58f ci: Fix exiting from ci.sh on error
1b6e081538 include: remove WARN_UNUSED_RESULT for functions always returning 1
2abb35b034 Merge bitcoin-core/secp256k1#1657: tests: remove unused uncounting_illegal_callback_fn
51907fa918 tests: remove unused uncounting_illegal_callback_fn
a7a5117144 Merge bitcoin-core/secp256k1#1359: Fix symbol visibility issues, add test for it
13ed6f65dc Merge bitcoin-core/secp256k1#1593: Remove deprecated `_ec_privkey_{negate,tweak_add,tweak_mul}` aliases from API
d1478763a5 build: Drop no longer needed  `-fvisibility=hidden` compiler option
8ed1d83d92 ci: Run `tools/symbol-check.py`
41d32ab2de test: Add `tools/symbol-check.py`
88548058b3 Introduce `SECP256K1_LOCAL_VAR` macro
03bbe8c615 Merge bitcoin-core/secp256k1#1655: gha: Print all *.log files, in a separate action
59860bcc24 gha: Print all *.log files, in a separate action
4ba1ba2af9 Merge bitcoin-core/secp256k1#1647: cmake: Adjust diagnostic flags for `clang-cl`
abd25054a1 Merge bitcoin-core/secp256k1#1656: musig: Fix clearing of pubnonces
961ec25a83 musig: Fix clearing of pubnonces
3186082387 Merge bitcoin-core/secp256k1#1614: Add _ge_set_all_gej and use it in musig for own public nonces
6c2a39dafb Merge bitcoin-core/secp256k1#1639: Make static context const
37d2c60bec Remove deprecated _ec_privkey_{negate,tweak_add,tweak_mul} aliases
432ac57705 Make static context const
1b1fc09341 Merge bitcoin-core/secp256k1#1642: Verify `compressed` argument in `secp256k1_eckey_pubkey_serialize`
c0d9480fbb Merge bitcoin-core/secp256k1#1654: use `EXIT_` constants over magic numbers for indicating program execution status
13d389629a CONTRIBUTING: mention that `EXIT_` codes should be used
c855581728 test, bench, precompute_ecmult: use `EXIT_...` constants for `main` return values
965393fcea examples: use `EXIT_...` constants for `main` return values
2e3bf13653 Merge bitcoin-core/secp256k1#1646: README: add instructions for verifying GPG signatures
b682dbcf84 README: add instructions for verifying GPG signatures
00774d0723 Merge bitcoin-core/secp256k1#1650: schnorrsig: clear out masked secret key in BIP-340 nonce function
a82287fb85 schnorrsig: clear out masked secret key in BIP-340 nonce function
4c50d73dd9 ci: Add new "Windows (clang-cl)" job
84c0bd1f72 cmake: Adjust diagnostic flags for clang-cl
f79f46c703 Merge bitcoin-core/secp256k1#1641: doc: Improve cmake instructions in README
2ac9f558c4 doc: Improve cmake instructions in README
1823594761 Verify `compressed` argument in `secp256k1_eckey_pubkey_serialize`
8deef00b33 Merge bitcoin-core/secp256k1#1634: Fix some misspellings
39705450eb Fix some misspellings
ec329c2501 Merge bitcoin-core/secp256k1#1633: release cleanup: bump version after 0.6.0
c97059f594 release cleanup: bump version after 0.6.0
64228a648f musig: Use _ge_set_all_gej for own public nonces
300aab1c05 tests: Improve _ge_set_all_gej(_var) tests
365f274ce3 group: Simplify secp256k1_ge_set_all_gej
d3082ddead group: Add constant-time secp256k1_ge_set_all_gej

git-subtree-dir: src/secp256k1
git-subtree-split: 4187a4664914dc6f6fb6a619c6b85c854fc33033
2025-05-13 11:31:34 +01:00
MarcoFalke
fabdc5ad06
Remove unused LegacyDataSPKM::HaveWatchOnly() 2025-05-13 09:31:25 +02:00
MarcoFalke
fa7b7f796a
Remove HaveKey helper, unused after sethdseed removal 2025-05-13 09:31:07 +02:00
Pieter Wuille
8673e8f019 txgraph: Special-case singletons in chunk index (optimization) 2025-05-12 17:07:30 -04:00
Pieter Wuille
abdd9d35a3 txgraph: Skipping end of cluster has no impact (optimization) 2025-05-12 17:07:30 -04:00
Pieter Wuille
604acc2c28 txgraph: Reuse discarded chunkindex entries (optimization) 2025-05-12 17:07:30 -04:00
Pieter Wuille
c734081454 txgraph: Introduce TxGraph::GetWorstMainChunk (feature)
It returns the last chunk that would be suggested for mining by BlockBuilder
objects. This is intended for eviction.
2025-05-12 17:07:30 -04:00
Pieter Wuille
394dbe2142 txgraph: Introduce BlockBuilder interface (feature)
This interface lets one iterate efficiently over the chunks of the main
graph in a TxGraph, in the same order as CompareMainOrder. Each chunk
can be marked as "included" or "skipped" (and in the latter case,
dependent chunks will be skipped).
2025-05-12 17:07:30 -04:00
Pieter Wuille
883df3648e txgraph: Generalize GetClusterRefs to support subsections (preparation)
This is preparation for a next commit which will need a way to extract Refs
for just individual chunks from a cluster.
2025-05-12 17:07:30 -04:00
Pieter Wuille
c28a602e00 txgraph: Introduce TxGraphImpl observer tracking (preparation)
This is preparation for a next commit which will introduce a class whose
objects hold references to internals in TxGraphImpl, which disallows
modifications to the graph while such objects exist.
2025-05-12 17:07:30 -04:00
Pieter Wuille
9095d8ac1c txgraph: Maintain chunk index (preparation)
This is preparation for exposing mining and eviction functionality in
TxGraph.
2025-05-12 17:07:28 -04:00
Pieter Wuille
87e74e1242 txgraph: abstract out transaction ordering (refactor) 2025-05-12 17:00:33 -04:00
Pieter Wuille
2614fea17f txgraph: Add GetMainStagingDiagrams function (feature)
This allows determining whether the changes in a staging diagram unambiguously improve
the graph, through CompareChunks().
2025-05-12 16:00:24 -04:00
merge-script
663a9cabf8
Merge bitcoin/bitcoin#32458: guix: move *-check.py scripts under contrib/guix/
415650cea94f5050d7c368fdf9fd9878809957e1 guix: move *-check.py scripts under contrib/guix (fanquake)

Pull request description:

  These scripts are not meant for general developer usage. They are for use on the release binaries, which have been compiled in an environment that makes various assumptions in regards to c library, compiler options, hardening options, dependency patching etc.

  Anyone is free to run these scripts against self-compiled binaries, but this isn't something we want to modify/generalize the scripts to support.

ACKs for top commit:
  laanwj:
    Code review ACK 415650cea94f5050d7c368fdf9fd9878809957e1
  TheCharlatan:
    ACK 415650cea94f5050d7c368fdf9fd9878809957e1

Tree-SHA512: 469cc5da9df014b4a9dc39080f31c3283641691209497cdb7cc5dc4767681a7f4b67425768e81838153ce39a26547ed94cd3be4dc27352d33960765bfac9d0e5
2025-05-12 19:49:17 +01:00
merge-script
05765b8818
Merge bitcoin/bitcoin#32472: doc: Fix typo
d847e17c9656020de9f378ae82ec89e0bb39ecbd doc: Fix typo (Hennadii Stepanov)

Pull request description:

  A translator on Transifex noticed:
  > This is the only label which has two dots: ..
  > Usually we see the elipsis (…)

  This PR addresses this issue.

ACKs for top commit:
  janb84:
    good find, ACK d847e17c96

Tree-SHA512: cbdc5f283fe30655a923c34813c97406bba85657554984c26acbfed585ce3a652bcb21348d7e0f6fd9c82ca04111c412ff62c7d4b046869d13785b713e69ab6d
2025-05-12 19:48:46 +01:00
Hennadii Stepanov
d847e17c96
doc: Fix typo
An ellipsis (…) is typically used in such cases.
2025-05-12 17:11:27 +01:00
merge-script
3edf400b10
Merge bitcoin/bitcoin#32469: cmake: Allow WITH_DBUS on all Unix-like systems
5b7ed460c7c181f1fd34a927a09aed36284083cb cmake: Allow `WITH_DBUS` on all Unix-like systems (Hennadii Stepanov)

Pull request description:

  This PR makes the `WITH_DBUS` option available on all Unix-like systems, not just Linux, thereby fixing a regression that was overlooked during the migration from Autotools.

  Note: Enabling D-Bus support on macOS still makes no sense, since the `Notificator` class uses the User Notification Center regardless:746ab19d5a/src/qt/notificator.cpp (L43-L56)

  Fixes https://github.com/bitcoin/bitcoin/issues/32464.

ACKs for top commit:
  laanwj:
    ACK 5b7ed460c7c181f1fd34a927a09aed36284083cb
  theStack:
    tACK 5b7ed460c7c181f1fd34a927a09aed36284083cb

Tree-SHA512: 01f5a365a8109c273489e2d46b08d8b64b82251c4814a486561221b55d8a47cb1effc9140dbd6b2ab5f12e2966d0ea0d07a4cbf67d310001ee681b0f5b63f300
2025-05-12 14:22:55 +01:00
Hennadii Stepanov
59e09e0fb7
Merge bitcoin-core/gui#871: qt, docs: Unify term "clipboard"
3bbdbc0a5e1b409969cedaf249d1d01dea9bcf73 qt, docs: Unify term "clipboard" (Hennadii Stepanov)

Pull request description:

  A translator on Transifex noticed:
  > The term "system clipboard" appears twice. The term "clipboard" appears 10 times. Perhaps we could standardize on just saying "clipboard"?

  This PR addresses this issue.

ACKs for top commit:
  davidgumberg:
    ACK 3bbdbc0a5e
  pablomartin4btc:
    ACK 3bbdbc0a5e1b409969cedaf249d1d01dea9bcf73

Tree-SHA512: 61a100f60890d81122a4b8ce3e2cb7d355c7fb643de3196573f7f9107c6f52fa0b3e7a4f743ce2833e8c67b9cdad3568b761d730fef5c9781f5e1c45252888c4
2025-05-11 17:38:04 +01:00
Hennadii Stepanov
46f79dde67
Merge bitcoin-core/gui#841: Decouple WalletModel from RPCExecutor
002b792b9a85100d89e47706c29cf1fd355d9727 gui: decouple WalletModel from RPCExecutor (furszy)

Pull request description:

  A more comprehensive fix for the issue described in #837.

  Since the `WalletModel` class is unavailable when compiling without wallet support
  `(-DENABLE_WALLET=0)`, the RPC executor class should not be coupled to it.
  This decoupling ensures GUI compatibility with builds that omit wallet support.

  This also drops an extra `#ifdef ENABLE_WALLET` block which is always good.

ACKs for top commit:
  w0xlt:
    Code Review ACK 002b792b9a
  pablomartin4btc:
    tACK 002b792b9a85100d89e47706c29cf1fd355d9727
  BrandonOdiwuor:
    tACK 002b792b9a85100d89e47706c29cf1fd355d9727
  hebasto:
    ACK 002b792b9a85100d89e47706c29cf1fd355d9727, I have reviewed the code and it looks OK.

Tree-SHA512: a8e6b7e9d88dd8e0ff5e2d0de91be2f85fd0559265267d3bf6cae5a37606cf1ab6bc7415d5817a11006008de362f2ca3557ba772b4e1bd9fbef5f564be3b53bb
2025-05-11 17:34:11 +01:00
Hennadii Stepanov
5b7ed460c7
cmake: Allow WITH_DBUS on all Unix-like systems
This change makes the `WITH_DBUS` option available on all Unix-like
systems, not just Linux, thereby fixing a regression that was
overlooked during the migration from Autotools.

Note: Enabling D-Bus support on macOS still makes no sense, since the
`Notificator` class uses the User Notification Center regardless.
2025-05-11 17:06:01 +01:00
merge-script
746ab19d5a
Merge bitcoin/bitcoin#32446: build: simplify *ifaddr handling
ab878a7e741073574336c9c4b1d41c6cf80b0d6a build: simplify *ifaddr handling (fanquake)

Pull request description:

  We really just want to skip this when building for Windows. So do that,
  and remove the two header checks (we also already use both of these
  headers, unguarded, in the !windows part of the codebase).

  Squash the two *iffaddrs defines into one, as I haven't seen an
  `iffaddrs.h` that implements one, but not the other.

ACKs for top commit:
  hebasto:
    ACK ab878a7e741073574336c9c4b1d41c6cf80b0d6a. Only addressed my [comment](https://github.com/bitcoin/bitcoin/pull/32446#discussion_r2079994126) and rebased since my recent [review](https://github.com/bitcoin/bitcoin/pull/32446#pullrequestreview-2825606189).
  TheCharlatan:
    ACK ab878a7e741073574336c9c4b1d41c6cf80b0d6a

Tree-SHA512: 7667305df9fef4728526c7217f85b51e739ec63b38e808da51d6ae65cb6f2696afa5ba82e5a72ed4a7a9b79ffa2402640448af4392587253027122eab7618e30
2025-05-10 15:50:01 +01:00
Ava Chow
19b1e177d6
Merge bitcoin/bitcoin#32155: miner: timelock the coinbase to the mined block's height
a58cb3b1c12c8cb75a87375c50f94c4605bb805d qa: sanity check mined block have their coinbase timelocked to height (Antoine Poinsot)
8f2078af6a55448c003b3f7f3021955fbb351caa miner: timelock coinbase transactions (Antoine Poinsot)
788aeebf343526760fa8f3ed969ac3713212a5b6 qa: use prev height as nLockTime for coinbase txs created in unit tests (Antoine Poinsot)
c76dbe9b8b6f03b761a0ef97e1b8cd133b934714 qa: timelock coinbase transactions created in fuzz targets (Antoine Poinsot)
9c94069d8b6cf67a24eb03c51230a4f2b2bf2d64 contrib: timelock coinbase transactions in signet miner (Antoine Poinsot)
a5f52cfcc400ad0adb41a78c65b8abb971e0d622 qa: timelock coinbase transactions created in functional tests (Antoine Poinsot)

Pull request description:

  The Consensus Cleanup soft fork proposal includes enforcing that coinbase transactions set their
  nLockTime field to the block height minus 1, as well as their nSequence such as to not disable the
  timelock. If such a fork were to be activated by Bitcoin users, miners need to be ready to produce
  compliant blocks at the risk of losing substantial amounts mining would-be invalid blocks. As miners
  are unfamously slow to upgrade, it's good to make this change as early as possible.

  Although Bitcoin Core's GBT implementation does not provide the `coinbasetxn` field, and mining
  pool software crafts the coinbase on its own, updating the Bitcoin Core mining code is a first step
  toward convincing pools to update their (often closed source) code. A possible followup is also to
  introduce new fields to GBT. In addition, this first step also makes it possible to test future
  Consensus Cleanup changes.

  The commit making the change also updates a bunch of seemingly-unrelated tests. This is because those tests were asserting error messages based on the txid of transactions involved, and changing the coinbase transaction structure necessarily changes the txid of all tests' transactions.

ACKs for top commit:
  Sjors:
    Code review ACK a58cb3b1c12c8cb75a87375c50f94c4605bb805d
  achow101:
    ACK a58cb3b1c12c8cb75a87375c50f94c4605bb805d
  TheCharlatan:
    Re-ACK a58cb3b1c12c8cb75a87375c50f94c4605bb805d

Tree-SHA512: a2aae009a187eb760d34435f518a895ee76c6b02a667eb030ddf6bd584da6e8eae2737d974dbf81a928d60c07bcb4820f055adc067e18d8819640db0240bb513
2025-05-09 15:09:27 -07:00
Ava Chow
6c6ef58b0b
Merge bitcoin/bitcoin#32436: test: refactor: negate signature-s using libsecp256k1
1ee698fde2e8652d8eb083749edb8029c003b8db test: refactor: negate signature-s using libsecp256k1 (Sebastian Falbesoner)

Pull request description:

  This small PR gets rid of manual mod-n inversion of the ECDSA signature-s part in unit tests (introduced a long time ago in #5256, triggered by https://github.com/bitcoin-core/secp256k1/pull/69) by using secp256k1 instead. The function wasn't available at that time, but was introduced about three years later, see https://github.com/bitcoin-core/secp256k1/pull/408. Note that as the name suggests, `secp256k1_ec_seckey_negate` is meant to be used for secret keys, but it obviously works in general for scalars modulo the group order.

ACKs for top commit:
  achow101:
    ACK 1ee698fde2e8652d8eb083749edb8029c003b8db
  laanwj:
    Code review ACK 1ee698fde2e8652d8eb083749edb8029c003b8db
  w0xlt:
    ACK 1ee698fde2
  rkrux:
    tACK 1ee698fde2e8652d8eb083749edb8029c003b8db

Tree-SHA512: dc36ea1572b538d11ae34e1871f310a1cda8083ffb753e93e7ee9d56e91ebd8ec78d35758dfb700254720914b734ef7a071eeef71b6239f19e1e2fb289fb5435
2025-05-09 13:26:27 -07:00
merge-script
9a05b45da6
Merge bitcoin/bitcoin#32438: refactor: Removals after bdb removal
fa061bfcdb0caea240fd15bcc309e7847132a4ff Remove create options from wallet tool (MarcoFalke)
fa2125e7b8e368d8fae8a3d56cdb54b7f9d0d9c9 Remove unused IsSingleKey (MarcoFalke)
fab5e2a0948a965c29206f2a051d5fe22d49378b doc: Remove note about bdb wallets (MarcoFalke)
eeeef88d46feda06feda597152329533d0aad212 doc: fix typo in abortrescan rpc (MarcoFalke)
fa7e5c15a795852972a322fb9605643d4cef3471 Remove unused LegacyDataSPKM::DeleteRecords() (MarcoFalke)
ffff949472985c70e82aa5eb5671c1c55c073d72 remove NotifyWatchonlyChanged (MarcoFalke)
fa62a013a558338dc6ee5fb4cfd6fc7c782c301b remove dead flush() (MarcoFalke)
fa5f3e62c8801cca80997cfb046c13983e0876e7 vcpkg: Remove bdb (MarcoFalke)

Pull request description:

  This deletes some dead code

ACKs for top commit:
  Sjors:
    ACK fa061bfcdb0caea240fd15bcc309e7847132a4ff if CI is also happy
  rkrux:
    utACK fa061bf

Tree-SHA512: 6c0b0705caa4ad024e6b921bd7f65aaa055d1f12f7884cd61823cbf0c32e46697ddbdaa209ab449d6a1df9761ce5d53763e25f26e4c36ce4c685b7524f5a3dd9
2025-05-09 16:47:55 +01:00
MarcoFalke
fa061bfcdb
Remove create options from wallet tool
Just create descriptor wallets.
2025-05-09 15:07:04 +02:00
MarcoFalke
fa2125e7b8
Remove unused IsSingleKey 2025-05-09 15:06:51 +02:00
MarcoFalke
fab5e2a094
doc: Remove note about bdb wallets 2025-05-09 15:06:50 +02:00
MarcoFalke
eeeef88d46
doc: fix typo in abortrescan rpc 2025-05-09 15:06:37 +02:00
MarcoFalke
fa7e5c15a7
Remove unused LegacyDataSPKM::DeleteRecords() 2025-05-09 15:06:20 +02:00
merge-script
b070ce1696
Merge bitcoin/bitcoin#31360: depends: Avoid using helper variables in toolchain file
7343a1846cebf74ffef3c54e05b633df629510a1 depends: Avoid using helper variables in toolchain file (Hennadii Stepanov)

Pull request description:

  Using helper variables has two issues:
  1. They contaminate the global namespace of the main build script.
  2. They can be used as `set(var)`, effectively [exposing](https://cmake.org/cmake/help/latest/command/set.html) a cache variable `var`, which makes the toolchain file susceptible to the build environment.

  The [`depends/Makefile`](https://github.com/bitcoin/bitcoin/blob/master/depends/Makefile) can generate values with "not-set" semantics as empty strings or strings containing only spaces. For example:2638fdb4f9/depends/Makefile (L157)
  Therefore, [`MATCHES`](https://cmake.org/cmake/help/latest/command/if.html#matches) must be used rather than [`STREQUAL`](https://cmake.org/cmake/help/latest/command/if.html#strequal).

ACKs for top commit:
  purpleKarrot:
    ACK 7343a1846cebf74ffef3c54e05b633df629510a1

Tree-SHA512: f2235321ac13daee8e82fa1ae9d02b95097a696265ad3a31fbda9cbc3c387c1dc7d01951154f99828468e50b73ed2889a6fa2720007f519dd11fe25ee5303d23
2025-05-09 14:04:39 +01:00
MarcoFalke
ffff949472
remove NotifyWatchonlyChanged
The signal is never called.
2025-05-09 15:03:08 +02:00
MarcoFalke
fa62a013a5
remove dead flush()
It is confusing that the chain client flush happens between
StopHTTPServer and StopMapPort. Also, it is unused code. Seems best to
just add it back properly when it is needed again.
2025-05-09 14:59:34 +02:00
MarcoFalke
fa5f3e62c8
vcpkg: Remove bdb 2025-05-09 14:58:38 +02:00
fanquake
415650cea9
guix: move *-check.py scripts under contrib/guix
These scripts are not meant for general developer usage. They are for
use on the release binaries, which have been compiled in an environment
that makes various assumptions in regards to c library, compiler
options, hardening options, patching etc.
2025-05-09 13:42:07 +01:00
merge-script
5b8752198e
Merge bitcoin/bitcoin#32454: tracing: fix invalid argument in mempool_monitor
31c5ebc4007884b655f2f90ca09e36e0b9ada4da tracing: fix invalid argument in mempool_monitor (William Casarin)

Pull request description:

  The mempool_monitor tracing tool is incorrectly reading the reason as the first argument. Fix this!

  Noticed this during the bitcoin++ mempool hackathon 😅

  cc 0xB10C

ACKs for top commit:
  0xB10C:
    Code Review ACK 31c5ebc4007884b655f2f90ca09e36e0b9ada4da

Tree-SHA512: 6f3d64f0f75a44e1fdcad71af8e737ce948833498cd3879ef74cbabf53e3649145b83febceca19b1662de55346c199bf4259e17f5b28cf0352aefa730e07ea63
2025-05-09 09:21:35 +01:00
William Casarin
31c5ebc400 tracing: fix invalid argument in mempool_monitor
The mempool_monitor tracing tool is incorrectly reading the reason
as the first argument. Fix this!
2025-05-08 22:04:28 -07:00
Ryan Ofsky
ad5cd129f3
Merge bitcoin/bitcoin#30660: qa: Verify clean shutdown on startup failure
10845cd7cc89fc83b4ee844dc577b391720bba9c qa: Add feature_framework_startup_failures.py (Hodlinator)
28e282ef9ae94ede4aace6b97ff18c66cb72a001 qa: assert_raises_message() - Stop assuming certain structure for exceptions (Hodlinator)
1f639efca5e71a0ff208415d94e408a74778d4db qa: Work around Python socket timeout issue (Hodlinator)
9b24a403fae4b896ff7705519bd48c877b4e621b qa: Only allow calling TestNode.stop() after connecting (Hodlinator)
6ad21b4c0114029d16d334bf8d437834708a295e qa: Include ignored errors in RPC connection timeout (Hodlinator)
879243e81fd55f54739fbdae4d5b8666f5acb9a9 qa refactor: wait_for_rpc_connection - Treat OSErrors the same (Hodlinator)

Pull request description:

  Improves handling of startup errors in functional tests and puts tests in place to ensure knock-on errors don't creep in.
  - `wait_for_rpc_connection()` now appends specific failures leading up to the `Unable to connect to bitcoind` error to that error message:
    `[node 0] Unable to connect to bitcoind after 60s (ignored errors: {'missing_credentials': 1, 'OSError.ECONNREFUSED': 239}, latest error: ConnectionRefusedError(111, 'Connection refused'))`
  - Fixes Windows Python issue where `socket.timeout` exceptions end up with unset `errno`-fields.
  - Also adds comments, refactors code, improves logging.

  The underlying purpose is to ensure developer efficiency in finding root causes of test failures.

  Prior iterations of the PR partially focused on fixing the same issue as #31620.
  Originally inspired by #30390.

  ### Testing

  Can be tested by reverting either faf2f2c654d9aa18b2f49a157956f9ab0fce302a or fae3bf6b870eb0f9cddd1adac82ba72890806ae3 from #31620, or the "qa: Avoid calling stop-RPC if not connected" from this PR, and running *feature_framework_startup_failures.py*.

ACKs for top commit:
  l0rinc:
    ACK 10845cd7cc89fc83b4ee844dc577b391720bba9c
  ryanofsky:
    Code review ACK 10845cd7cc89fc83b4ee844dc577b391720bba9c. Only changes since last review were adding a new commit tweaking assert_raises_message(), extending the new test to have a self-check, and to pass through all options to child tests instead of a hardcoded list of options. I left some cleanup suggestions below but they are not important.

Tree-SHA512: f0235c5cbb6d1bb85d8dc5de492a08a34f6edc83499cbf0a5f9a3824809ff84635888c62c9c01101e3cc9ef9f1cdee2c9ab6537fea6feeb005b29f428caf8b22
2025-05-08 16:57:46 -04:00
Ava Chow
1656f6dbba
Merge bitcoin/bitcoin#32448: contrib: remove bdb exception from FORTIFY check
f9dfe8d5e0d3f628659702ab781b7919505c829f contrib: remove bdb exception from FORTIFY check (fanquake)

Pull request description:

  BDB has been removed (#28710), so we no-longer need to ignore functions from BDB in this check.

  Guix building this branch, and looking for `*_chk` functions across all binaries produces:
  ```
  # nm -C * | grep -i _chk | sort | uniq
                   U __fdelt_chk@GLIBC_2.15
                   U __fprintf_chk@GLIBC_2.3.4
                   U __fread_chk@GLIBC_2.7
                   U __longjmp_chk@GLIBC_2.11
                   U __memcpy_chk@GLIBC_2.3.4
                   U __printf_chk@GLIBC_2.3.4
                   U __snprintf_chk@GLIBC_2.3.4
                   U __sprintf_chk@GLIBC_2.3.4
                   U __stack_chk_fail@GLIBC_2.4
                   U __vsnprintf_chk@GLIBC_2.3.4
  ```

ACKs for top commit:
  achow101:
    ACK f9dfe8d5e0d3f628659702ab781b7919505c829f
  theuni:
    utACK f9dfe8d5e0d3f628659702ab781b7919505c829f
  laanwj:
    Code review ACK f9dfe8d5e0d3f628659702ab781b7919505c829f

Tree-SHA512: e9491c8b348a0d777c3f7186cab48b478548654712f8b85e7bde2f8b94f3a8b52bc7be8fb1b4a486954359d3109cfb74e3485ccfff67c6546f0efcabf2eda0e0
2025-05-08 11:06:59 -07:00
fanquake
ab878a7e74
build: simplify *ifaddr handling
We really just want to skip this when building for Windows. So do that,
and remove the two header checks (we also already use both of these
headers, unguarded, in the !windows part of the codebase).

Squash the two *iffaddrs defines into one, as I haven't seen an
iffaddrs.h that implements one, but not the other.
2025-05-08 16:49:58 +01:00
Ryan Ofsky
1b4ddb0c2d
Merge bitcoin/bitcoin#32356: cmake: Respect user-provided configuration-specific flags
edde96376a2961dec3730331b3d171ddf972589f cmake: Respect user-provided configuration-specific flags (Hennadii Stepanov)

Pull request description:

  This PR addresses [this](https://github.com/bitcoin/bitcoin/issues/31491#issuecomment-2542140874) comment:
  > I suppose that should only happen if the `-O3` isn't coming from an explicitly set `CMAKE_CXX_FLAGS_RELEASE`.

  With this PR:
  ```
  $ cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3"
  <snip>
  C++ compiler flags .................... -O3 -std=c++20 -fPIC -fno-extended-identifiers -fdebug-prefix-map=/home/hebasto/dev/bitcoin/src=. -fmacro-prefix-map=/home/hebasto/dev/bitcoin/src=. -fstack-reuse=none -Wall -Wextra -Wformat -Wformat-security -Wvla -Wredundant-decls -Wdate-time -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wbidi-chars=any -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection
  Linker flags .......................... -O3 -fstack-reuse=none -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
  ```
  and
  ```
  $ cmake -B build -DCMAKE_BUILD_TYPE=Release
  <snip>
  C++ compiler flags .................... -O2 -std=c++20 -fPIC -fno-extended-identifiers -fdebug-prefix-map=/home/hebasto/dev/bitcoin/src=. -fmacro-prefix-map=/home/hebasto/dev/bitcoin/src=. -fstack-reuse=none -Wall -Wextra -Wformat -Wformat-security -Wvla -Wredundant-decls -Wdate-time -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wbidi-chars=any -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection
  Linker flags .......................... -O2 -fstack-reuse=none -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
  ```

  When calling `cmake` repeatedly using the same build directory, each newly provided `CMAKE_CXX_FLAGS_RELEASE` value will be accommodated. In such a scenario, if the user wishes to revert to the build system defaults, they should unset the `CMAKE_CXX_FLAGS_RELEASE` variable by passing `-UCMAKE_CXX_FLAGS_RELEASE`  to `cmake`.

  ---

  This PR does not aim to resolve _all_ issues mentioned in https://github.com/bitcoin/bitcoin/issues/31491.

ACKs for top commit:
  purpleKarrot:
    ACK edde96376a2961dec3730331b3d171ddf972589f
  janb84:
    ACK [edde963](edde96376a)
  ryanofsky:
    Code review ACK edde96376a2961dec3730331b3d171ddf972589f

Tree-SHA512: 1fbc879bd02cf0be726ced490f65985e728f0686ccb3a32cd38787b56377aa666e1965448e5069515abc814df49a0083c8000bc3f6f322f5f395695638168fb6
2025-05-08 11:06:13 -04:00
Sebastian Falbesoner
1ee698fde2 test: refactor: negate signature-s using libsecp256k1
Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2025-05-08 15:52:38 +02:00
fanquake
f9dfe8d5e0
contrib: remove bdb exception from FORTIFY check
BDB has been removed (#28710), so we no-longer need to ignore functions
from BDB in this check.
2025-05-08 14:37:26 +01:00
merge-script
66c968b4b4
Merge bitcoin/bitcoin#32444: doc: swap "Docker image" for "container image"
1372eb09c5d031315bc6cde34f7a15297e96f4cc doc: swap "Docker image" for "container image" (fanquake)

Pull request description:

  I haven't used Docker for some time (now Podman), and the images are generic, so just use "container image". I'll be pushing some changes to https://github.com/fanquake/core-review/tree/master/guix, to reflect this.

ACKs for top commit:
  janb84:
    ACK 1372eb09c5
  laanwj:
    ACK 1372eb09c5d031315bc6cde34f7a15297e96f4cc
  hebasto:
    ACK 1372eb09c5d031315bc6cde34f7a15297e96f4cc.

Tree-SHA512: 45bb74d25a0faf7e5c3666d6897fb6b999144308c43cdf8a290d3a4210285b1e95286d27bb3d90bc50be4784c2242ad3f93794086f4634439a46a48ff68c7343
2025-05-08 13:50:24 +01:00
merge-script
6469752952
Merge bitcoin/bitcoin#32434: lint: Remove string exclusion from locale check
fa24fdcb7f474e6959ae4d8fe9759d365c6c021b lint: Remove string exclusion from locale check (MarcoFalke)

Pull request description:

  The exclusion isn't needed. In fact, it prevents detection of `"bla" + wrong()`.

  For example, the following is not detected:

  ```diff
  diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp
  index 1c2951deee..c1209013e5 100644
  --- a/src/wallet/rpc/addresses.cpp
  +++ b/src/wallet/rpc/addresses.cpp
  @@ -336,7 +336,8 @@ RPCHelpMan addmultisigaddress()
   RPCHelpMan keypoolrefill()
   {
       return RPCHelpMan{"keypoolrefill",
  -                "\nFills the keypool."+
  +                "\nRefills each descriptor keypool in the wallet up to the specified number of new keys.\n"
  +                "By default, descriptor wallets have 4 active ranged descriptors (\"legacy\", \"p2sh-segwit\", \"bech32\", and \"bech32m\"), each with " + std::to_string(DEFAULT_KEYPOOL_SIZE) + " entries.\n" +
           HELP_REQUIRING_PASSPHRASE,
                   {
                       {"newsize", RPCArg::Type::NUM, RPCArg::DefaultHint{strprintf("%u, or as set by -keypool", DEFAULT_KEYPOOL_SIZE)}, "The new keypool size"},
  ```

  Fix the script by detecting it.

ACKs for top commit:
  laanwj:
    Code review ACK fa24fdcb7f474e6959ae4d8fe9759d365c6c021b.
  rkrux:
    ACK fa24fdcb7f474e6959ae4d8fe9759d365c6c021b
  w0xlt:
    ACK fa24fdcb7f

Tree-SHA512: cb7e6ed9fec5d2089e94031329ebf26b83a1814ffbbbca94f7527c127bc759d13c0f4ea79b71ff7f5f009d071dcf01958c8921163d6dc5e1ae6256cc40b57eea
2025-05-08 10:42:30 +01:00
fanquake
1372eb09c5
doc: swap "Docker image" for "container image"
I haven't used Docker for some time (now Podman), and the images are
generic, so just use container image. I'll be pushing some changes to
https://github.com/fanquake/core-review/tree/master/guix, to reflect this.
2025-05-08 10:20:21 +01:00
merge-script
03ebdd0793
Merge bitcoin/bitcoin#32437: crypto: disable ASan for sha256_sse4 with Clang
4e8ab5e00fa72016a7ec0e0505ca025d4e59e4d8 crypto: disable ASan for sha256_sse4 with Clang (fanquake)

Pull request description:

  This also fails to compile when optimisations are being used, see: https://github.com/bitcoin/bitcoin/issues/31913.
  So just disable ASan under any optimisation level.

  Closes #31913.

ACKs for top commit:
  maflcko:
    lgtm ACK 4e8ab5e00fa72016a7ec0e0505ca025d4e59e4d8
  davidgumberg:
    Tested ACK 4e8ab5e00f
  laanwj:
    Code review ACK 4e8ab5e00fa72016a7ec0e0505ca025d4e59e4d8

Tree-SHA512: 680fb424f43b35730e03e0c7443c80445a2cf423d4f9161414ea22fea0b955f49197f8a96d1241896d981c6c13814d3eb7b5e4d8c9138813fb69e437ac4768ea
2025-05-08 09:08:36 +01:00