-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework CIP-0005's headers and sections + remove h1 headers from vario…
…us CIPs (#453) * Rework CIP-0005's headers and sections according to new CIP-0001 * Remove h1 header from template and CIPs.
- Loading branch information
Showing
12 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,10 +1,18 @@ | ||
--- | ||
CIP: 5 | ||
Title: Common Bech32 Prefixes | ||
Authors: Matthias Benkort <[email protected]> | ||
Comments-URI: https://forum.cardano.org/t/cip5-common-bech32-prefixes/35189 | ||
Category: Tools | ||
Status: Active | ||
Type: Standards | ||
Authors: | ||
- Matthias Benkort <[email protected]> | ||
Implementors: N/A | ||
Discussions: | ||
- https://forum.cardano.org/t/cip5-common-bech32-prefixes/35189 | ||
- https://github.com/cardano-foundation/CIPs/pull/427 | ||
- https://github.com/cardano-foundation/CIPs/pull/342 | ||
- https://github.com/cardano-foundation/CIPs/pull/251 | ||
- https://github.com/cardano-foundation/CIPs/pull/177 | ||
- https://github.com/cardano-foundation/CIPs/pull/31 | ||
Created: 2020-05-28 | ||
License: Apache-2.0 | ||
--- | ||
|
@@ -13,7 +21,7 @@ License: Apache-2.0 | |
|
||
This CIP defines a set of common prefixes (or so-called human-readable part in the [bech32](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)) encoding format) for various bech32-encoded binary data across the Cardano eco-system. | ||
|
||
## Motivation | ||
## Motivation: why is this CIP necessary? | ||
|
||
Many tools used within the Cardano eco-system are manipulating binary data. Binary data are typically encoded as hexadecimal text strings when shown in a user interface (might it be a console, a url or a structured document from a server). From the user perspective, it can be difficult to distinguish between various encoded data. From the tools developer perspective, it can also be difficult to validate inputs based only on raw bytes (in particular when encoded data often have the same length). | ||
|
||
|
@@ -23,7 +31,7 @@ Therefore, we can leverage bech32 for binary data encoding, with a set of common | |
|
||
We define the following set of common prefixes with their corresponding semantic. Any software willing to represent binary data in a human-friendly way should abide by these guidelines. Should a data-type be missing, we encourage developers to update this CIP and register a new prefix. | ||
|
||
#### Keys | ||
### Keys | ||
|
||
| Prefix | Meaning | Contents | | ||
| --- | --- | --- | | ||
|
@@ -72,7 +80,7 @@ We define the following set of common prefixes with their corresponding semantic | |
| `vrf_sk` | VRF signing key | VRF signing key | | ||
| `vrf_vk` | VRF verification key | VRF verification key | | ||
|
||
#### Hashes | ||
### Hashes | ||
|
||
| Prefix | Meaning | Contents | | ||
| --- | --- | --- | | ||
|
@@ -89,7 +97,7 @@ We define the following set of common prefixes with their corresponding semantic | |
| `datum` | Output datum hash | blake2b\_256 digest of output datum | | ||
| `script_data` | Script data hash | blake2b\_256 digest of script data | | ||
|
||
#### Miscellaneous | ||
### Miscellaneous | ||
|
||
| Prefix | Meaning | Contents | | ||
| --- | --- | --- | | ||
|
@@ -98,34 +106,33 @@ We define the following set of common prefixes with their corresponding semantic | |
| `stake` | Mainnet stake address | Network tag and stake credential | | ||
| `stake_test` | Testnet stake address | Network tag and stake credential | | ||
|
||
## Rationale: how does this CIP achieve its goals? | ||
|
||
## Rationale | ||
|
||
#### About the `_test` suffix | ||
### About the `_test` suffix | ||
|
||
Address already contains a discriminant tag, yet it requires one to peek at the internal binary payload. With Base58-encoded addresses, people have been used to look at first few characters and distinguish address this way. Not only this is cumbersome, but it is also made harder with both Shelley and Bech32-encoded addresses. On the one hand, the "common" part of the internal payload is much less than in Byron addresses and thus, the first bytes of the payload are varying much more. Plus, the bech32 prefix which can now be fixed makes it even more error-prone. | ||
|
||
Therefore, having a clear human-readable indicator regarding the network discrimination is useful. | ||
|
||
#### About `addr` | ||
### About `addr` | ||
|
||
Addresses probably are the most user-facing object in the current Cardano eco-system. Being able to clearly identify them | ||
|
||
> :bulb: Open question: with side-chains and multi-currencies coming soon, would it make sense to include the currency in the bech32 prefix? e.g. `ada1...` or `ada_addr1.` | ||
#### About `stake` | ||
### About `stake` | ||
|
||
Stake _addresses_ are references to reward account. They are used in many manipulation involving rewards (registering stake key, delegating, fetching reward balance etc..). We therefore make it a "first-class" object and assign it a dedicated prefix. | ||
|
||
#### About `sk` & `vk` | ||
### About `sk` & `vk` | ||
|
||
Both are rather transparent abbreviations for **s**igning **k**ey and **v**erification **k**ey. | ||
|
||
#### About `xsk` & `xvk` | ||
### About `xsk` & `xvk` | ||
|
||
The prefix `x` is typically used in cryptography to refer to e**x**tended keys (e.g. `xpub`, `xprv` ...). Following this convention, we prefix `sk` and `vk` as such when they refer to extended keys. | ||
|
||
#### About `vkh` | ||
### About `vkh` | ||
|
||
An abbreviation for **v**erification **k**ey **h**ash. | ||
|
||
|
@@ -136,13 +143,25 @@ deregistration certificates, etc. As a result, it seems useful to have a | |
human-readable prefix by which one can discern the different kinds of | ||
verification key hashes. | ||
|
||
## Backwards compatibility | ||
### Backwards compatibility | ||
|
||
The only prior work done towards that direction has been [jcli](https://input-output-hk.github.io/jormungandr/jcli/introduction.html). Historically, prefixes evolved very organically and without any agreed-upon standard. jcli is however only compatible with Jörmungandr and is not intended to be compatible with the cardano-node. Therefore, there's little concern regarding compatibility here. | ||
|
||
## Reference implementation | ||
## Path to Active | ||
|
||
### Acceptance Criteria | ||
|
||
- [x] There is a variety of tools and services utilizing this standard: | ||
- [x] Trezor, Ledger | ||
- [x] cardano-cli | ||
- [x] cardano-wallet | ||
- [x] Blockfrost | ||
- [x] cardanoscan, cexplorer | ||
- ... and more | ||
|
||
### Implementation Plan | ||
|
||
[cip5-js](https://www.npmjs.com/package/@dcspark/cip5-js) | ||
- Available JavaScript library: [cip5-js](https://www.npmjs.com/package/@dcspark/cip5-js) | ||
|
||
## Copyright | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
CIP: 31 | ||
Title: Reference inputs | ||
Authors: Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
Authors: | ||
- Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
- Michael Peyton Jones <[email protected]> | ||
- Jared Corduan <[email protected]> | ||
Status: Active | ||
|
@@ -11,8 +12,6 @@ Created: 2021-11-29 | |
License: CC-BY-4.0 | ||
--- | ||
|
||
# Reference inputs | ||
|
||
## Abstract | ||
|
||
We introduce a new kind of input, a _reference_ input, which allows looking at an output without spending it. | ||
|
This file contains 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
CIP: 32 | ||
Title: Inline datums | ||
Authors: Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
Authors: | ||
- Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
- Michael Peyton Jones <[email protected]> | ||
- Jared Corduan <[email protected]> | ||
Status: Active | ||
|
@@ -11,8 +12,6 @@ Created: 2021-11-29 | |
License: CC-BY-4.0 | ||
--- | ||
|
||
# Inline datums | ||
|
||
## Abstract | ||
|
||
We propose to allow datums themselves to be attached to outputs instead of datum hashes. | ||
|
This file contains 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
CIP: 33 | ||
Title: Reference scripts | ||
Authors: Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
Authors: | ||
- Michael Peyton Jones <[email protected]> | ||
Implementors: | ||
- Michael Peyton Jones <[email protected]> | ||
- Jared Corduan <[email protected]> | ||
Status: Active | ||
|