Skip to content

A simple tool that counts relays (and which nodes did for what application) during a time period.

License

Notifications You must be signed in to change notification settings

BenVanGithub/relay_counter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

relay_counter

A simple tool that counts relays during a time period

How To Use

  1. Ensure golang 1.13+ environment is properly installed
  2. Sync (RC-0.5.2.9) Pocket Core Instance (ensure completely synced)
  3. go get github.com/pokt-network/relay_counter
  4. cd /src/github.com/pokt-network/relay_counter
  5. Edit configuration file (See details below)
  6. go run ./...
  7. check /src/github.com/pokt-network/relay_counter/result for the result file

Config File

Found in /config/config.json

{
  "timeline": {
    "start": -4,
    "end": -1, // can be 0 for latest
    "unit": "days" // blocks, sessions, min, weeks, hours
  },
  "endpoint": "http://localhost:8081/v1",
  "http_retry": 3, // if rpc not responsive
  "params": {
    "blocks_per_session": 4, // needed for sessions
    "approx_block_time_in_min": 15
  }
}

TL;DR how it works

With a simple config file, relay_counter uses binary search to find the nearest blocks to the start/end, then tallies up the relays using valid claims and proofs transactions.

About

A simple tool that counts relays (and which nodes did for what application) during a time period.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%