-
Notifications
You must be signed in to change notification settings - Fork 176
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/6819 simplify rpc inspector validation #4642
Khalil/6819 simplify rpc inspector validation #4642
Conversation
- remove blocking pre-processing - queue up a single RPC per request not control message per request - update metrics - capture all errors encountered for each control message, pass the actual error count to the notification distributor - update CLI flags
…low/flow-go into khalil/6819-simplify-rpc-inspector-validation
insecure/integration/functional/test/gossipsub/rpc_inspector/metrics_inspector_test.go
Outdated
Show resolved
Hide resolved
network/p2p/inspector/validation/control_message_validation_inspector.go
Outdated
Show resolved
Hide resolved
network/p2p/inspector/validation/control_message_validation_inspector.go
Outdated
Show resolved
Hide resolved
network/p2p/inspector/validation/control_message_validation_inspector.go
Outdated
Show resolved
Hide resolved
network/p2p/inspector/validation/control_message_validation_inspector.go
Outdated
Show resolved
Hide resolved
return nil | ||
} | ||
|
||
// Name returns the name of the rpc inspector. | ||
func (c *ControlMsgValidationInspector) Name() string { |
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.
While the ControlMsgValidationInspector
is covered by integration tests in the insecure
package, its critical role in our codebase warrants dedicated unit tests. These tests should focus on both successful and unsuccessful RPC processing:
- Verify that legitimate RPCs (iHave, iWant, Graft, Prune) do not trigger misbehavior notifications.
- Test for iHave misbehaviors, ensuring each case triggers a misbehavior notification.
- Similarly, validate that iWant misbehaviors trigger misbehavior notifications.
- Confirm that GRAFT and PRUNE misbehaviors also lead to misbehavior notifications.
Please include these tests in this PR or create an issue for them to be implemented in a subsequent PR.
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.
Currently in progress here https://github.com/dapperlabs/flow-internal/issues/1902
- update error handling - add ihave duplicate message ID tests
- add iwant max message id sample size - sample iwant messages and message ids
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4642 +/- ##
==========================================
- Coverage 56.74% 52.16% -4.58%
==========================================
Files 876 734 -142
Lines 80357 65958 -14399
==========================================
- Hits 45597 34406 -11191
+ Misses 31208 28922 -2286
+ Partials 3552 2630 -922
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
…spector.go Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
…b.com:onflow/flow-go into khalil/6819-simplify-rpc-inspector-validation
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
…spector.go Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
- throw error on signaler context
Co-authored-by: Misha <15269764+gomisha@users.noreply.github.com>
Co-authored-by: Misha <15269764+gomisha@users.noreply.github.com>
Co-authored-by: Misha <15269764+gomisha@users.noreply.github.com>
…b.com:onflow/flow-go into khalil/6819-simplify-rpc-inspector-validation
…implify-rpc-inspector-validation
- compensate for rpc truncation - compensate for score decay
…implify-rpc-inspector-validation
This PR simplifies RPC control message validation.
Tests removed: