From 37241d4790c7502ce71c6505ff5822fe56cf2036 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Thu, 5 Nov 2026 01:04:28 -0600 Subject: [PATCH 1/3] refactor: define CQuorum destructor out of line quorums.h only forward-declares CFinalCommitment. Defaulting the CQuorum destructor inline makes IWYU instantiate unique_ptr deletion with an incomplete type when checking llmq/observer.cpp. Define the destructor in quorums.cpp, which includes commitment.h. This fixes the multiprocess lint failure exposed by the all-source IWYU backport (Bitcoin Core #27571) without widening header dependencies. Cherry-picked from e071b31927b77f187626493271360853f864326b. No kernel backports from its parent branch are needed. Co-Authored-By: Claude Code --- src/llmq/quorums.cpp | 2 ++ src/llmq/quorums.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/llmq/quorums.cpp b/src/llmq/quorums.cpp index 4d804c115d8f..3a0d466fa699 100644 --- a/src/llmq/quorums.cpp +++ b/src/llmq/quorums.cpp @@ -114,6 +114,8 @@ CQuorum::CQuorum(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker, assert(m_quorum_base_block_index != nullptr); } +CQuorum::~CQuorum() = default; + bool CQuorum::SetVerificationVector(const std::vector& quorumVecIn) { const auto quorumVecInSerialized = ::SerializeHash(quorumVecIn); diff --git a/src/llmq/quorums.h b/src/llmq/quorums.h index 80cf0e839d5d..a712454d5469 100644 --- a/src/llmq/quorums.h +++ b/src/llmq/quorums.h @@ -192,7 +192,7 @@ class CQuorum CQuorum(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker, CFinalCommitmentPtr _qc, const CBlockIndex* _pQuorumBaseBlockIndex, const uint256& _minedBlockHash, Span _members); - ~CQuorum() = default; + ~CQuorum(); bool SetVerificationVector(const std::vector& quorumVecIn) EXCLUSIVE_LOCKS_REQUIRED(!cs_vvec_shShare); void SetVerificationVector(BLSVerificationVectorPtr vvec_in) EXCLUSIVE_LOCKS_REQUIRED(!cs_vvec_shShare) From f33c514945aa36d13533ad11ed4eb6e8a36ccce0 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Thu, 5 Nov 2026 01:04:30 -0600 Subject: [PATCH 2/3] ci: run tidy after unit tests lint-tidy.sh ends with fix_includes.py, which rewrites the build tree with suggested IWYU changes for diagnostic output. Running make check afterwards rebuilds those unreviewed edits, failing on removed includes. Run unit tests before the diagnostic rewrite, matching the ordering in Bitcoin Core ci/test/06_script_b.sh at #27571. Keep IWYU compiler errors fatal; moving the step alone does not fix the incomplete CFinalCommitment. Cherry-picked from 417d83d5f5ed03cf07894e5d3069361eba9a31f7. Co-Authored-By: Claude Code --- .github/workflows/build-src.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-src.yml b/.github/workflows/build-src.yml index 2e72d4043bbd..c9a56a85ea6a 100644 --- a/.github/workflows/build-src.yml +++ b/.github/workflows/build-src.yml @@ -196,6 +196,14 @@ jobs: /cache/ccache key: ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }} + - name: Run unit tests + env: + BUILD_TARGET: ${{ inputs.build-target }} + run: | + source ./ci/dash/matrix.sh + ./ci/dash/test_unittests.sh + shell: bash + - name: Restore ctcache cache if: inputs.build-target == 'linux64_multiprocess' uses: actions/cache/restore@v5 @@ -227,14 +235,6 @@ jobs: /cache/ctcache key: ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }} - - name: Run unit tests - env: - BUILD_TARGET: ${{ inputs.build-target }} - run: | - source ./ci/dash/matrix.sh - ./ci/dash/test_unittests.sh - shell: bash - - name: Bundle artifacts id: bundle env: From bb7d0fffae1422586d12c3de0c1785761111c165 Mon Sep 17 00:00:00 2001 From: PastaClaw Date: Thu, 5 Nov 2026 02:29:03 -0600 Subject: [PATCH 3/3] ci: lint multiprocess artifacts in a separate job Run tidy/IWYU on a restored build tree in its own job so it cannot rewrite the sources under unit tests or delay functional tests. Restore the matching depends prefix and keep the existing ctcache policy. Include compile_commands.json and generated Qt translation units in the multiprocess bundle, rejecting a missing database before upload. Other targets keep their existing artifact exclusions. Cache pruning waits for the new ctcache-producing job. Requested in review by knst on PR #8056. The additional suggested hash 54877e2bfdf88afb3c40df1d585b6f12e508f903 was not available from the Dash, knst/dash, or Bitcoin repositories; the existing upstream PR run failed because it still executes the base workflow with the old test ordering. Validated bundle round trips, generated-source retention, missing-database failure, workflow dependencies, ShellCheck, and workflow syntax. The prior fork push passed the full multiprocess build, unit tests, and tidy/IWYU. Co-Authored-By: Claude Code --- .github/workflows/build-src.yml | 31 ------------ .github/workflows/build.yml | 88 ++++++++++++++++++++++++++++++++- ci/dash/bundle-artifacts.sh | 11 +++-- 3 files changed, 94 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-src.yml b/.github/workflows/build-src.yml index c9a56a85ea6a..833b2482c5d6 100644 --- a/.github/workflows/build-src.yml +++ b/.github/workflows/build-src.yml @@ -204,37 +204,6 @@ jobs: ./ci/dash/test_unittests.sh shell: bash - - name: Restore ctcache cache - if: inputs.build-target == 'linux64_multiprocess' - uses: actions/cache/restore@v5 - with: - path: | - /cache/ctcache - key: ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }} - restore-keys: | - ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}- - - - name: Run linters - if: inputs.build-target == 'linux64_multiprocess' - env: - BUILD_TARGET: ${{ inputs.build-target }} - run: | - CACHE_DIR="/cache" - source ./ci/dash/matrix.sh - ./ci/dash/lint-tidy.sh - shell: bash - - - name: Save ctcache cache - if: | - inputs.build-target == 'linux64_multiprocess' && - github.event_name == 'push' && - github.ref_name == github.event.repository.default_branch - uses: actions/cache/save@v5 - with: - path: | - /cache/ctcache - key: ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }} - - name: Bundle artifacts id: bundle env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20e7c9189f04..6381e0645742 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -462,6 +462,92 @@ jobs: runs-on: ${{ needs.check-skip.outputs['runner-build'] }} secrets: *remote-ccache-auth + lint-multiprocess: + name: linux64_multiprocess-lint + needs: [check-skip, container, depends-linux64_multiprocess, src-linux64_multiprocess] + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} + container: + image: ${{ needs.container.outputs.path }} # zizmor: ignore[unpinned-images] built earlier in this run + options: --user root + env: + BUILD_TARGET: linux64_multiprocess + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + allow-unsafe-pr-checkout: true + persist-credentials: false + fetch-depth: 1 + + - name: Restore depends cache + id: depends-cache + uses: actions/cache/restore@v5 + with: + path: depends/built/${{ needs.depends-linux64_multiprocess.outputs.host }} + key: ${{ needs.depends-linux64_multiprocess.outputs.key }} + + - name: Download built depends + if: steps.depends-cache.outputs.cache-hit != 'true' && needs.depends-linux64_multiprocess.outputs.built-artifact != '' + uses: actions/download-artifact@v8 + with: + name: ${{ needs.depends-linux64_multiprocess.outputs.built-artifact }} + path: depends/built/${{ needs.depends-linux64_multiprocess.outputs.host }} + + - name: Check built depends are present + if: steps.depends-cache.outputs.cache-hit != 'true' && needs.depends-linux64_multiprocess.outputs.built-artifact == '' + run: | + echo "::error::Depends cache restore missed and no built depends artifact was provided" + exit 1 + shell: bash + + - name: Rebuild depends prefix + env: + DEPENDS_HOST: ${{ needs.depends-linux64_multiprocess.outputs.host }} + DEP_OPTS: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }} + run: | + eval "DEP_OPTS_ARGS=(${DEP_OPTS})" + make -j"$(nproc)" -C depends HOST="${DEPENDS_HOST}" "${DEP_OPTS_ARGS[@]}" + shell: bash + + - name: Download build artifacts + uses: actions/download-artifact@v8 + with: + name: ${{ needs.src-linux64_multiprocess.outputs.key }} + + - name: Extract lint inputs + env: + BUNDLE_KEY: ${{ needs.src-linux64_multiprocess.outputs.key }} + run: | + git config --global --add safe.directory "$PWD" + ./ci/dash/bundle-artifacts.sh extract + test -s "build-ci/dashcore-${BUILD_TARGET}/compile_commands.json" + shell: bash + + - name: Restore ctcache cache + uses: actions/cache/restore@v5 + with: + path: /cache/ctcache + key: ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-linux64_multiprocess-${{ github.sha }} + restore-keys: | + ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-linux64_multiprocess- + + - name: Run linters + run: | + CACHE_DIR="/cache" + source ./ci/dash/matrix.sh + ./ci/dash/lint-tidy.sh + shell: bash + + - name: Save ctcache cache + if: | + github.event_name == 'push' && + github.ref_name == github.event.repository.default_branch + uses: actions/cache/save@v5 + with: + path: /cache/ctcache + key: ctcache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-linux64_multiprocess-${{ github.sha }} + test-linux64: name: linux64-test uses: ./.github/workflows/test-src.yml @@ -538,7 +624,7 @@ jobs: name: Prune old ccache generations # Each develop push saves a new ccache/ctcache entry per target; keep only # the newest so the 10 GB repository cache stops evicting fresh ones. - needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_sqlite, src-linux64_tsan, src-mac, src-win64] + needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_sqlite, src-linux64_tsan, src-mac, src-win64, lint-multiprocess] if: | !cancelled() && github.event_name == 'push' && diff --git a/ci/dash/bundle-artifacts.sh b/ci/dash/bundle-artifacts.sh index 8625a8bbc686..7f82fc7f0f3a 100755 --- a/ci/dash/bundle-artifacts.sh +++ b/ci/dash/bundle-artifacts.sh @@ -42,15 +42,18 @@ if [ "${VERB}" = "create" ]; then "*.o" ".deps" ".libs" - # Test binaries and generated sources that only the unit tests, run - # before bundling, need + # Test binaries that only the unit tests, run before bundling, need "src/bench/bench_dash" - "src/qt/qrc_bitcoin.cpp" - "src/qt/qrc_dash_locale.cpp" "src/qt/test/test_dash-qt" "src/test/fuzz/fuzz" "src/test/test_dash" ) + if [ "${BUILD_TARGET}" != "linux64_multiprocess" ]; then + EXCLUSIONS+=("src/qt/qrc_bitcoin.cpp" "src/qt/qrc_dash_locale.cpp") + else + # The lint job consumes the compilation database and generated sources. + test -s "build-ci/dashcore-${BUILD_TARGET}/compile_commands.json" + fi EXCLUSIONS_ARG="" for excl in "${EXCLUSIONS[@]}" do