Skip to content

refactor: use iwyu analyzer to break circular dependencies #6743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025

Conversation

knst
Copy link
Collaborator

@knst knst commented Jul 7, 2025

Issue being fixed or feature implemented

Some includes are leftover after code movements, refactors or feature edits.
Some includes meant to be, but included indirectly.

What was done?

I run iwyu [include what you use] analyzer and got 15k lines diff which touches 800 files. It's a bit too big diff and not quite useful! See full set of changes here: https://github.com/knst/dash/tree/refactor-iwyu-all

Though, it helped to remove 11 exception for circular dependencies linter, so, this PR has a small sub-set of original changes that are split to 2 commits:

  • breakage of circular dependencies (some includes are removed)
  • compilation time improvements by removing obviously unused includes from Dash specific code

How Has This Been Tested?

Here're steps to run iwyu analyser:

make clean
bear -- make -j14
iwyu_tool -p compile_commands.json -j14 > out.txt
fix_include

See test/lint/lint-circular-dependencies.py, it removed 10 exception for circular dependencies.
Originally has been 11 of them, but one has been found before manually, and merged as #6728, so, 10 only left for this PR.

Compilation time is reduced insignificantly, only 1 minute out of 98 minutes (assuming single core compilation).

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 23 milestone Jul 7, 2025
@knst knst changed the title Refactor iwyu refactor: use iwyu analyzer to break circular dependencies Jul 7, 2025
@knst
Copy link
Collaborator Author

knst commented Jul 7, 2025

I will keep it as draft to avoid possible conflicts (not tested together with #6730 and #6736 )

Copy link

This pull request has conflicts, please rebase.

These unused headers has been found by running iwyu linter
It improves compilation time insignificantly (1minute out of 98minutes,  assuming 1 core compilation, 1% improvement)
Copy link

github-actions bot commented Jul 22, 2025

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@knst knst marked this pull request as ready for review July 22, 2025 15:28
@knst knst requested review from kwvg, UdjinM6 and PastaPastaPasta and removed request for kwvg July 22, 2025 15:28
Copy link

coderabbitai bot commented Jul 22, 2025

Walkthrough

This set of changes consists of widespread cleanup and reorganization of header file inclusions across numerous source and header files in the codebase. The modifications primarily involve removing unused or redundant #include directives, adding necessary standard library or project-specific headers where required, and adjusting the order of some includes for clarity or compilation correctness. No functional code, logic, control flow, or error handling is altered in any of the affected files. Additionally, a test linter script is updated to remove entries for circular dependencies that are no longer present due to the header cleanup.

Estimated code review effort

1 (~8 minutes)

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/evo/mnauth.h (1)

8-14: Optional: align include order with project conventions
If we follow the usual “STL first, project headers after” ordering, consider moving <string_view> above the project-specific headers for consistency:

-#include <bls/bls.h>
-#include <protocol.h>
-#include <serialize.h>
-#include <uint256.h>
-#include <string_view>
+#include <string_view>
+#include <bls/bls.h>
+#include <protocol.h>
+#include <serialize.h>
+#include <uint256.h>

Purely cosmetic; feel free to ignore if the existing convention differs.

src/stats/client.cpp (1)

9-9: Verify include path & redundancy for logging.h.

logging.h is a project header; most files include it with quoted form ("logging.h"). Using the angle-bracket form may pick up an unintended copy if the build system’s include paths ever shadow the project root. Consider switching to quoted form for consistency and to avoid surprises:

-#include <logging.h>
+#include "logging.h"

Also double-check that both logging.h and util/system.h are strictly required here (the latter is presumably for ArgsManager). If either is transitively included by the other after this PR’s header reshuffle, drop the redundant include to keep the dependency graph minimal.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f648039 and 9aa039c.

📒 Files selected for processing (57)
  • src/bls/bls_worker.cpp (0 hunks)
  • src/coinjoin/client.cpp (1 hunks)
  • src/coinjoin/coinjoin.cpp (0 hunks)
  • src/coinjoin/interfaces.cpp (0 hunks)
  • src/coinjoin/server.cpp (0 hunks)
  • src/coinjoin/util.cpp (0 hunks)
  • src/dsnotificationinterface.cpp (0 hunks)
  • src/evo/chainhelper.cpp (1 hunks)
  • src/evo/deterministicmns.cpp (0 hunks)
  • src/evo/dmnstate.cpp (0 hunks)
  • src/evo/mnauth.cpp (0 hunks)
  • src/evo/mnauth.h (1 hunks)
  • src/evo/simplifiedmns.cpp (0 hunks)
  • src/evo/specialtxman.cpp (0 hunks)
  • src/governance/classes.cpp (0 hunks)
  • src/governance/classes.h (1 hunks)
  • src/governance/common.cpp (0 hunks)
  • src/governance/exceptions.cpp (0 hunks)
  • src/governance/governance.cpp (0 hunks)
  • src/governance/object.cpp (0 hunks)
  • src/governance/vote.cpp (1 hunks)
  • src/llmq/chainlocks.cpp (1 hunks)
  • src/llmq/commitment.h (1 hunks)
  • src/llmq/context.cpp (1 hunks)
  • src/llmq/dkgsession.cpp (1 hunks)
  • src/llmq/dkgsessionmgr.cpp (0 hunks)
  • src/llmq/ehf_signals.cpp (1 hunks)
  • src/llmq/quorums.cpp (1 hunks)
  • src/llmq/signing.cpp (0 hunks)
  • src/llmq/snapshot.cpp (1 hunks)
  • src/llmq/utils.cpp (1 hunks)
  • src/logging.cpp (0 hunks)
  • src/masternode/meta.cpp (0 hunks)
  • src/masternode/node.cpp (0 hunks)
  • src/masternode/payments.cpp (0 hunks)
  • src/masternode/sync.cpp (0 hunks)
  • src/masternode/utils.cpp (0 hunks)
  • src/netfulfilledman.cpp (0 hunks)
  • src/qt/governancelist.cpp (0 hunks)
  • src/qt/guiutil.cpp (0 hunks)
  • src/qt/masternodelist.cpp (0 hunks)
  • src/rpc/coinjoin.cpp (0 hunks)
  • src/rpc/evo.cpp (0 hunks)
  • src/rpc/governance.cpp (0 hunks)
  • src/rpc/masternode.cpp (0 hunks)
  • src/rpc/quorums.cpp (0 hunks)
  • src/saltedhasher.cpp (0 hunks)
  • src/spork.cpp (0 hunks)
  • src/stats/client.cpp (1 hunks)
  • src/test/block_reward_reallocation_tests.cpp (0 hunks)
  • src/test/dynamic_activation_thresholds_tests.cpp (0 hunks)
  • src/test/evo_deterministicmns_tests.cpp (0 hunks)
  • src/test/evo_mnhf_tests.cpp (0 hunks)
  • src/test/evo_utils_tests.cpp (1 hunks)
  • src/wallet/hdchain.cpp (0 hunks)
  • src/wallet/wallet.cpp (0 hunks)
  • test/lint/lint-circular-dependencies.py (0 hunks)
📓 Path-based instructions (3)
src/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction

Files:

  • src/governance/vote.cpp
  • src/llmq/quorums.cpp
  • src/llmq/utils.cpp
  • src/llmq/commitment.h
  • src/test/evo_utils_tests.cpp
  • src/llmq/chainlocks.cpp
  • src/evo/chainhelper.cpp
  • src/coinjoin/client.cpp
  • src/llmq/dkgsession.cpp
  • src/evo/mnauth.h
  • src/stats/client.cpp
  • src/llmq/ehf_signals.cpp
  • src/llmq/context.cpp
  • src/governance/classes.h
  • src/llmq/snapshot.cpp
src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Files:

  • src/test/evo_utils_tests.cpp
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Masternode lists must use immutable data structures (Immer library) for thread safety

Files:

  • src/evo/chainhelper.cpp
  • src/evo/mnauth.h
🧠 Learnings (14)
📓 Common learnings
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Learnt from: kwvg
PR: dashpay/dash#6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
Learnt from: knst
PR: dashpay/dash#6533
File: test/functional/feature_llmq_singlenode.py:98-106
Timestamp: 2025-01-22T08:33:31.405Z
Learning: When reviewing PRs, ensure that suggestions are directly related to the PR's primary objectives rather than general code improvements that could be addressed separately.
src/governance/vote.cpp (2)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

src/llmq/quorums.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

src/llmq/utils.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/test/evo_utils_tests.cpp (4)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp} : Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Learnt from: kwvg
PR: #6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

src/llmq/chainlocks.cpp (4)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: kwvg
PR: #6504
File: src/llmq/context.cpp:42-43
Timestamp: 2025-01-02T21:50:00.967Z
Learning: LLMQContext manages concurrency for the CInstantSendManager. Previously, this was handled globally; now it's handled as a class member in LLMQContext, but the concurrency control remains consistent.

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/evo/chainhelper.cpp (4)

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: kwvg
PR: #6530
File: src/validation.cpp:360-362
Timestamp: 2025-01-14T08:37:16.955Z
Learning: The UpdateTransactionsFromBlock() method in txmempool.cpp takes parameters in the order: vHashUpdate, ancestor_size_limit, ancestor_count_limit. The size limit comes before the count limit.

src/coinjoin/client.cpp (5)

Learnt from: kwvg
PR: #6529
File: src/wallet/rpcwallet.cpp:3002-3003
Timestamp: 2025-02-14T15:19:17.218Z
Learning: The GetWallet() function calls in src/wallet/rpcwallet.cpp are properly validated with null checks that throw appropriate RPC errors, making additional validation unnecessary.

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: kwvg
PR: #6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/llmq/dkgsession.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/evo/mnauth.h (1)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

src/llmq/ehf_signals.cpp (5)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: kwvg
PR: #6665
File: src/evo/providertx.h:82-82
Timestamp: 2025-06-06T11:53:09.094Z
Learning: In ProTx serialization code (SERIALIZE_METHODS), version checks should use hardcoded maximum flags (/is_basic_scheme_active=/true, /is_extended_addr=/true) rather than deployment-based flags. This is because serialization code should be able to deserialize any structurally valid ProTx up to the maximum version the code knows how to handle, regardless of current consensus validity. Validation code, not serialization code, is responsible for checking whether a ProTx version is consensus-valid based on deployment status.

src/llmq/context.cpp (2)

Learnt from: kwvg
PR: #6504
File: src/llmq/context.cpp:42-43
Timestamp: 2025-01-02T21:50:00.967Z
Learning: LLMQContext manages concurrency for the CInstantSendManager. Previously, this was handled globally; now it's handled as a class member in LLMQContext, but the concurrency control remains consistent.

Learnt from: kwvg
PR: #6504
File: src/llmq/quorums.cpp:224-224
Timestamp: 2024-12-29T17:43:41.755Z
Learning: The CQuorumManager is fully initialized by LLMQContext, addressing any concerns about the manager’s initialization sequence.

src/governance/classes.h (1)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/llmq/snapshot.cpp (5)

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{crc32c,dashbls,gsl,immer,leveldb,minisketch,secp256k1,univalue}/** : Do not make changes under any circumstances to vendored dependencies in src/crc32c, src/dashbls, src/gsl, src/immer, src/leveldb, src/minisketch, src/secp256k1, src/univalue

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

💤 Files with no reviewable changes (42)
  • src/coinjoin/interfaces.cpp
  • src/rpc/coinjoin.cpp
  • src/logging.cpp
  • src/evo/specialtxman.cpp
  • src/masternode/utils.cpp
  • src/governance/classes.cpp
  • src/evo/deterministicmns.cpp
  • src/rpc/quorums.cpp
  • src/test/evo_mnhf_tests.cpp
  • src/governance/governance.cpp
  • src/qt/governancelist.cpp
  • src/test/evo_deterministicmns_tests.cpp
  • src/netfulfilledman.cpp
  • src/evo/simplifiedmns.cpp
  • src/coinjoin/util.cpp
  • src/llmq/signing.cpp
  • src/qt/masternodelist.cpp
  • src/coinjoin/server.cpp
  • src/governance/object.cpp
  • src/masternode/payments.cpp
  • src/wallet/hdchain.cpp
  • src/dsnotificationinterface.cpp
  • src/governance/exceptions.cpp
  • src/evo/dmnstate.cpp
  • src/llmq/dkgsessionmgr.cpp
  • test/lint/lint-circular-dependencies.py
  • src/masternode/sync.cpp
  • src/rpc/masternode.cpp
  • src/coinjoin/coinjoin.cpp
  • src/rpc/governance.cpp
  • src/evo/mnauth.cpp
  • src/masternode/node.cpp
  • src/governance/common.cpp
  • src/test/dynamic_activation_thresholds_tests.cpp
  • src/rpc/evo.cpp
  • src/saltedhasher.cpp
  • src/qt/guiutil.cpp
  • src/wallet/wallet.cpp
  • src/masternode/meta.cpp
  • src/bls/bls_worker.cpp
  • src/test/block_reward_reallocation_tests.cpp
  • src/spork.cpp
🧰 Additional context used
📓 Path-based instructions (3)
src/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction

Files:

  • src/governance/vote.cpp
  • src/llmq/quorums.cpp
  • src/llmq/utils.cpp
  • src/llmq/commitment.h
  • src/test/evo_utils_tests.cpp
  • src/llmq/chainlocks.cpp
  • src/evo/chainhelper.cpp
  • src/coinjoin/client.cpp
  • src/llmq/dkgsession.cpp
  • src/evo/mnauth.h
  • src/stats/client.cpp
  • src/llmq/ehf_signals.cpp
  • src/llmq/context.cpp
  • src/governance/classes.h
  • src/llmq/snapshot.cpp
src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Files:

  • src/test/evo_utils_tests.cpp
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Masternode lists must use immutable data structures (Immer library) for thread safety

Files:

  • src/evo/chainhelper.cpp
  • src/evo/mnauth.h
🧠 Learnings (14)
📓 Common learnings
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Learnt from: kwvg
PR: dashpay/dash#6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
Learnt from: knst
PR: dashpay/dash#6533
File: test/functional/feature_llmq_singlenode.py:98-106
Timestamp: 2025-01-22T08:33:31.405Z
Learning: When reviewing PRs, ensure that suggestions are directly related to the PR's primary objectives rather than general code improvements that could be addressed separately.
src/governance/vote.cpp (2)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

src/llmq/quorums.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

src/llmq/utils.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/test/evo_utils_tests.cpp (4)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp} : Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Learnt from: kwvg
PR: #6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

src/llmq/chainlocks.cpp (4)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: kwvg
PR: #6504
File: src/llmq/context.cpp:42-43
Timestamp: 2025-01-02T21:50:00.967Z
Learning: LLMQContext manages concurrency for the CInstantSendManager. Previously, this was handled globally; now it's handled as a class member in LLMQContext, but the concurrency control remains consistent.

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/evo/chainhelper.cpp (4)

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: kwvg
PR: #6530
File: src/validation.cpp:360-362
Timestamp: 2025-01-14T08:37:16.955Z
Learning: The UpdateTransactionsFromBlock() method in txmempool.cpp takes parameters in the order: vHashUpdate, ancestor_size_limit, ancestor_count_limit. The size limit comes before the count limit.

src/coinjoin/client.cpp (5)

Learnt from: kwvg
PR: #6529
File: src/wallet/rpcwallet.cpp:3002-3003
Timestamp: 2025-02-14T15:19:17.218Z
Learning: The GetWallet() function calls in src/wallet/rpcwallet.cpp are properly validated with null checks that throw appropriate RPC errors, making additional validation unnecessary.

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: kwvg
PR: #6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/llmq/dkgsession.cpp (3)

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/evo/mnauth.h (1)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

src/llmq/ehf_signals.cpp (5)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

Learnt from: knst
PR: #6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: kwvg
PR: #6665
File: src/evo/providertx.h:82-82
Timestamp: 2025-06-06T11:53:09.094Z
Learning: In ProTx serialization code (SERIALIZE_METHODS), version checks should use hardcoded maximum flags (/is_basic_scheme_active=/true, /is_extended_addr=/true) rather than deployment-based flags. This is because serialization code should be able to deserialize any structurally valid ProTx up to the maximum version the code knows how to handle, regardless of current consensus validity. Validation code, not serialization code, is responsible for checking whether a ProTx version is consensus-valid based on deployment status.

src/llmq/context.cpp (2)

Learnt from: kwvg
PR: #6504
File: src/llmq/context.cpp:42-43
Timestamp: 2025-01-02T21:50:00.967Z
Learning: LLMQContext manages concurrency for the CInstantSendManager. Previously, this was handled globally; now it's handled as a class member in LLMQContext, but the concurrency control remains consistent.

Learnt from: kwvg
PR: #6504
File: src/llmq/quorums.cpp:224-224
Timestamp: 2024-12-29T17:43:41.755Z
Learning: The CQuorumManager is fully initialized by LLMQContext, addressing any concerns about the manager’s initialization sequence.

src/governance/classes.h (1)

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

src/llmq/snapshot.cpp (5)

Learnt from: kwvg
PR: #6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp} : Masternode lists must use immutable data structures (Immer library) for thread safety

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/evo/specialtx.h : Special transactions use payload extensions defined in src/evo/specialtx.h

Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{crc32c,dashbls,gsl,immer,leveldb,minisketch,secp256k1,univalue}/** : Do not make changes under any circumstances to vendored dependencies in src/crc32c, src/dashbls, src/gsl, src/immer, src/leveldb, src/minisketch, src/secp256k1, src/univalue

Learnt from: knst
PR: #6511
File: src/evo/deterministicmns.cpp:1369-1373
Timestamp: 2025-01-07T18:50:44.838Z
Learning: The functions MigrateDBIfNeeded and MigrateDBIfNeeded2 in src/evo/deterministicmns.cpp are temporary and will be removed in a future version. Refactoring suggestions for these functions should be avoided.

🔇 Additional comments (16)
src/evo/mnauth.h (1)

11-14: Necessary headers added – compile-time fix is correct
uint256 and std::string_view are used in this header, so explicitly including <uint256.h> and <string_view> is the right move. No further action required.

src/governance/classes.h (1)

13-15: Header is now self-contained; good change

Adding <memory>, <string>, and <vector> makes the header compile-unit safe without relying on transitive includes.

src/governance/vote.cpp (1)

9-10: Explicit dependency inclusion aligns with IWYU

Including both <evo/deterministicmns.h> and <evo/dmn_types.h> clarifies the file’s direct dependencies and prevents future breakage if transitive includes change.

src/evo/chainhelper.cpp (1)

7-7: LGTM: Header include cleanup aligns with iwyu recommendations.

The replacement of consensus/params.h with chainparams.h is appropriate as part of the systematic include cleanup. The file's functionality remains intact while reducing dependencies.

src/coinjoin/client.cpp (1)

27-27: LGTM: Improved header alignment and circular dependency removal.

The replacement of wallet/fees.h with wallet/coinselection.h better reflects the file's actual dependencies, which focus on coin selection functionality. This change also contributes to breaking circular dependencies between wallet components.

src/test/evo_utils_tests.cpp (1)

8-8: LGTM: Include reordering improves dependency clarity.

Moving llmq/options.h after chainparams.h creates a more logical include order, as LLMQ functionality may depend on chain parameters. This reordering enhances compilation clarity without affecting functionality.

src/llmq/snapshot.cpp (1)

7-7: LGTM: Explicit include addition improves dependency clarity.

Adding chainparams.h is appropriate since the file extensively uses Params() functionality throughout (lines 135, 138, 394, etc.). Making this dependency explicit rather than relying on transitive includes follows iwyu best practices and improves code maintainability.

src/llmq/chainlocks.cpp (2)

11-11: Good catch: required include for CInstantSendManager added.

The new #include <instantsend/instantsend.h> resolves the previously implicit dependency.
No further action needed.


6-7: chainlocks.h safely forward-declares CSigSharesManager; no member access found

All references to CSigSharesManager in chainlocks.h and chainlocks.cpp use it by reference or pointer, and there are no shareman.* or shareman->* calls. The header only forward-declares the class and doesn’t include signing_shares.h, so dropping that include is safe.

• src/llmq/chainlocks.h line 36: class CSigSharesManager; (forward declaration)
• src/llmq/chainlocks.h line 51: CSigSharesManager& shareman; (no member access in header)
• src/llmq/chainlocks.cpp line 43 & 89: only parameter references, no shareman. usage

src/llmq/ehf_signals.cpp (2)

12-13: Include realignment looks correct.

<evo/mnhftx.h> is now pulled in, giving a direct definition for MNHFTxPayload; the removed headers are unused in this TU. Build should remain green.


5-8: ehf_signals.cpp – No shareman references detected, no action required
Ran rg -n '\bshareman\.' src/llmq/ehf_signals.cpp and found no matches, so there’s no CSigSharesManager (shareman) usage in this file. The previous caution can be safely removed.

src/llmq/commitment.h (1)

18-18: <algorithm> inclusion is required – thumbs-up.

std::count is used at lines 63 & 67; adding <algorithm> prevents implicit-use warnings on modern compilers.

src/llmq/utils.cpp (1)

10-10: BLS header added, orphan include removed – looks good.

CBLSSignature forward-decl remains, but the concrete definitions come from the new <bls/bls.h> include.
No references to EvoDB remain, so dropping that header is safe.

src/llmq/dkgsession.cpp (1)

16-25: Include list trimmed correctly – just re-confirm compilation succeeds

<evo/deterministicmns.h> is still required and <array> is now explicitly included for the std::array at line 39 – good catch.
Please kick off a full build (or at least ninja src/llmq/dkgsession.cpp) to ensure nothing in this TU still relied on the now-removed <evo/specialtx.h>, <netmessagemaker.h> or <univalue.h>.

src/llmq/context.cpp (1)

5-9: Explicit BLS dependency added – verifies hidden include

<bls/bls_worker.h> brings in the types required for the new std::shared_ptr<CBLSWorker> at line 25. With the old transitive include gone, this keeps the TU self-contained.
No functional impact; just make sure CI still passes after the header shuffle.

Also applies to: 18-18

src/llmq/quorums.cpp (1)

13-18: Header cleanup & BLS additions LGTM

Switching to <bls/bls.h> / <bls/bls_ies.h> and dropping the indirect includes removes the circular edge the IWYU run flagged. The file already uses CBLSSecretKey, CBLSIESEncryptedObject, etc., so the direct includes are correct.

As a sanity check, verify that nothing in this compilation unit still needs the previously pulled-in <llmq/dkgsession.h> or <univalue.h>.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 9aa039c

Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 9aa039c

@PastaPastaPasta PastaPastaPasta merged commit 10ad0af into dashpay:develop Jul 23, 2025
32 of 36 checks passed
@knst knst deleted the refactor-iwyu branch July 24, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants