Go to file
Andreas Fackler d87709b1fc Version 0.3.0 2018-05-29 14:18:53 +02:00
abi Improve logging, add contract files. 2018-05-07 11:22:51 +02:00
ci Update Rust, Clippy, Rustfmt. 2018-05-19 17:13:01 +02:00
contracts Improve logging, add contract files. 2018-05-07 11:22:51 +02:00
src Use VotingKeyChanged events to determine voter set. 2018-05-29 12:48:59 +02:00
.gitignore Initial commit. 2018-03-31 18:50:43 +02:00
.travis.yml Add note about core.poa.network, fix tag regex. 2018-05-21 10:18:53 +02:00
Cargo.lock Add an option for earliest block number. 2018-05-28 10:24:46 +02:00
Cargo.toml Version 0.3.0 2018-05-29 14:18:53 +02:00
LICENSE Add the GPL3 license. 2018-04-19 09:28:19 +02:00
README.md Use VotingKeyChanged events to determine voter set. 2018-05-29 12:48:59 +02:00
screenshot.png Add a screenshot to the readme. 2018-05-12 11:04:52 +02:00

README.md

POA ballot stats

A command line tool that displays voting statistics for the POA network. It and needs to communicate with a fully synchronized node that is connected to the network: POA installation. Note that poa-ballot-stats needs access to the network's full logs, so the node must run with --pruning=archive --no-warp. Initial requirements for the tool described in RFC9 "Statistics of ballots." https://github.com/poanetwork/RFC/issues/9

Usage

Stable release

Download the archive for your platform from the latest release and unpack it. Run the tool with ./poa-ballot-stats <options>.

You can view the command line options with -h, and specify a different endpoint if your node e.g. uses a non-standard port. By default, it tries to connect to a local node http://127.0.0.1:8545.

In verbose mode, with -v, the list of collected ballot and key change events is displayed, and for each ballot the list of participating and abstaining voters.

The -c option takes a map with the POA contracts' addresses in JSON format. You can find the current maps for the main and test network the contracts folder. By default, it uses core.json, for the main network.

The -p option takes a time interval in hours, days, months, etc. E.g. -p "10 weeks" will only count participation in ballots that were created within the last 10 weeks. Alternatively, instead of a time, you can specify the earliest block number as a decimal integer with the -b option.

Examples:

$ ./poa-ballot-stats -h
$ ./poa-ballot-stats
$ ./poa-ballot-stats https://core.poa.network -v -p "10 weeks"
$ ./poa-ballot-stats -c contracts/sokol.json https://sokol.poa.network -v

Latest code

If you have a recent version of Rust, you can clone this repository and use cargo run -- instead of ./poa-ballot-stats to compile and run the latest version of the code.

Screenshot

Screenshot