Skip to content

Commit ebbcdc1

Browse files
authored
Merge branch 'main' into feat/catalyst-python
2 parents 5942212 + 0b38ad4 commit ebbcdc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1294
-1209
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33

44
; Allowed Collaborators on the next subsequent version of a document.
5+
; Sorting for each array element follows the same sort order as specified for Map Keys,
6+
; as defined by CBOR Deterministic Encoding (4.3.2 Length-First Map Key Ordering),
7+
; and all array elements are unique.
58
collaborators = [ + catalyst_id_kid ]
69

710
; UTF8 Catalyst ID URI encoded as a bytes string.

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

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,12 @@
55

66
; Catalyst Vote Payload data object.
77
contest-ballot-payload = {
8-
+ document_ref => choices
8+
+ uint => choices
99
? "column-proof" : column-proof
1010
? "matrix-proof" : matrix-proof
1111
? "voter-choice" : voter-choice
1212
}
1313

14-
; Reference to a single Signed Document
15-
document_ref = [
16-
document_id
17-
document_ver
18-
document_locator
19-
]
20-
21-
; Document ID
22-
document_id = uuid_v7
23-
24-
; UUIDv7
25-
uuid_v7 = #6.37(bytes .size 16)
26-
27-
; Document Version
28-
document_ver = uuid_v7
29-
30-
; Where a document can be located, must be a unique identifier.
31-
document_locator = {
32-
"cid" : cid
33-
}
34-
35-
; IPLD content identifier.
36-
; Currently limited to SHA2-256 based CIDs.
37-
cid = #6.42(bytes .abnfb ("cid" .det cbor-cid ))
38-
39-
; CIDv1 ABNF Constrained for SHA2-256
40-
cbor-cid = '
41-
cid = cidv1 codec-cbor sha2-256 digest-32 digest
42-
cidv1 = %x00 %x01
43-
codec-cbor = %x51
44-
sha2-256 = %x12
45-
digest-32 = %x20
46-
digest = 32(%x00-FF)
47-
'
48-
4914
; Voters Choices.
5015
choices = [ 0, clear-choices ] /
5116
[ 1, elgamal-ristretto255-encrypted-choices ]

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
; document_refs
22

33

4-
; Reference to one or more Signed Documents
5-
document_refs = [ 1* document_ref ]
4+
; Reference to one or more Signed Documents.
5+
; Sorting for each array element follows the same sort order as specified for Map Keys,
6+
; as defined by CBOR Deterministic Encoding (4.3.2 Length-First Map Key Ordering),
7+
; and all array elements are unique.
8+
document_refs = [ + document_ref ]
69

