forked from cardano-foundation/CIPs
-
Notifications
You must be signed in to change notification settings - Fork 0
Internal review #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iFergal
wants to merge
3
commits into
master
Choose a base branch
from
cip/1904
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| The following are examples of how the on-chain metadata would look like in an explorer. | ||
| This means in JSON format with byte-streams hex-encoded. | ||
|
|
||
| Please see the [CDDL](../schema.cddl) for the __correct__ schema with byte streams. | ||
|
|
||
| The [complex directory](./complex) contains examples of key rotation, public key URLs and > 64 byte length values. | ||
| As mentioned in the spec, some of these complex scenarios can "stack" or "mix" - for example, rotating a key that is greater than 64 bytes in length, or simply a transaction where both a private key and signature are > 64 bytes in length. | ||
| This means the examples are not exhaustive but the current set, coupled with the CDDL, should make it clear. |
35 changes: 35 additions & 0 deletions
35
CIP-1904/examples/complex/key-rotation-mid-tx-long-signatures.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| [ | ||
| [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "623238312d343038622" | ||
| ], | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| [ | ||
| "727b7dbbdacf861297cc25fe4f58ca62fe6a3bbde4577562abb348182e49ca7f634ab76bff00224a5e91ab47b3b24e6547e8edf4d248fb9211c0f1e534cf6f0a", | ||
| "27e03340999899aa32712639ca895656c39d50524316d8b7a8abd2600fba270b583c31c4a2052789c7b11b4c1e11ffd0d5d8a301e53590d682e8f5bf54349b0c" | ||
| ] | ||
| ], | ||
| "h": [ | ||
| "7b22616c67223a224564445341227d", | ||
| "7b22616c67223a224564445341227d" | ||
| ], | ||
| "pk": [ | ||
| "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "095f9a1a595dde755d82786864ad03dfa5a4fbd68832566364e2b65e13cc9e44" | ||
| ], | ||
| "pkn": [ | ||
| 0, | ||
| 1 | ||
| ] | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| [ | ||
| "727b7dbbdacf861297cc25fe4f58ca62fe6a3bbde4577562abb348182e49ca7f634ab76bff00224a5e91ab47b3b24e6547e8edf4d248fb9211c0f1e534cf6f0a", | ||
| "27e03340999899aa32712639ca895656c39d50524316d8b7a8abd2600fba270b583c31c4a2052789c7b11b4c1e11ffd0d5d8a301e53590d682e8f5bf54349b0c" | ||
| ] | ||
| ], | ||
| "h": [ | ||
| "7b22616c67223a224564445341227d", | ||
| "7b22616c67223a224564445341227d" | ||
| ], | ||
| "pk": [ | ||
| "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "095f9a1a595dde755d82786864ad03dfa5a4fbd68832566364e2b65e13cc9e44" | ||
| ], | ||
| "pkn": [ | ||
| 0, | ||
| 1 | ||
| ] | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": [ | ||
| "727b7dbbdacf861297cc25fe4f58ca62fe6a3bbde4577562abb348182e49ca7f634ab76bff00224a5e91ab47b3b24e6547e8edf4d248fb9211c0f1e534cf6f0a", | ||
| "095f9a1a595dde755d82786864ad03dfa5a4fbd68832566364e2b65e13cc9e44" | ||
| ], | ||
| "pk": "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "pkn": 3 | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": [ | ||
| "727b7dbbdacf861297cc25fe4f58ca62fe6a3bbde4577562abb348182e49ca7f634ab76bff00224a5e91ab47b3b24e6547e8edf4d248fb9211c0f1e534cf6f0a", | ||
| "095f9a1a595dde755d82786864ad03dfa5a4fbd68832566364e2b65e13cc9e44" | ||
| ], | ||
| "pkn": 3 | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "a66462ed4502ef5bf5e25f447ce134e0" | ||
| ], | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "pkn": 3 | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "https://example.gov/api/v1/pubkeys/a2gh/v/3" | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "t": "conformityCert", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "pkn": 3, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "t": "conformityCertRevoke", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "pkn": 3, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "t": "scm", | ||
| "v": "1", | ||
| "st": "georgianWine", | ||
| "d": { | ||
| "a2gh": { | ||
| "s": [ | ||
| "0c2b48602f8aefde43fbab49e7225d50f02d091f508d9dc84e538b4d656940d57301141070612016a50a14f26976cb20378b40a965f63d125dd0bc18fae1f00c", | ||
| "7b226b6964223a2237326363346636342d623238312d343038622d383430342d393966396264646538393139222c22616c67223a224564445341227d" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "0e459119216db26ba7fec7a66462ed4502ef5bf5e25f447ce134e0acccf2be6f", | ||
| "pkn": 3 | ||
| }, | ||
| "p33l": { | ||
| "s": [ | ||
| "727b7dbbdacf861297cc25fe4f58ca62fe6a3bbde4577562abb348182e49ca7f634ab76bff00224a5e91ab47b3b24e6547e8edf4d248fb9211c0f1e534cf6f0a", | ||
| "27e03340999899aa32712639ca895656c39d50524316d8b7a8abd2600fba270b583c31c4a2052789c7b11b4c1e11ffd0d5d8a301e53590d682e8f5bf54349b0c" | ||
| ], | ||
| "h": "7b22616c67223a224564445341227d", | ||
| "pk": "095f9a1a595dde755d82786864ad03dfa5a4fbd68832566364e2b65e13cc9e44" | ||
| } | ||
| }, | ||
| "cid": "zCT5htke9ZJ963Tsk5hDXizLzVQTha63ojw4X6SyWa3EBXtmWTPQ" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| transaction_metadata = { | ||
| "1904": scm_record / conformity_cert_issue_record / conformity_cert_revoke_record | ||
| } | ||
|
|
||
|
|
||
| ; Common | ||
| md_str = tstr .size (1..64) | ||
| md_bs = bytes .size (1..64) | ||
| md_bs_arr = [2* md_bs] | ||
|
|
||
| ; If a key rotation occurred, an array of public keys, headers and signatures are supplied and are all suffixed with "_kt" | ||
| ; The length of each "_kt" array must be the same, where the ith index of each array refers to the ith key and its corresponding JSON Web Signatures | ||
|
|
||
| public_key = md_str / md_bs ; URL to public key (application/octet-stream) or public key byte stream | ||
| public_key_kt = [2* public_key] | ||
|
|
||
| public_key_version = uint | ||
| public_key_version_kt = [2* public_key_version] | ||
|
|
||
| header = md_bs / md_bs_arr ; JSON Web Signature header - RFC 7515 | ||
| header_kt = [2* header] | ||
|
|
||
| signature = md_bs / md_bs_arr ; detached JSON Web Signature - RFC 7515 | ||
| signature_arr = [1* signature] | ||
| signature_arr_kt = [2* signature_arr] | ||
|
|
||
| ; CID hereafter refers to the Content Identifier of off-chain data (Multiformats) | ||
|
|
||
|
|
||
| ; SCM | ||
| scm_record = | ||
| { t: "scm" | ||
| , ? st: md_str | ||
| , v: md_str | ||
| , cid: md_str | ||
| , d: verification_data | ||
| } | ||
|
|
||
| verification_data = { * producer_id => producer_verification_data } | ||
|
|
||
| producer_id = md_str | ||
|
|
||
| producer_verification_data = | ||
| { pk: public_key / public_key_kt | ||
| , ? pkv: public_key_version / public_key_version_kt | ||
| , h: header / header_kt | ||
| , s: signature_arr / signature_arr_kt | ||
| } | ||
|
|
||
|
|
||
| ; Certificate of Conformity | ||
| conformity_cert_issue_record = | ||
| { t: "conformityCert" | ||
| , ? st: md_str | ||
| , v: md_str | ||
| , cid: md_str | ||
| , pk: public_key / public_key_kt | ||
| , ? pkv: public_key_version / public_key_version_kt | ||
| , h: header / header_kt | ||
| , s: signature_arr / signature_arr_kt | ||
| } | ||
|
|
||
|
|
||
| ; Certificate of Conformity revoke | ||
| conformity_cert_revoke_record = | ||
| { t: "conformityCertRevoke" | ||
| , ? st: md_str | ||
| , v: md_str | ||
| , pk: public_key / public_key_kt | ||
| , ? pkv: public_key_version / public_key_version_kt | ||
| , h: header / header_kt | ||
| , s: signature_arr / signature_arr_kt | ||
| , cid: md_str | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [ | ||
| { | ||
| "st": "georgianWine", | ||
| "description": "The National Wine Agency of Georgia oversees the production and quality control of bottles of wine produced in the country. This subtype is used for proof-of-origin and quality control on individual bottles. Supply Chain Management data follows an extended version of the OIV Standard - https://www.oiv.int/standards/international-standard-for-the-labelling-of-wines - and Certificates of Conformity are signed directly by the National Wine Agency. For more information on transaction verification, please see https://cardano-foundation.github.io/cf-georgian-wine-resolver." | ||
| } | ||
| ] | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory this could just be a link to the outside documentation but I think some description is useful in case of link rot.
This seems a bit long though