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

[Networking] Simplifies RPC inspection misbehavior notification handling #5398

Merged
merged 39 commits into from
Feb 22, 2024

Conversation

yhassanzadeh13
Copy link
Contributor

@yhassanzadeh13 yhassanzadeh13 commented Feb 15, 2024

This PR significantly streamlines GossipSub misbehavior notification handling. Previously, notifications passed through ControlMsgValidationInspector, GossipSubInspectorNotifDistributor, then GossipSubAppSpecificScoreRegistry. Now, we've removed GossipSubInspectorNotifDistributor, merging its functionality into GossipSubAppSpecificScoreRegistry, reducing the process to a direct flow from ControlMsgValidationInspector to GossipSubAppSpecificScoreRegistry. This change not only simplifies the notification handling process but also makes it easier to debug and understand. It eliminates unnecessary layers and abstractions, enhancing the efficiency of the inspector suite by fully integrating it with ControlMsgValidationInspector.

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2024

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (cb9a2f3) 56.02% compared to head (625fa72) 56.01%.

Files Patch % Lines
network/netconf/flags.go 39.53% 26 Missing ⚠️
network/p2p/test/fixtures.go 0.00% 4 Missing and 1 partial ⚠️
network/p2p/scoring/noopConsumer.go 0.00% 4 Missing ⚠️
network/p2p/builder/libp2pNodeBuilder.go 0.00% 3 Missing ⚠️
network/p2p/scoring/registry.go 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5398      +/-   ##
==========================================
- Coverage   56.02%   56.01%   -0.02%     
==========================================
  Files        1026     1026              
  Lines       99859    99815      -44     
==========================================
- Hits        55944    55909      -35     
+ Misses      39618    39611       -7     
+ Partials     4297     4295       -2     
Flag Coverage Δ
unittests 56.01% <60.20%> (-0.02%) ⬇️

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.

@yhassanzadeh13 yhassanzadeh13 marked this pull request as ready for review February 16, 2024 18:43
@yhassanzadeh13 yhassanzadeh13 requested review from kc1116 and peterargue and removed request for kc1116 February 16, 2024 18:53
Comment on lines +416 to +417
// TODO: we have to add a metric for this case.
// TODO: we should not have deduplication for this case, as we need to penalize the peer for each misbehaviour, we need to add a nonce to the notification.
Copy link
Contributor

Choose a reason for hiding this comment

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

are there issues for these?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yhassanzadeh13 yhassanzadeh13 added this pull request to the merge queue Feb 22, 2024
Merged via the queue into master with commit 514461a Feb 22, 2024
49 of 51 checks passed
@yhassanzadeh13 yhassanzadeh13 deleted the yahya/simplify-rpc-inspection branch February 22, 2024 17:31
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