qa: feature_pruning.py fails when built ENABLE_WALLET=OFF #34175

issue hebasto openend this issue on December 29, 2025
  1. hebasto commented at 6:46 pm on December 29, 2025: member

    Below are the steps to reproduce the bug:

     0$ cmake -B build -DENABLE_WALLET=OFF
     1$ cmake --build build
     2$ ./build/test/functional/feature_pruning.py --tmpdir $(pwd)/tmp
     32025-12-29T18:31:27.385714Z TestFramework (INFO): PRNG seed is: 6842027149269818275
     42025-12-29T18:31:27.386337Z TestFramework (INFO): Initializing test directory /home/hebasto/dev/bitcoin/tmp
     52025-12-29T18:31:28.135416Z TestFramework (INFO): Warning! This test requires 4GB of disk space
     62025-12-29T18:31:28.135533Z TestFramework (INFO): Mining a big blockchain of 995 blocks
     72025-12-29T18:31:49.087269Z TestFramework (INFO): Check that we haven't started pruning yet because we're below PruneAfterHeight
     82025-12-29T18:31:49.087331Z TestFramework (INFO): Success
     92025-12-29T18:31:49.087425Z TestFramework (INFO): Though we're already using more than 550MiB, current usage: 592.1861515045166
    102025-12-29T18:31:49.087446Z TestFramework (INFO): Mining 25 more blocks should cause the first block file to be pruned
    112025-12-29T18:31:49.917042Z TestFramework (INFO): Success
    122025-12-29T18:31:49.917238Z TestFramework (INFO): Usage should be below target: 480.3139057159424
    132025-12-29T18:31:49.917265Z TestFramework (INFO): Check that we'll exceed disk space target if we have a very high stale block rate
    142025-12-29T18:31:49.917287Z TestFramework (INFO): Mine 24 (stale) blocks on Node 1, followed by 25 (main chain) block reorg from Node 0, for 12 rounds
    152025-12-29T18:32:23.946016Z TestFramework (INFO): Usage can be over target because of high stale rate: 640.085205078125
    162025-12-29T18:32:23.947212Z TestFramework (INFO): Check that we can survive a 288 block reorg still
    172025-12-29T18:32:23.947673Z TestFramework (INFO): Current block height: 1320
    182025-12-29T18:32:23.948098Z TestFramework (INFO): Invalidating block 170863767faea392ccf9ff5b962cc758ebe9991b2562af2f3aa044c321d175e2 at height 1033
    192025-12-29T18:32:24.322179Z TestFramework (INFO): New best height: 1032
    202025-12-29T18:32:24.429004Z TestFramework (INFO): Generating new longer chain of 300 more blocks
    212025-12-29T18:32:24.562884Z TestFramework (INFO): Reconnect nodes
    222025-12-29T18:32:25.769411Z TestFramework (INFO): Verify height on node 2: 1332
    232025-12-29T18:32:25.769654Z TestFramework (INFO): Usage possibly still high because of stale blocks in block files: 640.085205078125
    242025-12-29T18:32:25.769682Z TestFramework (INFO): Mine 220 more large blocks so we have requisite history
    252025-12-29T18:32:32.175362Z TestFramework (INFO): Usage should be below target: 448.4003086090088
    262025-12-29T18:32:32.175530Z TestFramework (INFO): Test that we can rerequest a block we previously pruned if needed for a reorg
    272025-12-29T18:32:33.817865Z TestFramework (INFO): Will need to redownload block 1033
    282025-12-29T18:32:33.938875Z TestFramework (INFO): Rewind node 0 to prev main chain to mine longer chain to trigger redownload. Blocks needed: 233
    292025-12-29T18:32:35.807399Z TestFramework (INFO): Verify node 2 reorged back to the main chain, some blocks of which it had to redownload
    302025-12-29T18:32:38.244340Z TestFramework (INFO): Test manual pruning with block indices
    312025-12-29T18:32:39.327901Z TestFramework (INFO): Success
    322025-12-29T18:32:39.327948Z TestFramework (INFO): Test manual pruning with timestamps
    332025-12-29T18:32:40.410622Z TestFramework (INFO): Success
    342025-12-29T18:32:40.410722Z TestFramework (INFO): Test invalid pruning command line options
    352025-12-29T18:32:40.580461Z TestFramework (INFO): Test scanblocks can not return pruned data
    362025-12-29T18:32:40.583664Z TestFramework (ERROR): Unexpected exception
    37Traceback (most recent call last):
    38  File "/home/hebasto/dev/bitcoin/test/functional/test_framework/test_framework.py", line 142, in main
    39    self.run_test()
    40    ~~~~~~~~~~~~~^^
    41  File "/home/hebasto/dev/bitcoin/./build/test/functional/feature_pruning.py", line 481, in run_test
    42    self.test_scanblocks_pruned()
    43    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    44  File "/home/hebasto/dev/bitcoin/./build/test/functional/feature_pruning.py", line 496, in test_scanblocks_pruned
    45    assert_raises_rpc_error(-1, "Block not available (pruned data)", node.scanblocks,
    46    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    47        "start", [{"desc": f"raw({false_positive_spk.hex()})"}], 0, 0, "basic", {"filter_false_positives": True})
    48        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    49  File "/home/hebasto/dev/bitcoin/test/functional/test_framework/util.py", line 157, in assert_raises_rpc_error
    50    assert try_rpc(code, message, fun, *args, **kwds), "No exception raised"
    51           ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    52AssertionError: No exception raised
    532025-12-29T18:32:40.636711Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    542025-12-29T18:32:40.636826Z TestFramework (WARNING): Not cleaning up dir /home/hebasto/dev/bitcoin/tmp
    552025-12-29T18:32:40.636857Z TestFramework (ERROR): Test failed. Test logging available at /home/hebasto/dev/bitcoin/tmp/test_framework.log
    562025-12-29T18:32:40.636939Z TestFramework (ERROR): 
    572025-12-29T18:32:40.637012Z TestFramework (ERROR): Hint: Call /home/hebasto/dev/bitcoin/test/functional/combine_logs.py '/home/hebasto/dev/bitcoin/tmp' to consolidate all logs
    582025-12-29T18:32:40.637031Z TestFramework (ERROR): 
    592025-12-29T18:32:40.637048Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
    602025-12-29T18:32:40.637086Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
    612025-12-29T18:32:40.637103Z TestFramework (ERROR): 
    62[node 5] Cleaning up leftover process
    63[node 4] Cleaning up leftover process
    64[node 3] Cleaning up leftover process
    65[node 2] Cleaning up leftover process
    66[node 1] Cleaning up leftover process
    

    The combined log appears to be too large to upload to GitHub.

    This was initially observed on NetBSD and was later reproduced on Fedora 43.

  2. hebasto added the label Tests on Dec 29, 2025
  3. brunoerg commented at 9:12 pm on December 30, 2025: contributor

    I was able to reproduce it on macOS 14.3:

    0cmake -B build_no_wallet -DENABLE_IPC=OFF -DENABLE_WALLET=OFF && cmake --build build_no_wallet -j 10 && ./build_no_wallet/test/functional/feature_pruning.py --tmpdir $(pwd)/tmp
    
     02025-12-30T21:10:45.025328Z TestFramework (INFO): Test manual pruning with block indices
     12025-12-30T21:10:46.286682Z TestFramework (INFO): Success
     22025-12-30T21:10:46.286738Z TestFramework (INFO): Test manual pruning with timestamps
     32025-12-30T21:10:47.544538Z TestFramework (INFO): Success
     42025-12-30T21:10:47.544656Z TestFramework (INFO): Test invalid pruning command line options
     52025-12-30T21:10:47.686153Z TestFramework (INFO): Test scanblocks can not return pruned data
     62025-12-30T21:10:47.688006Z TestFramework (ERROR): Unexpected exception
     7Traceback (most recent call last):
     8  File "/Users/brunogarcia/projects/bitcoin-core-dev/test/functional/test_framework/test_framework.py", line 142, in main
     9    self.run_test()
    10    ~~~~~~~~~~~~~^^
    11  File "/Users/brunogarcia/projects/bitcoin-core-dev/./build_no_wallet/test/functional/feature_pruning.py", line 481, in run_test
    12    self.test_scanblocks_pruned()
    13    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    14  File "/Users/brunogarcia/projects/bitcoin-core-dev/./build_no_wallet/test/functional/feature_pruning.py", line 496, in test_scanblocks_pruned
    15    assert_raises_rpc_error(-1, "Block not available (pruned data)", node.scanblocks,
    16    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    17        "start", [{"desc": f"raw({false_positive_spk.hex()})"}], 0, 0, "basic", {"filter_false_positives": True})
    18        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    19  File "/Users/brunogarcia/projects/bitcoin-core-dev/test/functional/test_framework/util.py", line 157, in assert_raises_rpc_error
    20    assert try_rpc(code, message, fun, *args, **kwds), "No exception raised"
    21           ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    22AssertionError: No exception raised
    232025-12-30T21:10:47.742645Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    242025-12-30T21:10:47.742746Z TestFramework (WARNING): Not cleaning up dir /Users/brunogarcia/projects/bitcoin-core-dev/tmp
    252025-12-30T21:10:47.742778Z TestFramework (ERROR): Test failed. Test logging available at /Users/brunogarcia/projects/bitcoin-core-dev/tmp/test_framework.log
    262025-12-30T21:10:47.742868Z TestFramework (ERROR):
    272025-12-30T21:10:47.742948Z TestFramework (ERROR): Hint: Call /Users/brunogarcia/projects/bitcoin-core-dev/test/functional/combine_logs.py '/Users/brunogarcia/projects/bitcoin-core-dev/tmp' to consolidate all logs
    282025-12-30T21:10:47.742973Z TestFramework (ERROR):
    292025-12-30T21:10:47.742996Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
    302025-12-30T21:10:47.743040Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
    312025-12-30T21:10:47.743061Z TestFramework (ERROR):
    32[node 5] Cleaning up leftover process
    33[node 4] Cleaning up leftover process
    34[node 3] Cleaning up leftover process
    35[node 2] Cleaning up leftover process
    36[node 1] Cleaning up leftover process
    
  4. brunoerg commented at 9:33 pm on December 30, 2025: contributor
    I did not investigate it in depth, but I think we shouldn’t test the behavior of scanblocks for a pruned node, especially filtering false positives, with the genesis block since it has no undo data. Also, without wallet, the wallet_test is skipped so node5 isn’t synced with node0 and the prune isn’t done?


hebasto brunoerg

Labels
Tests


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-07 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me