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:
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
For the public vote vote-type
value defined as follows:
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 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:
- Each proposal, defined by the
proposal
field, defines a number of possible options. - ristretto255 as a backend cryptographic group.
- A commitment key \(ck\) defined as a BLAKE2b-512 hash of the
proposal
bytes.