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

IF: HS network message filtering infrastructure (net plugin <-> IF engine) #1605

Closed
Tracked by #1508
fcecin opened this issue Sep 7, 2023 · 0 comments · Fixed by #1613
Closed
Tracked by #1508

IF: HS network message filtering infrastructure (net plugin <-> IF engine) #1605

fcecin opened this issue Sep 7, 2023 · 0 comments · Fixed by #1613
Assignees

Comments

@fcecin
Copy link

fcecin commented Sep 7, 2023

Add code for:

  • Net plugin notifies the connection_id of incoming HS messages to IF engine (this will be done by an additional parameter in the existing callback function signature(s)).

  • IF engine can (optionally) supply a connection_id to exclude, when passing an outgoing (broadcast) HS message to Net plugin; this is done whenever the IF engine will (in the future) decide to propagate a message, instead of sending an original message to broadcast.

  • IF engine calls the Net plugin whenever it detects that it has received a potentially malicious message (duplicates, irrelevant messages, messages with invalid signatures, i.e. an enum "reason"...) from a given connection_id direct peer, allowing the Net plugin to disconnect that direct peer that it decides is misbehaving (for example, by counting how frequently each type of messaging offense happen in a counter that would be added to the corresponding connection object -- which could then e.g. "cool down" periodically, or maybe not).

@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog Sep 7, 2023
@fcecin fcecin self-assigned this Sep 7, 2023
@bhazzard bhazzard added 👍 lgtm and removed triage labels Sep 7, 2023
fcecin added a commit that referenced this issue Sep 9, 2023
- connection ID of hs message sender (net plugin -> IF engine)
- connection ID to exclude when propagating (IF engine -> net plugin)
- added callback to warn of bad HS messages from a connection (IF engine -> net plugin)
- added sample use of the warning callback for discarded proposals and votes
- helpers on qc_chain to allow for easy message propagation (no propagation decisions added)
- no-ops for this feature added to test_pacemaker (which does not have multi-hop)

Closes #1605
@fcecin fcecin linked a pull request Sep 9, 2023 that will close this issue
@arhag arhag closed this as completed Sep 11, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants