Skip to content

Commit aa69938

Browse files
committed
wip
1 parent 98b274d commit aa69938

File tree

5 files changed

+82
-45
lines changed

5 files changed

+82
-45
lines changed

docs/src/architecture/08_concepts/catalyst_voting/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ arrange:
33
- crypto.md
44
- gen_vote_tx.md
55
- jorm.md
6+
- cat_v2.md
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Catalyst V2
2+
3+
---
4+
5+
Title: Catalyst V2 Voting Transaction
6+
7+
Status: Proposed
8+
9+
Authors:
10+
- Alex Pozhylenkov <[email protected]>
11+
12+
Created: 2024-10-24
13+
14+
---
15+
16+
## Abstract
17+
18+
This document decribes a Catalyst V2 vote transaction structure.
19+
20+
## Motivation
21+
22+
## Specification
23+
24+
It is a Catalyst v2 voting transaction
25+
defined on top the ["Generalized Vote Transaction"](./gen_vote_tx.md#specification) structure.
26+
27+
Following that spec we need define a format of `choice`, `proof` and `prop_id`.
28+
29+
!!! note
30+
31+
If `choice` is a public one, `proof` **must** be `null`.
32+
33+
<!-- markdownlint-disable max-one-sentence-per-line code-block-style -->
34+
??? note "vote transaction v2 definition: `vote_tx_v2.cddl`"
35+
36+
```CDDL
37+
{{ include_file('src/architecture/08_concepts/catalyst_voting/cddl/vote_tx_v2.cddl', indent=4) }}
38+
```
39+
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
40+
41+
### Vote generation
42+
43+
To generate a cryptographically secured `private_choice` and `zk_proof` parts you can follow this [spec](./crypto.md#vote).
44+
Important to note,
45+
that as part of [*initial setup*](./crypto.md#initial-setup) of the voting procedure,
46+
the following properties are used:
47+
48+
1. Each proposal,
49+
defined by the `vote_plan_id` and `proposal_index`, defines a number of possible options.
50+
2. [ristretto255] as a backend cryptographic group.
51+
3. A commitment key $ck$ defined as a [BLAKE2b-512] hash of the `vote_plan_id` bytes.
52+
53+
## Rationale
54+
55+
## Path to Active
56+
57+
### Acceptance Criteria
58+
<!-- Describes what are the acceptance criteria whereby a proposal becomes 'Active' -->
59+
60+
### Implementation Plan
61+
<!-- A plan to meet those criteria or `N/A` if an implementation plan is not applicable. -->
62+
63+
<!-- OPTIONAL SECTIONS: see CIP-0001 > Document > Structure table -->
64+
65+
[BLAKE2b-256]: https://www.blake2.net/blake2.pdf
66+
[BLAKE2b-512]: https://www.blake2.net/blake2.pdf
67+
[ristretto255]: https://ristretto.group
68+
<!-- [COSE]: https://datatracker.ietf.org/doc/rfc9052/ -->
69+
<!-- [CBOR]: https://datatracker.ietf.org/doc/rfc8949/ -->

docs/src/architecture/08_concepts/catalyst_voting/cddl/gen_vote_tx.cddl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ event_key = int / text
1717
votes = [+ vote]
1818
vote = [
1919
choices,
20-
proof,
21-
prop_id,
20+
proof \ null,
21+
prop_id \ null,
2222
]
2323
choices = [+ choice]
2424
choice = encoded-cbor
25-
proof = encoded-cbor \ null
26-
prop_id = encoded-cbor \ null
25+
proof = encoded-cbor
26+
prop_id = encoded-cbor
2727

2828
voters_data = encoded-cbor
2929

docs/src/architecture/08_concepts/catalyst_voting/jorm.md

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
---
44

5-
Title: Jörmungandr Voting Transactions
5+
Title: Jörmungandr Voting Transaction
66

77
Status: Proposed
88

@@ -15,25 +15,23 @@ Created: 2024-10-24
1515

1616
## Abstract
1717

18-
This document decribes a different definitions of the Jörmungandr based transactions.
18+
This document decribes a definition of the original Jörmungandr `VoteCast` transaction.
1919

2020
## Motivation
2121

2222
## Specification
2323

24-
### v1 (Jörmungandr blockchain)
25-
26-
An original Jörmungandr blockchain's transaction structure.
24+
An original Jörmungandr blockchain's `VoteCast` transaction structure.
2725

2826
<!-- markdownlint-disable max-one-sentence-per-line code-block-style -->
29-
??? note "V1 transaction definition: `jorm_v1.abnf`"
27+
??? note "V1 transaction definition: `jorm.abnf`"
3028

3129
```abnf
32-
{{ include_file('src/architecture/08_concepts/catalyst_voting/abnf/jorm_v1.abnf', indent=4) }}
30+
{{ include_file('src/architecture/08_concepts/catalyst_voting/abnf/jorm.abnf', indent=4) }}
3331
```
3432
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
3533

36-
#### Example
34+
### Example
3735

3836
V1 transaction representation in hex:
3937

@@ -77,7 +75,7 @@ V1 transaction representation in hex:
7775
* legacy signature (64 byte): `e6c8aa48925e37fdab75db13aca7c4f39068e12eeb3af8fd1f342005cae5ab9a1ef5344fab2374e9436a67f57041899693d333610dfe785d329988736797950d`
7876
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
7977

80-
#### Vote generation
78+
### Vote generation
8179

8280
To generate a cryptographically secured `ENCRYPTED-VOTE` and `PROOF-VOTE` parts you can follow this [spec](./crypto.md#vote).
8381
Important to note,
@@ -88,7 +86,7 @@ the following properties are used:
8886
2. [ristretto255] as a backend cryptographic group.
8987
3. A commitment key $ck$ defined as a [BLAKE2b-512] hash of the `VOTE-PLAN-ID` bytes.
9088

91-
#### Signing (witness generation)
89+
### Signing (witness generation)
9290

9391
Signature generated from the [BLAKE2b-256] hashed `VOTE-PAYLOAD` bytes except of the `WITNESS` part
9492
(the last part from the bytes array):
@@ -117,37 +115,6 @@ Expected witness (includes signature)
117115
```
118116
<!-- markdownlint-enable code-block-style -->
119117

120-
### v2
121-
122-
It is a Jörmungandr based transaction
123-
defined on top the ["Generalized Vote Transaction"](./gen_vote_tx.md#specification) structure.
124-
125-
Following that spec we need define a format of `choice`, `proof` and `prop_id`.
126-
127-
!!! note
128-
129-
If `choice` is a public one, `proof` **must** be `null`.
130-
131-
<!-- markdownlint-disable max-one-sentence-per-line code-block-style -->
132-
??? note "vote transaction v2 definition: `vote_tx_v2.cddl`"
133-
134-
```CDDL
135-
{{ include_file('src/architecture/08_concepts/catalyst_voting/cddl/vote_tx_v2.cddl', indent=4) }}
136-
```
137-
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
138-
139-
#### Vote generation
140-
141-
To generate a cryptographically secured `private_choice` and `zk_proof` parts you can follow this [spec](./crypto.md#vote).
142-
Important to note,
143-
that as part of [*initial setup*](./crypto.md#initial-setup) of the voting procedure,
144-
the following properties are used:
145-
146-
1. Each proposal,
147-
defined by the `vote_plan_id` and `proposal_index`, defines a number of possible options.
148-
2. [ristretto255] as a backend cryptographic group.
149-
3. A commitment key $ck$ defined as a [BLAKE2b-512] hash of the `vote_plan_id` bytes.
150-
151118
## Rationale
152119

153120
## Path to Active

0 commit comments

Comments
 (0)