HIP 05 and Hyperzones Showcase

Luke Burns takes us through HIP-5, Hyperzones, and decentralized SLDs.


(00:01) [Music] [Applause] so [Music] [Applause] [Music] [Music] [Applause] [Music] all right pretty good all right yeah we got it no we got it we got it all right let’s get out your hair let’s let’s start up uh if i hear silence for a while i’ll come back and check the thing and just message me via text is probably more likely to get to me okay hi i’m luke i’ve been doing lots of uh development on handshake i’ve fallen in love with

(01:05) the the way that handshake has built this really great infrastructure for for the internet and basically my talk will be sharing how these one two three four different domains are resolving records um in various ways the dns records for all four of these do not live on any name server they’re being resolved um off uh the blockchain they’re being resolved off any ordinary name server um so i’m going to go through how we’re doing that for each of these and um for now i want to sort of name two reasons this is this is

(01:51) interesting and why we might want to resolve dns records that don’t live in any centralized name server like putting your records on route 53 or putting your records on name base one reason is it it decentralizes uh the subzones um handshake is is does two things it decentralizes the root zone and it sort of demonopolizes the root zone meaning you can add and remove entries via the rules of handshake and by decentralizing the root zone we solve another problem which is the vulnerability of dns to denial of service attacks

(02:48) and handshake because it’s a blockchain based with with sort of distributed nodes everywhere it’s a decentralized data structure um it is far less vulnerable to denial services attacks which which to which like the icann’s root servers are um of course dns is uh icann has put in lots of effort any any organization that runs name servers they do a lot of uh work to make sure that the name servers stay up and they do a good job doing it but i think it’s worth considering the ways that we can we can build resilience to these types of

(03:32) attacks in other ways and so the second thing that the second reason that these are resolving names this way the second reason that it’s worth considering doing this is um handshake sort of demonopolizes the root zone in that anybody can now register a tld but with handshake there’s a new problem which is that sub-level domains are vulnerable to you know the monopolization of tlds so if you want to get a sub-level domain you really are at the whim of the tld owner and and so you can use what i’m going to share during this talk

(04:22) to offer trust lists sub-level domains for tlds if you are a generous tld owner that’s something you can do okay um if you want to skip to the point this is the library that i’ve been working on for the developers out there take a look um it’s still young still needs lots of documentation but um this is the crux of my talk you can learn here if you’re familiar with how with the tools that you need to get started so let’s start with this this domain ipf.

(05:02) chan zero so chan zero is a tld that i own on the handshake blockchain and um this is serving we’re serving the the records for this domain ipf ipfs.jan0 via a zone file stored on ipfs and um let’s quick go through what it takes to do that hopefully y’all are still with me i’m banking on that okay so we’ve got this zone file here that we’re going to create handycon channel zero zone file for it and it’s got an a record and a text record and i’m going to upload this to ipfs using

(06:06) this really great uh upload tool um which i think i already threw it in there already listed let’s do it again drop it upload all right so we’ve uploaded this file to ipfs using the infuria uh gateway and we’re going to grab the hash we’re going to grab the hash throw it into this cid inspector for ipfs to grab the base32 encoding of it and we need this because we’re going to throw this in an ns record for chan zero which i currently have on name base and we’re going to throw in the dot underscore ipfs

(06:58) dot to indicate that this is a pointer to a file on ipfs and any hip 5 resolver capable of hand capable of handling the ipfs protocol will be able to locate the name server or the zone file for uh so we’re going to set that and since i’m repeating myself it propagates um and you’d ideally do this on the on the blockchain itself i’m doing it on name basis name server for uh convenience um which is partly what i aim to hopefully you’ll not be putting it on abs name service because this is exactly the purpose of this

(07:46) but for the purposes of demoing um now we had a quick serve fail but that was in the background what was happening is we had a recursive resolver that can handle this ipfs record and it digs up this zone file this one that we uploaded um in fact we can do this let’s get the cloudflare ipfs gateway and see that it’s uploaded there we go so we’re on cloud for cloudflare’s ipfs gateway and we see the zone file that we uploaded and that is what the resolver on my computer is grabbing to resolve handycon.chanzero in particular it’s

(08:40) grabbing this a record that points to my server which serves this content and this is the library for the ipfs protocol hit 5 protocol for folks interested in looking at that but one of the main limitations of using ipfs as for zone storage is that um if you’re storing it on the blockchain which you should be um it takes a while to up uh update the records right every time you change your zone file upload to ipfs to change uh you need to go to blockchain change the ipfs hash in your nameserver record in order to update things

