dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Masternodes and IPv6 #1320

Closed SCDeveloper closed 7 years ago

SCDeveloper commented 7 years ago

https://github.com/dashpay/dash/blob/v0.12.1.x/src/activemasternode.cpp#L159

Shouldn't this line have && pnode->addr.IsIPv6() as well?

if (pnode->fSuccessfullyConnected && pnode->addr.IsIPv4() && pnode->addr.IsIPv6())

Or is there a reason to not run Masternodes on IPv6?

schinzelh commented 7 years ago

Masternodes on IPv6 are disabled/deprecated for Dash 12.1 due to connectivity issues, see https://github.com/dashpay/dash/pull/1065

MrDefacto commented 7 years ago

remember also about TOR...

MrDefacto commented 7 years ago

deprecated? whaaat? ;-) IPv6??

schinzelh commented 7 years ago

Read the discussion on #1065 ... The masternode network is supposed to provide SERVICE to the network, and 12.0 has a lot of issues with mixing due to heterogenous IPv4/IPv6 landscape. Therefore we decided to disable IPv6 MASTERNODES for now.

Normal wallet functionality is not affected.

SCDeveloper commented 7 years ago

Ok because I did some testing and you can actually force all the Masternodes on a network to WATCHDOG_EXPIRED with some IPv6 tinkering. Dangerous.

I have implemented this change to DarkSilk:

enum Network ParseNetwork(std::string net) { if (fStormNode){ boost::to_lower(net); if (net == "ipv4") return NET_IPV4; if (net == "ipv6") return NET_UNROUTABLE; if (net == "tor" || net == "onion") return NET_UNROUTABLE; return NET_UNROUTABLE; } else if (!fStormNode) { boost::to_lower(net); if (net == "ipv4") return NET_IPV4; if (net == "ipv6") return NET_IPV6; if (net == "tor" || net == "onion") return NET_TOR; return NET_UNROUTABLE; } }

SCDeveloper commented 7 years ago

Looking through now to further enforce ipv6 being disabled/unavailable when running a Masternode.

SCDeveloper commented 7 years ago

By the way even though they go to WATCHDOG_EXPIRED they still receive payments, however, they cannot provide services such as InstantSend signing, mixing etc. They just get their payments....

SCDeveloper commented 7 years ago

Oh and the Masternode running in IPv6 stays ENABLED lol

MrDefacto commented 7 years ago

but what with countries where IPv6 is more popular? And if somebody have only access to publich IP6? strange decision. at least for now.

When Dash will fully support IPv6?

SCDeveloper commented 7 years ago

Once these security issues are sorted....

SCDeveloper commented 7 years ago

We are running tests on our "Stormnodes" under all situations. Hot/Cold/ipv4/ipv6/controller wallets/public ip/bindip etc. etc.

SCDeveloper commented 7 years ago

host = ipv4 only host = ipv4 + ipv6 + MN limited to ipv4 only host = ipv4 + ipv6 and check MN or not

schinzelh commented 7 years ago

I'd appreciate if you don't use the ticket system as chat. You have just triggered 30+mails in 10 minutes to members subscribed here.

Thanks.