mn-spread

command module
v0.0.0-...-d48546e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2019 License: MIT Imports: 29 Imported by: 0

README

mn spread

License Build Status PRs Welcome

mn spread is a visualization tool that allows you to check how masternodes are distributed around the world by processing a list of unique ip addresses. It resolves ISP and geo location and groups this by region and ISP in real-time.

Three ways of fetching ip list information implemented:

  • Parse the IP list from a specific web explorer.
  • Use a local wallet cli to get recent masternode information
  • Use a webcrawler that returns you recent information about masternodes

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

coins implemented alt text

basic coin view alt text alt text alt text

Installation

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

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

Code dependencies

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

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

github.com/cwntr/go-crypto-tools for client, wallet cli and webcrawler's

mn spread API

Coins Details
Symbol Name API endpoint Data point Date implemented
XSN Stakenet (GET) /api/xsn local wallet cli 2019-02
DASH Dash (GET) /api/dash https://chainz.cryptoid.info 2019-02
XLQ ALQO (GET) /api/xlq https://masternodes.online 2019-03
GRPH Graphcoin (GET) /api/grph local wallet cli 2019-02
XZC Zcoin (GET) /api/xzc https://www.coinexplorer.net 2019-02
SYS Syscoin (GET) /api/sys https://chainz.cryptoid.info 2019-02
NIX NIX (GET) /api/nix https://chainz.cryptoid.info 2019-02
PHR PHORE (GET) /api/phr https://chainz.cryptoid.info 2019-02
PIVX PIVX (GET) /api/pivx https://masternodes.online 2019-03
BEET Beetle Coin (GET) /api/beet https://masternodes.online 2019-03
GIN GINcoin (GET) /api/gin https://masternodes.online 2019-03
POLIS Polis (GET) /api/polis https://masternodes.online 2019-03
RUPX Rupaya (GET) /api/rupx https://masternodes.online 2019-03
BITG BitcoinGreen (GET) /api/bitg https://masternodes.online 2019-03
CCBC Crypto Cash Back Coin (GET) /api/ccbc https://masternodes.online 2019-03
BWK Bulwark (GET) /api/bwk https://masternodes.online 2019-03
XLR Solaris (GET) /api/xlr https://masternodes.online 2019-03
PAWS PAWS Fund (GET) /api/paws https://masternodes.online 2019-03
DASHG Dash Green (GET) /api/dashg https://masternodes.online 2019-03
Util

(GET) /api/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

Available on: https://mn-spread.de/xsn/gov alt text

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

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

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

XSN Merchants (TPoS)

Available on: https://mn-spread.de/xsn/merchants alt text

(GET) /api/xsn/merchants/list reads local XSN wallet cli for merchant contracts and calculates commission rate based on last rewards

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.

Visualization Tools

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

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL