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

mixclient: Introduce random message jitter #3388

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

jrick
Copy link
Member

@jrick jrick commented Jun 18, 2024

In this change, random per-peer (per-identity) and per-message jitter are added to add additional delay to all message broadcasts. The jitter delay will range from 0-3s, with a random 0-2700ms of that being per-peer and 0-300ms being per-message. The total delay is calculated as 1/10 of the stage timeout duration, and the per-message delay is calculated is both the mean and median of dcrd's inventory trickling delay.

While here, pair request messages are also submitted to the network with random delays spanning over the entire epoch duration, while avoiding any PR sends during the 30s before and after the epoch.

mixing/mixclient/client.go Show resolved Hide resolved
mixing/mixclient/client.go Outdated Show resolved Hide resolved
mixing/mixclient/client.go Show resolved Hide resolved
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

The changes and updates look good and I've also been testing with the race detector running on testnet and have not run into any issues.

@davecgh davecgh added this to the 2.0.3 milestone Jun 19, 2024
In this change, random per-peer (per-identity) and per-message jitter are
added to add additional delay to all message broadcasts.  The jitter delay
will range from 0-3s, with a random 0-2700ms of that being per-peer and
0-300ms being per-message.  The total delay is calculated as 1/10 of the stage
timeout duration, and the per-message delay is calculated is both the mean and
median of dcrd's inventory trickling delay.

While here, pair request messages are also submitted to the network with
random delays spanning over the entire epoch duration, while avoiding any PR
sends during the 30s before and after the epoch.
@davecgh davecgh merged commit 8daacc2 into decred:master Jun 19, 2024
2 checks passed
@jrick jrick deleted the jitter branch June 19, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants