-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: ScanQuorums should not start cache population for outdated quorums #5784
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
ogabrielides
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
makes sense
| assert(pQuorumBaseBlockIndex); | ||
| auto quorum = GetQuorum(llmqType, pQuorumBaseBlockIndex); | ||
| // populate cache for keepOldConnections most recent quorums only | ||
| bool populate_cache = vecResultQuorums.size() < llmq_params_opt->keepOldConnections; |
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.
is vecResultQuorum sorted from newest to oldest?
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.
yes, the most recent quorum is at index 0
knst
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.
LGTM
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
Cache population for old quorums is a cpu heavy operation and should be avoided for inactive quorums at least oin
ScanQuorums. This issue is critical for testnet and other small network because every mn participate in almost every platform quorum and cache population for 2 months of quorums can easily block everything for 15+ minutes on a 4 cpu node. On mainnet quorum distribution is much better but it's still a small waste of cpu (or not so small for unlucky nodes).#5761 follow-up
What was done?
Do not start cache population for outdated quorums, improve logs in
StartCachePopulatorThreadto make it easier to see what's going on.How Has This Been Tested?
run a mn on testnet
Breaking Changes
n/a
Checklist: