Skip to content

Commit

Permalink
CIP-0100? | Governance Metadata (#556)
Browse files Browse the repository at this point in the history
* 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 <44342099+Ryun1@users.noreply.github.com>

---------

Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com>
  • Loading branch information
Quantumplation and Ryun1 authored Dec 12, 2023
1 parent 5498717 commit 7fa28f7
Show file tree
Hide file tree
Showing 7 changed files with 585 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CIP-0010/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"transaction_metadatum_label": 1667,
"description": "CIP-72: dApp registration & Discovery"
},
{
"transaction_metadataum_label": 1694,
"description": "Voltaire - additional metadata for governance, provided in a separate transaction"
},
{
"transaction_metadatum_label": 1870,
"description": "Open Badges v2.0 compliant metadata"
Expand Down
312 changes: 312 additions & 0 deletions CIP-0100/README.md

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions CIP-0100/cip-0100.common.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"@context": {
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@container": "@set",
"@context": {
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@context": {
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
}
}
}
}
}
}
146 changes: 146 additions & 0 deletions CIP-0100/cip-0100.common.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"title": "CIP-100 Common",
"description": "A base-line CIP-100 governance metadata document",
"type": "object",
"required": [
"hashAlgorithm",
"authors",
"body"
],
"properties": {
"hashAlgorithm": {
"$ref": "#/definitions/hashAlgorithm"
},
"authors": {
"title": "Authors",
"description": "The authors of this governance metadata",
"type": "array",
"items": {
"$ref": "#/definitions/Author"
}
},
"body": {
"$ref": "#/definitions/Body"
}
},
"definitions": {
"hashAlgorithm": {
"title": "Hash Algorithm",
"description": "The hash algorithm used to authenticate this document externally",
"type": "string",
"enum": [
"blake2b-224"
]
},
"Author": {
"title": "Author",
"description": "An author endorsing the content of a metadata document",
"type": "object",
"required": [
"witness"
],
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"witness": {
"$ref": "#/definitions/Witness"
}
}
},
"Witness": {
"title": "Witness",
"description": "A witness proving that the author endorses the content of the metadata",
"type": "object",
"properties": {
"witnessAlgorithm": {
"title": "WitnessAlgorithm",
"type": "string",
"enum": [
"ed25519"
]
},
"publicKey": {
"title": "PublicKey",
"type": "string"
},
"signature": {
"title": "Signature",
"type": "string"
}
}
},
"Body": {
"title": "Body",
"description": "The body of the metadata document that is hashed to produce a signature",
"properties": {
"references": {
"title": "References",
"type": "array",
"items": {
"$ref": "#/definitions/Reference"
}
},
"comment": {
"title": "Comment",
"type": "string"
},
"externalUpdatess": {
"title": "ExternalUpdates",
"type": "array",
"items": {
"$ref": "#/definitions/ExternalUpdate"
}
}
}
},
"Reference": {
"title": "Reference",
"description": "A reference to a document",
"type": "object",
"required": [
"@type",
"label",
"uri"
],
"properties": {
"@type": {
"title": "Type",
"type": "string",
"enum": [
"GovernanceMetadata",
"Other"
]
},
"label": {
"title": "Label",
"type": "string"
},
"uri": {
"title": "URI",
"type": "string"
}
}
},
"ExternalUpdate": {
"title": "ExternalUpdate",
"type": "object",
"description": "An source for updates *after* the metadata is published",
"required": [
"title",
"uri"
],
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"uri": {
"title": "URI",
"type": "string"
}
}
}
}
}
9 changes: 9 additions & 0 deletions CIP-0100/example.body.canonical
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .
10 changes: 10 additions & 0 deletions CIP-0100/example.canonical
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
_:c14n4 <http://xmlns.com/foaf/0.1/name> "Pi Lanningham"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .
59 changes: 59 additions & 0 deletions CIP-0100/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"@context": {
"@language": "en-us",
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@container": "@set",
"@context": {
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@context": {
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
}
}
}
}
},
"hashAlgorithm": "blake2b-224",
"authors": [
{ "name": "Pi Lanningham", "witness": { "witnessAlgorithm": "ed25519", "publicKey": "46e4db7f87497ba232977ccd591b3d040316b155e8c60e3ea49176c03fa269de", "signature": "abcd"}}
],
"body": {
"references": [
{ "@type": "Other", "label": "CIP-100", "uri": "https://cips.cardano.org/cip/CIP-0100" }
],
"comment": "This is a test vector for CIP-100",
"externalUpdates": [
{ "title": "Blog", "uri": "https://314pool.com" }
]
}
}

0 comments on commit 7fa28f7

Please sign in to comment.