kristjank / ark-net

Ark Client for .NET
MIT License
7 stars 18 forks source link

3 feature #31

Closed ghost closed 7 years ago

ghost commented 7 years ago

closes #3

kristjank commented 7 years ago

Hi,

only one seed peer is usually not a good idea. I know there has been lately an issue with a lot of them. Please take a look at the clean healthy SEED peer list - and include them from here: https://github.com/kristjank/ark-go/blob/master/core/arkenv.go#L206

After you randomly select one SEED peer... you must build up the ACTIVE healthy peer list to work with, meaning:

  1. connect to randomly selected SEED peer from the SEED list
  2. call peer/list from that peer
  3. clean the received peer/list by (version= 1.0.1 - mainnet, status=OK, and find the max height peer, and then select just the ones (let's say 10 blocks smaller than max height peer)
  4. save filtered the peer list globaly so it can be used on the API for later on (multi broadcasts and switch peer, etc)...

--I use this in arkgo now - and I usually clean the list from 150 to 70/60 healthy peers to work with...