1- # V2
2-
31---
4-
52Title : Catalyst V2 Voting Transaction
6-
73Status : Proposed
8-
94Authors :
105 -
Alex Pozhylenkov <[email protected] > 11-
126Created : 2024-10-24
13-
147---
158
169## Abstract
@@ -21,12 +14,12 @@ This document describes a Catalyst V2 vote transaction structure.
2114
2215## Specification
2316
24- It is a Catalyst v2 voting transaction
25- defined on top the [ "Generalized Vote Transaction" ] ( ./gen_vote_tx.md#specification ) structure .
17+ Catalyst v2 voting transaction is a [ Catalyst Signed Document ] ,
18+ so its fully follows the structure of the [ Catalyst Signed Document ] specification .
2619
27- Following that spec need to define a ` choice ` , ` proof ` and ` prop-id ` .
20+ #### Metadata Fields
2821
29- Also additional [ Catalyst Signed Document protected header fields] ( ./../signed_doc/spec.md#catalyst- signed-document -fields ) are defined,
22+ A list of used [ Catalyst Signed Document protected header fields] ( ./../signed_doc/spec.md#signed-object -fields ) .
3023
3124``` CDDL
3225"brand_id" => UUID, ; UUID v4
@@ -44,7 +37,35 @@ Also additional [Catalyst Signed Document protected header fields](./../signed_d
4437* ` category_id ` - a unique identifier which defines a voting category as a collection of proposals,
4538 e.g. "Development & Infrastructure", "Products & Integrations".
4639
47- ### Public vote
40+ * [ ` content type ` ] ( ./../signed_doc/spec.md#content-type ) : ` application/cbor ` .
41+ [ Catalyst Signed Document content] must be a [ CBOR] encoded.
42+
43+ ``` CDDL
44+ 3 => 50
45+ ```
46+
47+ * [ ` content encoding ` ] ( ./../signed_doc/spec.md#content-encoding-optional ) : [ Catalyst Signed Document content] must be [ Brotli] compressed.
48+
49+ ``` CDDL
50+ "content-type" => "br"
51+ ```
52+
53+
54+ ##### Public vote
55+
56+ For the public vote [ ` type ` ] ( ./../signed_doc/spec.md#type ) value defined as follows:
57+
58+ * [ ` type ` ] ( ./../signed_doc/spec.md#type ) : ` 8de5586c-e998-4b95-8742-7be3c8592803 ` [ UUID] value.
59+
60+ ``` CDDL
61+ "type" => 37(h'8DE5586CE9984B9587427BE3C8592803')
62+ ```
63+
64+ ###### Content format
65+
66+ The public vote transaction [ Catalyst Signed Document content] format is based on the [ Generalized Vote Transaction Structure] .
67+
68+ Following that spec need to define a ` choice ` , ` proof ` and ` prop-id ` .
4869
4970<!-- markdownlint-disable max-one-sentence-per-line code-block-style -->
5071??? note "Public vote transaction v2 definition: ` vote_tx_v2_public.cddl ` "
@@ -54,13 +75,21 @@ Also additional [Catalyst Signed Document protected header fields](./../signed_d
5475 ```
5576<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
5677
57- For the public vote [ ` type ` ] ( ./../signed_doc/spec.md#type ) value defined as follows:
78+ ##### Private vote
5879
59- ``` CDDL
60- vote-type = #6.37(h'8DE5586CE9984B9587427BE3C8592803') ; 8de5586c-e998-4b95-8742-7be3c8592803
61- ```
80+ For the private vote [ ` type ` ] ( ./../signed_doc/spec.md#type ) value defined as follows:
81+
82+ * [ ` type ` ] ( ./../signed_doc/spec.md#type ) : ` e78ee18d-f380-44c1-a852-80aa6ecb07fe ` [ UUID] value.
83+
84+ ``` CDDL
85+ "type" => 37(h'E78EE18DF38044C1A85280AA6ECB07FE')
86+ ```
6287
63- ### Private vote
88+ ###### Content format
89+
90+ The private vote transaction [ Catalyst Signed Document content] format is based on the [ Generalized Vote Transaction Structure] .
91+
92+ Following that spec need to define a ` choice ` , ` proof ` and ` prop-id ` .
6493
6594<!-- markdownlint-disable max-one-sentence-per-line code-block-style -->
6695??? note "Private vote transaction v2 definition: ` vote_tx_v2_private.cddl ` "
@@ -70,13 +99,7 @@ vote-type = #6.37(h'8DE5586CE9984B9587427BE3C8592803') ; 8de5586c-e998-4b95-8742
7099 ```
71100<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
72101
73- For the private vote [ ` type ` ] ( ./../signed_doc/spec.md#type ) value defined as follows:
74-
75- ``` CDDL
76- vote-type = #6.37(h'E78EE18DF38044C1A85280AA6ECB07FE') ; e78ee18d-f380-44c1-a852-80aa6ecb07fe
77- ```
78-
79- #### Vote and Proof generation
102+ ###### Vote and Proof generation
80103
81104To generate a cryptographically secured ` choice-data ` and ` zk_proof ` parts you can follow this [ spec] ( ./crypto.md#vote ) .
82105Important to note,
@@ -99,5 +122,11 @@ the following properties are used:
99122
100123<!-- OPTIONAL SECTIONS: see CIP-0001 > Document > Structure table -->
101124
125+ [ Catalyst Signed Document ] : ./../signed_doc/spec.md
126+ [ Catalyst Signed Document content ] : ./../signed_doc/spec.md#signed-object-content
127+ [ Generalized Vote Transaction Structure ] : ./gen_vote_tx.md
102128[ BLAKE2b-512 ] : https://www.blake2.net/blake2.pdf
103129[ ristretto255 ] : https://ristretto.group
130+ [ Brotli ] : https://datatracker.ietf.org/doc/html/rfc7932
131+ [ UUID ] : https://www.rfc-editor.org/rfc/rfc9562.html
132+ [ CBOR ] : https://datatracker.ietf.org/doc/rfc8949/
0 commit comments