Commit graph

7113 commits

Author SHA1 Message Date
MarcoFalke
fa48be3ba4
test: Force named args for RPCOverloadWrapper optional args
This can avoid bugs and makes the test code easier to read, because the
order of positional args does not have to be known or assumed.
2025-04-28 15:15:05 +02:00
MarcoFalke
aaaa45399c
test: Remove unused createwallet_passthrough 2025-04-28 15:14:52 +02:00
MarcoFalke
cccc1f4e91
test: Remove unused RPCOverloadWrapper is_cli field 2025-04-28 10:18:59 +02:00
merge-script
80e6ad9e30
Merge bitcoin/bitcoin#31250: wallet: Disable creating and loading legacy wallets
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
17bb63f9f9 wallet: Disallow loading legacy wallets (Ava Chow)
9f04e02ffa wallet: Disallow creating legacy wallets (Ava Chow)
6b247279b7 wallet: Disallow legacy wallet creation from the wallet tool (Ava Chow)
5e93b1fd6c bench: Remove WalletLoadingLegacy benchmark (Ava Chow)
56f959d829 wallet: Remove wallettool salvage (Ava Chow)
7a41c939f0 wallet: Remove -format and bdb from wallet tool's createfromdump (Ava Chow)
c847dee148 test: remove legacy wallet functional tests (Ava Chow)
20a9173717 test: Remove legacy wallet tests from wallet_reindex.py (Ava Chow)
446d480cb2 test: Remove legacy wallet tests from wallet_backwards_compatibility.py (Ava Chow)
aff80298d0 test: wallet_signer.py bdb will be removed (Ava Chow)
f94f9399ac test: Remove legacy wallet unit tests (Ava Chow)
d9ac9dbd8e tests, gui: Use descriptors watchonly wallet for watchonly test (Ava Chow)

Pull request description:

  To prepare for the deletion of legacy wallet code, disable creating or loading new legacy wallets.

  Tests for the legacy wallet specifically are deleted.

  Split from https://github.com/bitcoin/bitcoin/pull/28710

ACKs for top commit:
  Sjors:
    re-ACK 17bb63f9f9
  pablomartin4btc:
    re-ACK 17bb63f9f9
  laanwj:
    re-ACK 17bb63f9f9

Tree-SHA512: d7a86df1f71f12451b335f22f7c3f0394166ac3f8f5b81f6bbf0321026e2e8ed621576656c371d70e202df1be4410b2b1c1acb5d5f0c341e7b67aaa0ac792e7c
2025-04-25 13:11:24 +01:00
MarcoFalke
facb9b327b
scripted-diff: Use bpf_cflags
-BEGIN VERIFY SCRIPT-

 ren() { sed --regexp-extended -i "s/$1/$2/g" $( git grep --extended-regexp -l "$1" ) ; }

 ren 'cflags=\["-Wno-error=implicit-function-declaration"\]' 'cflags=bpf_cflags()'

-END VERIFY SCRIPT-
2025-04-24 10:47:57 +02:00
MarcoFalke
fa0c1baaf8
test: Add imports for util bpf_cflags
This is required for the next commit.
2025-04-24 10:47:44 +02:00
Ava Chow
17bb63f9f9 wallet: Disallow loading legacy wallets
Legacy wallets do not have the descriptors flag set. Don't load wallets
without the descriptors flag.

At the same time, we will no longer load BDB databases since they are
only used for legacy wallets.
2025-04-23 12:11:56 -07:00
Ava Chow
9f04e02ffa wallet: Disallow creating legacy wallets
Remove the option to set descriptors=False when creating a wallet, and
enforce this in RPC and in CreateWallet
2025-04-23 12:11:56 -07:00
Ava Chow
6b247279b7 wallet: Disallow legacy wallet creation from the wallet tool 2025-04-23 12:10:30 -07:00
Ava Chow
7a41c939f0 wallet: Remove -format and bdb from wallet tool's createfromdump 2025-04-23 12:10:30 -07:00
Ava Chow
c847dee148 test: remove legacy wallet functional tests
Removes all legacy wallet specific functional tests.

Also removes the --descriptor and --legacy-wallet options as these are
no longer necessary with the legacy wallet removed.
2025-04-23 12:10:30 -07:00
Ava Chow
20a9173717 test: Remove legacy wallet tests from wallet_reindex.py 2025-04-23 12:10:30 -07:00
Ava Chow
446d480cb2 test: Remove legacy wallet tests from wallet_backwards_compatibility.py 2025-04-23 12:10:30 -07:00
Ava Chow
aff80298d0 test: wallet_signer.py bdb will be removed 2025-04-23 12:09:38 -07:00
Ava Chow
06439a14c8
Merge bitcoin/bitcoin#31953: rpc: Allow fullrbf fee bump in (psbt)bumpfee
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
fa86190e6e rpc: Allow fullrbf fee bump (MarcoFalke)

