Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Ban Peers via CLI #254

Merged
merged 5 commits into from
Nov 13, 2018
Merged

Ban Peers via CLI #254

merged 5 commits into from
Nov 13, 2018

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Nov 12, 2018

PR description

As part of working on #251 I needed to be able to ban certain nodes from my
connection pool and let others connect. This is a general solution to add
a --banned-nodeids CLI flag where the nodeIds of banned nodes are listed.

Fixed Issue(s)

As part of working on #251 I needed to be able to ban certain nodes from my
connection pool and let others connect.  This is a general solution to add
a --banned-nodeids CLI flag where the nodeIds of banned nodes are listed.
@shemnon shemnon requested a review from ajsutton November 12, 2018 23:19
@ajsutton
Copy link
Contributor

I think if peers are blacklisted from the command line they should stay blacklisted permanently, not be subject to the usual limit of 500 blacklisted peers. It would be very confusing for users to have nodes they explicitly blacklisted wind up being able to connect.

Change the working of the internal PeerBlacklist so that a set of banned nodes
is consulted and that list is not altered by the PeerBlacklist.
@shemnon
Copy link
Contributor Author

shemnon commented Nov 13, 2018

I started down the ban list is separate initially but felt it mixed the implementation too much. Now I have a separate set that is not updated by the PeerBlacklist.

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM. Need to ensure the docs get updated as needed.

@MadelineMurray
Copy link
Contributor

MadelineMurray commented Nov 13, 2018

Raised Jira Issue NC-1874 for docs.

shemnon and others added 3 commits November 13, 2018 05:55
Spotless.  Apparently two spaces after a period in monospace fonts is a sin.
Don't pass null around.
@shemnon shemnon merged commit c8baa9a into PegaSysEng:master Nov 13, 2018
@shemnon shemnon deleted the goerli branch November 13, 2018 16:27
shemnon added a commit to shemnon/pantheon that referenced this pull request Nov 14, 2018
* Ban Peers via CLI

As part of working on #251 I needed to be able to ban certain nodes from my
connection pool and let others connect.  This is a general solution to add
a --banned-nodeids CLI flag where the nodeIds of banned nodes are listed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants