-
Notifications
You must be signed in to change notification settings - Fork 1.2k
llmq: Some fixes/improvements #3943
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
fc28871 to
2fc079c
Compare
There should be no reason to keep this tread attached to its parent, if so, let me know.
186c12c to
a47ccac
Compare
|
@UdjinM6 See the last 5 commits, i changed/dropped some stuff. Quorums/Commitment caches are now |
a47ccac to
dbc08f0
Compare
|
Okay so, i pushed some more commits to refactor This recent commits also changes the way the |
|
LGTM so far, waiting for the "inactive quorum" issue to be discussed (and fixed if needed). |
|
Okay so in the meeting today it turned out that the reason for querying old quorums is mainly to validate IS locks with Soo, from my understanding it wouldn't help a lot then here to have a bigger cache, right? We could maybe still just add a command line which allows to increase the cache sizes...not sure if it makes sense, but we could haha.. And i guess someone (i would but i don't know when :P) should in any case do some research and testing around all this to see how resource consuming fun like this is also given the fact that ivan said they are sometimes at the limit of the RPC queue during sync 🤔 |
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
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, one nit
| template <typename CacheType> | ||
| static void InitQuorumsCache(CacheType& cache) | ||
| { | ||
| for (auto& llmq : Params().GetConsensus().llmqs) { |
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.
Can llmq be const?
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.
You could add it, but llmq is already const because GetConsensus() returns a const reference so llmqs is const and it would be kind of redundant.
* llmq: Detach dash-q-cachepop from caller There should be no reason to keep this tread attached to its parent, if so, let me know. * llmq: Avoid nullptr access for pindexStart in ScanQuorums * llmq: Add cacheKey in ProcessCommitment * llmq: Erase minable commitments if they have been processed * llmq: Add CLLMQUtils::InitQuorumsCache * llmq: Use unordered_lru_cache for quorumsCache and rename it * llmq: Use unordered_lru_cache for hasMinedCommitmentCache and rename it * llmq: Drop redundant check * llmq: Rename nMaxCount2 -> nScanCommitments * llmq: Refactor storeCache -> fCacheExists * llmq: Rename maxCount -> nCountRequested * llmq: Rename result -> vecResultQuorums * llmq: Return an empty vector if the are zero elements requested * unordered_lru_cache: Add max_size() * llmq: Partially reuse existing cache if more than max is requested * llmq: std::map<LLMQType, unordered_lru_cache<...>> for scanQuoumsCache * llmq: Drop params * llmq: Only emplace to cache if there is something available
No description provided.