refactor: simplify architecture of quorum observer and quorum participant#7247
Open
knst wants to merge 16 commits intodashpay:developfrom
Open
refactor: simplify architecture of quorum observer and quorum participant#7247knst wants to merge 16 commits intodashpay:developfrom
knst wants to merge 16 commits intodashpay:developfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
It's a follow-up for #7066 and related PRs
This PR is reducing mental concentration when reading quorum-related code by significant simplification amount of levels of abstractions and inheritance classes from each other.
This PR is a direct dependency of #7234 (kernel / chainstate project)
Performance is not expected to be improved by any noticeable margin.
Compilation time is expected to be improved marginally due to fewer files (-2) to compile and less transitive includes over
src/llmq/quorumsman.h.What was done?
This changes has been spotted during #7234 and extracted to own PR.
Class hierarchy — before vs. after
*by claude
Before:
QuorumObserverParent (interface, implemented by CQuorumManager)
│
QuorumObserver (base class with shared state)
├── ObserverContext (observer mode, also CValidationInterface)
└── QuorumParticipant (active mode, in src/active/quorums.h)
After:
QuorumRole (pure virtual interface in quorumsman.h)
├── ObserverContext (observer mode, in src/llmq/observer.h)
└── ActiveContext (active mode, QuorumParticipant inlined)
How Has This Been Tested?
Run unit & functional tests
Breaking Changes
N/A
Checklist: