Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bafb9d8
add signed object design specs, update gen vote tx and vote v2 spec
Mr-Leshiy Dec 28, 2024
451c004
add catalyst signed document section
Mr-Leshiy Dec 29, 2024
3017e51
add table of contents
Mr-Leshiy Dec 29, 2024
0dfc4b6
fix markdown check
Mr-Leshiy Dec 29, 2024
0c4717f
fix spelling
Mr-Leshiy Dec 29, 2024
144612f
fix earthfile
Mr-Leshiy Dec 29, 2024
3afc095
Merge branch 'main' into feat/signed-object
Mr-Leshiy Jan 3, 2025
2acf841
rename catalyst signed object
Mr-Leshiy Jan 3, 2025
c8dca62
update kid def
Mr-Leshiy Jan 3, 2025
d1a4428
update content encoding
Mr-Leshiy Jan 3, 2025
45bedde
wip
Mr-Leshiy Jan 3, 2025
4c7f92b
wip
Mr-Leshiy Jan 3, 2025
b247fe7
add meta.md doc
Mr-Leshiy Jan 3, 2025
aa2e48f
add ref hash defintion
Mr-Leshiy Jan 5, 2025
98f82db
Add a table of available document types
Mr-Leshiy Jan 5, 2025
811c4b4
add proposal.md doc
Mr-Leshiy Jan 5, 2025
1221534
add comment document
Mr-Leshiy Jan 5, 2025
49a029f
add review document
Mr-Leshiy Jan 5, 2025
9defe3c
wip
Mr-Leshiy Jan 5, 2025
b989ea4
update v2 tx spec
Mr-Leshiy Jan 5, 2025
6b90ad4
fix spelling
Mr-Leshiy Jan 5, 2025
080b53f
fix mkdocs
Mr-Leshiy Jan 5, 2025
9c23bd6
update metadata fields
Mr-Leshiy Jan 6, 2025
76b248a
wip
Mr-Leshiy Jan 6, 2025
15ce4bc
remove redundant section
Mr-Leshiy Jan 6, 2025
d765971
fix ref_hash field
Mr-Leshiy Jan 6, 2025
ba32dd5
fix mk check
Mr-Leshiy Jan 6, 2025
2e71655
update immutable ledger spec
Mr-Leshiy Jan 6, 2025
3900978
add earthly cddl check
Mr-Leshiy Jan 6, 2025
217da88
fix ledger.md
Mr-Leshiy Jan 6, 2025
a154213
try
Mr-Leshiy Jan 6, 2025
712323d
fix
Mr-Leshiy Jan 6, 2025
ba67c28
cleanup documents
Mr-Leshiy Jan 6, 2025
cf2f339
Merge branch 'main' into feat/signed-object
Mr-Leshiy Jan 6, 2025
00dfc96
Merge branch 'main' into feat/signed-object
stevenj Jan 7, 2025
2cd3a35
Merge branch 'main' into feat/signed-object
stevenj Jan 8, 2025
84d2956
fix comments
Mr-Leshiy Jan 8, 2025
2f90b27
Merge branch 'main' into feat/signed-object
stevenj Jan 9, 2025
6d23d1c
Merge branch 'main' into feat/signed-object
stevenj Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/src/architecture/08_concepts/catalyst_docs/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: Catalyst Documents
arrange:
- proposal.md
- review.md
- comment.md
119 changes: 119 additions & 0 deletions docs/src/architecture/08_concepts/catalyst_docs/comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
Title: Catalyst Comment Document
Category: Catalyst
Status: Proposed
Authors:
- Steven Johnson <[email protected]>
Implementors:
- Catalyst Fund 14
Discussions: []
Created: 2024-12-29
License: CC-BY-4.0
---

## Abstract

## Comment Document

This is a document which provides a comment against a particular [Proposal Document].

### Specification

Catalyst Comment document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `b679ded3-0e7c-41ba-89f8-da62a17898ea` [UUID] value.

```CDDL
"type" => 37(h'b679ded30e7c41ba89f8da62a17898ea')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

* [`ref`](./../signed_doc/meta.md#ref-document-reference).
Reference to a related [Proposal Document].
* [`template`](./../signed_doc/meta.md#ref-document-reference) must be equal to `0b8424d4-ebfd-46e3-9577-1775a69d290c` value,
[comment template type](#comment-template).

```CDDL
"template" => 37(h'0b8424d4ebfd46e395771775a69d290c')
```

* [`reply`](./../signed_doc/meta.md#reply-reply-reference) (optional).
A reference to another comment,
where the comment is in reply to the referenced comment.
Comments may only reply to a single other comment document.
The referenced `comment` must be for the same proposal [`id`](./../signed_doc/spec.md#id),
but can be for a different proposal [`ver`](./../signed_doc/spec.md#ver).

* [`section`](./../signed_doc/meta.md#section-section-reference) (optional).
Used when the comment only applies to a specific section to the document being commented upon,
and not the entire document.

#### Content format

TODO

## Comment Template

This document pr provides the template structure which a Comment must be formatted to, and validated against.

### Specification

Catalyst Comment Template document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `0b8424d4-ebfd-46e3-9577-1775a69d290c` [UUID] value.

```CDDL
"type" => 37(h'0b8424d4ebfd46e395771775a69d290c')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

#### Content format

TODO

## Copyright

This document is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).

[Catalyst Signed Document]: ./../signed_doc/spec.md
[Catalyst Signed Document content]: ./../signed_doc/spec.md#signed-object-content
[Proposal Document]: ./proposal.md
[Brotli]: https://datatracker.ietf.org/doc/html/rfc7932
[JSON]: https://datatracker.ietf.org/doc/html/rfc7159
[UUID]: https://www.rfc-editor.org/rfc/rfc9562.html
109 changes: 109 additions & 0 deletions docs/src/architecture/08_concepts/catalyst_docs/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
Title: Catalyst Proposal Document
Category: Catalyst
Status: Proposed
Authors:
- Steven Johnson <[email protected]>
Implementors:
- Catalyst Fund 14
Discussions: []
Created: 2024-12-29
License: CC-BY-4.0
---

## Abstract

## Proposal Document

This is a document, formatted against the referenced proposal template, which defines a proposal which may be submitted
for consideration under one or more brand campaign categories.

The brand, campaign and category are not part of the document because the document can exist outside this boundary.
They are defined when a specific document is submitted for consideration.

### Specification

Catalyst Proposal document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `7808d2ba-d511-40af-84e8-c0d1625fdfdc` [UUID] value.

```CDDL
"type" => 37(h'7808d2bad51140af84e8c0d1625fdfdc')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

* [`template`](./../signed_doc/meta.md#ref-document-reference) must be equal to `0ce8ab38-9258-4fbc-a62e-7faa6e58318f` value,
[proposal template type](#proposal-template).

```CDDL
"template" => 37(h'0ce8ab3892584fbca62e7faa6e58318f')
```

#### Content format

TODO

## Proposal Template

This document provides the template structure which a Proposal must be formatted to, and validated against.

### Specification

Catalyst Proposal Template document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `0ce8ab38-9258-4fbc-a62e-7faa6e58318f` [UUID] value.

```CDDL
"type" => 37(h'0ce8ab3892584fbca62e7faa6e58318f')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

#### Content format

TODO

## Copyright

This document is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).

[Catalyst Signed Document]: ./../signed_doc/spec.md
[Catalyst Signed Document content]: ./../signed_doc/spec.md#signed-object-content
[Brotli]: https://datatracker.ietf.org/doc/html/rfc7932
[JSON]: https://datatracker.ietf.org/doc/html/rfc7159
[UUID]: https://www.rfc-editor.org/rfc/rfc9562.html
105 changes: 105 additions & 0 deletions docs/src/architecture/08_concepts/catalyst_docs/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
Title: Catalyst Review Document
Category: Catalyst
Status: Proposed
Authors:
- Steven Johnson <[email protected]>
Implementors:
- Catalyst Fund 14
Discussions: []
Created: 2024-12-29
License: CC-BY-4.0
---

## Abstract

## Review Document

TODO

### Specification

Catalyst Review document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `e4caf5f0-098b-45fd-94f3-0702a4573db5` [UUID] value.

```CDDL
"type" => 37(h'e4caf5f0098b45fd94f30702a4573db5')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

* [`template`](./../signed_doc/meta.md#ref-document-reference) must be equal to `ebe5d0bf-5d86-4577-af4d-008fddbe2edc` value,
[review template type](#review-template).

```CDDL
"template" => 37(h'ebe5d0bf5d864577af4d008fddbe2edc')
```

#### Content format

TODO

## Review Template

TODO

### Specification

Catalyst Review Template document is a [Catalyst Signed Document],
so its fully follows the structure of the [Catalyst Signed Document] specification.

#### Metadata Fields

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

* [`type`](./../signed_doc/spec.md#type): `ebe5d0bf-5d86-4577-af4d-008fddbe2edc` [UUID] value.

```CDDL
"type" => 37(h'ebe5d0bf5d864577af4d008fddbe2edc')
```

* [`content type`](./../signed_doc/spec.md#content-type): `application/json`.
[Catalyst Signed Document content] must be in [JSON] format.

```CDDL
3 => 30
```

* [`content encoding`](./../signed_doc/spec.md#content-encoding-optional):
[Catalyst Signed Document content] must be [Brotli] compressed.

```CDDL
"content-type" => "br"
```

#### Content format

TODO

## Copyright

This document is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).

[Catalyst Signed Document]: ./../signed_doc/spec.md
[Catalyst Signed Document content]: ./../signed_doc/spec.md#signed-object-content
[Brotli]: https://datatracker.ietf.org/doc/html/rfc7932
[JSON]: https://datatracker.ietf.org/doc/html/rfc7159
[UUID]: https://www.rfc-editor.org/rfc/rfc9562.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ check-cddl:
COPY ./gen_vote_tx.cddl \
./vote_tx_v2_public.cddl \
./vote_tx_v2_private.cddl \
./gen_vote_tx_cose_payload.cddl \
.

RUN cddlc -2 gen_vote_tx_cose_payload.cddl
RUN cddlc -2 gen_vote_tx.cddl
RUN cddlc -2 vote_tx_v2_public.cddl
RUN cddlc -2 vote_tx_v2_private.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@
; https://datatracker.ietf.org/doc/html/draft-ietf-cbor-cde-06

gen-vote-tx<choice-t, proof-t, prop-id-t, voter-data-t> = [
tx-body<choice-t, proof-t, prop-id-t, voter-data-t>,
signature
]

tx-body<choice-t, proof-t, prop-id-t, voter-data-t> = [
vote-type,
event,
votes<choice-t, proof-t, prop-id-t>,
voter-data<voter-data-t>,
]

vote-type = UUID ; e.g. Public or Private vote
event = { * event-key => event-value }
event-key = int / text
event-value = any

votes<choice-t, proof-t, prop-id-t> = [+ vote<choice-t, proof-t, prop-id-t>]
vote<choice-t, proof-t, prop-id-t> = [
choices<choice-t>,
Expand All @@ -30,8 +18,3 @@ proof<proof-t> = #6.24(bytes .cbor proof-t) ; encoded-cbor
prop-id<prop-id-t> = #6.24(bytes .cbor prop-id-t) ; encoded-cbor

voter-data<voter-data-t> = #6.24(bytes .cbor voter-data-t) ; encoded-cbor

UUID = #6.37(bytes) ; UUID type
signature = #6.98(cose.COSE_Sign) ; COSE signature

;# import rfc9052 as cose
Loading
Loading