Skip to content

Commit 9c23bd6

Browse files
committed
update metadata fields
1 parent 080b53f commit 9c23bd6

File tree

4 files changed

+43
-29
lines changed

4 files changed

+43
-29
lines changed

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

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ so its fully follows the structure of the [Catalyst Signed Document] specificati
2121

2222
A list of used [Catalyst Signed Document protected header fields](./../signed_doc/spec.md#signed-object-fields).
2323

24-
```CDDL
25-
"brand_id" => UUID, ; UUID v4
26-
"campaign_id" => UUID, ; UUID v4
27-
"election_id" => UUID, ; UUID v4
28-
"category_id" => UUID, ; UUID v4
29-
```
30-
31-
* `brand_id` - a unique identifier which represents a "brand" who is running the voting,
32-
e.g. Catalyst, Midnight.
33-
* `campaign_id` - a unique identifier which defines a "campaign" of voting,
34-
e.g. "treasury campaign".
35-
* `election_id` - a unique identifier which defines an election,
36-
e.g. "Catalyst Fund 1", "Catalyst Fund 2".
37-
* `category_id` - a unique identifier which defines a voting category as a collection of proposals,
38-
e.g. "Development & Infrastructure", "Products & Integrations".
39-
4024
* [`content type`](./../signed_doc/spec.md#content-type): `application/cbor`.
4125
[Catalyst Signed Document content] must be a [CBOR] encoded.
4226

@@ -51,6 +35,11 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
5135
"content-type" => "br"
5236
```
5337

38+
* [`brand_id`](./../signed_doc/meta.md#brand_id).
39+
* [`campaign_id`](./../signed_doc/meta.md#campaign_id).
40+
* [`election_id`](./../signed_doc/meta.md#election_id).
41+
* [`category_id`](./../signed_doc/meta.md#category_id).
42+
5443
#### Public vote
5544

5645
For the public vote [`type`](./../signed_doc/spec.md#type) value defined as follows:

docs/src/architecture/08_concepts/signed_doc/cddl/additional_meta.cddl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ additional_fields = {
55
? "reply" => ref_type,
66
? "section" => text,
77
? "collabs" => [+any],
8+
? "brand_id" => UUID, ; UUID v4
9+
? "campaign_id" => UUID, ; UUID v4
10+
? "election_id" => UUID, ; UUID v4
11+
? "category_id" => UUID, ; UUID v4
812
}
913

10-
ref_type = UUID / [UUID, UUID]
14+
ref_type = UUID / [UUID, UUID] ; UUIDs v7
1115
ref_hash_type = [ref_type, hash-bytes]
1216

1317
UUID = #6.37(bytes)

docs/src/architecture/08_concepts/signed_doc/meta.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88
```
99
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
1010

11-
* [`ref` Document Reference](#ref-document-reference)
12-
* [`ref-hash` Secured Document Reference](#ref-hash-secured-document-reference)
13-
* [`template` Template Reference](#template-template-reference)
14-
* [`reply` Reply Reference](#reply-reply-reference)
15-
* [`section` Section Reference](#section-section-reference)
16-
* [`collabs` Authorized Collaborators](#collabs-authorized-collaborators)
11+
* [Metadata Fields List](#metadata-fields-list)
12+
* [`ref` Document Reference](#ref-document-reference)
13+
* [`ref-hash` Secured Document Reference](#ref-hash-secured-document-reference)
14+
* [`template` Template Reference](#template-template-reference)
15+
* [`reply` Reply Reference](#reply-reply-reference)
16+
* [`section` Section Reference](#section-section-reference)
17+
* [`collabs` Authorized Collaborators](#collabs-authorized-collaborators)
18+
* [`brand_id`](#brand_id)
19+
* [`campaign_id`](#campaign_id)
20+
* [`election_id`](#election_id)
21+
* [`category_id`](#category_id)
1722

1823
## `ref` Document Reference
1924

@@ -22,11 +27,11 @@ The purpose of the `ref` will vary depending on the document [`type`](./spec.md#
2227

2328
The `ref` can be either a single [UUID] or a [CBOR] Array of Two [UUID].
2429

25-
If the `ref` is a single [UUID], it is a reference to the document of that [`id`](./spec.md#id).
30+
If the `ref` is a single [UUID] v7, it is a reference to the document of that [`id`](./spec.md#id).
2631
If the `ref` is a [CBOR] array, it has the form `[<id>,<ver>]` where:
2732

28-
* `<id>` - the [UUID] of the referenced documents [`id`](./spec.md#id).
29-
* `<ver>` - the [UUID] of the referenced documents [`ver`](./spec.md#ver).
33+
* `<id>` - the [UUID] v7 of the referenced documents [`id`](./spec.md#id).
34+
* `<ver>` - the [UUID] v7 of the referenced documents [`ver`](./spec.md#ver).
3035

3136
## `ref-hash` Secured Document Reference
3237

@@ -80,3 +85,19 @@ It does NOT mean that the listed collaborators have agreed to collaborate, only
8085
gives them permission to.*
8186

8287
This list can impact actions that can be performed by the `Proposal Action Document`.
88+
89+
## `brand_id`
90+
91+
Unique identifier [UUID] v4, which represents a "brand" who is running the voting, e.g. Catalyst, Midnight.
92+
93+
## `campaign_id`
94+
95+
Unique identifier [UUID] v4, which defines a "campaign" of voting, e.g. "treasury campaign".
96+
97+
## `election_id`
98+
99+
Unique identifier [UUID] v4, which defines an election, e.g. "Catalyst Fund 1", "Catalyst Fund 2".
100+
101+
## `category_id`
102+
103+
Unique identifier [UUID] v4 which defines a voting category as a collection of proposals, e.g. "Development & Infrastructure", "Products & Integrations".

docs/src/architecture/08_concepts/signed_doc/spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ All these fields will be encoded as the [COSE] `protected` header
6868

6969
Each Catalyst Signed Document will have a type identifier called `type`.
7070

71-
The `type` is a [UUID] V4.
71+
The `type` is a [UUID] v4.
7272

7373
[A full list of Catalyst supported document types](./types.md)
7474

@@ -81,7 +81,7 @@ However, `id` uniqueness is only guaranteed on first use.
8181

8282
If the same `id` is used, by unauthorized publishers, the Catalyst Signed Document is invalid.
8383

84-
The `id` is a [UUID] V7.
84+
The `id` is a [UUID] v7.
8585

8686
The first time a Catalyst Signed Document is created, it will be assigned by the creator a new `id` which must
8787
be well constructed.
@@ -105,7 +105,7 @@ including all otherwise legitimate publications by the same author being marked
105105
Every Catalyst Signed Document in the system will be versioned.
106106
There can, and probably will, exist multiple versions of the same document.
107107

108-
The `ver` is a [UUID] V7.
108+
The `ver` is a [UUID] v7.
109109

110110
The initial `ver` assigned the first time a Catalyst Signed Document is published will be identical to the [`id`](#id).
111111
Subsequent versions will retain the same [`id`](#id) and will create a new `ver`,

0 commit comments

Comments
 (0)