-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor: drop usages of llmq/utils to check if hard-fork is active #5753
Conversation
8255269
to
689fa42
Compare
689fa42
to
dcae438
Compare
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.
light ACK, reindexed on mainnet and testnet with no issues
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.
light ACK, reindexed on mainnet and testnet with no issues
not sure why github decided to post this ^^^ twice... 🤷♂️ |
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.
I added almost as many comments as you made commits :D (maybe try to do a smaller PR in future :) ); some of these are just comments; others need addressed
dcae438
to
3a76107
Compare
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
3a76107
to
5956d56
Compare
5956d56
to
9928d0c
Compare
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 merging via merge commit
9928d0c
to
e092b18
Compare
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.
LGTM.
Good job 👍
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
…s have no idea why it is not matching with v19 activation
Note: g_versionbitscache is reset in UnloadBlockIndex()
… EHF logic anymore
…tation Impossible to drop it completelly right now because: - net doesn't know any details about chain - can't check status of fork - the functional test feature_maxuploadtarget.py assume block size 1Mb - DIP0001 can't be activated from regtest early block2 because big txes are not allowed after DIP0001 refactor: drop global variable fDIP0001ActiveAtTip - attempt 2
e092b18
to
42e65f4
Compare
) ## Issue being fixed or feature implemented `llmq/utils` has simple util code that used all over code base and also have too heavy code for calculation quorums such as: `GetAllQuorumMembers`, `EnsureQuorumConnections` and 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: - #5753 - #5486 See also #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: - new module llmq/options have a code related to various params, command line options, spork-related etc - llmq/utils is not included in various files which do not use any llmq/utils code - helper `BuildCommitmentHash` goes to llmq/commitment - helper `BuildSignHash` goes to llmq/signing - helper `GetLLMQParam` inlined since it's trivial (it has not been trivial when introduced ages ago) - removed dependency of `IsQuorumEnabled` on CQuorumManager which means `quorumManager` deglobalization is done for 90% ## How Has This Been Tested? - Run unit functional tests - updated circular dependencies `test/lint/lint-circular-dependencies.sh` - check that llmq/utils is not included without needs to calculate Quorums Members ``` $ grep -r include src/ 2> /dev/null | grep -v .Po: | grep -vE 'llmq/utils.(h|cpp)': | grep llmq/utils src/evo/mnauth.cpp:#include <llmq/utils.h> src/evo/deterministicmns.cpp:#include <llmq/utils.h> src/llmq/quorums.cpp:#include <llmq/utils.h> src/llmq/blockprocessor.cpp:#include <llmq/utils.h> src/llmq/commitment.cpp:#include <llmq/utils.h> src/llmq/debug.cpp:#include <llmq/utils.h> src/llmq/dkgsessionhandler.cpp:#include <llmq/utils.h> src/llmq/dkgsession.cpp:#include <llmq/utils.h> src/llmq/dkgsessionmgr.cpp:#include <llmq/utils.h> src/rpc/quorums.cpp:#include <llmq/utils.h> ``` ## 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 - [ ] 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
Issue being fixed or feature implemented
That's a follow-up changes for #5749 and #5740 (bitcoin#19438)
What was done?
Dropped all usages of llmq/utils to check if any hard-fork is active; as well dropped all direct usages of
chainparams
in favor of a new interfacedeploymentstatus
As positive side effect it removes circular dependency
validation
<->llmq/utils
and it exclude including llmq/utils from many other compilation units.How Has This Been Tested?
Run unit/functional tests
Breaking Changes
N/A
Checklist: