-
Notifications
You must be signed in to change notification settings - Fork 334
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
CIP-0005 | update drep and cc identifier prefixes #845
CIP-0005 | update drep and cc identifier prefixes #845
Conversation
8541d8c
to
a74a567
Compare
whats a drep address? there is just an ID drep1xxx there is also no flag or prebyte that would differ from a mainnet or testnet "address". like with a pool id, there is just one. same for mainnet and testnets. a drep-id is like a pool-id. you can delegate to it. i don't see how such an id would count as an address? |
dRep-id is not same as pool id, pool ID is a single hash, whereas dRep is a credential with - type and key field, see here, https://github.com/IntersectMBO/cardano-ledger/blob/a44a5b5ac9f68c5d7a2ff38b040a5fcac8ccfc6a/eras/conway/impl/cddl-files/conway.cddl#L338 similarly, a stake address is defined with stake credential and an additional network flag is added to identify if a stake address is on mainnet or testnet. Similarly a dRep address is combination of network flag + dRep Credential |
there is no network flag for a drep id. i made an issue about that i think a year ago if such a thing should be implemented, did not get the attention of many, result was: "no we don't need a network flag for dreps" |
that was the issue i opened back in time: #564 |
|
Since a network flag is probably not required for these addresses, should we use the network flag bytes instead for specifying the credential type and defining a new schema for these addresses, eg. 4-7 bits define the address type 0000 - cc_hot 0-3 bits define the credential type 0000-0001 reserved (to avoid accidental fund transfers, as 0-1 is network tag in normal address) 0010 - keyhash28 eg. dRep address of keyhash credential type |
Hey @ashisherc, thanks for opening this. A few thoughts from me;
|
@Ryun1 The CIP1694 does not define the bech32 prefix, I think there is a misunderstanding here, I am not suggesting a change to how a drep ID spec should be, but infact suggesting a change that fits well with existing bech32 formats in this CIP. eg. the bech32 prefix for drep keyhash is just CIP-105 as well does not require any changes, it does define a vkey prefix precisely as I would propose relevant amendments to cip-19 once this CIP makes the changes and uses the relevant bech32 format. As suggested a drep address prefix will use |
da6c5e2
to
7d8c914
Compare
As you have pointed out, when defining this we more or less ignored the "credential" nature of these DRep and CC credentials, and thus avoided defining addresses for them. Motivation for current setup
Benefits of proposed changes
Im not sure of anymore? Drawbacks of proposed changes
### Specific Responses
My bad, I had misinterpreted you as wanting to remove DRep IDs.
This is a fair take, the reason I chose
My suggestion is that this proposal becomes it's own CIP, then while editing CIP-19 the edits can point to the full definition and explaination within the new CIP. |
Also, not sure if intentional, but you seemed to have removed all significant file changes with the last force push. |
@Ryun1 thanks for the background, the idea is not to have drep/cc as addresses in the sense of sending/receiving ADA but a unique hex representation for sharing across the community, specially in tooling. While it was a good idea to base of pool id, but due to nature of these keys being a credential and not just a vkh unlike a pool id, it is a bit misrepresented. I agree for a dedicated CIP for this, but I would like to use
I updated the PR to only keep the changes relevant for this CIP which is updating the prefix to use While this amendment might create confusion initially, it is not a user facing terminology yet, but will soon become once the explorers etc start showing this data, I believe it will be good to modify it at this time then to be stuck with it forever. |
I completely agree, it is somewhat wonky 😆
I look forward to seeing this proposal 💪
understood, good points |
| `datum` | Output datum hash | blake2b\_256 digest of output datum | | ||
| `script_data` | Script data hash | blake2b\_256 digest of script data | | ||
| `drep_vkh` | Delegate representative verification key hash | blake2b\_224 digest of a delegate representative verification key | | ||
| `drep_script_vkh` | Delegate representative script hash | blake2b\_224 digest of a serialized delegate representative script | |
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.
| `drep_script_vkh` | Delegate representative script hash | blake2b\_224 digest of a serialized delegate representative script | | |
| `drep_script` | Delegate representative script hash | blake2b\_224 digest of a serialized delegate representative script | |
script verification key hash (vkh)?
merged with #857 |
Update drep hashes prefix to reflect the actual hash type, as dRep ID is not just a hash but a credential (unlike pool ID), we need a hex representation of the various keys, bech32 is supposed to be only for the human-readable representation.
eg.
drep
->drep_vkh
cc_cold
>cc_cold_vkh
drep
,cc_cold
etc prefix to be used to represent the credential hex format, to be proposed in a dedicated CIP.