Crate voting_tools_rs
source ·Expand description
Rust implementation of voting tools
Original Haskell repository is https://github.com/input-output-hk/voting-tools
The queries themselves (as well as the details of the CLI) are different, but they should produce similar outputs. Malformed registrations are silently ignored.
Re-exports
pub use crate::verification::*;
Modules
- cli 🔒
- data 🔒
- db 🔒
- error 🔒
- exports 🔒
- logic 🔒
- Test api for internal tests as well for building mocks and various testing utils outside the project
- testing 🔒
Structs
- CLI arguments for snapshot tool
- Information required to connect to a database
- A registration that failed validation, along with the error
- Registrations with a corrupted raw cbor binary require extra metadata for context
- An ED25519 signature
- A signature for a registration as defined in CIP-15
- A slot number
- Single element in a snapshot
- Arguments to the
voting_power
function - A
u64
used to identify the purpose of a particular registration
Enums
- Sub command for internal testing or dry runs
- An error encountered during parsing and validation of a Catalyst registration
- The source of voting power for a given registration
Functions
- If there are errors, we want to notify the user, but it’s not really actionable, so we provide the option to silence the error via env var
- Calculate voting power info by querying a db-sync instance