Skip to content

V2

Abstract

This document describes a Catalyst V2 vote transaction structure.

Motivation

Specification

Catalyst v2 voting transaction is a Catalyst Signed Document, so its fully follows the structure of the Catalyst Signed Document specification.

Metadata Fields

A list of used Catalyst Signed Document protected header fields.

3 => 50
"content-type" => "br"

Public vote

For the public vote type value defined as follows:

  • type: 8de5586c-e998-4b95-8742-7be3c8592803 UUID value.
"type" => 37(h'8DE5586CE9984B9587427BE3C8592803')
Content format

The public vote transaction Catalyst Signed Document content format is based on the Generalized Vote Transaction Structure.

Following that spec need to define a choice, proof and prop-id.

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

vote-tx-v2-public<voter-data-t> = gen-vote-tx<choice-data, proof-data, proposal, voter-data-t>

choice-data = uint
proof-data = undefined
proposal = UUID ; UUID v7

UUID = #6.37(bytes) ; UUID type

;# include gen_vote_tx

Private vote

For the private vote type value defined as follows:

  • type: e78ee18d-f380-44c1-a852-80aa6ecb07fe UUID value.
"type" => 37(h'E78EE18DF38044C1A85280AA6ECB07FE')
Content format

The private vote transaction Catalyst Signed Document content format is based on the Generalized Vote Transaction Structure.

Following that spec need to define a choice, proof and prop-id.

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

vote-tx-v2<voter-data-t> = gen-vote-tx<choice-data, proof-data, proposal, voter-data-t>

choice-data = ciphertext
ciphertext = [group-element, group-element]

proposal = UUID ; UUID v7

proof-data = zk-proof

zk-proof = [[+ (announcement, ~ciphertext, r-response)], scalar]

announcement = (group-element, group-element, group-element)
r-response = (scalar, scalar, scalar)

scalar = bytes .size 32
group-element = bytes .size 32

UUID = #6.37(bytes) ; UUID type

;# include gen_vote_tx
Vote and Proof generation

To generate a cryptographically secured choice-data and zk_proof parts you can follow this spec. Important to note, that as part of initial setup of the voting procedure, the following properties are used:

  1. Each proposal, defined by the proposal field, defines a number of possible options.
  2. ristretto255 as a backend cryptographic group.
  3. A commitment key \(ck\) defined as a BLAKE2b-512 hash of the proposal bytes.

Rationale

Path to Active

Acceptance Criteria

Implementation Plan