Skip to content

Add Ballot Consistency Audit Report #35

@Just-Bamford

Description

@Just-Bamford

��# Issue 16: Add Ballot Consistency Audit Report

Problem

No structured way to get full audit report. Requires multiple read calls to reconstruct state.

Solution

  • Implement get_audit_report(ballot_id_hash) returning complete BallotAuditReport struct
  • Report includes: created_at, admin, tokens_issued, votes_cast, result_hash, is_consistent, state
  • TypeScript helper sorobanGetAuditReport() to fetch in single call
  • Enables external verification and compliance audits

Implementation Tasks

  • Define BallotAuditReport struct with all fields
  • Implement get_audit_report() function assembling all data
  • Add TypeScript helper sorobanGetAuditReport()
  • Unit tests: report includes all required fields
  • Unit tests: report matches individual reads
  • Verify report is immutable (read-only)

Note for Contributors

Complete Issues #1, #9, #10, #12 (ballot metadata, state transitions, expiration, timestamps) first to have all report fields available. The audit report is a comprehensive snapshot of ballot state for compliance and verification purposes. Include all fields: created_at, admin, tokens_issued, votes_cast, result_hash, is_consistent flag, current state, expiration_time. This single function call replaces multiple read operations, improving efficiency. The report is read-only and immutable. Use this for external audits and compliance verification. Consider returning error if ballot doesn't exist (use Option or error type).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions