Closed p5150j closed 1 year ago
We have an algorithm that works with Wil's requirements above. For the first 500 million users or so, it will generate sixteen options for a 33-bit "suffix". 33 was chosen because it maps directly to 3 words from BIP39, but we could also represent the suffix in other encodings. As an example, here are some options for suffixes if I am dsnp://59918 and want my handle to be "wesbiggs":
wesbiggs.number-immune-actress
wesbiggs.charge-outer-badge
wesbiggs.detect-heart-coach
wesbiggs.team-sunset-direct
wesbiggs.honey-smart-drip
wesbiggs.lamp-auction-fluid
wesbiggs.sweet-interest-gather
wesbiggs.essence-advance-infant
Different encodings of one of these are all equivalent, and as long as we knew what we were dealing with, could be used according to circumstance, for example, these all locate the same DSNP User Id:
BIP39 wesbiggs.sweet-interest-gather
Base36 wesbiggs.1hih2vx
Hex wesbiggs.c0dd6edd
Decimal wesbiggs.3235737309
Base36 is obviously the most concise but not particularly easy to get a friend to remember. BIP39 seems best for sharing verbally. Decimal is included because that's a lot of the examples we've been talking about, but as you can see from that example it's going to be 10 digits or so on average.
Thanks for posting that Patrick.
For reference, POC code is here: https://github.com/Liberty30/architecture-pocs/tree/main/handles Implementation: https://github.com/Liberty30/architecture-pocs/blob/main/handles/lib/src/main/java/org/dsnp/handles/HandleHelper.java Test/Example: https://github.com/Liberty30/architecture-pocs/blob/main/handles/lib/src/test/java/org/dsnp/handles/HandlesTest.java
Hi all, various apples have hit us on the collective head over the last few days, and we have an option to enable much shorter suffixes (or possibly no suffix at all). Instead of requiring handle + suffix to hash to a specific, sequentially assigned MSA, we can enable non-sequential assignment of MSAs within a predetermined namespace (for now, we are thinking up to 2^32, which is enough for over 4 billion users). Any handle + any suffix will be hashed to one of those 2^32 MSAs. For the most part, this can work exactly like users are used to with a Web2 solution.
Basic rules:
There are a few product/business decisions that we would want to make with this scheme:
Thanks @wesbiggs, I think we'd like to get to a good place with product and eng teams by Wednesday the 1st EOD. Ill look at stakeholder (braxton, kenne, @wilwade and scott )calendars and see if we can get something on the books and close out the spike at that point.
Using the first 32 bits of the Blake2b hash of handle + suffix_bytes, we form an MSA and check if it is already in use. If so, we try a different suffix (perhaps by incrementing the suffix value by one until we find an available one). We can use indexing services to aid in this process, though they won’t be completely authoritative.
This would mean that Msa ids won't be incremental. There might be consequences for this change in msa pallet and other places that we need to verify. Other consequence might be in compression assumptions.
We're now treating the suffixing and hashing semantics as Frequency-specific. However, we may need to specify handles from a DSNP point of view.
This could involve the following:
Generalization - chain-specific handles are one alternative means of addressing/representing a DSNP User Id, there could be others (URI, ...)
If you implement a handle inside of your DSNP System, it must always...
Spike user handles on DSNP technical implementation options
Per meetings see Suggested Approach idea phase doc
We would like to get options to know the boundaries for user handles prefix and suffix implementation.
Things to think about:
@wilwade @wesbiggs @pfrank13 please add more context as you see fit
The artifact of this spike should be a loose design doc on optionality and pros and cons of each implementation idea to share with the larger group of stakeholders.
Starting guidelines: