Skip to content

Commit 7fa28f7

Browse files
CIP-0100? | Governance Metadata (cardano-foundation#556)
* Second draft of the governance metadata CIP * Typo * Small bits of feedback * Make open questions more discoverable * Assign CIP number 100 * Revision based on community feedback This implements the feedback from 2 separate community workshops, the recordings of which can be found here: - https://www.youtube.com/watch?v=X3XdQZx_TyU - https://www.youtube.com/watch?v=bBQMF6Dr6HY In particular, this limits the scope of what this CIP tries to achieve, and answers many of the open questions. There are still a few small items to finish off before we're ready to merge this. * Final draft for CIP-0100 Provides a JSON-LD and JSON Schema file for the minimal features. Reworks the wording of many bits, especially to reference a parallel CIP to extend CIP-0013. Renames "justification" to "comment", to leave it more general so others can specify the rationale-related extensions. Provides example test vectors. Folds the "augmentation" concept into a simple "references" field. * Update CIP-0100/README.md Co-authored-by: Ryan Williams <[email protected]> --------- Co-authored-by: Ryan Williams <[email protected]>
1 parent 5498717 commit 7fa28f7

File tree

7 files changed

+585
-0
lines changed

7 files changed

+585
-0
lines changed

CIP-0010/registry.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"transaction_metadatum_label": 1667,
4848
"description": "CIP-72: dApp registration & Discovery"
4949
},
50+
{
51+
"transaction_metadataum_label": 1694,
52+
"description": "Voltaire - additional metadata for governance, provided in a separate transaction"
53+
},
5054
{
5155
"transaction_metadatum_label": 1870,
5256
"description": "Open Badges v2.0 compliant metadata"

CIP-0100/README.md

Lines changed: 312 additions & 0 deletions
Large diffs are not rendered by default.

CIP-0100/cip-0100.common.jsonld

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"@context": {
3+
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
4+
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
5+
"body": {
6+
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
7+
"@context": {
8+
"references": {
9+
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
10+
"@container": "@set",
11+
"@context": {
12+
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
13+
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
14+
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
15+
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
16+
}
17+
},
18+
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
19+
"externalUpdates": {
20+
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
21+
"@context": {
22+
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
23+
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
24+
}
25+
}
26+
}
27+
},
28+
"authors": {
29+
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
30+
"@container": "@set",
31+
"@context": {
32+
"did": "@id",
33+
"name": "http://xmlns.com/foaf/0.1/name",
34+
"witness": {
35+
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
36+
"@context": {
37+
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
38+
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
39+
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}

CIP-0100/cip-0100.common.schema.json

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{
2+
"title": "CIP-100 Common",
3+
"description": "A base-line CIP-100 governance metadata document",
4+
"type": "object",
5+
"required": [
6+
"hashAlgorithm",
7+
"authors",
8+
"body"
9+
],
10+
"properties": {
11+
"hashAlgorithm": {
12+
"$ref": "#/definitions/hashAlgorithm"
13+
},
14+
"authors": {
15+
"title": "Authors",
16+
"description": "The authors of this governance metadata",
17+
"type": "array",
18+
"items": {
19+
"$ref": "#/definitions/Author"
20+
}
21+
},
22+
"body": {
23+
"$ref": "#/definitions/Body"
24+
}
25+
},
26+
"definitions": {
27+
"hashAlgorithm": {
28+
"title": "Hash Algorithm",
29+
"description": "The hash algorithm used to authenticate this document externally",
30+
"type": "string",
31+
"enum": [
32+
"blake2b-224"
33+
]
34+
},
35+
"Author": {
36+
"title": "Author",
37+
"description": "An author endorsing the content of a metadata document",
38+
"type": "object",
39+
"required": [
40+
"witness"
41+
],
42+
"properties": {
43+
"name": {
44+
"title": "Name",
45+
"type": "string"
46+
},
47+
"witness": {
48+
"$ref": "#/definitions/Witness"
49+
}
50+
}
51+
},
52+
"Witness": {
53+
"title": "Witness",
54+
"description": "A witness proving that the author endorses the content of the metadata",
55+
"type": "object",
56+
"properties": {
57+
"witnessAlgorithm": {
58+
"title": "WitnessAlgorithm",
59+
"type": "string",
60+
"enum": [
61+
"ed25519"
62+
]
63+
},
64+
"publicKey": {
65+
"title": "PublicKey",
66+
"type": "string"
67+
},
68+
"signature": {
69+
"title": "Signature",
70+
"type": "string"
71+
}
72+
}
73+
},
74+
"Body": {
75+
"title": "Body",
76+
"description": "The body of the metadata document that is hashed to produce a signature",
77+
"properties": {
78+
"references": {
79+
"title": "References",
80+
"type": "array",
81+
"items": {
82+
"$ref": "#/definitions/Reference"
83+
}
84+
},
85+
"comment": {
86+
"title": "Comment",
87+
"type": "string"
88+
},
89+
"externalUpdatess": {
90+
"title": "ExternalUpdates",
91+
"type": "array",
92+
"items": {
93+
"$ref": "#/definitions/ExternalUpdate"
94+
}
95+
}
96+
}
97+
},
98+
"Reference": {
99+
"title": "Reference",
100+
"description": "A reference to a document",
101+
"type": "object",
102+
"required": [
103+
"@type",
104+
"label",
105+
"uri"
106+
],
107+
"properties": {
108+
"@type": {
109+
"title": "Type",
110+
"type": "string",
111+
"enum": [
112+
"GovernanceMetadata",
113+
"Other"
114+
]
115+
},
116+
"label": {
117+
"title": "Label",
118+
"type": "string"
119+
},
120+
"uri": {
121+
"title": "URI",
122+
"type": "string"
123+
}
124+
}
125+
},
126+
"ExternalUpdate": {
127+
"title": "ExternalUpdate",
128+
"type": "object",
129+
"description": "An source for updates *after* the metadata is published",
130+
"required": [
131+
"title",
132+
"uri"
133+
],
134+
"properties": {
135+
"title": {
136+
"title": "Title",
137+
"type": "string"
138+
},
139+
"uri": {
140+
"title": "URI",
141+
"type": "string"
142+
}
143+
}
144+
}
145+
}
146+
}

CIP-0100/example.body.canonical

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
2+
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
3+
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
4+
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
5+
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
6+
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
7+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
8+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
9+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .

CIP-0100/example.canonical

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
2+
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
3+
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
4+
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
5+
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
6+
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
7+
_:c14n4 <http://xmlns.com/foaf/0.1/name> "Pi Lanningham"@en-us .
8+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
9+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
10+
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .

CIP-0100/example.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"@context": {
3+
"@language": "en-us",
4+
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
5+
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
6+
"body": {
7+
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
8+
"@context": {
9+
"references": {
10+
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
11+
"@container": "@set",
12+
"@context": {
13+
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
14+
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
15+
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
16+
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
17+
}
18+
},
19+
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
20+
"externalUpdates": {
21+
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
22+
"@context": {
23+
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
24+
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
25+
}
26+
}
27+
}
28+
},
29+
"authors": {
30+
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
31+
"@container": "@set",
32+
"@context": {
33+
"did": "@id",
34+
"name": "http://xmlns.com/foaf/0.1/name",
35+
"witness": {
36+
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
37+
"@context": {
38+
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
39+
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
40+
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
41+
}
42+
}
43+
}
44+
}
45+
},
46+
"hashAlgorithm": "blake2b-224",
47+
"authors": [
48+
{ "name": "Pi Lanningham", "witness": { "witnessAlgorithm": "ed25519", "publicKey": "46e4db7f87497ba232977ccd591b3d040316b155e8c60e3ea49176c03fa269de", "signature": "abcd"}}
49+
],
50+
"body": {
51+
"references": [
52+
{ "@type": "Other", "label": "CIP-100", "uri": "https://cips.cardano.org/cip/CIP-0100" }
53+
],
54+
"comment": "This is a test vector for CIP-100",
55+
"externalUpdates": [
56+
{ "title": "Blog", "uri": "https://314pool.com" }
57+
]
58+
}
59+
}

0 commit comments

Comments
 (0)