Skip to content

General Voting Transaction


Title: General Voting Transaction Structure

Status: Proposed

Authors: - Alex Pozhylenkov alex.pozhylenkov@iohk.io

Created: 2024-09-04


Abstract

This document defines a generalized voting transaction CDDL structure.

Motivation

Project "Catalyst" requires a structure to keep people vote's data in the secure and verifiable way.

Specification

vote transaction definition: gen_vote_tx.cddl
; All encoders/decoders of this specification must follow deterministic cbor encoding rules
; https://datatracker.ietf.org/doc/html/draft-ietf-cbor-cde-06

gen-vote-tx<choice-t, proof-t, prop-id-t, voter-data-t> = [
    votes<choice-t, proof-t, prop-id-t>,
    voter-data<voter-data-t>,
]

votes<choice-t, proof-t, prop-id-t> = [+ vote<choice-t, proof-t, prop-id-t>]
vote<choice-t, proof-t, prop-id-t>  = [
    choices<choice-t>,
    proof<proof-t>,
    prop-id<prop-id-t>,
]
choices<choice-t> = [+ choice<choice-t>]
choice<choice-t> = #6.24(bytes .cbor choice-t) ; encoded-cbor
proof<proof-t> = #6.24(bytes .cbor proof-t) ; encoded-cbor
prop-id<prop-id-t> = #6.24(bytes .cbor prop-id-t) ; encoded-cbor

voter-data<voter-data-t> = #6.24(bytes .cbor voter-data-t) ; encoded-cbor

Vote:

  • choices - a collection of voter choices for the proposal.
  • proof - a voter proof, could be null.
  • prop-id - a proposal id for which choice is made, could be null. For that case where for the event defined only one proposal, so it's redundant to provide an additional identifier for the proposal, so it could be placed null.

voter-data - an any additional voter's specific data.

Rationale

Path to Active

Acceptance Criteria

Implementation Plan