Fetches Geo Location and ISPinformation for a given IP list e.g. Masternode hosting list
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
info
pkg
template
vendor/github.com/gin-contrib/location
.gitignore
LICENSE
README.md
api_coins.go
api_util.go
api_xsn_governance.go
api_xsn_merchants.go
archive.sh
build.sh
cfg.conf_example
main.go

README.md

Masternode Spread (mn-spread)

Resolves ISP and geo location from a given ip address list and groups this by region and ISP in real-time.

Currently allows two options to fetch data from:

  • Parse the IP list from a specific web explorer.
  • Use a local wallet cli to get masternode information

Flow

  1. get list of all active masternode ip addresses of a coin
  2. request ipstack api with ip address to retrieve information
  3. analyze and group by location and provider
  4. visualize

Example visualization

alt text

Installation

Its a simple go project that you can just checkout and build an executable. Requires go v1.10+

go get "github.com/cwntr/mn-spread"

go build -o mn && chmod +x mn

./mn

Code dependencies

github.com/dnaeon/go-vcr/recorder HTTP request/response recorder

github.com/gin-gonic/gin Gin Framework to utilize the frontend + APIs

MN spread API

Coins

(GET) /xsn groups Stakenet's MN nodes IPs by region and provider

(GET) /xlq groups ALQO's MN nodes IPs by region and provider

(GET) /graph groups GRAPH's MN nodes IPs by region and provider

(GET) /dash groups DASH's MN nodes IPs by region and provider

(GET) /phore groups PHORE's MN nodes IPs by region and provider

(GET) /nix groups NIX's MN nodes IPs by region and provider

(GET) /xzc groups ZCOIN's MN nodes IPs by region and provider

(GET) /sys groups SYSCOIN's MN nodes IPs by region and provider

Util

(GET) /totals lists current MN nodes IPs counts

(GET) /history/:coin/:start-date/:end-date returns archived .json objects in the given time range. e.g. /history/xsn/2019-02-01/2019-02-10 will return a list of 10 MN spread result objects.

XSN Governance

(GET) /xsn/governance/totals reads local XSN wallet cli for total governance stats

(GET) /xsn/governance/objects reads local XSN wallet cli for proposal information

(GET) /xsn/governance/object/:hash reads local XSN wallet cli for a specific object (:hash) parameter the object hash

External Tools

Translate IP to Geo Location / ISP info: ipstack.com(https://ipstack.com/)

Using a free api key for the ipstack api is request limited by 10k requests/ month, I decided to record the results. If same ip is requested again, it will replay the response it received before. So only new ip's will be requested.

Masternode IP data sources

XSN // StakeNet : https://xsnexplorer.io // local XSN wallet-cli

XLQ // ALQO : https://explorer.alqo.org

XZC // ZCOIN : https://www.coinexplorer.net/XZC/masternodes/list

GRAPH // GRAPHCOIN : using local graph wallet cli

DASH // DASH : https://chainz.cryptoid.info/explorer/masternodes.data.dws?coin=DASH

PHR // PHORE : https://chainz.cryptoid.info/explorer/masternodes.data.dws?coin=PHR

NIX // NIX : https://chainz.cryptoid.info/explorer/masternodes.data.dws?coin=NIX

SYS // SYSCOIN : https://chainz.cryptoid.info/explorer/masternodes.data.dws?coin=SYS

Visualization Tools

free template provided by web-framework: mdbootstrap (https://mdbootstrap.com)

map: jVectorMap (http://jvectormap.com/)