Witnesses Monitor Map

in utopian-io •  6 years ago  (edited)

steemexplorer-title.png

Repository

https://github.com/joticajulian/steemexplorer/

Website

https://joticajulian.github.io/steemexplorer/#/witnesses/map

Witnesses Status Monitor

The last task for the EFTG project of the European Commission relates to develop a live witnesses status monitor map in the block explorer web interface. The current work shows a solution for this task. The principal idea is to display in a world map the witnesses and their status, changing to green the last witness that validated a block.

Location

There are two ways to get the location:

  1. If we know the IP addresses of the nodes we can search their location in services like ipstack.com. The list of status.steemnodes.com (developed by @wackou) is a good choice to start, or searching one by one in the posts of each witness. The advantage of this method is that we know where is located the server (but not necessarily the real person). The disadvantage is that this information is difficult to get. Apart from @wackou's website, there are no more sites to contrast the nodes.

  2. Looking at the metadata stored in the user profile. There are good services like nominatim or google maps that can be used to get the latitude and longitude given the city or country. The advantage of this method is that the metadata can be easily obtained. However, some witnesses have not filled this information, or have undesirable locations like "Worldwide".

In the current work, we first look at the metadata to get the location, and if the response is not good then the point is taken from a predefined json that contains the seed nodes. If the witness is not on the list either, then the witness is tagged as 'unknown location'.

Status with colors

The status of a witness is represented by 3 colors:

  • Green - for the last witness that validated the block
  • Blue - for witnesses that are online
  • Red - for witnesses that are offline

In the beginning, all witnesses are represented by red circles, and as time passes and they produce blocks they become blue, and the current witness is colored with green.

steemexplorer-website2.png

Installation

This page has been added to the steemexplorer as a new component called Map.vue. The json to modify the default seed nodes is located at src/assets/seednodes.json.

Open the file src/config.js to define the following constants:

const MAP = {
  TOP_WITNESSES: 20,
  INI_POS : [30, 0], //latitude, longitude
  INI_ZOOM : 1,
}

Install dependencies
npm install
Option 1: Serve with hot reload at localhost:8080
npm run dev
Option 2: Build for production with minification
npm run build

Technology Stack

  • vue.js: Steem Explorer Website.
  • steem-js: API to access the blockchain.
  • leaflet.js: Open-source JavaScript library for interactive maps

Relevant commits

How to contribute?

Any type of contribution is very welcome. You can make pull requests to the Github repository, or contact me on Discord (jga#0699), steem.chat (jga), or steem (@jga).

GitHub Account

https://github.com/joticajulian

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  • Please supply either the pull request url or the commits that belong to the post. My hack for reviewing the changes: https://github.com/joticajulian/steemexplorer/compare/master@%7B15day%7D...master
  • These seems machine generated, docs/static/css/app.656257de076928dae443eb515beae651.css perhaps they should be .git ignored?
  • The project seems very dependent on the generation and upkeep of the seednodes.json, any plans to automate the way to generate this file?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you very much for your review!

  • I just added the relevant commits for this Map.
  • Yes, the folder docsis machine generated. However, I need to commit it because it is the way it is available on Github Pages. In a future I will commit them separately to have cleaner and readable commits.
  • In this moment I don't know how to automate the generation of seednodes.jsonbecause as I said this information is difficult to get. However, for the EFTG project this file will not be necessary since all the witnesses will write their location in the user's profile and the website will use the other method.

Thank you for your review, @helo! Keep up the good work!

Congratulations @jga! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 15000 upvotes. Your next target is to reach 16000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Saint Nicholas challenge for good boys and girls

Support SteemitBoard's project! Vote for its witness and get one more award!

You got a 59.52% upvote from @ocdb courtesy of @jga!

@ocdb is a non-profit bidbot for whitelisted Steemians, current max bid is 12 SBD or the respective amount in Steem. Vote value is 150% of the bid.
Check our website https://thegoodwhales.io/ for the whitelist, queue and delegation info. Join our Discord channel for more information.

If you like what @ocd does, consider voting for ocd-witness through SteemConnect or on the Steemit Witnesses page. :)

Congratulations @jga! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 4000 upvotes. Your next target is to reach 5000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The Meet the Steemians Contest is over - Results are coming soon ...

Support SteemitBoard's project! Vote for its witness and get one more award!

Hey, @jga!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Amigo saludos espero que estés bien. Ya establecido en tu nuevo hogar. Saludos desde Venezuela.
Acuerdate de enviarme tu new numero Tlf.

Por cierto puedes hacer uno pero de usuarios no se uno que muestres que país esta creciendo aceleradamente en steemit. Se que aquí en Venezuela cada vez somos más.

Pensé que en Venezuela estaba aunque sea un testigo.

Hi @jga!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Felicitaciones, excelente trabajo!

Te felicito @jga! Realizas un trabajo maravilloso!!

Congratulations @jga! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got more than 800 replies. Your next target is to reach 900 replies.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Meet the Steemians Contest - The results, the winners and the prizes
Meet the Steemians Contest - Special attendees revealed
Meet the Steemians Contest - Intermediate results

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @jga! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 1000 as payout for your posts. Your next target is to reach a total payout of 2000

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Meet the Steemians Contest - The results, the winners and the prizes
Meet the Steemians Contest - Special attendees revealed
Meet the Steemians Contest - Intermediate results

Support SteemitBoard's project! Vote for its witness and get one more award!

Work accepted ! Thank you @jga! Very nice job!