There is a nasty attack if some node can't accept incoming connections and it is limited to 1 or few outgoing connections. If such node connects to rogue (enemy) node or few of
them, it won't be able to sync with legit blockchain until eventualy it starts dropping connections to rogue nodes and go lucky with picking some legit node out of the peers.dat file.
Indeed. If I make the max outbound connection count configurable, I'll use 8 as the minimum setting as well as the default. Then someone would have to modify the source themselves to get it down to 1, and if they do that, they're on their own anyway. Anyone have a case for the minimum configurable outbound count (in the case of making this a config file and command line option) being a number other than 8?
to rogue nodes only it would never sync with legit blockchain because rogue nodes would surely share only IPs of the other rogue nodes.
I seem to recall the client is set up to connect to a certain IRC channel on the Freenode servers to locate other peer IP's. Now that there's enough people running YACoin nodes/clients, it may be hard for a rogue operator to poison the list of available peers unless someone disables IRC (irc=0). I need to double-check that the IRC portion is currently working correctly for peer discovery.
Some attention to the seed nodes are probably in order to ensure someone starting up the client for the first time will still accomplish something if the IRC-based peer discovery method fails. Current official client source doesn't have any seed nodes set.