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

did:dht refactor step 1 #60

Merged
merged 25 commits into from
Apr 18, 2024
Merged

did:dht refactor step 1 #60

merged 25 commits into from
Apr 18, 2024

Conversation

mistermoe
Copy link
Contributor

Summary

this PR includes the first of 3 steps to refactor did:dht creation and resolution.

Overall plan is:

  1. refactor DNS packet package
  2. write bridge classes to convert DID Document resources <-> TXT Records
  3. refactor actual did:dht Create and Resolve

Warning

you'll notice that a dns and dns_packet dir exists now. we've kept dns is the refactor. dns_packet is what's currently being used for did:dht creation and resolution. We'll be deleting dns_packet as part of the final PR.

Changes

  • Refactored dns packet related stuff in order to allow for programmatic creation of individual packets and records
  • Added tests for dns packet encoding and decoding
  • Put a pattern in place for encoding/decoding that removes the need for adding switch statements everywhere. this should streamline adding support for additional RData types (not a priority but eventually would be nice to separate dns related functionality out into its own open source lib)

@ethanwlee ethanwlee merged commit eb6746f into main Apr 18, 2024
1 check failed
@ethanwlee ethanwlee deleted the fix-dht-resolve branch April 18, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants