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

Track banned nodes in NodeList #565

Closed
sangaman opened this issue Oct 5, 2018 · 0 comments
Closed

Track banned nodes in NodeList #565

sangaman opened this issue Oct 5, 2018 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers p2p Peer to peer networking P3 low priority

Comments

@sangaman
Copy link
Collaborator

sangaman commented Oct 5, 2018

Right now when xud starts up, it does not track any nodes that have been previously banned. That means that we could theoretically accept a connection with a banned node, resulting in a uniqueness constraint violation when we try to add the banned node to the database.

Instead, when we read from the nodes table and come across a banned node, we should track it in a separate list of banned node pub keys. Then in Pool.openPeer we should check to make sure the node pub key of the newly connected peer does not appear in the banned list.

This also means that, when a node is banned, we should remove it from the nodes map in NodesList and add its pub key to the list of banned pub keys.

@sangaman sangaman added bug Something isn't working good first issue Good for newcomers p2p Peer to peer networking P3 low priority labels Oct 5, 2018
This was referenced Oct 9, 2018
@ghost ghost assigned ImmanuelSegol Oct 16, 2018
@ghost ghost added the in progress label Oct 16, 2018
sangaman pushed a commit that referenced this issue Oct 18, 2018
This commit creates a list to track banned nodes to ensure that we
don't accept or initiate connections to them. When a node is banned,
is is removed from the map of nodes in NodesList and its pub key  is
added to the list of banned pub keys.

Closes #565.
@ghost ghost removed the in progress label Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers p2p Peer to peer networking P3 low priority
Projects
None yet
Development

No branches or pull requests

2 participants