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

Khalil/1908 fix gossipsub integration test #5323

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

kc1116
Copy link
Contributor

@kc1116 kc1116 commented Jan 30, 2024

This PR resolves the intermittent issues observed in the TestGossipSubSpamMitigationIntegration. To enhance the stability of the test, the following improvements have been made:

Test Case Splitting:
The test has been divided into two distinct test cases, focusing on graft and prune control message types separately. This allows for more granular analysis and troubleshooting.

Control Message Volume Adjustment:
The volume of control messages sent during the test has been increased. This adjustment ensures that the penalized score is sustained for a longer duration than the time it takes for the score to decay. This modification guarantees the completion of the test within a reasonable timeframe.

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fce3336) 55.97% compared to head (e13a684) 55.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5323      +/-   ##
==========================================
+ Coverage   55.97%   55.98%   +0.01%     
==========================================
  Files        1017     1017              
  Lines       98513    98513              
==========================================
+ Hits        55145    55157      +12     
+ Misses      39161    39148      -13     
- Partials     4207     4208       +1     
Flag Coverage Δ
unittests 55.98% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peterargue
Copy link
Contributor

can you add some context about what's going on in this PR to the description?

Copy link
Contributor

@yhassanzadeh13 yhassanzadeh13 left a comment

Choose a reason for hiding this comment

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

Except one minor test case addition, the rest looks good 👍

})
t.Run("gossipsub spam mitigation invalid prunes", func(t *testing.T) {
testGossipSubSpamMitigationIntegration(t, p2pmsg.CtrlMsgPrune)
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also extend this test to iHave as well. Effectively, unknown, malformed and duplicate topics for iHave messages are also subsumed as spam attacks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kc1116 kc1116 added this pull request to the merge queue Feb 21, 2024
Merged via the queue into master with commit 57b5376 Feb 21, 2024
49 of 51 checks passed
@kc1116 kc1116 deleted the khalil/1908-fix-gossipsub-integration-test branch February 21, 2024 05:13
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.

4 participants