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

fix: ban peers if they send a bad protobuf message #5693

Merged
merged 14 commits into from
Aug 31, 2023

Conversation

stringhandler
Copy link
Collaborator

Description

Propagate errors in decoding protobuf messages and conversions higher up so that nodes can ban them

Motivation and Context

Bad messages were previously ignored and could just fill up a node's buffers. This PR allows the nodes to ban more messages from those peers.

How Has This Been Tested?

Tested locally and cargo test

What process can a PR reviewer use to test or verify this change?

This is pretty tough to test, you might have to try connect an old node to this peer

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Test Results (CI)

1 194 tests   1 194 ✔️  7m 25s ⏱️
     37 suites         0 💤
       1 files           0

Results for commit 5559223.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Test Results (Integration tests)

  2 files  11 suites   23m 19s ⏱️
27 tests 25 ✔️ 0 💤 2
29 runs  27 ✔️ 0 💤 2

For more details on these failures, see this check.

Results for commit 5559223.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

This looks good. I just have a NIT about IllFormed, as camel case that just reads difficult.
There are some uncommented code to be deleted.
And I created issues for the todos. Todos left in code will stay there, and later get deleted. A todo worth doing, is worth creating a issue for

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Aug 30, 2023
SWvheerden
SWvheerden previously approved these changes Aug 30, 2023
@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Aug 30, 2023
@ghpbot-tari-project ghpbot-tari-project added the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Aug 30, 2023
@SWvheerden SWvheerden merged commit 58cbfe6 into tari-project:development Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants