Skip to content
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

Optimize DKG debug message processing for performance and lower bandwidth #2672

Merged
merged 11 commits into from
Feb 1, 2019

Conversation

codablock
Copy link

Profiling has shown that a lot of time is spent processing DKG debug messages. There are multiple reasons for this:

  1. Serialization of the messages was unnecessarily expensive due to the message buffer being constantly resized
  2. Verification of the signatures was not batched
  3. ALL MNs were constantly sending status messages, even if they were not participating in any DKGs

See individual commits for the fixes

…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.
@codablock codablock added this to the 14.0 milestone Jan 31, 2019
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 merged commit 18950f9 into dashpay:develop Feb 1, 2019
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a 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;
Copy link
Member

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

@UdjinM6 UdjinM6 added P2P Some notable changes on p2p level RPC Some notable changes to RPC params/behaviour/descriptions labels Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2P Some notable changes on p2p level RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants