Skip to main content

Module record

Module record 

Source
Expand description

Record schema v1: questions and ballots, signed as canonical JSON.

Structs§

BadBallot
A tracker ballot that does not stand.
BallotEntry
A ballot entry.
CheckReport
Summary of ljos record check.
EntrySignature
Signature material for one entry.
QuestionEntry
A question entry.
SignedEntry
One signed entry in the plain record layer.
TrackerReport
Summary of ljos record check --tracker.
UnsignedEntry
A record entry before signing.

Enums§

Entry
Entry kinds in schema v1.

Constants§

SCHEMA_V1
The only accepted schema value for record entries.

Functions§

ballot_id
Ballot id from canonical ballot JSON without id.
canonical_json
Canonical JSON bytes: recursive key sort, no insignificant whitespace.
check_dir
Validate every .json entry under dir.
check_entries
Run schema + signature checks over many entries, including voter-key pinning.
check_tracker
Hold every ballot on the tracker at root to the push gate’s signature check (crate::ballot_sig::seat_check): the newest ballot-sig: note of its voter names its choice, verifies, and is under the key .ljos-seat-keys pins for that voter and for no other seat or voter on the issue, so one key does not count as several voters. A persona’s or a judge’s ballot is held to it too, since every cast signs. An unsigned ballot the tracker held before its first pin, by commit order, is legacy, as at the push gate (crate::ballot_sig::recorded_before_signing_in). Only files are read, and git for that order.
format_check_report
Text form of a successful check.
format_tracker_report
Text form of a tracker check: one FILE:LINE: ISSUE: REASON line per ballot that does not stand, then the count.
sign_entry
Sign one entry with seat’s ballot key.
tally
Latest unreplaced ballot per voter and question.
verify_entry
Verify a signed entry and its schema rules.