Skip to content
This repository has been archived by the owner on Sep 3, 2018. It is now read-only.

PeerCleaning and optimization #36

Closed
kristjank opened this issue Oct 4, 2017 · 0 comments · Fixed by #66
Closed

PeerCleaning and optimization #36

kristjank opened this issue Oct 4, 2017 · 0 comments · Fixed by #66

Comments

@kristjank
Copy link
Owner

Hi @sharkdev-j @sharkdev-a ,

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:

connect to randomly selected SEED peer from the SEED list
call peer/list from that peer
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)
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...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant