Author Topic: Tool / website: Bitshares Witness Log  (Read 10236 times)

0 Members and 1 Guest are viewing this topic.

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
Updates
Updates to http://roelandp.nl/bitshareswitnesslog/ with regards to GUI:

  • Made high variance difference not coloured red any longer. High Variance in a pricefeed of a given witness can also mean markets are moving fast and therefore a higher % off the median can also mean the given witness is already moving along to the new direction, whilst others not yet... New objective indicator for that... (tiny triangle top right of the cell)
  • Also Median is no longer green (is subjective too), but now a colored background cell.
  • Additionally onhover pricefeed cells now shows instant tooltips to reveal 'published ago + variance percentage'
  • Added the 'market volumes' to the header titles
  • Added some explainer stuff in the bottom

Hard refresh to see.

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
@Thom updated the explainer on the site...

Additionally added feature to highlight + deeplink to a witness in the list: http://roelandp.nl/bitshareswitnesslog/?witness=roelandp

+ a fix for bug submitted by @Bhuz : sorting was off for 'missed blocks' column.


Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
Looks great!

1 little nit - The text under the table "Update Frequency" reflects 3 times an hour, but now you're updating 4 times an hour; do I have that right?

yes i was so lazy I still have to update the frontend. They are seperate. For these kind of tools, the way how I like it is: the frontends are static hosted pages on AWS and the backend is a complete different server rendering static data files from the database and pushing it to AWS. This way no need to setup NGINX and support server loads. How i like it even better would be to not even have a database but host everything on Google Spreadsheet :P

But asap I will push some new stuff to the frontend and overwrite that info :)


Offline Thom

Looks great!

1 little nit - The text under the table "Update Frequency" reflects 3 times an hour, but now you're updating 4 times an hour; do I have that right?
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
@Thom I have updated the scripts now:

After the logging of the latest blockchain data the script immediately executes the creation of the new cache-file (JSONP) for the display on the website. I also intensified the logging (and therefore updating of the site) having it 4 times per hour 5,20,35,50 minute.

thanks for your input!

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
Thus when you say a feed is an hour old, I presume you mean that is the publish time you obtained in your most recent query of the blockchain. However, due to these 2 asynchronous timers there is inaccuracy in reporting.

My witness publishes every hour ~2 minutes after the hour. I looked at your witness log at 10 minutes after the hour, after I published, and it reported the feed was not updated when it was.

Hi @Thom the 'X time ago' feeds are based on the time registered on the blockchain as the 'feed publication' time. They are stored in the database, and then published in the JSON I use for the website. That JSON is parsed with moment.js to display the X-time ago based on your computer's time setting.

Here is the part in the code grabbing that timestamp from the blockchain and prepping it as a datetime for mysql:
Code: [Select]
for feedarrays in asset['bitasset_data']['feeds']:
            feedtime = datetime.datetime.strptime(feedarrays[1][0], "%Y-%m-%dT%H:%M:%S")

I use this combo feedtime + id_asset + id_account to compare feeds in my database so I only log new feed publications and not every time the same feeds when my tool does another round of data syncing.

What is happening instead and why your feed is not showing up: My tool gets at exactly (NTP) minute 2, 22, 42 cronjobs the current status from the blockchain. Most probably you are then still executing your feed publications :)

But yeah there is indeed a discrepancy... the 'last updated time' in the top of the page says whenever the last time the datafile was created. That is done on 5, 25, 45. But that is indeed based on the poll from 2,22,42. Let me see if I can align that more... I wanted to keep the polling & creating seperated, but I might just copy everything over into 1 script so I executes in 1 flow.

TLDR; the website shows the times based on blockchain.
« Last Edit: May 03, 2017, 06:15:28 pm by roelandp »

Offline Thom

When showing "last update time" there are 2 timers to consider that operate asynchronously: 1) timer for when feeds are published, controlled by witness and 2) the timer your tool uses between updates.

Thus when you say a feed is an hour old, I presume you mean that is the publish time you obtained in your most recent query of the blockchain. However, due to these 2 asynchronous timers there is inaccuracy in reporting.

My witness publishes every hour ~2 minutes after the hour. I looked at your witness log at 10 minutes after the hour, after I published, and it reported the feed was not updated when it was.

I don't think this is a major issue at all. You may already display the last time the blockchain was sampled and I just didn't notice it. Might be nice to show if it's not now.