710
; Reference to a single Signed Document
811
document_ref = [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
; Document Type
5-
document_type = [ 1* uuid_v4 ]
5+
document_type = uuid_v4
66

77
; UUIDv4
88
uuid_v4 = #6.37(bytes .size 16)

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Signed_Document_Metadata_Headers = (
7676
)
7777

7878
; Document Type
79-
document_type = [ 1* uuid_v4 ]
79+
document_type = uuid_v4
8080

8181
; UUIDv4
8282
uuid_v4 = #6.37(bytes .size 16)
@@ -90,8 +90,11 @@ uuid_v7 = #6.37(bytes .size 16)
9090
; Document Version
9191
document_ver = uuid_v7
9292

93-
; Reference to one or more Signed Documents
94-
document_refs = [ 1* document_ref ]
93+
; Reference to one or more Signed Documents.
94+
; Sorting for each array element follows the same sort order as specified for Map Keys,
95+
; as defined by CBOR Deterministic Encoding (4.3.2 Length-First Map Key Ordering),
96+
; and all array elements are unique.
97+
document_refs = [ + document_ref ]
9598

9699
; Reference to a single Signed Document
97100
document_ref = [
@@ -127,6 +130,9 @@ section_ref = json_pointer
127130
json_pointer = text
128131

129132
; Allowed Collaborators on the next subsequent version of a document.
133+
; Sorting for each array element follows the same sort order as specified for Map Keys,
134+
; as defined by CBOR Deterministic Encoding (4.3.2 Length-First Map Key Ordering),
135+
; and all array elements are unique.
130136
collaborators = [ + catalyst_id_kid ]
131137

132138
; UTF8 Catalyst ID URI encoded as a bytes string.

docs/src/architecture/08_concepts/signed_doc/diagrams/all.dot

Lines changed: 108 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,101 @@ digraph "All" {
377377
];
378378

379379

380+
"Proposal" [
381+
id="Proposal";
382+
label=<
383+
<TABLE BORDER="2" COLOR="#29235c" CELLBORDER="1" CELLSPACING="0" CELLPADDING="10">
384+
<TR>
385+
<TD PORT="title" BGCOLOR="#1d71b8" HREF="./docs/proposal/">
386+
<FONT COLOR="#ffffff"><B> Proposal </B></FONT>
387+
</TD>
388+
</TR>
389+
<TR>
390+
<TD ALIGN="LEFT" PORT="content type" BGCOLOR="#e7e2dd">
391+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
392+
<TR>
393+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">content type</FONT></TD>
394+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>application/json</I></FONT></TD>
395+
</TR>
396+
</TABLE>
397+
</TD>
398+
</TR>
399+
<TR>
400+
<TD ALIGN="LEFT" PORT="type" BGCOLOR="#b8b5b0">
401+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
402+
<TR>
403+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">type</FONT></TD>
404+
<TD ALIGN="RIGHT"><FONT FACE="Courier" COLOR="#7706E5"><B><I>7808d2ba-d511-40af-84e8-c0d1625fdfdc</I></B></FONT></TD>
405+
</TR>
406+
</TABLE>
407+
</TD>
408+
</TR>
409+
<TR>
410+
<TD ALIGN="LEFT" PORT="id" BGCOLOR="#e7e2dd">
411+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
412+
<TR>
413+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">id</FONT></TD>
414+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Document Id</I></FONT></TD>
415+
</TR>
416+
</TABLE>
417+
</TD>
418+
</TR>
419+
<TR>
420+
<TD ALIGN="LEFT" PORT="ver" BGCOLOR="#b8b5b0">
421+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
422+
<TR>
423+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">ver</FONT></TD>
424+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Document Ver</I></FONT></TD>
425+
</TR>
426+
</TABLE>
427+
</TD>
428+
</TR>
429+
<TR>
430+
<TD ALIGN="LEFT" PORT="template" BGCOLOR="#e7e2dd">
431+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
432+
<TR>
433+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">template</FONT></TD>
434+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Proposal Form Template</I></FONT></TD>
435+
</TR>
436+
</TABLE>
437+
</TD>
438+
</TR>
439+
<TR>
440+
<TD ALIGN="LEFT" PORT="collaborators" BGCOLOR="#b8b5b0">
441+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
442+
<TR>
443+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">collaborators</FONT></TD>
444+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Collaborators Reference List</I></FONT></TD>
445+
</TR>
446+
</TABLE>
447+
</TD>
448+
</TR>
449+
<TR>
450+
<TD ALIGN="LEFT" PORT="revocations" BGCOLOR="#e7e2dd">
451+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
452+
<TR>
453+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">revocations</FONT></TD>
454+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Version Revocations</I></FONT></TD>
455+
</TR>
456+
</TABLE>
457+
</TD>
458+
</TR>
459+
<TR>
460+
<TD ALIGN="LEFT" PORT="parameters" BGCOLOR="#b8b5b0">
461+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
462+
<TR>
463+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">parameters</FONT></TD>
464+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Brand Parameters<BR />Campaign Parameters<BR />Category Parameters</I></FONT></TD>
465+
</TR>
466+
</TABLE>
467+
</TD>
468+
</TR>
469+
470+
</TABLE>
471+
>
472+
];
473+
474+
380475
"Contest Parameters" [
381476
id="Contest Parameters";
382477
label=<
@@ -522,7 +617,17 @@ digraph "All" {
522617
</TD>
523618
</TR>
524619
<TR>
525-
<TD ALIGN="LEFT" PORT="revocations" BGCOLOR="#e7e2dd">
620+
<TD ALIGN="LEFT" PORT="ref" BGCOLOR="#e7e2dd">
621+
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
622+
<TR>
623+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">ref</FONT></TD>
624+
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Proposal</I></FONT></TD>
625+
</TR>
626+
</TABLE>
627+
</TD>
628+
</TR>
629+
<TR>
630+
<TD ALIGN="LEFT" PORT="revocations" BGCOLOR="#b8b5b0">
526631
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
527632
<TR>
528633
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">revocations</FONT></TD>
@@ -532,7 +637,7 @@ digraph "All" {
532637
</TD>
533638
</TR>
534639
<TR>
535-
<TD ALIGN="LEFT" PORT="parameters" BGCOLOR="#b8b5b0">
640+
<TD ALIGN="LEFT" PORT="parameters" BGCOLOR="#e7e2dd">
536641
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
537642
<TR>
538643
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">parameters</FONT></TD>
@@ -1007,101 +1112,6 @@ digraph "All" {
10071112
];
10081113

10091114

1010-
"Proposal" [
1011-
id="Proposal";
1012-
label=<
1013-
<TABLE BORDER="2" COLOR="#29235c" CELLBORDER="1" CELLSPACING="0" CELLPADDING="10">
1014-
<TR>
1015-
<TD PORT="title" BGCOLOR="#1d71b8" HREF="./docs/proposal/">
1016-
<FONT COLOR="#ffffff"><B> Proposal </B></FONT>
1017-
</TD>
1018-
</TR>
1019-
<TR>
1020-
<TD ALIGN="LEFT" PORT="content type" BGCOLOR="#e7e2dd">
1021-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1022-
<TR>
1023-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">content type</FONT></TD>
1024-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>application/json</I></FONT></TD>
1025-
</TR>
1026-
</TABLE>
1027-
</TD>
1028-
</TR>
1029-
<TR>
1030-
<TD ALIGN="LEFT" PORT="type" BGCOLOR="#b8b5b0">
1031-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1032-
<TR>
1033-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">type</FONT></TD>
1034-
<TD ALIGN="RIGHT"><FONT FACE="Courier" COLOR="#7706E5"><B><I>7808d2ba-d511-40af-84e8-c0d1625fdfdc</I></B></FONT></TD>
1035-
</TR>
1036-
</TABLE>
1037-
</TD>
1038-
</TR>
1039-
<TR>
1040-
<TD ALIGN="LEFT" PORT="id" BGCOLOR="#e7e2dd">
1041-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1042-
<TR>
1043-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">id</FONT></TD>
1044-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Document Id</I></FONT></TD>
1045-
</TR>
1046-
</TABLE>
1047-
</TD>
1048-
</TR>
1049-
<TR>
1050-
<TD ALIGN="LEFT" PORT="ver" BGCOLOR="#b8b5b0">
1051-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1052-
<TR>
1053-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">ver</FONT></TD>
1054-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Document Ver</I></FONT></TD>
1055-
</TR>
1056-
</TABLE>
1057-
</TD>
1058-
</TR>
1059-
<TR>
1060-
<TD ALIGN="LEFT" PORT="template" BGCOLOR="#e7e2dd">
1061-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1062-
<TR>
1063-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">template</FONT></TD>
1064-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Proposal Form Template</I></FONT></TD>
1065-
</TR>
1066-
</TABLE>
1067-
</TD>
1068-
</TR>
1069-
<TR>
1070-
<TD ALIGN="LEFT" PORT="collaborators" BGCOLOR="#b8b5b0">
1071-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1072-
<TR>
1073-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">collaborators</FONT></TD>
1074-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Collaborators Reference List</I></FONT></TD>
1075-
</TR>
1076-
</TABLE>
1077-
</TD>
1078-
</TR>
1079-
<TR>
1080-
<TD ALIGN="LEFT" PORT="revocations" BGCOLOR="#e7e2dd">
1081-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1082-
<TR>
1083-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">revocations</FONT></TD>
1084-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Version Revocations</I></FONT></TD>
1085-
</TR>
1086-
</TABLE>
1087-
</TD>
1088-
</TR>
1089-
<TR>
1090-
<TD ALIGN="LEFT" PORT="parameters" BGCOLOR="#b8b5b0">
1091-
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
1092-
<TR>
1093-
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="200"><FONT COLOR="#7706E5">parameters</FONT></TD>
1094-
<TD ALIGN="RIGHT"><FONT COLOR="#7706E5"><I>Brand Parameters<BR />Campaign Parameters<BR />Category Parameters</I></FONT></TD>
1095-
</TR>
1096-
</TABLE>
1097-
</TD>
1098-
</TR>
1099-
1100-
</TABLE>
1101-
>
1102-
];
1103-
1104-
11051115
"Proposal Comment Form Template" [
11061116
id="Proposal Comment Form Template";
11071117
label=<
@@ -1811,6 +1821,7 @@ digraph "All" {
18111821
"Category Parameters":"parameters":e -> "Campaign Parameters":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]
18121822
"Category Parameters Form Template":"parameters":e -> "Campaign Parameters" [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*", lhead="cluster_system_parameters"]
18131823
"Comment Moderation Action":"ref":e -> "Proposal Comment":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]
1824+
"Contest Ballot":"ref":e -> "Proposal":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]
18141825
"Contest Ballot":"parameters":e -> "Contest Parameters":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]
18151826
"Contest Ballot Checkpoint":"ref":e -> "Contest Ballot":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]
18161827
"Contest Ballot Checkpoint":"parameters":e -> "Contest Parameters":"title":w [dir=forward, penwidth=6, color="#29235c", headlabel="1", taillabel="*"]

0 commit comments

Comments
 (0)