Pull request description:

  The RPCs (psbt)bumpfee, and the GUI, reject fee bumps when BIP 125 signalling is absent in the transaction even when the mempool and other RPCs allow them. Fix the confusion by allowing the fee bump.

  This is done after fullrbf is always on (https://github.com/bitcoin/bitcoin/pull/30592)

ACKs for top commit:
  1440000bytes:
    reACK fa86190e6e
  achow101:
    ACK fa86190e6e
  w0xlt:
    ACK fa86190e6e
  rkrux:
    reACK fa86190e6e
  glozow:
    ACK fa86190e6e

Tree-SHA512: b2ffe8dcadbe71e9be767a16cf8aa0bf383c2de7aa1aee9438d125f444e24f3f7e4f02ddb28981bd3b8b645b6a24a407b4ad6bb0b21946ae637e78f6386e05bf
2025-04-21 13:25:52 -07:00
merge-script
c7b592fbd7
Merge bitcoin/bitcoin#31247: psbt: MuSig2 Fields
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
e261eb8d50 tests: Add BIP 373 test vectors (Ava Chow)
26370c68d0 rpc: Include MuSig2 fields in decodepsbt (Ava Chow)
ff3d460898 psbt: Implement un/ser of musig2 fields (Ava Chow)

Pull request description:

  Implements un/serialization of MuSig2 PSBT fields and prepares PSBT to be able to sign for MuSig2 inputs.

  Split from #29675

ACKs for top commit:
  fjahr:
    re-ACK e261eb8d50
  theStack:
    re-ACK e261eb8d50
  rkrux:
    tACK e261eb8d50

Tree-SHA512: bb852ad074978847ac4dc656332025e2d4d1025d4283537b89618c7cadd61a8ecd2eff24779b8a014bc8d7b431125060449768192fa05ad0577f29e3c64b2374
2025-04-18 16:44:33 -04:00
Ava Chow
e261eb8d50 tests: Add BIP 373 test vectors 2025-04-17 16:31:57 -07:00
merge-script
bfeacc18b3
Merge bitcoin/bitcoin#32154: fuzz: Avoid integer sanitizer warnings in policy_estimator target
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
fa6a007b8e fuzz: Avoid integer sanitizer warnings in policy_estimator target (MarcoFalke)

Pull request description:

  It seems odd to write a fuzz target to trigger integer sanitizer warnings in `CBlockPolicyEstimator::processBlockTx` and then suppress them. If the scenario can happen in reality, the code should be properly fixed to handle the cases. If not, it seems better to fix the fuzz target to not trigger meaningless traces.

  Do that here by keeping track of the current height and limiting mempool entries to at most this entry height.

ACKs for top commit:
  brunoerg:
    ACK fa6a007b8e
  dergoegge:
    utACK fa6a007b8e

Tree-SHA512: 2092017dc309fb095fe5d43cfb76efb691795f303d567ee919be2b5cac19a944293636229903dc4d1e8b9fe5daf9dc3058544321eff1735f91f804c3baa36cd0
2025-04-17 13:34:53 +01:00
MarcoFalke
fa86190e6e
rpc: Allow fullrbf fee bump
Also, fix the incorrect documention of the 'replaceable' RPC argument
with respect to sequence number handling. The docs were incorrect
before, so the fix could be extracted, but it seems fine to include here
as well.
2025-04-17 13:12:26 +02:00
Ava Chow
b6282dbd45
Merge bitcoin/bitcoin#32079: test: Add test coverage for rpcwhitelistdefault when unset
2929da1dd5 test: Add coverage for rpcwhitelistdefault when unset (naiyoma)
535b874707 test: Combine rpcwhitelistdefault functions (naiyoma)
2b6ce9254d test: Update permissions and string formatting (naiyoma)

Pull request description:

  This is a follow-up PR to address review feedback from [https://github.com/bitcoin/bitcoin/pull/29858](https://github.com/bitcoin/bitcoin/pull/29858)

  - [x]  add  case where rpcwhitelistdefault setting is [unset](https://github.com/bitcoin/bitcoin/pull/29858#pullrequestreview-2532726241)
  - [x] Code [cleanup](https://github.com/bitcoin/bitcoin/pull/29858#discussion_r1927238617) , change password and f-string formatting
  - [x] [Combine](https://github.com/bitcoin/bitcoin/pull/29858#discussion_r1930137601) rpcwhitelistdefault tests into `test_rpcwhitelistdefault_permissions`
  I am not sure if my approach of adding` test_rpcwhitelistdefault_unset` is better or if I should just include the assertions in the existing `test_rpcwhitelistdefault_permissions`

ACKs for top commit:
  w0xlt:
    Code review ACK 2929da1dd5
  achow101:
    ACK 2929da1dd5
  ryanofsky:
    Code review ACK 2929da1dd5. Only change since last review was simplifying the last commit as suggested

Tree-SHA512: 6750dd3e6abaca3a09ad1fd5d07c64767bc59188ff953cbc26aa7796071774cb92745ac82cf91e479632d682fd450bc00d53032454b65b22654a3e770ec68e89
2025-04-16 16:24:01 -07:00
Brandon Odiwuor
a4041c77f0 test: Handle empty string returned by CLI as None in RPC tests 2025-04-16 14:18:48 +03:00
merge-script
b2bb27f40c
Merge bitcoin/bitcoin#31741: multiprocess: Add libmultiprocess git subtree
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
babb9f5db6 depends: remove non-native libmultiprocess build (Cory Fields)
5d105fb8c3 depends: Switch libmultiprocess packages to use local git subtree (Ryan Ofsky)
9b35518d2f depends, moveonly: split up int_get_build_id function (Ryan Ofsky)
2d373e2707 lint: Add exclusions for libmultiprocess subtree (Ryan Ofsky)
e88ab394c1 doc: Update documentation to explain libmultiprocess subtree (Ryan Ofsky)
d4bc563982 cmake: Fix clang-tidy "no input files" errors (Ryan Ofsky)
abdf3cb645 cmake: Fix warnings from boost headers (Ryan Ofsky)
8532fcb1c3 cmake: Fix ctest mptest "Unable to find executable" errors (Ryan Ofsky)
d597ab1dee cmake: Support building with libmultiprocess subtree (Ryan Ofsky)
69f0d4adb7 scripted-diff: s/WITH_MULTIPROCESS/ENABLE_IPC/ in cmake (Ryan Ofsky)
a2f28e4be9 Squashed 'src/ipc/libmultiprocess/' content from commit 35944ffd23fa (Ryan Ofsky)
d6244f85c5 depends: Update libmultiprocess library to simplify cmake subtree build (Ryan Ofsky)

Pull request description:

  This adds the [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) library and code generator as a subtree in `src/ipc/libmultiprocess` and allows it to be built with the cmake `-DENABLE_IPC` option, which is disabled by default.

  This PR does not entirely remove the depends system [libmultiprocess package](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/native_libmultiprocess.mk) because the package is useful when cross compiling. (A cross-compiling cmake build cannot easily build and run a native code generation tool.) However, it does update the depends package to build from the new git subtree, instead of being downloaded separately from github, so the same sources are used to build both the runtime library and the code generator.

  This PR includes the following manual changes (not created automatically with `git subtree add`) which just update the build system and documentation:

  - [`d6244f85c509` depends: Update libmultiprocess library to simplify cmake subtree build](d6244f85c5)
  - [`69f0d4adb72c` scripted-diff: s/WITH_MULTIPROCESS/ENABLE_IPC/ in cmake](69f0d4adb7)
  - [`d597ab1dee6b` cmake: Support building with libmultiprocess subtree](d597ab1dee)
  - [`8532fcb1c30d` cmake: Fix ctest mptest "Unable to find executable" errors](8532fcb1c3)
  - [`abdf3cb6456f` cmake: Fix warnings from boost headers](abdf3cb645)
  - [`d4bc5639829f` cmake: Fix clang-tidy "no input files" errors](d4bc563982)
  - [`e88ab394c163` doc: Update documentation to explain libmultiprocess subtree](e88ab394c1)
  - [`2d373e27071f` lint: Add exclusions for libmultiprocess subtree](2d373e2707)
  - [`9b35518d2f3f` depends, moveonly: split up int_get_build_id function](9b35518d2f)
  - [`5d105fb8c3ff` depends: Switch libmultiprocess packages to use local git subtree](5d105fb8c3)
  - [`babb9f5db641` depends: remove non-native libmultiprocess build](babb9f5db6)

  ---

  Previous minisketch subtree PR #23114 may be useful for comparison

  Instructions for subtree verification can be found:

  - https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees
  - https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh

  TL&DR:

  ```sh
  git remote add --fetch libmultiprocess https://github.com/chaincodelabs/libmultiprocess.git
  test/lint/git-subtree-check.sh -r src/ipc/libmultiprocess
  ```

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).

ACKs for top commit:
  Sjors:
    re-ACK babb9f5db6
  TheCharlatan:
    tACK babb9f5db6
  vasild:
    ACK babb9f5db6

Tree-SHA512: 43d4eecca5aab63e55c613de935965666eaced327f9fe859a0e9c9b85f7685dc16c5c8d6e03e09ca998628c5d468633f4f743529930b037049abe8e0101e0143
2025-04-11 13:40:31 +01:00
Ava Chow
b8cefeb221
Merge bitcoin/bitcoin#32149: wallet, migration: Fix empty wallet crash
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
0f602c5693 wallet, migration: Fix crash on empty wallet (pablomartin4btc)
42c13141b5 wallet, refactor: Decouple into HasLegacyRecords() (pablomartin4btc)

Pull request description:

  Same as with a blank wallet (#28976), wallets with no legacy records (i.e. empty, non-blank, watch-only wallet) do not require to be migrated.

  Steps to reproduce the issue:

  1.- `createwallet "empty_wo_noblank_legacy_wallet" true false "" false false`
  2.- `migratewallet`

  ```
  wallet/wallet.cpp:4071 GetDescriptorsForLegacy: Assertion `legacy_spkm' failed.
  Aborted (core dumped)
  ```

ACKs for top commit:
  davidgumberg:
    untested reACK 0f602c5693
  fjahr:
    re-ACK 0f602c5693
  achow101:
    ACK 0f602c5693
  furszy:
    ACK 0f602c5693
  BrandonOdiwuor:
    Code Review ACK 0f602c5693

Tree-SHA512: 796c3f0b1946281097f7ffc3563bc79f879e80a98237012535cc530a4a2239fd2d71a17b4f54e30258886dc9f0b83206d7a5d50312e4fc6d0abe4f559fbe07ec
2025-04-09 17:50:48 -07:00
Ryan Ofsky
ff5b7b0b0a
Merge bitcoin/bitcoin#32214: test: Remove fragile and ancient release 0.17 wallet test
fac978fb21 test: Remove fragile and ancient release 0.17 wallet test (MarcoFalke)

Pull request description:

  The test checks that the 0.17 wallet rejects wallet files created in "the future".

  This is nice, and good to know. However,

  * The 0.17 release is ancient and should be unused outside of tests, especially to load future wallets.
  * The test intermittently fails, due to ancient RPC server bugs, that were fixed in the meantime. [1]
  * Albeit they are not identical, the 0.18 release is still checked in this test, so any theoretical bug that would be caught by 0.17 is hopefully still caught by 0.18 as well.

  So fix all issues by removing the test case.

  [1] For example from https://api.cirrus-ci.com/v1/task/6161588714995712/logs/ci.log:

  ```
  190/321 - [1mwallet_backwards_compatibility.py --descriptors[0m failed, Duration: 23 s
  [17:21:40.700]
  [17:21:40.700] [1mstdout:
  [17:21:40.700] [0m2025-04-02T21:21:16.575000Z TestFramework (INFO): PRNG seed is: 5772716217847090743
  [17:21:40.700] 2025-04-02T21:21:16.580000Z TestFramework (INFO): Initializing test directory /ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20250402_210134/wallet_backwards_compatibility_134
  [17:21:40.700] 2025-04-02T21:21:26.378000Z TestFramework (INFO): Test wallet backwards compatibility...
  [17:21:40.700] 2025-04-02T21:21:33.191000Z TestFramework (INFO): Testing 0.19 addmultisigaddress case (#18075)
  [17:21:40.700] 2025-04-02T21:21:33.637000Z TestFramework (INFO): Test that a wallet made on master can be opened on:
  [17:21:40.700] 2025-04-02T21:21:33.637000Z TestFramework (INFO): - 250000
  [17:21:40.700] 2025-04-02T21:21:34.055000Z TestFramework (INFO): - 240001
  [17:21:40.700] 2025-04-02T21:21:34.435000Z TestFramework (INFO): - 230000
  [17:21:40.700] 2025-04-02T21:21:34.858000Z TestFramework (INFO): - 220000
  [17:21:40.700] 2025-04-02T21:21:35.614000Z TestFramework (INFO): - 210000
  [17:21:40.700] 2025-04-02T21:21:35.707000Z TestFramework (INFO): Test descriptor wallet incompatibility on:
  [17:21:40.700] 2025-04-02T21:21:35.707000Z TestFramework (INFO): - 200100
  [17:21:40.700] 2025-04-02T21:21:35.878000Z TestFramework (INFO): - 190100
  [17:21:40.700] 2025-04-02T21:21:36.021000Z TestFramework (INFO): - 180100
  [17:21:40.700] 2025-04-02T21:21:36.319000Z TestFramework (INFO): Test descriptor wallet incompatibility with 0.17
  [17:21:40.700] 2025-04-02T21:21:37.328000Z TestFramework (INFO): Test that 0.21 cannot open wallet containing tr() descriptors
  [17:21:40.700] 2025-04-02T21:21:37.356000Z TestFramework (INFO): Test that a wallet can upgrade to and downgrade from master, from:
  [17:21:40.700] 2025-04-02T21:21:37.361000Z TestFramework (INFO): - 250000
  [17:21:40.700] 2025-04-02T21:21:37.665000Z TestFramework (INFO): - 240001
  [17:21:40.700] 2025-04-02T21:21:37.970000Z TestFramework (INFO): - 230000
  [17:21:40.700] 2025-04-02T21:21:38.439000Z TestFramework (INFO): - 220000
  [17:21:40.700] 2025-04-02T21:21:38.793000Z TestFramework (INFO): - 210000
  [17:21:40.700] 2025-04-02T21:21:39.470000Z TestFramework (INFO): Stopping nodes
  [17:21:40.700]
  [17:21:40.700]
  [17:21:40.700] [1mstderr:
  [17:21:40.700] [0mTraceback (most recent call last):
  [17:21:40.700]   File "/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/test/functional/wallet_backwards_compatibility.py", line 389, in <module>
  [17:21:40.700]     BackwardsCompatibilityTest(__file__).main()
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/test_framework.py", line 206, in main
  [17:21:40.700]     exit_code = self.shutdown()
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/test_framework.py", line 379, in shutdown
  [17:21:40.700]     self.stop_nodes()
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/test_framework.py", line 643, in stop_nodes
  [17:21:40.700]     node.stop_node(wait=wait, wait_until_stopped=False)
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/test_node.py", line 397, in stop_node
  [17:21:40.700]     self.stop()
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/coverage.py", line 50, in __call__
  [17:21:40.700]     return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/authproxy.py", line 132, in __call__
  [17:21:40.700]     response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/authproxy.py", line 106, in _request
  [17:21:40.700]     return self._get_response()
  [17:21:40.700]   File "/ci_container_base/test/functional/test_framework/authproxy.py", line 169, in _get_response
  [17:21:40.700]     http_response = self.__conn.getresponse()
  [17:21:40.700]   File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse
  [17:21:40.700]     response.begin()
  [17:21:40.700]   File "/usr/lib/python3.10/http/client.py", line 318, in begin
  [17:21:40.700]     version, status, reason = self._read_status()
  [17:21:40.700]   File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
  [17:21:40.700]     raise RemoteDisconnected("Remote end closed connection without"
  [17:21:40.700] http.client.RemoteDisconnected: Remote end closed connection without response
  [17:21:40.700] [node 10] Cleaning up leftover process
  [17:21:40.700] [node 9] Cleaning up leftover process
  [17:21:40.700] [node 8] Cleaning up leftover process
  [17:21:40.700] [node 7] Cleaning up leftover process
  [17:21:40.700] [node 6] Cleaning up leftover process
  [17:21:40.700] [node 5] Cleaning up leftover process
  [17:21:40.700] [node 4] Cleaning up leftover process
  [17:21:40.700] [node 3] Cleaning up leftover process
  [17:21:40.700] [node 2] Cleaning up leftover process
  [17:21:40.700] [node 1] Cleaning up leftover process
  [17:21:40.700] [node 0] Cleaning up leftover process

ACKs for top commit:
  laanwj:
    Code review ACK fac978fb21
  janb84:
    Re ACK [fac978f](fac978fb21)
  pablomartin4btc:
    re ACK fac978fb21
  BrandonOdiwuor:
    Code Review ACK fac978fb21

Tree-SHA512: 13acdfc6be4293a0ff45ae20b26ba60636e130097da380b7b51716faaa950320462399bef55e74b3cedc82944586dcc1bfd078babb96edb03c4efdb8f40af5a4
2025-04-08 17:03:48 -04:00
Ryan Ofsky
ad0eee5492
Merge bitcoin/bitcoin#32139: test: remove strict restrictions on rpc_deprecated test
459807d566 test: remove strict restrictions on rpc_deprecated (Pol Espinasa)

Pull request description:

  Removed the wallet restrictions for `rpc_deprecated.py` and added specific test case for the current deprecated rpc.
  `skip_test_if_missing_module` will skip the whole test when the wallet is missing, even if a part of the test is non-wallet related. This PR ensures that other tests not related to wallet can be ran and only this specific test will be skipped if there's no wallet

  For more context check https://github.com/bitcoin/bitcoin/pull/31278#discussion_r2011661090

ACKs for top commit:
  maflcko:
    lgtm ACK 459807d566
  rkrux:
    ACK 459807d

Tree-SHA512: 922b0fafe8fb5bd88a677ce8be5c3fe2fdd4d0aadcd32cc11738a714cd6f765f07e7e7158c829f8338db0d46a15c030437a1ea09a3187c072bebebb4ca53ad85
2025-04-08 15:41:48 -04:00
Ryan Ofsky
24d5033a62
Merge bitcoin/bitcoin#32114: test: Add encodable PUSHDATA1 examples to feature_taproot
f974359e21 test: Add encodable PUSHDATA1 examples to feature_taproot (Greg Sanders)

Pull request description:

  Inspired by discussion in https://github.com/bitcoin/bitcoin/pull/31640#issuecomment-2743492906 I made an example adding coverage I think is missing, with some extra commentary that might help future contributors (including myself when I forget how it works again).

  Open for suggestions how we can make it more welcoming beyond this.

  cc darosior EthanHeilman sipa

ACKs for top commit:
  janb84:
    Re-ACK [f974359](f974359e21)
  rkrux:
    ACK f974359e21

Tree-SHA512: 7544d41c39c13d245a8a33522e53f22b4dd7593c069631978303e5a349cd12cf9d45bed648c391618c4732831232c4b82b8de2bf6cba5bf5e1232501db926122
2025-04-08 15:08:52 -04:00
pablomartin4btc
0f602c5693 wallet, migration: Fix crash on empty wallet
Same as with a blank wallet, wallets with no legacy
records (i.e. empty, non-blank, watch-only wallet)
do not require to be migrated.
2025-04-04 17:38:41 -03:00
merge-script
65dcbec756
Merge bitcoin/bitcoin#32209: test: Preserve llvm profile path
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Has been cancelled
CI / macOS 14 native, arm64, fuzz (push) Has been cancelled
CI / Windows native, VS 2022 (push) Has been cancelled
CI / Windows native, fuzz, VS 2022 (push) Has been cancelled
CI / Linux->Windows cross, no tests (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
CI / Windows, test cross-built (push) Has been cancelled
c5a7ffd1e8 preserve llvm profile env (Prabhat Verma)

Pull request description:

  While generating `profraw` for fuzz tests using steps in [PR 32206](https://github.com/bitcoin/bitcoin/pull/32206) , the profraw was not being built at the desired location and only one `default.profraw` was being created which was being overwritten for multiple fuzz targets. This PR fixes that.

ACKs for top commit:
  maflcko:
    lgtm ACK c5a7ffd1e8
  mabu44:
    ACK c5a7ffd1e8

Tree-SHA512: 11f74caa8cba6f841aa899a5e294f658aed1b6a3d4cf68992609ea99fadb4a092b2350ffacea5c2d5eb377eb10082de018f27a1d6486a72460cb3905aaa15664
2025-04-04 15:42:52 +08:00
Prabhat Verma
c5a7ffd1e8 preserve llvm profile env
Signed-off-by: Prabhat Verma <prabhatverma329@gmail.com>
2025-04-03 21:02:21 +05:30
MarcoFalke
fac978fb21
test: Remove fragile and ancient release 0.17 wallet test 2025-04-03 14:34:06 +02:00
merge-script
639279e86a
Merge bitcoin/bitcoin#30997: build: Switch to Qt 6
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
f00345727b doc: Update `dependencies.md` for Qt 6 (Hennadii Stepanov)
80b917991e build, msvc: Update `vcpkg.json` for Qt 6 (Hennadii Stepanov)
30dd1f1644 ci: Update for Qt 6 (Hennadii Stepanov)
629d292f4d test: Update sanitizer suppressions for Qt 6 (Hennadii Stepanov)
551e13abf8 guix: Adjust for Qt 6 (Hennadii Stepanov)
c3e9bd086c qt: Fix compiling for Windows (Hennadii Stepanov)
ab399c4db2 depends: Add `native_qt` package (Hennadii Stepanov)
248613eb3e depends: Factor out Qt modules' details (Hennadii Stepanov)
0268f52a4c depends: Introduce customizable `$(package)_patches_path` variables (Hennadii Stepanov)
5e794e6202 depends: Bump `qt` package up to 6.7.3 (Hennadii Stepanov)
6d4214925f cmake: Require Qt 6 to build GUI (Hennadii Stepanov)

Pull request description:

  The currently used Qt 5.15 is approaching [EOL](https://www.qt.io/blog/qt-5.15-extended-support-for-subscription-license-holders) and will reach it before the Bitcoin Core v30 release. The recent migration of the build system to CMake makes it possible to switch to Qt 6.

  This PR updates the OS runtime compatibility requirements for the Bitcoin Core GUI as follows:

  ### 1. Linux

  Starting with Qt 6.5.0, the `libxcb-cursor0` package is required to be installed at runtime.

  ### 2. Windows

  Cross-compiling does not support LTO. We have to re-add it in a follow-up.

  A new style plugin causes minor visual glitches, such as
  ![image](https://github.com/user-attachments/assets/e06f8685-aa79-49e7-9e61-4d54563f6d04)
  which will be fixed in follow-ups.

  ### 3. macOS

  `bitcoin-qt` now uses the [Metal](https://developer.apple.com/metal/) backend.

  ---

  **IMPORTANT.** Don't forget to install [Ninja](https://ninja-build.org/).

  ---

  For historical context, please refer to:
  - https://github.com/bitcoin/bitcoin/issues/20627
  - https://github.com/bitcoin/bitcoin/pull/24798

  ---

  UPD 2024-10-09. Qt 6.8 has been [released](https://www.qt.io/blog/qt-6.8-released), but it has some [drawbacks](https://github.com/bitcoin/bitcoin/pull/30997#issuecomment-2402990346) for us. As a result, this PR will stick to Qt 6.7.

  UPD 2025-03-18: [Standard support for Qt 5.15 will end after 26th of May 2025](https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025)

ACKs for top commit:
  laanwj:
    re-ACK f00345727b
  hodlinator:
    re-ACK f00345727b

Tree-SHA512: 367f722e6c3ea4700b5395871c40b6df8c8062fdc822107090449ea4ae4ad2db75cc53a982a678f4c48ce8f9b2d43ed10e6d23b06165ab78713f161db712d895
2025-04-02 21:41:16 +08:00
Ryan Ofsky
2d373e2707 lint: Add exclusions for libmultiprocess subtree
Without this change linter produces errors about:

- Use of std::filesystem the libmultiprocess example program.
- Use of locale-dependent functions in example program, in the build time code
  generator, and in the runtime library for debug logging.
- Include guards not beginning with BITCOIN_
2025-04-02 08:41:16 -05:00
Hennadii Stepanov
629d292f4d
test: Update sanitizer suppressions for Qt 6 2025-04-02 09:15:13 +01:00
John Bampton
4774a0c923 test: fix spelling in Python code comment 2025-04-02 07:20:41 +10:00
Pol Espinasa
459807d566
test: remove strict restrictions on rpc_deprecated
Removed the wallet restrictions for rpc_deprecated.py and added specific test case for the current deprecated rpc.
skip_test_if_missing_module will skip the whole test when the wallet is missing, even if a part of the test is non-wallet related.
2025-04-01 21:40:27 +02:00
merge-script
1a6fc04d81
Merge bitcoin/bitcoin#29500: test: create assert_not_equal util
Some checks are pending
CI / test each commit (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
7bb83f6718 test: create assert_not_equal util and add to where imports are needed (kevkevin)

Pull request description:

  In the functional tests there are lots of cases where we assert != which we now swap with assert_not_equal to be more readable

  This is motivated/uses logic from this PR which was closed https://github.com/bitcoin/bitcoin/pull/28528
  This partially helps https://github.com/bitcoin/bitcoin/issues/23119

  I've broken it up to just `assert_not_equal` to keep the PR smaller as suggested in https://github.com/bitcoin/bitcoin/pull/28528#issuecomment-1959945805

  I can create follow up PR's if this is wanted

ACKs for top commit:
  hodlinator:
    re-ACK 7bb83f6718
  ryanofsky:
    Code review ACK 7bb83f6718. Only change since last review is fixing error message formatting and passing it as a keyword argument
  janb84:
    Re-ACK [7bb83f6](7bb83f6718)

Tree-SHA512: de09f41a690033a5b61e6f861d3bd69a32b889d6655a28fbc0d5cfac9f7ec9c642432967d33913970882b4cfdd47bdd377d0ddc44e25976cbaa49f7f9d8f7b10
2025-04-01 13:52:41 -04:00
Ryan Ofsky
80e47b1920
Merge bitcoin/bitcoin#32096: Move some tests and documentation from testnet3 to testnet4
aa7a898c23 doc: use testnet4 in developer docs (Sjors Provoost)
6c217d22fd test: use testnet4 in argsman test (Sjors Provoost)
7c200ece80 test: use testnet4 in key_io_valid.json (Sjors Provoost)
d424bd5941 test: drop unused testnet3 magic bytes (Sjors Provoost)
8cfc09fafe test: cover testnet4 magic in assumeutxo.py (Sjors Provoost)
4281e3603a zmq: use testnet4 in zmq_sub.py example (Sjors Provoost)

Pull request description:

  In preparation for dropping testnet3 entirely in #31974 this PR migrates a few things to testnet4:

  * the ZMQ examples
  * developer docs
  * various unit tests
  * the snapshot magic byte check in `feature_assumeutxo.py`

  It drops `testnet3` from `MAGIC_BYTES` in the test framework, since no test uses it.

ACKs for top commit:
  fjahr:
    re-ACK aa7a898c23
  maflcko:
    lgtm ACK aa7a898c23 🔊
  hodlinator:
    re-ACK aa7a898c23

Tree-SHA512: 235f74273234e8fb2aedf0017dea5c16bb9813ec7a1f89a51abe85691f09830a5ead834115d7db0936e12e55a40bc81888856a8002fe507c1474407e77f8b9fb
2025-04-01 11:54:41 -04:00
kevkevin
7bb83f6718
test: create assert_not_equal util and add to where imports are needed
In the functional tests there are lots of cases where we assert != which
this new util will replace, we also are adding the imports and the new assertion
2025-04-01 08:39:24 -04:00
naiyoma
2929da1dd5 test: Add coverage for rpcwhitelistdefault when unset 2025-04-01 15:11:15 +03:00
Greg Sanders
f974359e21 test: Add encodable PUSHDATA1 examples to feature_taproot 2025-03-31 08:19:10 -04:00
merge-script
e3c4bb12ba
Merge bitcoin/bitcoin#32058: test: get rid of redundant TODO tag
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
d065208f0f test: get rid of redundant TODO tag (Chandra Pratap)

Pull request description:

  The `FEE` parameter in `test/functional/feature_dbcrash.py::generate_small_transaction()` is not a fee rate, but an absolute fee. Hence, it doesn't make sense to replace it with node relay based fee calculation. Get rid of the TODO comment suggesting otherwise.

ACKs for top commit:
  maflcko:
    lgtm ACK d065208f0f

Tree-SHA512: f2b7f51ffb23de8e14ca071edd731410176a20750115a65db0ae67714389e03ffe1593ce88368e96d211329bd93c772f665de7c3a59b932681bc5b80db908d9f
2025-03-28 10:07:55 +08:00
Ryan Ofsky
930b237f16
Merge bitcoin/bitcoin#31874: qa wallet: Activate dormant checks in wallet_multisig_descriptor_psbt.py
35d17cd5ee qa wallet: Actually make use of expressions (Hodlinator)

Pull request description:

  Conditions had virtually no effect, lets activate them.

ACKs for top commit:
  maflcko:
    lgtm ACK 35d17cd5ee
  ryanofsky:
    Code review ACK 35d17cd5ee
  l0rinc:
    ACK 35d17cd5ee

Tree-SHA512: 852e325714e4f3083e28ef1a91c68250ee536d1c0ed09cac15d2ea74d47cefeffba19df4efe3d25d359ec8bc1588ce5bcf263efbcc2b392d102f5ff5c90307d4
2025-03-27 16:18:52 -04:00
Ryan Ofsky
74c23f80ab
Merge bitcoin/bitcoin#32145: test: Add functional test for bitcoin-chainstate
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
ca55613fd1 test: Add functional test for bitcoin-chainstate (TheCharlatan)
3f9c716e7f test: Fix docstring for cmake migration (TheCharlatan)

Pull request description:

  While the `bitcoin-chainstate` utility is not shipped in a release, it is the only current utility directly using the bitcoin kernel library. Adding a simple test for it is useful for checking that the library is actually usable. The test is also useful in future to demonstrate that the `bitcoin-chainstate` binary using the API for the kernel library introduced in #30595 actually works and offers similar features.

ACKs for top commit:
  laanwj:
    Code review ACK ca55613fd1
  maflcko:
    ACK ca55613fd1 🎭
  kevkevinpal:
    ACK ca55613fd1

Tree-SHA512: 282627f5fac868a84aab9962ef2cbd3a8d3941d9f9dc2a3f26db1e7706ffa8051637ab5f8372676800e426e077ca40449a9e3e42a003048472339d81ed81bca8
2025-03-27 11:02:01 -04:00
Ryan Ofsky
bcb316bd88
Merge bitcoin/bitcoin#32050: test: avoid treating hash results as integers
a82829f37e test: simplify (w)txid checks by avoiding .calc_sha256 calls (Sebastian Falbesoner)
346a099fc1 test: avoid unneeded hash -> uint256 -> hash roundtrips (Sebastian Falbesoner)

Pull request description:

  In the functional test framework we currently have a strong tendency to treat and store identifiers that result from hash functions (e.g. (w)txids, block hashes) as integers, which seems an unnatural and confusing choice. Hashes are just pseudo-random sequences of bytes, and there is usually no need to apply integer operations on them; the only exceptions I could think of is PoW-verification of block hashes with the less-than (`<`) operator, or interpreting the byte-string as scalar in the EC-context for e.g. key derivation.

  I'd hence argue that most uses of `ser_uint256`/`uint256_from_str` and txid conversions via `int(txid/blockhash, 16)` are potential code smells and should be reduced to a minimum long-term if possible. This PR is a first step into this direction, intentionally kept small with (what I think) uncontroversial changes for demonstration purposes, to check out if other contributors are interested in this. A next step could be to change the classes of primitives (CTransaction, CBlock etc.) and network messages (msg_) to store hash results as actual bytes (maybe in a class wrapping the bytes that offers conversion from/to human-readable strings [1], for easier interaction with RPC calls and debug outputs) rather than ints. But that would of course need larger, potentially more controversial changes, and its questionable if its really worth the effort.

  [1] unfortunately, txids and block hashes are shown to user in reverse byte order, so e.g. a txid_bytes->txid_str conversion is not just a simple `txid_bytes.hex()`, but a `txid_bytes[::-1].hex()`

ACKs for top commit:
  maflcko:
    review ACK a82829f37e 🐘
  rkrux:
    Concept and utACK a82829f37e
  ryanofsky:
    Code review ACK a82829f37e. Nice changes, and sorry about the false bug report

Tree-SHA512: bb0465802d743a495207800f922b65f49ed0d20552f95bb0bee764944664092aad74812e29df6e01ef40bcb8f9bc6c84c7e9cbbe6f008ee1a14d94ed88e698b4
2025-03-27 10:30:41 -04:00
MarcoFalke
fa6a007b8e
fuzz: Avoid integer sanitizer warnings in policy_estimator target 2025-03-27 11:54:39 +01:00
merge-script
b131e1bfc0
Merge bitcoin/bitcoin#32101: Accept unordered tracepoints in interface_usdt_utxocache.py
248fdd88dc test: accept unordered tracepoints in... (willcl-ark)

Pull request description:

  We have encountered an instance where the tracepoints were not collected in the same order they were fired (#31951).

  Tracepoint ordering is not guaranteed in userspace for a number of reasons.

  As this test does not require a strict collection/processing order collect `expected` and `actual` events into dicts and compare them.

  This will gracefully handle both the number of events, and out-of-order events should they reoccur in the future.

  Fixes: #31951

ACKs for top commit:
  0xB10C:
    re-ACK 248fdd88dc
  laanwj:
    Code review ACK 248fdd88dc

Tree-SHA512: 78d1aa936194d386d919ed26133aac3af5fc6d3d0b1fe1e767288d9e6226e2c701d640e71e994a63ccd48344bd2a0db508cb353cdd5ce1f644cd6f7313654623
2025-03-27 15:50:57 +08:00
merge-script
5dd6ebc7e1
Merge bitcoin/bitcoin#32148: test: fix intermittent timeout in p2p_ibd_stalling.py
9f35d4d070 test: fix intermittent timeout in p2p_ibd_stalling.py (Martin Zumsande)

Pull request description:

  After sending the headers message add a sync, so that we wait until the header message from the previous peer has been received before connecting additional peers.
  In the failed NetBSD run linked in #32090, the second node managed to complete the handshake and send its own headers message before the message from the first node was received.

  Fixes #32090

ACKs for top commit:
  maflcko:
    lgtm ACK 9f35d4d070

Tree-SHA512: 30a98c6ec04f819c892ab5ce76a309df81b3a4644be021f938eefddbd00ec4141e055c3cf735c9e04ce2fe9e950470a99d54cb6be43230110348a802a6a6c252
2025-03-27 15:42:18 +08:00
Martin Zumsande
9f35d4d070 test: fix intermittent timeout in p2p_ibd_stalling.py
by adding a sync, so that we wait until the header message from the
previous peer has been received before connecting additional peers.
2025-03-26 13:22:07 -04:00
Chandra Pratap
d065208f0f test: get rid of redundant TODO tag
The 'FEE' parameter in test/functional/feature_dbcrash.py::
generate_small_transaction() is not a fee rate, but an
absolute fee. Hence, it doesn't make sense to replace it
with node relay based fee calculation. Get rid of the TODO
comment suggesting otherwise.
2025-03-26 16:44:48 +00:00
willcl-ark
248fdd88dc
test: accept unordered tracepoints in...
...interface_usdt_utxocache.py

We have encountered an instance where the tracepoints were not collected
in the same order they were fired (#31951).

Tracepoint ordering is not guaranteed in userspace for a number of
reasons.

As this test does not require a strict collection/processing order
collect `expected` and `actual` events into dicts and compare them.

This will gracefully handle both the number of events, and out-of-order
events should they reoccur in the future.
2025-03-26 14:13:09 +00:00