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

Proposal: Add class HNS for basic blockchain metadata #443

Open
pinheadmz opened this issue May 5, 2020 · 4 comments
Open

Proposal: Add class HNS for basic blockchain metadata #443

pinheadmz opened this issue May 5, 2020 · 4 comments

Comments

@pinheadmz
Copy link
Member

Background

We're all familiar with the IN class ("internet"):

$ dig google.com IN A
...
google.com.             300     IN      A       142.250.64.110

There are a few other lesser-known and less useful classes that are supposed to be used on local networks only, such as CH ("chaos" class):

$ dig @jay.ns.cloudflare.com version.bind CH TXT
...
version.bind.           86400   CH      TXT     "20171212"

There are a few others specified in section 3.2.4 of rfc1035: IN, CS, CH, and HS.

Currently hsd and hnsd only support IN.

Proposal

I had this idea specifically for hnsd because the program has no rpc interface or actually, no interface at all except the recursive resolver. However since it is a blockchain-processing application, it should have features that allow the user to ensure they are at least synced properly and confident that they are resolving names on the most-work chain.

I propose we add a unique class to hsd and hnsd both: HNS so a user can verify very simple blockchain status data like the current tip.

Example

$ dig @127.0.0.1 hash.tip HNS TXT
...
hash.tip             0    HNS          TXT      "0000000000000274523871d00ba2837cb6227038053af91f35f674086b4393d1"
@pinheadmz
Copy link
Member Author

@chjj @mikedamm any thoughts?

@dnsguru
Copy link

dnsguru commented May 20, 2020

@pinheadmz Here is an idea that I suggest might work...
Hesiod (Wikipedia Article) is a class that was used to shuttle TXT records around - it already exists, would likely stretch to fit the purpose

Hesiod class records would look like this

hash.tip  0   HS  TXT  "0000000000000274523871d00ba2837cb6227038053af91f35f674086b4393d1"
  • They can coexist within a zone file along side IN or others, and
  • They will likely cause fewer interop issues with legacy stuff out there as they might evolve, and
  • An added benefit, HS = Handshake, and
  • One less character

@pinheadmz
Copy link
Member Author

An added benefit, HS = Handshake,

🚀

@james-stevens
Copy link
Contributor

james-stevens commented Feb 25, 2021

If you are querying hsd directly, this could be a workable solution, although I wouldn't just hijack somebody else's class. CLASS is a 16 bit number, so there's plenty of other values to choose from.

However, if you were trying to get other DNS servers (resolvers etc) to be able to propagate the records, I suspect you will have a lot of problems when you go outside the IN class.

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

No branches or pull requests

3 participants