-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
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.
Just a couple of grammar tweaks
text/0000-address.md
Outdated
|
||
* `PublicKey`: this will be necessary to be able to utilise the token; | ||
* `Discriminant`: this will prevent misuse of addresses between testing | ||
environment and production environment; |
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.
Should we add the address kind here as well?
text/0000-address.md
Outdated
It is possible to create a **Grouped Address**, it groups addresses to a | ||
staking key. To create a **Grouped Address** you need the `PublicKey`, | ||
the `Discriminant` (just like for a **Single Address**) and another | ||
`PublicKey` that is associating this address to another hierarchy. |
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 think we should expand on this, to get the connection to what's in the design document. There, we have four new types of addresses (base, pointer, enterprise, and reward account). This RFC introduces two new kinds of addresses, which can be used to represent three of the addresses in the design document:
- base addresses can be implemented in terms of grouped addresses
- pointer addresses are not covered here
- enterprise addresses can be implemented in terms of single addresses
- reward account addresses can be implemented in terms of grouped addresses
I suggest using the address kind to distinguish the two kinds of grouped addresses (base and reward account), and adding pointer addresses.
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.
we're not going to support pointer address (with this rfc). they are not useful for MVP, can be bolted afterwards without a problem from the format PoV, and are raising important security questions.
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.
So are you saying that with this proposed address format, where the additional staking key hash takes only 32 bytes, the savings of space by using pointer addresses is not enough to warrant the additional complexity?
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.
@kantp can you share a document where types of addresses are defined - as I am not aware of the recent development
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.
@akegalj They are defined in the design document for delegation.
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.
Made a bunch of grammar/consistency suggestions. I also agree that we should have some mention of pointer addresses in here. Otherwise this LGTM
ETA: just seen the note about pointer addresses.
I think we've given this enough time and eyeballs now. @NicolasDP if you could adress @nc6's review I'll go ahead and merge. |
Co-Authored-By: NicolasDP <nicolas@primetype.co.uk>
Thanks for the feedback and fixes. |
@Boothead , before merging we need to agree on the CIP number: 0001 seems the obvious choice. |
Good point! Yes, let's go for |
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.
Technically, this looks good, but I'd really like to see a connection be made to the address types that we have for Shelley (base, enterprise, and reward account addresses). Ideally, I think we should avoid introducing new terminology when we already have some.
@vincenthz you said that you deliberately did not include pointer addresses, because of security concerns. Could you elaborate on that? If there are security issues with pointer addresses, we should address them in the design.
@kantp thanks for your feedback on this. Just like you said in your previous comment : we can implement the spec's addresses with the address types we currently have. The pointer address is not necessary now. Right now we need to focus on delivering the necessary resources before Q2. To do so we need to make choices and axes the non necessary elements. As you notice, there are room for new types (up to 121 new address types) so we can always extend this CIP with another one (and I think the pointer address will need a proper CIP since there are lot of questions that will arise from this). |
I'm going to go ahead and merge this. Thanks everyone for their input. If we've missed anything, please feel free to put comments here and we can look at re-opening if necessary or superseding with another RFC. |
Two points that I thought might be worth bringing up:
|
I also noticed the Rust codebase uses many different HRPs for bech32 serialization of internal data structures. Maybe these should be defined in some registry? (ex: https://github.com/input-output-hk/chain-libs/blob/d50858350f37e864aeda6b7ce573f773a2dbecd2/chain-crypto/src/algorithms/ed25519_derive.rs#L45) |
I think, they should consider ':' separator for addresses, but for the keys we should stick with the 1, which will give some advantages e.g. easily distinguish between keys and addresses. But, IMO, the Bech32 should be standardised first (versioned either) for general use as |
However, the checksum is not really relevant as it was designed for length 71 and is effective till 89. That's why there is a size restriction (90 i.e. 450 bits data which is 56 length octets) in the original spec. |
I agree. The fact that the Rust codebase uses bech32 for literally everything (not just addresses) is strange because the checksum wasn't designed to be used for arbitrary lengths. As long as we don't care about the checksum it's not an issue though |
resolves #2
Propose short address binary serialisation as well as a new human readable encoding for it using bech32
rendered markdown