-
Notifications
You must be signed in to change notification settings - Fork 371
CIP-0154? | Orthogonal Certificates #1021
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
base: master
Are you sure you want to change the base?
Changes from 6 commits
7555411
25835d6
d1148d6
e4b3b0a
1f2715c
97d8c8d
0c2fd25
a06940f
e893db9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,146 @@ | ||||||||||||||||||
| --- | ||||||||||||||||||
| CIP: ? | ||||||||||||||||||
| Title: Orthogonal Certificates | ||||||||||||||||||
| Status: Proposed | ||||||||||||||||||
| Category: Ledger | ||||||||||||||||||
| Authors: | ||||||||||||||||||
| - Joshua Marchand <[email protected]> | ||||||||||||||||||
| Implementors: N/A | ||||||||||||||||||
| Discussions: | ||||||||||||||||||
| - https://discord.gg/tsr7H6ApdT | ||||||||||||||||||
rphair marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
| - https://github.com/cardano-foundation/CIPs/pull/1021 | ||||||||||||||||||
| Created: 2025-04-13 | ||||||||||||||||||
| License: CC-BY-4.0 | ||||||||||||||||||
| --- | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Abstract | ||||||||||||||||||
|
|
||||||||||||||||||
| This CIP proposes a simplified design of stake managmenet certificate types focused on simplicity and usability. | ||||||||||||||||||
rphair marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||
|
|
||||||||||||||||||
| The current Conway era ledger specification includes multiple certificate types each representing different combinations of stake registration, delegation, and vote delegation. This proposal simplifies this specification by defining a set of orthogonal certificate types that can be composed to achieve the same functionality, making the ledger more intuitive and easier to document, use, and maintain. | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Motivation: why is this CIP necessary? | ||||||||||||||||||
|
|
||||||||||||||||||
| The Conway era introduces multiple certificate types for various stake operations including combinations of: | ||||||||||||||||||
|
|
||||||||||||||||||
| - Registering a stake credential | ||||||||||||||||||
| - Delegating stake to a pool | ||||||||||||||||||
| - Delegating voting power to a DRep | ||||||||||||||||||
|
|
||||||||||||||||||
| This approach results in many complex and convoluted certificate types, increasing complexity for developers and users. The number of certificate types would also grow combinatorially with new features, making it only harder to document, extend, and understand the certificates. | ||||||||||||||||||
|
|
||||||||||||||||||
| By redesigning the certificate types with orthogonal certificates, we can: | ||||||||||||||||||
| - Make the system more intuitive for users and developers | ||||||||||||||||||
| - Simplify documentation by having self-describing, single-purpose certificates | ||||||||||||||||||
| - Make ledger implementations easier to maintain | ||||||||||||||||||
| - Avoid combinatorial growth of certificates with future features | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| ## Specification | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Current Certificates CDDL | ||||||||||||||||||
| The Conway era has multiple certificate types for stake related operations: | ||||||||||||||||||
| ```cddl | ||||||||||||||||||
| certificate = [stake_registration | ||||||||||||||||||
| // stake_deregistration | ||||||||||||||||||
| // stake_delegation | ||||||||||||||||||
| // pool_registration | ||||||||||||||||||
| // pool_retirement | ||||||||||||||||||
| // reg_cert | ||||||||||||||||||
| // unreg_cert | ||||||||||||||||||
| // vote_deleg_cert | ||||||||||||||||||
| // stake_vote_deleg_cert | ||||||||||||||||||
| // stake_reg_deleg_cert | ||||||||||||||||||
| // vote_reg_deleg_cert | ||||||||||||||||||
| // stake_vote_reg_deleg_cert | ||||||||||||||||||
| // auth_committee_hot_cert | ||||||||||||||||||
| // resign_committee_cold_cert | ||||||||||||||||||
| // reg_drep_cert | ||||||||||||||||||
| // unreg_drep_cert | ||||||||||||||||||
| // update_drep_cert] | ||||||||||||||||||
|
|
||||||||||||||||||
| stake_registration = (0, stake_credential) | ||||||||||||||||||
| stake_deregistration = (1, stake_credential) | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This two certificates are from the Shelley era and were already planned for removal. They were kept around in Conway for ease of transition and preventing breakage of tooling while this transition is under way. |
||||||||||||||||||
| stake_delegation = (2, stake_credential, pool_keyhash) | ||||||||||||||||||
| reg_cert = (7, stake_credential, coin) | ||||||||||||||||||
| unreg_cert = (8, stake_credential, coin) | ||||||||||||||||||
| stake_vote_deleg_cert = (10, stake_credential, pool_keyhash, drep) | ||||||||||||||||||
| stake_reg_deleg_cert = (11, stake_credential, pool_keyhash, coin) | ||||||||||||||||||
| stake_vote_reg_deleg_cert = (13, stake_credential, pool_keyhash, drep, coin) | ||||||||||||||||||
| ... | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Proposed CDDL | ||||||||||||||||||
| While the current certificates may save a few bytes in the transaction when doing multiple actions in a single transaction, it greatly complicates certificates for both users and implementers. | ||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For completeness, it would be worth highlighting how many bytes in the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, added the worst case numbers. |
||||||||||||||||||
|
|
||||||||||||||||||
| Instead, we propose a much simpler certificate design with orthogonal certificates. | ||||||||||||||||||
| ```cddl | ||||||||||||||||||
| certificate = pool_registration | ||||||||||||||||||
| / pool_retirement | ||||||||||||||||||
| / auth_committee_hot_cert | ||||||||||||||||||
| / resign_committee_cold_cert | ||||||||||||||||||
| / reg_drep_cert | ||||||||||||||||||
| / unreg_drep_cert | ||||||||||||||||||
| / update_drep_cert | ||||||||||||||||||
| / stake_registration_cert | ||||||||||||||||||
| / stake_deregistration_cert | ||||||||||||||||||
| / stake_delegation_cert | ||||||||||||||||||
| / vote_delegation_cert | ||||||||||||||||||
|
|
||||||||||||||||||
| ; New orthogonal certificates | ||||||||||||||||||
| stake_registration_cert = (N, stake_credential, coin) | ||||||||||||||||||
| stake_deregistration_cert = (N+1, stake_credential, coin) | ||||||||||||||||||
| stake_delegation_cert = (N+2, stake_credential, pool_keyhash) | ||||||||||||||||||
| vote_delegation_cert = (N+3, stake_credential, drep) | ||||||||||||||||||
|
||||||||||||||||||
| stake_registration_cert = (N, stake_credential, coin) | |
| stake_deregistration_cert = (N+1, stake_credential, coin) | |
| stake_delegation_cert = (N+2, stake_credential, pool_keyhash) | |
| vote_delegation_cert = (N+3, stake_credential, drep) | |
| stake_registration_cert = (7, stake_credential, coin) | |
| stake_deregistration_cert = (8, stake_credential, coin) | |
| stake_delegation_cert = (2, stake_credential, pool_keyhash) | |
| vote_delegation_cert = (9, stake_credential, drep) |
Otherwise we would have to keep old certificates for one more era to avoid breakage, just to replace certificates with equivalent ones
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.
I decided to go with this in the CIP. I left them intentionally ambiguous so that others could weigh in on whether we want to simply rename existing certs or introduce new ones (for consistency or whatever)
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.
I am weighing in. Renaming (changing the tag) will require old certificates to be retained for a whole new era. So, it makes no sense to introduce new identical replacement certificates. Please adjust the CIP to retaon the old tags.
Actual names of cddl bindings are irrelevant and can be discussed at a any point, since they do not require a HF.
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.
Note that hardforking into this can't immediately remove the current certificates, they can only be deprecated since otherwise downstream tooling would immediately break. So it needs to be done in two steps, implementing the new CDDL & deprecating the old one, and then removing the old one 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.
I asked a clarifying question about this in the Cardano scaling discord, but I'm not sure why this has become the process only for some changes.
rphair marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
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.
This will also require a hard-fork, and the CIP can only be active once the hard-fork has been enacted.
Uh oh!
There was an error while loading. Please reload this page.