Skip to content

V2


Title: Catalyst V2 Voting Transaction

Status: Proposed

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

Created: 2024-10-24


Abstract

This document describes a Catalyst V2 vote transaction structure.

Motivation

Specification

It is a Catalyst v2 voting transaction defined on top the "Generalized Vote Transaction" structure.

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

Also needed to define an event field, so for both public and private transaction it must be the following:

event = {
    "brand_id": UUID,
    "campaign_id": UUID,
    "election_id": UUID,
    "category_id": UUID,
}
  • brand_id - a unique identifier which represents a "brand" who is running the voting, e.g. Catalyst, Midnight.
  • campaign_id - a unique identifier which defines a "campaign" of voting, e.g. "treasury campaign".
  • election_id - a unique identifier which defines an election, e.g. "Catalyst Fund 1", "Catalyst Fund 2".
  • category_id - a unique identifier which defines a voting category as a collection of proposals, e.g. "Development & Infrastructure", "Products & Integrations".

Public vote

Public vote transaction v2 definition: vote_tx_v2_public.cddl
vote-tx-v2-public = gen-vote-tx<choice-data, proof-data, proposal>

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

;# include gen_vote_tx

For the public vote vote-type value defined as follows:

vote-type = #6.37(h'8DE5586CE9984B9587427BE3C8592803') ; 8de5586c-e998-4b95-8742-7be3c8592803

Private vote

Private vote transaction v2 definition: vote_tx_v2_private.cddl
vote-tx-v2 = gen-vote-tx<choice-data, proof-data, proposal>

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

proposal = UUID

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

;# include gen_vote_tx

For the private vote vote-type value defined as follows:

vote-type = #6.37(h'E78EE18DF38044C1A85280AA6ECB07FE') ; e78ee18d-f380-44c1-a852-80aa6ecb07fe

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