Bitcoin Forum
November 22, 2017, 06:45:08 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: chaincountdown - blockchain aware countdown timer, with image server  (Read 1516 times)
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
August 08, 2015, 01:49:22 PM
 #1


chaincountdown.py v14

Time estimation to a target block height of nxt/hz/.... (any coin with open api is possible!)

Image rendered at request. Comes with httpserver.
Choose heading, fontsizes, fontface, colors.

Built for for the nxthacks voting, and beyond.
quickstart

This PNG image is generated automatically, and always up-to-date:
http://altsheets.ddns.net:8888/nxt/495997.png?heading=nxthacks%20voting

The image style can be adapted to any webpage, like here (in the center):
http://altsheets.ddns.net/assetgraphs/

license
Placed under my giveback license v05. Please give generously. Thx.

manual
Much more infos, e.g. on how to choose better colors, sizes, font, etc:
http://altsheets.ddns.net:8888

__________________________________________________________________________

TL;DR:
A Blockchain aware countdown timer !





Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
1511376308
Hero Member
*
Offline Offline

Posts: 1511376308

View Profile Personal Message (Offline)

Ignore
1511376308
Reply with quote  #2

1511376308
Report to moderator
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511376308
Hero Member
*
Offline Offline

Posts: 1511376308

View Profile Personal Message (Offline)

Ignore
1511376308
Reply with quote  #2

1511376308
Report to moderator
1511376308
Hero Member
*
Offline Offline

Posts: 1511376308

View Profile Personal Message (Offline)

Ignore
1511376308
Reply with quote  #2

1511376308
Report to moderator
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
August 08, 2015, 01:56:26 PM
 #2

(any coin with open api is possible!)

To answer the first -unasked- question:

Yes, to implement the same for bitcoin should not be difficult.

I am only using "getBlockchainStatus" to find the most recent block,
and "getBlock" to get the timestamp of a block in the past.

But for Bitcoin I would have to create empirical measurements
on several timescales, as with all the recent illnesses & attacks ...
... the blocktime is fluctuating so strongly.

Won't matter for long term prediction,
but will matter much for short countdowns.




Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
hexafraction
Sr. Member
****
Offline Offline

Activity: 378

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
August 08, 2015, 07:38:06 PM
 #3

Slightly unrelated, but can/may I adapt your giveback license to my own projects? It seems to be a step above the "give coins plz" donation pages most projects use.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
August 08, 2015, 09:20:21 PM
 #4

Of course you can.

That is the (2nd) nicest compliment I can get for having created it,
(only 2nd to actually receiving donations which is definitely the top 1 compliment Wink)

The condition is self-evident: Linking back to my original license.

Thanks a lot, makes me happy.


Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
August 10, 2015, 09:17:03 AM
 #5

New much improved version v10:

v10 Fonts & Static pages - detected automatically.

* all fontnames & static files are collected at startup
* new modules: helpers.py, imaging_tests.py
* two new image generators:
* all available fonts - 'allfonts.png' image is re-rendered when you call: python imaging.py
* all fonts with increasing size (to test minimum readable fontsize). Call: python imaging_tests.py
* new static page: errors.html with all errors that are caught

v09: all automatic now:

* at startup, prints folders, username, and current time, good for -->
* logging
* README-serverinstall.txt : starts the webserver not as root but as dedicated user



allfonts.png:


You choose your own fonts!


And *tattaa* the first donation came in! Thx!

Learn more at: http://altsheets.ddns.net:8888

:-)


Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
September 02, 2015, 02:50:55 AM
 #6

v11: "Conceptual Thunderstorm" - coding in the old programming language "English":

* new architecture.html
* new todo.html
* better errors.html
* github wikiwiki
* github issues
* I started this session (the 3rd after waking up 26 hours ago) in a MINDMAP software.
* What inspired me much ... to still continue, and happily... was this reaction :
   " It works! This is awesome. Tomorrow, i will make it work for ethereum. "
   Thanks! Feedback is a booster ...


v12: ... learning Docker. My very first ...

* ... Dockerfile, and
* DockerHub repository altsheets/chaincountdown
* and a lot of extra learning, because "Windows is different" again :-)
* already have an idea for an even better Dockerfile
   - one which always pulls the newest sourcecode from github. Next time ...
* oh, and actually *lol* ...
   I have won the nxthacks2015 - the voting poll of which was the inspiration for this chaincountdown.


v13: Docker magic

* learnt lots more about Docker, powerful stuff ... and applied it:
* see github chaincountdown/docker for these files, and more info on:
  * clonethenrunserver.sh is running inside the container
      * it cleverly clones the newest source code from github, before it starts the CCD server
      * and alternatively, withssh.sh additionally allows for ssh access into the docker container
  * dockerbuild.sh is building an image from the Dockerfile
  * dockercheatsheet.txt = useful docker commands
  * README.md exlaining it all
* autostarting using systemd
   * chaincountdown.service for systemd.
   * instructions how to install it.


ALL of the above, with tons of URLs linking to all the files ...
... in the LIVE VERSION of this neat and useful image server.


:-)


Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
January 06, 2016, 04:21:07 PM
 #7

version update

v13.5: Block times revisited

ChainCountDown (CCD) image server:
thread nxtforum
thread bitcointalk
github - shorturl 2020.fm/ccd
live server

______________________________________________________________________________


If you like this, show it:   NXT-CMKU-ZQYK-V6CD-9UHF4 (or other currencies at /give/)  - thanks.




Live rendered example image:


http://altsheets.ddns.net:8888/nxt/621000.png?heading=Upgrade%20your%20NXT&hea....


Please retweet this:





Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
January 23, 2016, 11:16:03 PM
 #8

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. Yiehah.


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.


Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
altsheets
Hero Member
*****
Offline Offline

Activity: 798

Free trial of #AltFolio = save time, react faster


View Profile WWW
January 25, 2016, 06:13:18 PM
 #9

chaincountdown v18

HZ peer network - analysis

Once the above crawler was ready, a natural next step was to make a network graph from the collected data.

This is how it looks:



Two nodes (green spheres) are connected with edges (gray lines) if they call each other 'peers'.
The more peers a node has (that is called the degree of a node), the bigger its sphere.

Strange shape, isn't it?

The network is very dense, so most nodes end up drawn into one big ball.
But those which are not, were catching my attention. Irregularities are interesting.

I tried an automatic clustering algorithm (i.e. "color nodes equal which are similar"),
called Louvain communities, and those nodes on the top right are clearly recognized
to be different from the all other ones:



You also see some quantitative measurements of network properties. For example:
"Path length" means how many steps a transaction needs from one node to another one.
"Diameter=4" says, it takes maximum 4 steps for a transaction to reach any other node,
and "characteristic path length" that on average only 1.769 steps.

The "Number of shared neighbors" is interesting. Many nodes are almost copies to each other.


But back to the question ... what is making those nodes at the top right so
different, that they are drawn so far out of the main bulk? Ah ... idea:
I checked for the HZ version ("NHZ V5.4") of each node, and colored them:



And now it was all clear: The nodes on the top right ... should be -but have not been- updated :-)
The mainstream (yellow) nodes do not like nostalgic, old-fashioned nodes - and do not connect to them.

The three V5 versions are mixing well, the network graph is showing that too.

Riddle solved.

By the way, here is the first picture with which I realized that I had probably hit the right reason:



The placement of the nodes is a bit artificial, it uses a "optimize inside clusters only" layouting.
But it gives immediate feedback that coloring ("NHZ versions") has something to do with graph structure.
The "NHZ 4.0e" version still has a lot of fans  Wink (RED nodes).


... Anyways, back on track:

Now I dropped all older-than-V5 nodes from the picture - and 160 IP addresses remained:



As they are hyperconnected, with many more links between them than needed
(diameter 2, average path length 1.722, average peers 44.225 / 159 = 28% of all nodes)
it is very difficult to get a meaningful automatic layout.

What I employed is the automatic partitioning "BlockModelling" by "Structural Equivalence"
... which identified 7 nodes (blue) to be different from all the other >150 ones.
They also seem to be the ones with the largest degree. I placed them manually.

At the bottom right you see a (log-log) histogram of degree versus number-of-such-nodes.

That's it, for now.


A typical next question of network analysis would be "resilience":
* ... against random failure: How many nodes have to fail until the network is fragmenting.
* ... against attacks: How many of the most connected nodes have to fail, until the network is fragmenting.

That can be examined in numerical simulations. Perhaps you want to try, then all network files are here ...


That was a really enjoyable, geeky weekend. What had started as a short & simple
user question "your image server is down" ... evolved into a whole research project.

Fascinating, no?

 Wink

If that was entertaining, enlightening, cool, or simply ... interesting
- then please now consider a way to give back. Thanks. You're good.


Newbium great new platform || AltFolio = Altcoin Portfolio solution || AAsset = crowdfunding, dividends paying = profit sharing Assets (on NXT & HZ) - big 2nd dividends were paid, xmas 2016 || AssetGraphs = novel GUI to assets & shareholders (won nxthacks2015!) || ABEE = Block Explorer Extension for ETH clones, live on SOIL || Advice = Consulting || assetparser.py and shareholders.py - tools for NXT/HZ asset buyers & issuers || bamm.py || PeerCrawler || PGP || Texts || Github e.g. ChainCountDown, ethjsre |||| /give/ GiveBackLicense /give/ |||| Looking for an affordable crypto advertisement service with adspaces on crypto-attractive websites, contact me, thx.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!