(09:34) which is super slow because it takes the blockchain six hours to update um and that is one of the problems that uh this other hip5 protocol based on hyperzones which is a project that i’ve been focused on primarily um and hyperzones are you can think of as like ipfs zone files except you can mutate them you can update them um and you don’t have to change the names the name server on the blockchain um so luke burns is being resolved via a hyperzone and towards the end of this talk i’ll show you what’s happening in the

(10:22) recursive resolver that is um handling all these particles and and what it’s doing if we have time i’m still banking on y’all being with me um so what i’ll do now is is quickly show you um what uh how i’m managing these things called a hyperzone so you can install the hyperzone command liner interface using this command and once you have it installed you can create or edit a zone and once you do so this is an interactive terminal session in which um we have a lot of content here this is the origin

(11:18) for the firms this is the public key this is the thing that is um basically this is this is a public key that identifies um the hyperzone and um instead of the ipfs hash you’ll use this in the ns record and it the command line interface gives you some helpful stuff um this is the ds record that you can put in the parent this is the ns record that you should put in to the parent zone for on the blockchain both of these go on the blockchain um and you can see that this is the public key here and i have this now on the blockchain

(12:08) records this is a tld on name base but now these are actually blockchain records um in here i have the public key um with a a underscore hyperzone uh hip five protocol uh i’ve got what 10 minutes or so 15 minutes okay so let’s quick edit or add a text record handycon text hey handycon and i added a handycon record to this hyperzone and where we connected it if we’re not connected then this might take some time uh let’s dig it and see that was where did we put it handycon so there we go

(13:11) um what happened here was uh got memory leaks but this hyperzone is replicated across all of uh in this case my recursive resolver and others out there that are using the hyperzen particle and then it once it gets the data from that updated hyperzone i can um resolve it like i normally would and it’s pretty quick the replication um library still needs some work so anybody interested in peer-to-peer networking come help me but that’s how this domain is resolving um the uh the record stored in this hyperzone which is where are you right here so

(14:11) this is the uh the dns record by which this domain resolves and none of this data lives on a name server okay powering through so lastly um i want to share the second part which is rather than just serving records from some peer-to-peer from a zone file stored on some peer-to-peer data structure we’re going to look at using hip five the handshake improvement proposal number five i don’t think i mentioned that um it is just a standard for resolving records and i’ll go into more detail later on um but this domain is using

(15:15) um something called the what i call the aliasing protocol hip5 protocol and it is not grabbing records from some decentralized zone storage it is um actually a a sub-level domain for this tld um which i currently own but intend to eventually set to renew only so i i won’t have any control over the records um and once i do that anybody would be able to register a sub domain for this top level domain without any without going through me in any way um or without going through anyone um you don’t need permission and the way it

(16:12) works is you bid on a tld on handshake which is acts as an alias for this subdomain um all right so this domain here is actually the alias for luke.d sub um and that only matters behind the scenes in resolving stuff um but to see how it’s working uh let’s first look at the d sub ns records so you’ve got this wild string here similar to the what we saw with ipfs and hyperzones um but now with the aliasing protocol at the end uh ignore this right now i’ve been working on gateways so that you don’t actually need all of this to

(17:06) resolve stuff but it’s still buggy so for now just um understand that this is a different the third protocol uh we’ve looked at the ipfs protocol the hyperzone vertical and now the aliasing tip 5 protocol and this string here is just a unique id for this tld dsub and we use it to deterministically generate this uh long string that represents luke.

(17:40) d sub and i actually own this domain i bid on it and in one and in this uh in the blockchain records for this uh alias i set a hyperzone um so what’s happening here is luke.dsub is a trustless sublevel domain with records stored on a decentralized uh in a decentralized data structure in this case the hyperzone and you can use whatever you want um but the idea here is that uh there there really isn’t any single server out there that can go down and cause this website to go down and there is nobody preventing you from

(18:36) getting your own sublevel domain here and the way you would do that is let’s look at this um this is how that string is being computed i wanted the subdomain luke and this was the unique string that uh the unique id for d sub if i compute that then i get exactly that uh alias right this is how you compute the alias it’s the base 32 encoding of a blank three hash of the concatenation of the sub level domain um the sublet the label that you want plus the unique id um and there are reasons for doing this not just

(19:31) dsub here that we can discuss if if you’re interested um and what did i want to do oh so um to get a clearer sense of what’s actually happening here now we’re going to transition to it’s already been pretty dev oriented but now it’s going to be even more dev oriented all right so to see what exactly is happening here firstly this is the hipper tool that this starts up a recursive resolver and it uses the aliasing middleware the ipfs middleware and the hyperzone middleware which are uh you what you the

(20:23) these are libraries that i’ve written that you can use to resolve each of these different types of zone files and these slds trustlessly okay so here’s what’s happening um when we try to resolve the a record for luke.d sub um it goes through the aliasing protocol middleware handler and we ask using this data where we can get luke.

(20:53) d and it says oh this is a truncation of this tld um oh you can get it here at this this uh alias and um oh that alias is also a hyperzone so the hyperzone middleware is uh grabbing that request and substituting dsub for the alias and asking for the a record in that in the zone for this um and this is the uh public key for something’s bigger this is the public key for the hyperzone which is on the blockchain right here 3cb 3cb um and then we get this answer uh here is the a record for the alias and then the aliasing protocol comes back and says oh

(21:55) thanks let’s turn it back into the actual sub-level domain and that’s how we get the a record um and in fact we can do this i have a sub-sub-level domain which is an ipfs zone file for this sub-sub-domain um and so we’re composing three different hip five middle uh protocols first the aliasing then the hyperzone then the ipfs uh handlers and it gets us back this guy right here which is stored on ipfs um yeah okay i i’m still hoping and with me if not please

(22:57) um if you’re looking for the aliasing protocol here’s the library for the middleware for that um are you all with me yeah we’re here with you luke i just wanted to actually uh tell you that you got about five minutes left uh there are two q a questions i don’t know if you wanted to answer them or if you just want to use this five minutes to keep talking about what you’re talking about nope i am i am done uh the only thing i wanted to point people to was this is all happening using um a a slight abuse of this hip five

(23:35) protocol which goes like something like this where uh all of these protocols work something like this you get a request or recursive resolver which asks the root uh resolver of a handshake node for requests and it gets the name server with this protocol and then that’s how you head off to in this case this is a way to resolve records stored on the ethereum blockchain um i personally have the opinion that records should not be stored on blockchains um there are lots of lighter weight peer-to-peer data structures that are i think are are

(24:14) better but this if you’re interested in it hip five check it out this is the standard that that this is all based on and the library that i’m using is hipper under active development come help that’s it um thanks for your attention all right cool and if you can uh touch on these q a really quick uh matt was just asking can you put the website on ipfs as well oh i i that’s that’s as soon as i get all this more stable that is the next step um in fact i not only want to resolve websites via ipfs i want to

(24:58) resolve websites via another hyper core based data structure that the thing that hyperzones are based on are called hypercores um by the developer that goes by mafintosh is incredible i highly recommend you check out hypercore um it’s it’s amazing um so yeah i hope to do uh rendering content from decentralized data structures as well okay question are the hyperzones viewable on the web or on the blockchain um they are available um so this is an important question and i’ve sort of glossed over how this works

(25:43) they do not live on a blockchain and in order to get one you need to find a peer that has one and um i’m i think that this is a really good use case um uh dns resolvers are a really good use case for d for being both dns servers and dht nodes distributed hash table nodes which is uh how you find hyperzones right it this is how ipfs works you grab your uh you can find the content for a hash by going to a dht which is a this just this data structure that’s super interesting um but that’s how you find it and this

(26:36) works the same way and rather than just having it out on the dht we will just have a bunch of resolvers dns resolvers that have a copy a replica of a hyperzone and they replicate it in a swarm of dns resolvers um so yeah i think that’s that’s my best answer your question now that getting that right is getting replication of hyperzones right is a big next step that uh i need to dig into all right awesome uh that was well that’s all the q a that we have uh time for luke thank you for giving your time explaining hip five and hyper zones uh i

(27:22) can tell that the technical crowd liked it very much i did not understand very much of it but that’s okay um all right so we’re gonna go into a break now and then we’ll get back with paul webb and he’s going to talk about registrars and uh registries um so we’ll see you all there thanks everybody yeah thank you luke yeah i really enjoyed that [Music] [Applause] [Music] god [Music] kinetic

(28:31) is a blockchain crypto investment firm based in hong kong and puerto rico [Music] founded in 2016 they were the first fund in hong kong and one of the earliest in asia with a portfolio of over 220 companies they received investors in such projects as ethereum parity and polka dot solana ftx and of course handshake in name base [Music] founder johann chu was an active investor and supporter of the handshake ecosystem over 100 000 domains co-founder of d-web foundation co-founder of handicon and sponsor of the handshake house at miami

(29:11) hack week 2022 [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] uh [Music] oh