Post
Topic
Board Announcements (Altcoins)
Re: [ANN][HZ] Horizon Long + Fair Distribution|Decentralized Asset Exchange
by
altsheets
on 23/01/2016, 23:23:41 UTC
EDITED heavily, to avoid repetition below. See this post for the continuation of this.


chaincountdown v18
Motivation, why all this --> A user had complained that my image server 'ChainCountDown' was broken ... but it actually was jxnt.org which was down - which is the server I had been using for API queries (of 'getBlockchainStatus' --> blockNumber). New solution: Whenever an API lookup is failing, the next server is asked. Only if all nodes are failing, my server is in trouble. But now server names are hardcoded in config.py - so I wanted to select servers which may last a while. Choosing by looking at their domain names.

-->

PeerExplorer for HZ - updated!
Domain lookup for HZ nodes and NXT nodes


Code:
mkdir -p testing; cd testing; rm peerMagic.py* -f
apt-get -y install wget python
wget https://raw.githubusercontent.com/altsheets/chaincountdown/master/tools/peerMagic.py
python peerMagic.py
Or on Windows: install Python 2.7, then download & doubleclick peerMagic.py

You can
* study the source code
* look at the NXT results
* and the -really interesting- HZ results,
* and see the network analysis results below.

---

For NXT


... I could use www.peerexplorer.com results, so the main work was a multi-threaded DNS lookup.

Plus meaningful sorting mechanisms:
* The domain names are sorted back to front, with TLD as the most significant split part.
* The IP addresses are in increasing order, with most significant the left-most byte.

For 30 of the 46 IPs with open nxt API ... I got domain names.

---

For Horizon HZ

... I could not query any peerexplorer.com server, so I developed my own crawler:

(1) ask 'woll-e.net' for 'getPeers' ... answer is 659 APs (address+port, or IP)
(2) enqueue them all, and start 150 worker threads
(3) in each thread ... dequeue one AP, add it to 'apDone'.
(4) if an IP answers to a 'getTime' query on 7776, save it to 'openAPI'.
(5) if AP is answering on peer node port (usually 7774) to 'getInfo', then query 'getPeers' - then enqueue all its (yet-unvisited) peers.
(6) store all results in lists, do cool infoline printing ...
(7) keep on working through the queue ... until it is finally empty:

Ready. After checking 669 APs, on two ports each (and in ~20 seconds only!) ...:

Found
187 HZ nodes, and
63 with open API (answering on port 7776).

---

Of 63 nodes with open API, 44 had a domain name.

To see all details, scroll down in this output file peerMagic_HZ.txt.


Punchline: All HZ nodes with open API that I could find are these ...

Code:
 107.161.81.146:                               serv1.care-market.biz
 107.161.81.142:                           mail2.turboxafiliados.biz
 138.128.169.44:                    mail10.flex04.flexmailing.com.br
138.128.169.220:                  spcr-5.interspireservidores.com.br
138.128.169.227:                  spcr-6.interspireservidores.com.br
 107.155.89.207:                107-155-89-207-customer-at-wable.com
 107.155.89.235:                107-155-89-235-customer-at-wable.com
  107.155.90.83:                 107-155-90-83-customer-at-wable.com
  52.24.108.223:   ec2-52-24-108-223.us-west-2.compute.amazonaws.com
   52.24.142.13:    ec2-52-24-142-13.us-west-2.compute.amazonaws.com
   52.24.187.95:    ec2-52-24-187-95.us-west-2.compute.amazonaws.com
    52.24.85.12:     ec2-52-24-85-12.us-west-2.compute.amazonaws.com
  52.25.130.226:   ec2-52-25-130-226.us-west-2.compute.amazonaws.com
  52.26.118.234:   ec2-52-26-118-234.us-west-2.compute.amazonaws.com
     52.26.95.4:      ec2-52-26-95-4.us-west-2.compute.amazonaws.com
   52.27.145.90:    ec2-52-27-145-90.us-west-2.compute.amazonaws.com
    52.32.66.50:     ec2-52-32-66-50.us-west-2.compute.amazonaws.com
   52.88.94.131:    ec2-52-88-94-131.us-west-2.compute.amazonaws.com
  54.201.121.58:   ec2-54-201-121-58.us-west-2.compute.amazonaws.com
 192.227.239.69:                192-227-239-69-host.colocrossing.com
 173.232.15.176:                173-232-15.static.rdns.serverhub.com
  85.214.37.185:                                      mail.cochet.de
     78.46.32.4:            static.4.32.46.78.clients.your-server.de
   194.135.88.1:                                  7146.s.time4vps.eu
 194.135.89.218:                                  7169.s.time4vps.eu
   194.135.91.6:                                  7170.s.time4vps.eu
  194.135.89.18:                                  7171.s.time4vps.eu
  194.135.88.81:                                  7172.s.time4vps.eu
 194.135.88.110:                                  7173.s.time4vps.eu
  194.135.88.20:                                  7174.s.time4vps.eu
 194.135.88.186:                                  7175.s.time4vps.eu
 194.135.88.140:                                  7176.s.time4vps.eu
  194.135.92.93:                                  9205.s.time4vps.eu
  161.53.40.242:                                     castor.riteh.hr
   161.53.40.94:                                 penguinium.riteh.hr
  85.214.65.220:                           h1746043.stratoserver.net
 178.150.207.53:                          53.207.150.178.triolan.net
 178.150.207.53:                          53.207.150.178.triolan.net
 81.169.157.223:                                          woll-e.net
 81.169.157.223:                                          woll-e.net
 85.214.243.229:                                      eu2.woll-e.net
  81.169.133.57:                                      eu3.woll-e.net
  81.169.133.57:                                      eu3.woll-e.net
   85.214.18.69:                                      eu5.woll-e.net
    23.245.7.15
     40.115.9.5
    40.115.9.55
    45.55.79.49
   45.55.81.226
   45.55.157.54
   104.131.0.36
104.236.121.190
 138.128.169.91
150.107.225.218
  159.203.65.55
159.203.119.139
159.203.125.129
 176.126.245.17
  178.33.14.208
  185.38.44.173
  185.38.44.174
192.227.163.233
 193.198.102.32

These are all IPs with open API!

I still did not really know how to speak to peernodeservers. Is the port 7774 communication really not documented other than so? During my first attempt,  I covered only ~2/3 of the network:

Quote
BUT that way, I could NOT find 85.214.65.220 which is api.nhzcrypto.org.
So ... something in my strategy is not perfect yet. I might not be finding all nodes!
Happy about any suggestion.

MaWo's script helped ... and after a lot of fiddling, I found the way. See below.


Now ChainCountDown is more resilient, because instead of 1 server per coin, I hardcoded 6 and 7 addresses with open API. That should do the trick.

:-)


If you like this, show it:
  NHZ-Q675-SGBG-LQ43-D38L6   or   NXT-CMKU-ZQYK-V6CD-9UHF4
  or hard cash BTC 13whfNFT2dse7eiuNXVkuJivjxqSXHrW4j
 
EDIT: retweet


EDITED heavily, to avoid repetition below. See this post for the continuation of this.