Page MenuHomePhabricator

init: avoid unsetting service bits from `nLocalServices`
ClosedPublic

Authored by PiRK on Tue, Apr 22, 06:47.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC56115c774db2: init: avoid unsetting service bits from `nLocalServices`
Summary

Rather than setting the service bit NODE_NETWORK first and then unset
it, start out the bare minimum flags that every node serves and only add
NODE_NETWORK if we are running as a non-pruned node.

This is a backport of core#25887

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Tue, Apr 22, 06:47

Failed tests logs:

====== Bitcoin ABC functional tests: feature_assumeutxo.py ======

------- Stdout: -------
2025-04-22T06:51:22.181000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250422_065018/feature_assumeutxo_24
2025-04-22T06:51:25.560000Z TestFramework (INFO): -- Testing assumeutxo + some indexes + pruning
2025-04-22T06:51:25.562000Z TestFramework (INFO): Creating a UTXO snapshot at height 299
2025-04-22T06:51:25.603000Z TestFramework (INFO): Test loading snapshot when headers are not synced
2025-04-22T06:51:29.554000Z TestFramework (INFO): Test bitcoind should fail when mempool not empty.
2025-04-22T06:51:32.019000Z TestFramework (INFO): Test different scenarios of loading invalid snapshot files
2025-04-22T06:51:32.020000Z TestFramework (INFO):   - snapshot file refering to a block that is not in the assumeutxo parameters
2025-04-22T06:51:32.023000Z TestFramework (INFO):   - snapshot file with wrong number of coins
2025-04-22T06:51:32.339000Z TestFramework (INFO):   - snapshot file with alternated UTXO data
2025-04-22T06:51:33.418000Z TestFramework (INFO): Test bitcoind should fail when file path is invalid.
2025-04-22T06:51:33.418000Z TestFramework (INFO): Loading snapshot into second node from /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250422_065018/feature_assumeutxo_24/node0/regtest/utxos.dat
2025-04-22T06:51:34.079000Z TestFramework (INFO): Submit a stale block that forked off the chain before the snapshot
2025-04-22T06:51:34.107000Z TestFramework (INFO): Submit a spending transaction for a snapshot chainstate coin to the mempool
2025-04-22T06:51:34.121000Z TestFramework (INFO): Restarting node to stop at height 359
2025-04-22T06:51:39.999000Z TestFramework (INFO): Checking that blocks are segmented on disk
2025-04-22T06:51:39.999000Z TestFramework (INFO): Restarted node before snapshot validation completed, reloading...
2025-04-22T06:51:42.122000Z TestFramework (INFO): Ensuring snapshot chain syncs to tip. (399)
2025-04-22T06:51:44.130000Z TestFramework (INFO): Ensuring background validation completes
2025-04-22T06:53:48.152000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        self.wait_until(lambda: n1.getindexinfo() == completed_idx_state)
'''
2025-04-22T06:53:48.152000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/feature_assumeutxo.py", line 430, in run_test
    self.wait_until(lambda: n1.getindexinfo() == completed_idx_state)
  File "/work/test/functional/test_framework/test_framework.py", line 890, in wait_until
    return wait_until_helper(
           ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/util.py", line 309, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
        self.wait_until(lambda: n1.getindexinfo() == completed_idx_state)
''' not true after 120.0 seconds
2025-04-22T06:53:48.203000Z TestFramework (INFO): Stopping nodes
2025-04-22T06:53:48.507000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250422_065018/feature_assumeutxo_24
2025-04-22T06:53:48.507000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250422_065018/feature_assumeutxo_24/test_framework.log
2025-04-22T06:53:48.507000Z TestFramework (ERROR): 
2025-04-22T06:53:48.507000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250422_065018/feature_assumeutxo_24' to consolidate all logs
2025-04-22T06:53:48.507000Z TestFramework (ERROR): 
2025-04-22T06:53:48.507000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-04-22T06:53:48.507000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-04-22T06:53:48.507000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: feature_assumeutxo.py

This revision is now accepted and ready to land.Tue, Apr 22, 10:04