ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

Whitelist P2P Mode #179

Open moshababo opened 6 years ago

moshababo commented 6 years ago

The default behavior is that a node will create/accept connection to any peer which is not on the black list. We previously discussed about having a strict mode, that unlike the permissive one, will block all peers by default, except these who are explicitly mentioned in a white list.

kilrau commented 6 years ago

Based on nodePubKey and let's stick with the whitelist terminology for now. Easier to understand. Blacklist is the default mode and functionality will exist as ban (https://github.com/ExchangeUnion/xud/issues/336) and I don't think we need a separate blacklist mode for that anymore.

Basics for whitelist mode:

kilrau commented 5 years ago

Would you be ok taking this? @reliveyy Sth not clear?

reliveyy commented 5 years ago

@kilrau OK

kilrau commented 5 years ago

EDIT of my comment above: Default mode and functionality will exist as ban (https://github.com/ExchangeUnion/xud/issues/336) and there is no need for a separate blacklist mode for that anymore.

Basics for whitelist mode:

sangaman commented 5 years ago

Is the plan to drop the configurable whitelist IP addresses?

I think those whitelist rpc calls make sense, then I imagine we'd have a configurable option as to whether to only allow node pub keys found on the whitelist.

I think we might want a different disconnection reason from "banned" for when a node is not on the white list.

kilrau commented 5 years ago

Is the plan to drop the configurable whitelist IP addresses?

IP addresses are not too permanent and were never planned to be whitelisted. xud NodePubKeys are.

then I imagine we'd have a configurable option as to whether to only allow node pub keys found on the whitelist.

Exactly.

I think we might want a different disconnection reason from "banned" for when a node is not on the white list.

Ok. Proposal? @sangaman

sangaman commented 5 years ago

Ok. Proposal?

Something like WHITELIST_RESTRICTED I guess - exactly what we call it isn't too important as long as there's a separate reason for it.

kilrau commented 5 years ago

WHITELIST_RESTRICTED sounds good to me. All clear? @reliveyy

kilrau commented 5 years ago

Did you already start with this? If not please move to post-1.0.0 @sangaman

It's not important enough to loose focus of the more pressing raiden and swap issues.

sangaman commented 5 years ago

I haven't, moving the milestone.