-
Notifications
You must be signed in to change notification settings - Fork 74
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
Proquint prefix in RFC #83
Comments
I think it is also worth mandating some formatting rules for acceptable prefixes. For example, one could require that prefixes be non-empty strings of printable ASCII characters (codepoints Similarly, one could mandate a specific format for multibase names, e.g. the format |
The multibase prefix is |
Ah! I see. However, that doesn't quite match the proquint encoding itself, which is a pity. What do you see as the main obstacle to adopting a more general prefix code for the multibase encoding? Checking the prefix property itself is easy, and we could make a validation script for the multibase table similar to that for the multicodec table. One could then additionally mandate that implementations of multibase only allow multibase codes that respect the prefix property, which is trivial to check in most programming languages. |
These two solutions are effectively the same, just slightly different spemantics. I picked this route because the proquint encoding was a cool random idea and I didn't want to put too much effort into it. Unfortunately, current multibase implementations already assume that these prefixes will be exactly one "character" (whatever that means in the host language) and changing that now is a significant amount of work that I'm not willing to do. |
I can certainly sympathise with that, yes 😅. In this case, I think it's worth adding a brief clarification to both spec and table, in order to avoid confusion. |
According to [https://github.com/multiformats/multibase/blob/master/rfcs/PRO-QUINT.md], the "full" prefix for proquints is
pro-
, but the multibase prefix isp
. As the multibase spec dictates that encoded strings be<base-encoding-character><base-encoded-data>
, the result of encoding IP 127.0.0.1—as the 4 bytes bytestring[0x7f, 0x00, 0x00, 0x01]
—would be:Of course, the multibase spec could be easily extended from a single code character to an arbitrary prefix code, as
<base-encoding-prefix><base-encoded-data>
. One could then legitimately usepro-
as the multibase prefix for proquints, which would lead to the intended result:@Stebalien I'm happy to make the necessary changes to the readme, table and proquint RFC, if this sounds sensible.
The text was updated successfully, but these errors were encountered: