Giter VIP home page Giter VIP logo

poa-ballot-stats's Introduction

POA ballot stats

Build Status

POA ballot stats is a command line tool used to display voting statistics for the POA network.

Validators on the network engage in active governance, managing their roles and creating on-chain consensus. This is achieved through a balloting process.

Ballot tracking provides transparency for POA token holders and promotes validator accountability. The poa-ballot-stats tool displays active validator voting participation ordered by percentage of missed votes.

The default display includes:

  • non-participation/associated ballots
  • missed %
  • validator voting key (truncated to fit screen)
  • validator mining key (truncated)
  • first name last name

Screenshot

Dependencies

Prior to downloading poa-ballot-stats, install and activate a fully synchronized node connected to the POA network. See the POA installation guide for instructions.

Note: poa-ballot-stats must access the full network logs. Use these flags when running a node: --pruning=archive --no-warp

Example:

$ parity --chain poa-chain-spec/spec.json --reserved-peers poa-chain-spec/bootnodes.txt --pruning=archive --no-warp

Installation

Stable Release

Download the archive for your platform from the latest release and unpack.

Run the tool with ./poa-ballot-stats <options>.

Options

-h, --help view command line options and help information.

<url> specify a different endpoint if your node uses a non-standard port. The default connects to a local node http://127.0.0.1:8545.

-V, --version prints version information.

-v, --verbose display collected ballot and key change events and the list of participating and abstaining voters for each ballot.

-c, --contracts <contracts> append a map file with POA contract addresses in JSON format. The current maps for the main and test network are in the contracts folder. Default is the main network core.json file.

-p, --period <period> a time interval in hours, days, months, etc. For example, -p "10 weeks" only counts participation in ballots created within the last 10 weeks.

-b, --block takes the earliest block number as a decimal option. For example, -b 524647 counts participation from block number 524647 onward.

Examples:

# run the application
$ ./poa-ballot-stats

# view options
$ ./poa-ballot-stats -h

# track voting on poa core network, display voting details for previous 10 weeks
$ ./poa-ballot-stats https://core.poa.network -v -p "10 weeks"

# specify the contracts/sokol.json map file and run on sokol test network with voting details
$ ./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.

Troubleshooting

No Events Found error

  1. Parity must be fully synced to the correct node and running in full mode, not "light" mode. Check Parity UI and/or Task Manager to confirm Parity is synced and actively connected to peers.

  2. poa-ballot-stats must run with a file matching the Parity network node. Use the contracts address file (-c option) that matches the network connection. Included are files for the main POA network ("core") and the POA test network ("sokol"). The Parity UI will show the current network selection in green. Make sure this is the correct network, and not the Foundation or other Ethereum network.

Versioning

We use SemVer for versioning. See the project releases and the changelog for historical changes.

Contributing

Please read CONTRIBUTING.md for contribution and pull request protocol.

Contributors should look into issues or reference RFC9 Statistics of ballots for additional information.

License

License: LGPL v3

This project is licensed under the GNU Lesser General Public License. See the LICENSE file for details.

poa-ballot-stats's People

Contributors

afck avatar andogro avatar igorbarinov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.