In my case if you sample 3 times near 0, 20 and 40 minutes past the hour the most out of date report would be less than 20 minutes old if requested between 2 and 19 minutes past the hour.
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
    @roelandp, this is really excellent work!  A tool like this has been sorely needed.  There was a nice discussion a while back about what features would be useful for such a tool. I can't find it right now, but beyond what you've done so far, some of the ideas I can remember included monitoring latency and uptime (which you may have in the works already), measuring server processor speed and memory, and there was discussion about combining all of the various factors into a score.  And finally, there was talk about creating some charts in order to help visual the data.  I hope this gives you some ideas to continue taking this excellent tool forward!

    thx tbone.
    • I will add a monitoring for latency & uptime of the public seednodes provided i can find them by the witnesses posts.
    • Monitoring individual block producing servers for the network can be done as well however for security reasons witnesses should not declare their public nodes' IP / hostnames, so I cannot and/or won't tie those IP addresses to witness names.
    • Measuring server processor speed & memory would need a program (which would monitor and submit) run on the client side of the witness nodes, which is a bit to much to ask and also puts trust onto the witness to install this program onto their actual producing nodes and not some high powered machine to modify stats, so I will leave this out for now. I think the server speed / memory etc is not that important either, as long as witnesses are reliable block producers. If the chain grows and tx's requires better servers they will notice as they might start missing blocks and operate accoringly to upgrade system (or not).
    • Charts: @lafona made some charts already... Let me know what kind of charts you want to see based on the data of http://roelandp.nl/bitshareswitnesslog ! I currently log the follow data 3 times per hour:
      • Pricefeeds per witness
      • Missed blocks
    [/list]
    « Last Edit: May 03, 2017, 09:26:00 am by roelandp »

    Offline xeroc

    • Board Moderator
    • Hero Member
    • *****
    • Posts: 12922
    • ChainSquad GmbH
      • View Profile
      • ChainSquad GmbH
    • BitShares: xeroc
    • GitHub: xeroc

    Offline tbone

    • Hero Member
    • *****
    • Posts: 632
      • View Profile
    • BitShares: tbone2
    @roelandp, this is really excellent work!  A tool like this has been sorely needed.  There was a nice discussion a while back about what features would be useful for such a tool. I can't find it right now, but beyond what you've done so far, some of the ideas I can remember included monitoring latency and uptime (which you may have in the works already), measuring server processor speed and memory, and there was discussion about combining all of the various factors into a score.  And finally, there was talk about creating some charts in order to help visual the data.  I hope this gives you some ideas to continue taking this excellent tool forward!

    Offline roelandp

    • Full Member
    • ***
    • Posts: 114
    • Witness, dad, kitesurfer, event organiser
      • View Profile
      • RoelandP.nl
    • BitShares: roelandp
    • GitHub: roelandp
    Update:
    Added the 'This week missed' count next to the 'total blocks missed' per witness. The difference between the current missed blocks or the missed_blocks 7 days ago (or oldest registered if no 7 days exist) is being displayed. This adds to the realtime data and says more than the total_missed blocks IMHO.

    Offline roelandp

    • Full Member
    • ***
    • Posts: 114
    • Witness, dad, kitesurfer, event organiser
      • View Profile
      • RoelandP.nl
    • BitShares: roelandp
    • GitHub: roelandp
    Updates
    • Under the detail-pane (hit (+) button in front of any witness) you now find all (other) feeds published by the given witness (provided I track them, if you miss any, hit me up))
    • In the main overview with the 8-10 main markets (based on 24h volume) the 'median' price feed is highlighted with 'green + bold' in each column.
    • Some minor additional cosmetic changes to make err'thing look a little more slick-rick.
    Let me know any feedback! Thanks!
    « Last Edit: May 02, 2017, 06:27:28 pm by roelandp »

    Offline Yao

    • Hero Member
    • *****
    • Posts: 534
      • View Profile
    • BitShares: yao
    • GitHub: imYao

    Offline roelandp

    • Full Member
    • ***
    • Posts: 114
    • Witness, dad, kitesurfer, event organiser
      • View Profile
      • RoelandP.nl
    • BitShares: roelandp
    • GitHub: roelandp
    thanks for the replies @alt @Chris4210 @sakhan @fav !

    Updated with some cosmetic changes:



    Note if you hit the (+) button in front of each witness you can see a detailed view

    http://roelandp.nl/bitshareswitnesslog

    Offline fav

    • Hero Member
    • *****
    • Posts: 4278
    • No Pain, No Gain
      • View Profile
      • Follow Me!
    • BitShares: fav