Commit Graph

48428 Commits

Author SHA1 Message Date
MarcoFalke
faf3ef4ee7 ci: Clarify why valgrind task has gui disabled
A build with system libs (or with a normal depends build) will fail
with:

```sh
$ valgrind --exit-on-first-error=yes --error-exitcode=1 --quiet ./bld-cmake/bin/test_bitcoin-qt
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
********* Start testing of AppTests *********
Config: Using QtTest library 6.10.2, Qt 6.10.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 15.2.0), ubuntu 26.04
PASS   : AppTests::initTestCase()
QINFO  : AppTests::appTests() Backing up GUI settings to "/tmp/test_common bitcoin/60d474ffae390f81657d/regtest/guisettings.ini.bak"
==18007== Conditional jump or move depends on uninitialised value(s)
==18007==    at 0x12655E26: ???
==18007==    by 0xCB28E7F: ???
==18007==
==18007==
==18007== Exit program on first error (--exit-on-first-error=yes)
```

A DEBUG=1 depends build would work, but that seems tedious for
questionable benefit.
2026-03-18 10:27:42 +01:00
Sebastian Falbesoner
9f28120a5b kernel: Add API function for getting a tx input's nSequence 2026-03-18 04:22:59 +01:00
Sebastian Falbesoner
6b64b181d5 kernel: Add API function for getting a tx's nLockTime 2026-03-18 04:22:21 +01:00
merge-script
04480c2558 Merge bitcoin/bitcoin#34830: fuzz: set fSuccessfullyConnected in connman harness
685a44c601 fuzz: set fSuccessfullyConnected in connman harness (frankomosh)

Pull request description:

  The connman fuzz harness never sets `fSuccessfullyConnected=true` on nodes added through `AddTestNode()`. `NodeFullyConnected()` gates `ForEachNode()` on that flag, making its callback unreachable in the current harness.
  Set `fSuccessfullyConnected=true` before `AddTestNode()` to simulate a node that has completed the version handshake.

ACKs for top commit:
  maflcko:
    lgtm ACK 685a44c601
  sedited:
    ACK 685a44c601
  marcofleon:
    ACK 685a44c601

Tree-SHA512: 2c696b8674cb465f468642b5fd37a467bc34dcbf61dc901d784fd2fe0dd13ced5cd6bd9873bcce0f8e60e25d450052e9a562ece08abeb2ab6472e584dba65c40
2026-03-17 23:35:37 +08:00
fanquake
3293e9a61f guix: document when GCC SSA gen patch can be removed 2026-03-17 22:47:15 +08:00
fanquake
978023fd9e guix: use latest glibc 2.31
https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.31/master.
2026-03-17 22:47:15 +08:00
fanquake
ab9a98b1e4 guix: combine gcc-libgcc-patches with base-gcc 2026-03-17 22:47:15 +08:00
fanquake
2276426bb1 guix: switch to upstream python-oscrypto package 2026-03-17 22:47:14 +08:00
fanquake
feea2a850e ci: use LIEF 0.17.5 in lint job 2026-03-17 22:47:14 +08:00
fanquake
a7524f57ba guix: switch to upstream python-lief package 2026-03-17 22:47:14 +08:00
fanquake
2bf97e813d guix: switch to upstream osslsigncode package 2026-03-17 22:47:14 +08:00
fanquake
dc0ddab389 guix: drop CMake workaround
We are now using 3.31.x.
2026-03-17 22:47:14 +08:00
fanquake
31eb46f054 guix: update to c5eee3336cc1d10a3cc1c97fde2809c3451624d3
Package updates:
binutils 2.41 -> 2.44
diffutils 3.10 -> 3.12
file 5.45 -> 5.46
git-minimal 2.46.0 -> 2.52.0
(base) glibc 2.39 -> 2.41
gzip 1.13 -> 1.14
linux-headers 6.1.119 -> 6.1.166
LLVM/Clang 19.1.4 -> 19.1.7
mingw-w64 12.0.0 -> 13.0.0
nsis 3.10 -> 3.11
python-minimal 3.10 -> 3.11

CMake 4.x becomes available.
Clang/LLVM 20 & 21 become available.
2026-03-17 22:47:00 +08:00
fanquake
0f323e1075 guix: add --no-same-owner to TAR_OPTIONS
So it's used to extract tarballs.
2026-03-17 22:39:04 +08:00
merge-script
dc104cc333 Merge bitcoin/bitcoin#34832: lint: detect arch for mlc binary
551875360c ci: Use arch-appropriate binaries in lint install (will)

Pull request description:

  In testing #34547 it has been observed that the lint container does not run on aarch64-linux without `qemu binfmt` (or similar).

  This is because some tools are hardcoded to download x64 linux binaries. This has meant the linter works fine on:

  - x64 linux
  - aarch64 MacOS (via Rosetta)
  - platforms using qemu

  But does not work on e.g. aarch64-linux _without qemu_.

  `shellcheck`` offer many platforms: https://github.com/koalaman/shellcheck/releases/tag/v0.11.0 and `mlc` offers are least x64 and aarch64 linux https://github.com/becheran/mlc/releases/tag/v1.2.0.

  Try to download the correct binary for the platform using `uname` detection. This should see the linter work on native aarch64 + amd64, whilst maintaining current (emulated) compatibility.

ACKs for top commit:
  maflcko:
    lgtm ACK 551875360c

Tree-SHA512: 636cccbed3ffff995549c666b0cad1aa9790291a73a0f2212f0374c8878bd916c04e4ecb17fac1611fc2d72d363cececeeaa997af918ad4225355231376ff7b0
2026-03-17 21:33:56 +08:00
will
551875360c ci: Use arch-appropriate binaries in lint install
Replace the hardcoded x86_64 binary name with $(uname --machine) so the
correct binary is downloaded when building the lint container, where at
all possible.
2026-03-17 09:55:17 +00:00
merge-script
52e8c1ce32 Merge bitcoin/bitcoin#34825: depends: capnp 1.4.0
bde35d61f9 depends: capnp 1.4.0 (fanquake)

Pull request description:

  Update capnp in depends to [`1.4.0`](https://github.com/capnproto/capnproto/releases/tag/v1.4.0).

  It contains a number of bugfixes, and fixes for 2 CVEs, of which I think only `Fix benign(?) buffer overrun in async readMessage()` is relevant to us, and it seems to be considered benign:
  > This is technically undefined behavior (a buffer overrun), but we suspect that it is benign with all known memory allocators. In C++, a zero-sized allocation (made with `operator new(0)`, as is the case here) is required to return a unique pointer, different from any other such allocation. Because of this, all common memory allocators round up a zero-byte allocation to a word-sized allocation (32-bit or 64-bit, depending on the architecture). The overrun written to this allocation was exactly one pointer in size, so always fits into the actual allocation space.

  > Nevertheless, the code is in fact relying on undefined behavior, and it is theoretically possible that some memory allocator implements zero-sized allocations in a way that would make this overrun dangerous.

  See https://github.com/capnproto/capnproto/compare/release-1.3.0...release-1.4.0 for all changes since 1.3.0.

ACKs for top commit:
  sedited:
    ACK bde35d61f9
  janb84:
    ACK bde35d61f9
  hebasto:
    ACK bde35d61f9.

Tree-SHA512: 33a6c12684b9a6046a38c3b9dd1a5730db352eae07b5dbfe7244228fde3d1627d039c0e0ba7d35fe0968f91a0f476c239fa8f2e356a37b8ac975ac268d271bc2
2026-03-17 09:24:50 +08:00
merge-script
8d55154655 Merge bitcoin/bitcoin#34602: test: addrman: successive failures in the last week for IsTerrible
6202acd284 test: addrman: successive failures in the last week for IsTerrible (brunoerg)
f611d3bdaf refactor: addrman: move consts to .h (brunoerg)

Pull request description:

  This PR adds test coverage for the case that an address is considered terrible if we had N successive failures in the last week.

  It kills the following mutant (https://corecheck.dev/mutation/src/addrman.cpp#L88):
  ```diff
  diff --git a/src/addrman.cpp b/src/addrman.cpp
  index e3981e6a40..f8045491c1 100644
  --- a/src/addrman.cpp
  +++ b/src/addrman.cpp
  @@ -65,7 +65,7 @@ bool AddrInfo::IsTerrible(NodeSeconds now) const
       }

       if (now - m_last_success > ADDRMAN_MIN_FAIL && nAttempts >= ADDRMAN_MAX_FAILURES) { // N successive failures in the last week
  -        return true;
  +        return false;
       }

       return false;

  ```

ACKs for top commit:
  frankomosh:
    re-ACK 6202acd284
  naiyoma:
    tACK 6202acd284
  danielabrozzoni:
    tACK 6202acd284
  sedited:
    ACK 6202acd284

Tree-SHA512: b4736ef91b75ba4c060dc18a2b796aee94d0d8be5ca58b9b873156248cd0dc6910595595e0f56d75bffff4f94c035319ac8428f7d79f07fe685bdba27a188829
2026-03-16 22:29:38 +01:00
merge-script
bac8046fce Merge bitcoin/bitcoin#34831: lint: remove excluded files from whitespace check
f55c891a65 lint: more reuse of SHARED_EXCLUDED_SUBTREES (fanquake)
8864917d8b lint: add missing ipc/test to grep_boost_fixture_test_suite (fanquake)
ecefc12927 lint: fix lint issue in lint script (fanquake)
ee8c22eb6a contrib: fix whitespace issues in scripts (fanquake)
04e2118372 lint: remove excluded .cpp/.h files from whitespace check (fanquake)

Pull request description:

  The `.cpp`/`.h` have been fixed since #32482 and 5d25a82b9a.
  Fix other offending files.

ACKs for top commit:
  stickies-v:
    re-ACK f55c891a65
  maflcko:
    re-ACK f55c891a65 🗿
  kevkevinpal:
    ACK [f55c891](f55c891a65)
  sedited:
    Re-ACK f55c891a65

Tree-SHA512: 975c217d1cc82433b7960dad47976254d36526f3bd156133dcd4eb51b34616beb89e1449c245deb8b41ab6e1f746a96a0b629013e1996f355e521d075f4692c8
2026-03-16 21:43:50 +01:00
Cory Fields
79467e3ec7 threading: never require logging from sync.h
sync.h is low-level and should not require any other subsystems.

Move the lone remaining logging call to the .cpp. Any cost incurred by an
additional function call should be trivial compared to the logging itself.
2026-03-16 18:13:15 +00:00
fanquake
f55c891a65 lint: more reuse of SHARED_EXCLUDED_SUBTREES 2026-03-16 23:24:52 +08:00
fanquake
8864917d8b lint: add missing ipc/test to grep_boost_fixture_test_suite 2026-03-16 23:24:52 +08:00
fanquake
ecefc12927 lint: fix lint issue in lint script
Replace the tabs with spaces.
2026-03-16 23:24:52 +08:00
fanquake
ee8c22eb6a contrib: fix whitespace issues in scripts 2026-03-16 23:24:48 +08:00
MarcoFalke
fa55723b8f move-only: Extract ProcessAddrs() helper
This can be reviewed via the git options:
--color-moved=dimmed-zebra  --color-moved-ws=ignore-all-space
2026-03-16 13:56:46 +01:00
Novo
92287ae753 test/wallet: ensure FastWalletRescanFilter is updated during scanning
The fixed non-range descriptor address ensured that the FastWalletRescanFilter would match all Blocks even if the filter wasn't properly updated.
This commit moves the non-range descriptor tx to a different block, so that the filters must be updated after each TopUp for the test to pass.

Co-authored-by: rkrux <rkrux.connect@gmail.com>
2026-03-16 11:51:56 +01:00
fanquake
04e2118372 lint: remove excluded .cpp/.h files from whitespace check
These have been fixed since #32482 and
5d25a82b9a.
2026-03-16 17:38:21 +08:00
frankomosh
685a44c601 fuzz: set fSuccessfullyConnected in connman harness
Without this, NodeFullyConnected() filters out every fuzz-constructed node, making ForEachNode's callback unreachable (0/1.13M branch hits from my end).
2026-03-16 11:39:41 +03:00
MarcoFalke
fadf901fd4 rpc: Run type check on decodepsbt result
For RPCResults, the type may be ELISION, which is confusing and brittle:

* The elision should only affect the help output, not the type.
* The type should be the real type, so that type checks can be run on
  it.

Fix this issue by introducing a new print_elision option and using it
in decodepsbt.

This change will ensure that RPCResult::MatchesType is properly run.
Also, this clarifies the RPC output minimally:

```diff
--- a/decodepsbt
+++ b/decodepsbt
@@ -35,7 +35,7 @@ Result:
   "inputs" : [                             (json array)
     {                                      (json object)
       "non_witness_utxo" : {               (json object, optional) Decoded network transaction for non-witness UTXOs
-        ...
+        ...                                The layout is the same as the output of decoderawtransaction.
       },
       "witness_utxo" : {                   (json object, optional) Transaction output for witness UTXOs
         "amount" : n,                      (numeric) The value in BTC
```
2026-03-16 08:41:42 +01:00
merge-script
ff7cdf633e Merge bitcoin/bitcoin#34816: test: Remove vulture from ci, Remove some --min-confidence=60 unused code
fa90b21430 test: Remove unused feature_segwit.py functions (MarcoFalke)
fa6b05c96f test: Remove unused CUSTOM_._COUNT (MarcoFalke)
fa7bac94d8 test: Remove unused wait_for_addr, firstAddrnServices, on_addr (MarcoFalke)
fa388a3585 test: Remove unused self.p2p_conn_index = 1 (MarcoFalke)
fa803710e2 test: Remove unused AddressType (MarcoFalke)
fab5072ce1 ci: Remove vulture (MarcoFalke)

Pull request description:

  Currently, `vulture` is run with `--min-confidence=100`, which reduces its checks to dead code after control statements, which is nice, but not really a common nor severe issue. See the discussion in https://github.com/bitcoin/bitcoin/issues/34810#issuecomment-4045927137 and commit 5c005363a8, which had to remove dead code manually.

  Reducing the confidence has shown to be too brittle/tedious in the past, so remove the tool for now from CI.

  Of course, removing this from CI does not prevent anyone from running it locally and removing dead code.

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

ACKs for top commit:
  fanquake:
    ACK fa90b21430
  willcl-ark:
    ACK fa90b21430

Tree-SHA512: 6a5998470dae3a17baec29b70b02333f4cd9b81bc4c6a05b56085ff1ba527ed7bdeccd17b09d9ad785ae03c97982ee1f3147e4df3bd537c66b02e9a44d0e5f15
2026-03-16 12:46:50 +08:00
fanquake
bde35d61f9 depends: capnp 1.4.0 2026-03-15 11:24:38 +08:00
Ava Chow
92a3d30f38 Merge bitcoin/bitcoin#34418: qa: Make wallet_multiwallet.py Windows crossbuild-compatible
111864ac30 qa: Avoid duplicating output in case the diff is the same (Hodlinator)
c2e28d455a ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator)
850a80c199 qa: Disable parts of the test when running under Windows or root (Hodlinator)
fb803e3c79 qa: Test scanning errors individually (Hodlinator)
ed43ce57cc qa: Check for platform-independent part of error message (Hodlinator)
64a098a9b6 refactor(qa): Break apart ginormous run_test() (Hodlinator)
bb1aff7ed7 move-only(qa): Move wallet creation check down to others (Hodlinator)
d1a4ddb58e refactor(qa): Lift out functions to outer scopes (Hodlinator)
c811e47367 scripted-diff: self.nodes[0] => node (Hodlinator)
73cf858911 refactor(qa): Remove unused option (Hodlinator)

Pull request description:

  Makes the functional test compatible with *Linux->Windows cross-built executables*.

  Main parts:
  * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message.
  * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410.
  * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on https://github.com/bitcoin/bitcoin/pull/31410#issuecomment-3554721014.

  Also:
  * Removes unused option in wallet_multiwallet.py.
  * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions.
  * Improves `assert_equal()` output for dicts.

  Fixes #31409.

ACKs for top commit:
  achow101:
    ACK 111864ac30
  janb84:
    re ACK 111864ac30
  w0xlt:
    reACK 111864ac30

Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
2026-03-13 15:45:47 -07:00
Ava Chow
abaadc3d5b Merge bitcoin/bitcoin#31774: crypto: Use secure_allocator for AES256_ctx
af0da2fce2 crypto: Use `secure_allocator` for `AES256CBC*::iv` (David Gumberg)
d53852be31 crypto: Use `secure_allocator` for `AES256_ctx` (David Gumberg)
8c6fedaa81 build: `lockedpool.cpp` kernel -> crypto (David Gumberg)
51ac1abf6f bench: Add wallet encryption benchmark (David Gumberg)
9a15872516 wallet: Make encryption derivation clock mockable (David Gumberg)
ae5485fa0d refactor: Generalize derivation target calculation (David Gumberg)

Pull request description:

  Fixes #31744

  Reuse `secure_allocator` for `AES256_ctx` in the aes 256 encrypters and decrypters and the `iv` of `AES256CBC` encrypters and decrypters. These classes are relevant to `CCrypter`, used for encrypting wallets, and my understanding is that if an attacker knows some or all of the contents of these data structures (`AES256_ctx` & `iv`) they might be able to decrypt a user's wallet.

   Presently the `secure_allocator` tries to protect sensitive data with `mlock()` on POSIX systems and `VirtualLock()` on Windows to prevent memory being paged to disk, and by zero'ing out memory contents on deallocation with `memory_cleanse()` which is similar to `OPENSSL_cleanse()` by scaring compilers away from optimizing `memset` calls on non-Windows systems, and using `SecureZeroMemory()` on Windows.

ACKs for top commit:
  achow101:
    ACK af0da2fce2
  furszy:
    utACK af0da2fce2
  theStack:
    re-ACK af0da2fce2

Tree-SHA512: 49067934fd2f2b285fc7b1a7c853fd2d4475431b3a811ae511f61074dc71a99a0826c3ab40ab4a5dfc84b2b9914a90c920d2484b38ac19502e3bd6170ad27622
2026-03-13 13:34:35 -07:00
Ava Chow
16a02bf5af Merge bitcoin/bitcoin#33451: doc: Add INSTALL.md to Linux release tarballs
d62f46eed4 doc: Add `INSTALL.md` to Linux release tarballs (Hennadii Stepanov)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/32097:
  > Better I think would be to add instructions for the most popular desktop distros.

ACKs for top commit:
  willcl-ark:
    utACK d62f46eed4
  achow101:
    ACK d62f46eed4
  janb84:
    re ACK d62f46eed4
  w0xlt:
    ACK d62f46eed4
  sedited:
    ACK d62f46eed4

Tree-SHA512: eab6904b6acc63eaf0e13112f52d856ee630ce4110fb368f4f5f170655def91706bb7c7f70c123186a51461ea3d48ef026a4e026d665675f1fd76f2d0bbca68c
2026-03-13 13:20:04 -07:00
MarcoFalke
fa050da980 test: Move event loop creation to network thread
This should fix https://github.com/bitcoin/bitcoin/issues/34367

I am not familiar with Windows sockets thread-safety, but creating the
event loop on the main thread, and running it in the network thread
could lead to a fast abort in Python on Windows (without any stderr):

```
77/276 - wallet_txn_clone.py failed, Duration: 1 s

stdout:
2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117

stderr:

Combine the logs and print the last 99999999 lines ...
============
Combined log for D:\a\_temp/test_runner_₿_🏃_20251210_075632/wallet_txn_clone_196:
============
 test  2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117
 test  2025-12-10T08:04:27.500433Z TestFramework (DEBUG): Setting up network thread
```

Also, I couldn't find any docs that require the loop must be created on
the thread that runs them:

* https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.new_event_loop
* https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_forever

However, the patch seems trivial to review, harmless, and easy to
revert, so it may be a good try to fix the intermittent Windows Python
crash.
2026-03-13 13:48:47 +01:00
Hennadii Stepanov
a1f22a0a6b test: Suppress another unsolicited mock_process/* output
The `mock_process/*` test cases, which serve as helpers for
`system_tests` rather than actual tests, are invoked in a way that
suppresses unsolicited output to stdout or stderr to keep the test
results reproducible.

However, in debug builds, the Windows CRT still prints false-positive
memory leak dumps to stderr.

This change handles this specific case and documents the other
suppressions.
2026-03-13 12:12:26 +00:00
MarcoFalke
fa9168ffcd test: Use asyncio.SelectorEventLoop() over deprecated asyncio.WindowsSelectorEventLoopPolicy() 2026-03-13 12:11:56 +01:00
merge-script
390e7d61bd Merge bitcoin/bitcoin#34787: build: fix native macOS deployment
d03e3be246 ci: check macos bundle structure and codesigning (fanquake)
66d80d57b4 macdeploy: use plugins dir to find plugins (fanquake)
ab137cbfe2 macdeploy: subprocess out to zip rather than shutil.make_archive (fanquake)

Pull request description:

  Fix bundle format.
  Add a CI check that codesigning works.
  Fixes #34744.

ACKs for top commit:
  Sjors:
    tACK d03e3be246
  hebasto:
    ACK d03e3be246, tested on macOS Tahoe 26.3.1.
  sedited:
    ACK d03e3be246

Tree-SHA512: 5a7db896952edf338ff4fe8c934f1e1c992642850a99d5fafbb1212c6979601b3b72b6f3af880fb6f6ac8759cd4102e9f01792abb05410ceaf36cbffaec48e47
2026-03-13 11:16:48 +01:00
merge-script
5440280891 Merge bitcoin/bitcoin#34745: refactor: replace ArgsManager::cs_args RecursiveMutex with Mutex
20fb7618b0 args: make most ArgsManager members private (w0xlt)
22b40f34f3 args: replace cs_args RecursiveMutex with Mutex (w0xlt)
3a16ec8582 test: scope cs_args locks to avoid recursive locking (w0xlt)
70b51fef7a args: eliminate all recursive locking of cs_args (w0xlt)
7d61e03c70 args: extract lock-requiring internal helpers (w0xlt)

Pull request description:

  Part of #19303.

  Replace `ArgsManager::cs_args` from `RecursiveMutex` to `Mutex`.

  The conversion follows the pattern established in prior `RecursiveMutex` removals (e.g. `CAddrMan` in #19238, `CBlockPolicyEstimator` in #22014): extract private lock-held helpers with trailing underscore naming (`GetSetting_()`, `GetArgFlags_()`, `GetPathArg_()`), then replace recursive calls in methods that already hold `cs_args` with those helpers.

ACKs for top commit:
  l0rinc:
    ACK 20fb7618b0
  rkrux:
    Concept ACK 20fb7618b0
  sedited:
    Re-ACK 20fb7618b0
  hebasto:
    ACK 20fb7618b0, only rebased and suggested changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/34745#pullrequestreview-3916715262).

Tree-SHA512: 7ab4278737f00deaa3f3da75e08469f91e95aa31e916820d02af737c754751ae4f73c1c8650f120eeff142a134f9209cf581499696a7b88ffc83d296515e40f2
2026-03-13 09:22:05 +01:00
MarcoFalke
fa4ec13b44 build: Enable -Wcovered-switch-default
The leveldb exclusion is required to avoid this warning in the subtree:

```
src/leveldb/util/status.cc:63:7: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   63 |       default:
      |       ^
1 warning generated.
```
2026-03-13 09:02:21 +01:00
MarcoFalke
fa2670bd4b refactor: Enable -Wswitch in exhaustive switch
Also, apply the comment according to the dev notes.

Also, modify the dev notes to give a lambda-wrapped example.

Can be reviewed via --ignore-all-space

Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
2026-03-13 09:02:09 +01:00
merge-script
5f75d90c38 Merge bitcoin/bitcoin#34813: threads: qa: Add lock order annotation for TxMempool::cs
9085dee476 qa: Add lock order annotation for TxMempool::cs (David Gumberg)

Pull request description:

  I added this to see if static analysis would catch any lock order inversions while investigating #34731, it did not catch any but it is a worthwhile defense against statically-analyzable inversions of `cs_main->TxMempool::cs`.

ACKs for top commit:
  sedited:
    tested ACK 9085dee476
  hebasto:
    ACK 9085dee476.
  w0xlt:
    ACK 9085dee476

Tree-SHA512: 498605362e7b197b7643a3f9ffd04589bc9b245aca1d245d289efa145906248c1a72f9fbf4835a9378aabe170b747dc0cc033105915a2bf7a9989de368710c02
2026-03-13 00:02:21 +00:00
merge-script
f1e0245f89 Merge bitcoin/bitcoin#34818: doc: fix process name typo in multiprocess.md
c2732146d1 doc: fix process name typo in multiprocess.md (ViniciusCestarii)

Pull request description:

  In this [flow](https://github.com/bitcoin/bitcoin/blob/master/doc/design/multiprocess.md#example-use-cases-and-flows), the bitcoin-wallet process acts as the client initiating the RPC request, while the bitcoin-node process acts as the server receiving it. So at "The `getBlockHash` method of the generated `Chain` server subclass in `bitcoin-wallet` receives a Cap’n Proto request object with the `height` parameter, and calls the `getBlockHash` method on its local `Chain` object with the provided `height`." it should say bitcoin-node not bitcoin-wallet.

  This PR fix this typo.

ACKs for top commit:
  ryanofsky:
    Code review ACK c2732146d1. Nice catch!

Tree-SHA512: 7227dc96e556ad36f1f39cc1033d80c92e8c6a47cf61ab68401122b1ef8075068224494e4ffb7094eca8dc325294cb96e561d3e997af7d434158031485f92677
2026-03-12 22:22:31 +00:00
ViniciusCestarii
c2732146d1 doc: fix process name typo in multiprocess.md 2026-03-12 15:06:55 -03:00
MarcoFalke
faea12ecd9 test: Fixup docs for NodeClockContext and SteadyClockContext 2026-03-12 18:13:33 +01:00
merge-script
5608b8ce9e Merge bitcoin/bitcoin#34750: test: fix addr relay test silently passing and other improvements
57bfa864fe test: use static methods and clarify comment in addr_relay (stratospher)
7ee8c0abc6 test: protect outbound connection from eviction in getaddr_test (stratospher)
ecb5ce6e76 test: fix addr relay test silent pass and wrong peerinfo index (stratospher)

Pull request description:

  couple of improvements in the addr relay test:
    - fixes the silent test pass discovered in https://github.com/bitcoin/bitcoin/pull/34717#issuecomment-3990585763 (will remove this if that PR gets merged - the test doesn't fail even though #34717 changes the behaviour)
    - correct wrong peerinfo index
    - prevent intermittent disconnection warnings like the one shown below by protecting outbound peer from `ConsiderEviction`
    ```
      TestFramework (INFO): Check that we answer getaddr messages only once per connection
      TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:58829 due to [Errno 54] Connection reset by peer
  ```
    - remove a no longer applicable test comment since we don't need to send initial GETADDR for intial self announcement anymore

ACKs for top commit:
  Bortlesboat:
    ACK 57bfa864fe. Ran both `p2p_addr_relay.py` and `p2p_addr_selfannouncement.py` locally, both pass. Good catch on the stale `peerinfo` reference in `inbound_blackhole_tests` — that would silently check the wrong peer.
  naiyoma:
    ACK  57bfa864fe
  mzumsande:
    Code Review ACK 57bfa864fe

Tree-SHA512: 22e4f87f66569bfa629a68a8b440cd21b5285c6dad6eb7926514f2d74e16fe3711525b264f82765c83020be976a0438b8d2ab1e48e7c0b7d85437ee672d52324
2026-03-12 15:06:29 +00:00
MarcoFalke
fa90b21430 test: Remove unused feature_segwit.py functions
Unused after commit c847dee148
2026-03-12 16:01:12 +01:00
MarcoFalke
fa6b05c96f test: Remove unused CUSTOM_._COUNT
Unused after commit cf3ab8e1d0
2026-03-12 16:01:12 +01:00
MarcoFalke
fa7bac94d8 test: Remove unused wait_for_addr, firstAddrnServices, on_addr
Unused after commit be25ac3092
2026-03-12 16:01:09 +01:00
MarcoFalke
fa388a3585 test: Remove unused self.p2p_conn_index = 1
Was never used
2026-03-12 16:01:06 +01:00