Xud: Permanently disconnect from a node

Created on 14 Aug 2018  路  7Comments  路  Source: ExchangeUnion/xud

As discussed in https://github.com/ExchangeUnion/xud/issues/305#issuecomment-411606536 we should permanently disconnect from a peer on manual disconnect via gRPC/CLI.

Easiest proposed solution: add to bannedHosts.

grpc p2p

Most helpful comment

Yeah I'd use the banning functionality unless we have a reason not to.

All 7 comments

Yeah I'd use the banning functionality unless we have a reason not to.

Merge 'disconnect' into ban, which permanently disconnect, sets host on ban list and doesn't allow incoming connections from this host

We would be renaming disconnect to ban, right?

Before we implement this we should have banning done right first. We should add a hostReputationEvents table as discussed in #185. We should add a row to that table with the hostId that's being banned, and the event (in this case a manual banning). I think it would be nice to have an internal enum for all the reputation events there can be, and in the db we only store the number value of the enum. This event could be MANUAL_BAN. We'd also want to update the hosts table to set the banned field to true.

Thoughts? @moshababo

Yeah I agree on renaming it to ban and on not storing the ban score itself in the database. We should move this issue to alpha.2 because so is #185 and we don't necessarily need this right now.

Agreed on doing banning right first as per #185 moved it. And yes rename disconnect to ban @sangaman

Depends on #457

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kilrau picture kilrau  路  6Comments

kilrau picture kilrau  路  6Comments

moshababo picture moshababo  路  6Comments

offerm picture offerm  路  4Comments

moshababo picture moshababo  路  7Comments