Skip to content
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

Update did:dht to conform to the latest version of the specification #497

Open
decentralgabe opened this issue Apr 23, 2024 · 3 comments
Open
Assignees

Comments

@decentralgabe
Copy link
Member

decentralgabe commented Apr 23, 2024

There have been a number of changes to the DID DHT spec since implementation, which I've captured below. These changes should be backwards compatible, meaning DIDs you use today will not break.

These changes are already in place in the DID DHT project itself, and you can find passing test vectors here as a reference.

  1. Support the three test vectors listed here: https://did-dht.com/#test-vectors
  2. Support NS records to be set to the publishing gateway (as per https://did-dht.com/#designating-authoritative-gateways, Consider adding NS records to point to gateways did-dht#129)
  3. Always set alg and kid on expansion (to the values in the registry), support overriding of alg values (as per Update spec to include language on default verification relationships, guidance on the alg property did-dht#148)
  4. Support TXT records over 255 characters (as per Address TXT records > 255 characters; make language more consistent; separate section for root records did-dht#162)
  5. Set verification method's controller property, allow overriding (as per add version number and controller property did-dht#102)
  6. Stamp version field in the root record - set to 0 for now (as per add version number and controller property did-dht#102)
  7. Support multiple service endpoints (as per Multiple spec changes - support for aka, controller, ; -> , & list of service endpoints did-dht#86)
  8. Support X25519 (as per Update spec to include language on default verification relationships, guidance on the alg property did-dht#148) - note this is required for the 3rd test vector

Additionally, I would recommend:

  1. Support a republish feature, which is able to take the latest state of a DID DHT document and re-publish it to a gateway.

If not in practice already, it would make sense to expand our "PortableDID" construct to store histories of DID DHT documents and republish should only work on the latest version (seq num).


After this you can anticipate two additional changes to DID DHT pertaining to the following issues:

74 will be a breaking change, though (9) from above paves a path to make it less disruptive.

Please let me know if you have any questions.

@nitro-neal
Copy link
Contributor

nitro-neal commented Apr 25, 2024

ok so in web5-js:

❌ - Not done
🟡 - Needs further investigation
✅ - Done
⌛ - Depriortized (for now)

  1. ❌ Support the three test vectors listed here (Needs to be fully implemented)

  2. ❌ Support NS records to be set to the publishing gateway (needs to be fully implemented)

  3. 🟡 Always set alg and kid on expansion (not sure if this exists currently)

  4. 🟡 Support TXT records over 255 characters
    I don't see anything in the code preventing this, need to create a unit test / consume test vector to confirm we can handle over 255

  5. ✅ Set verification method's controller property (Already done)

  6. ✅ stamp version field in the root record (Already version 0)

  7. ✅ Support multiple service endpoints (already supported)

  8. ⌛ Support X25519 (need to fully implement this, but low-pri as it is considered optional for now)

  9. ⌛ Support a republish feature.

@decentralgabe
Copy link
Member Author

@nitro-neal

5 - looks right
6 - this is fine - my mistake mentioning 1, 0 is correct
8 - would consider this optional for now

@nitro-neal
Copy link
Contributor

Number 3 draft pr - #502

thehenrytsai added a commit that referenced this issue May 7, 2024
… 2 compliance (#514)

- Added support for publishing NS records and fixed bugs to achieve official test vector 2 compliance.
- Removed kid in DNS records according to DID DHT spec update.
- Minor renaming.
- QoL - Updated CODEOWNERS to further increase review efficiency.
- QoL - Added HTML code coverage output for `dids` repo for immediate coverage feedback.
thehenrytsai added a commit that referenced this issue May 24, 2024
1. Vector 3 compliance
2. X25519 support
3. Previous DID link support
4. DNS record chunking support for record > 255 characters (only in context of vector 3 compliance, will need to apply generically in a separate PR that addresses item 4 specifically in #497)
5. Some test refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Status: In Progress
Development

No branches or pull requests

3 participants