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

Spam connections and forged block locators fix #3422

Merged
merged 8 commits into from
Nov 12, 2024

Conversation

zkxuerb
Copy link
Collaborator

@zkxuerb zkxuerb commented Oct 24, 2024

Motivation

The motivation behind this PR is to have a mechanism of banning peer IPs as outlined here to mitigate cases that might stall client/validators.

Approach

A banned peers list was implemented to store peers acting maliciously that are banned for 300 seconds. If a peer sends more than 10 connection requests in under 10 seconds they get banned and if a peer does not respond to block requests within 600 seconds ( can be changed ) they get banned.

Test Plan

This was tested on an isolated network with a different ip/machine per peer. Plan is to test this out on the Canary network with the relevant attacks.

Related PRs

#3366
#3388

node/sync/Cargo.toml Outdated Show resolved Hide resolved
node/sync/src/block_sync.rs Outdated Show resolved Hide resolved
node/sync/src/block_sync.rs Outdated Show resolved Hide resolved
node/bft/src/gateway.rs Outdated Show resolved Hide resolved
Copy link

@Pjrich1313 Pjrich1313 left a comment

Choose a reason for hiding this comment

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

This isn't a dupe white board needs to debug

Copy link

@Pjrich1313 Pjrich1313 left a comment

Choose a reason for hiding this comment

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

Debug and rerun nobes

@zkxuerb zkxuerb added Mid Priority This label is used to showcase medium urgency for this PR to get merged into the network. v1.1.4 canary release number labels Nov 12, 2024
Copy link
Collaborator

@ljedrz ljedrz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@zosorock zosorock merged commit 5adb31b into AleoNet:staging Nov 12, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Mid Priority This label is used to showcase medium urgency for this PR to get merged into the network. v1.1.4 canary release number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants