-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: split llmq/utils to Quorum Calculation and llmq/options #5790
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
Conversation
6229ce8 to
5d265ac
Compare
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
|
|
This pull request has conflicts, please rebase. |
5d265ac to
87c5163
Compare
|
This pull request has conflicts, please rebase. |
87c5163 to
9002f39
Compare
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK
|
need guix image to test a theory with crash: run as |
|
Guix Automation has began to build this PR tagged as v20.1.0-devpr5790.9002f39c. A new comment will be made when the image is pushed. |
|
Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v20.1.0-devpr5790.9002f39c. The image should be on dockerhub soon. |
|
Guix Automation has began to build this PR tagged as v20.1.0-devpr5790.98457039. A new comment will be made when the image is pushed. |
|
Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v20.1.0-devpr5790.98457039. The image should be on dockerhub soon. |
|
This pull request has conflicts, please rebase. |
Also this commit add llmq/utils in modules where it is included indirectly but it requires to be used such as rpc/quorums
That's an internal helper!
In the past implementation has been non-trivial:
```cpp
return Params().GetConsensus().llmqs.at(llmqType);
```
But over time it was simplified and now does nothing but hide usage of
global variable Params():
```cpp
return Params().GetLLMQ(llmqType);
```
Also it adds missing [[nodiscard]] for Params().GetLLMQ()
Eventually it caused some circular dependencies to disapear.
newly introduced circular dependencies are just longer pathes through
same modules that has been in past short-circuited
It seems as it is an artefact from non-deterministic IS. It used only for LLMQ_TEST_INSTANTSEND quorum and doesn't look useful. Removing this dependency helps to: - simplify implementation of many classes significantly so far as they don't need to pass quorumManager to low-level helpers - achieved significant progress of de-globalization quorumManager. Only one step left (evo/assertlocks, evo/creditpool, evo/mnhftx) and we can drop global variable ::quorumManager - disapeared 2 circular dependencies through llmq/quorum
9845703 to
45957d5
Compare
rebase to top of develop + resolved conflicts |
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK
PastaPastaPasta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
## Issue being fixed or feature implemented `develop` can't sync from genesis on mainnet, b8a086d broke it. #5790 follow-up ## What was done? Revive the old logic but using hardcoded block heights instead of scanning via quorum manager. ## How Has This Been Tested? Synced on mainnet/testnet, CI is happy https://gitlab.com/UdjinM6/dash/-/pipelines/1148980046. ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
Issue being fixed or feature implemented
llmq/utilshas simple util code that used all over code base and also have too heavy code for calculation quorums such as:GetAllQuorumMembers,EnsureQuorumConnectionsand other.These helpers for calculation quorums are used only by evo/deterministicmns, evo/simplifiedmns and llmq/* modules, but llmq/utils is included in many other modules for various trivial helpers.
What was done?
Prior work:
See also refactor(llmq): separate llmq/utils into llmq/utils and llmq/complex_… #4798
This PR remove all non-quorum calculation code from llmq/utils. Eventually it happens that easier to take everything out rather than move Quorum Calculation to new place atm:
BuildCommitmentHashgoes to llmq/commitmentBuildSignHashgoes to llmq/signingGetLLMQParaminlined since it's trivial (it has not been trivial when introduced ages ago)IsQuorumEnabledon CQuorumManager which meansquorumManagerdeglobalization is done for 90%How Has This Been Tested?
test/lint/lint-circular-dependencies.shBreaking Changes
N/A
Checklist: