-
Notifications
You must be signed in to change notification settings - Fork 1.2k
perf: cache mined commitment for quorum merkle root calculation #6756
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
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThis set of changes refactors and modernizes the handling of quorum commitments and their associated caches throughout the codebase. The main updates include changing the return type of Estimated code review effort3 (~45 minutes) 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
📓 Path-based instructions (2)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (2)📓 Common learnings
src/evo/smldiff.cpp (6)Learnt from: CR Learnt from: kwvg Learnt from: knst Learnt from: kwvg Learnt from: CR Learnt from: kwvg 🚧 Files skipped from review as they are similar to previous changes (6)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (2)📓 Common learnings
src/evo/smldiff.cpp (6)Learnt from: CR Learnt from: kwvg Learnt from: knst Learnt from: kwvg Learnt from: CR Learnt from: kwvg 🔇 Additional comments (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request has conflicts, please rebase. |
…lock and related code
… RVO CFinalCommitment is a heavy object to create and copy
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
Issue being fixed or feature implemented
Every time when list of quorum is changed, the quorum final commitments for multiple active quorums are re-read from database.
It's a heavy operation in a current implementation due to heavy database reading, heavy BLS deserialization and multiple in-memory copies.
What was done?
llmq::utils::InitQuorumsCache(qc_hashes_cached)
How Has This Been Tested?
Time of calculation
CheckCbTxMerkleRoots
is shortened for 40%, and this step is a significant part of block validation.Expected impact to total time for block validation and re-index is 3-4%.
develop
:vs PR:
Breaking Changes
N/A
Checklist: