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

inc quietly on small batches of headers #3564

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Feb 16, 2021

Identified an issue with our headers sync - we increment our received msg count for every small batch of 32 headers, not once for the underlying larger batch of 512 headers.
This artificially inflates the received message rate and risks banning the peer due for abusive behavior.

This PR reworks the Headers msg handling to inc "quietly" for every 32 header batch and inc normally for the last batch (0 remaining headers).
This now correctly counts the received Headers msg as a single msg.

@antiochp antiochp marked this pull request as ready for review February 16, 2021 13:16
@antiochp antiochp merged commit 5b9664b into mimblewimble:master Feb 16, 2021
@antiochp antiochp deleted the inc_quiet_headers_batch branch February 16, 2021 14:36
@antiochp antiochp mentioned this pull request May 6, 2021
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 12, 2024
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.

1 participant