-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Optimize DKG debug message processing for performance and lower bandwidth #2672
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
…ssionStatus No need to waste one byte per member and per LLMQ type.
Profiling has shown that a lot of time is spent in resizing the data vector when large messages are involved.
This field changes every block and causes all masternodes to propagate its status for every block, even if nothing DKG related has changed.
Otherwise MNs which are not members of DKG sessions will spam the network
This is not bound to a session and thus is prone to spam the network when final commitments are propagated in the finalization phase.
"statuses" only contains the current messages but none of the old messages, so nodes kept re-requesting old messages.
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, a nit
| if (ban) { | ||
| LOCK(cs_main); | ||
| Misbehaving(pfrom->id, 10); | ||
| return; |
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'd prefer a comment here on what action etc it is punishing
22efef0 No matter how fast we process sig shares, always force 100ms between sending (Alexander Block) 1bd0c2f Don't sleep in WorkThreadMain when CPU intensive work was done (Alexander Block) 40a247d Implement caching in CRecoveredSigsDb (Alexander Block) 6c63a77 Use CBLSLazySignature in CBatchedSigShares (Alexander Block) bff6e6e CLLMQUtils::IsQuorumActive() shouldn't require cs_main to be held (UdjinM6) fdba615 Introduce startBlockHeight to make things more explicit (Alexander Block) 7bca9a2 Correctly use SIGN_HEIGHT_OFFSET when checking for out of bound height (Alexander Block) 04b6a67 Reserve 4k of buffer for CSerializedNetMsg buffer (Alexander Block) be1c4a7 Fix cleanup of old recovered sigs (Alexander Block) Pull request description: Backport dash PRs (in the following order): dashpay#2640 dashpay#2672 dashpay#2674 dashpay#2702 dashpay#2705 dashpay#2706 dashpay#2707 NB: Some or them are partial backports since most of our llmq files are already updated to a more recent upstream version. So I basically ended up picking the commits that touch only the files `quorums_signing_shares.*` and `quorums_signing.*` I suggest to review by checking each individual commit against the corresponding upstream one ACKs for top commit: 22efef0 Liquid369: tACK 22efef0 Duddino: ACK 22efef0 Tree-SHA512: 94e5dcdef044524ad4fa4d1fadbe670d839a08ccadc39071ba9300cfc44ce3d19ba24dfef1a6c6745271139d43f43ea47ed5a29e06f0d94e13ff09957f8e0c10
Profiling has shown that a lot of time is spent processing DKG debug messages. There are multiple reasons for this:
See individual commits for the fixes